hall.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <template>
  2. <view class="center">
  3. <view class="top">
  4. <image class="top-bg" src="../../static/img/hall-bg.png" mode=""></image>
  5. <view class="title">易趣会馆</view>
  6. </view>
  7. <view class="hall-main"><image src="../../static/img/hell-main.png" mode=""></image></view>
  8. <view class="hall-center">
  9. <view class="shingle-main" v-for="(item, index) in list" :key="index" @click="nav(item)">
  10. <view class="shingle-bg"><image :src="item.image" mode=""></image></view>
  11. <view class="shinglem-title flex">
  12. <image class="tbg" src="../../static/img/tbg-left.png" mode=""></image>
  13. <view class="shinglemt-center">
  14. <image class="address" src="../../static/img/address.png" mode=""></image>
  15. <view class="shingle-font">{{ item.name }}</view>
  16. </view>
  17. <image class="tbg" src="../../static/img/tbg-right.png" mode=""></image>
  18. </view>
  19. <view class="shingle-mmain flex">
  20. <view class="smmain-item">
  21. <view class="smitem-top">开放中</view>
  22. <view class="smitem-bottom">状态</view>
  23. </view>
  24. <view class="shu"></view>
  25. <view class="smmain-item">
  26. <view class="smitem-top clamp">{{ item.nickname }}</view>
  27. <view class="smitem-bottom clamp">馆长</view>
  28. </view>
  29. <view class="shu"></view>
  30. <view class="smmain-item">
  31. <view class="people flex">
  32. <view class="peopleitem" v-for="item in 1"><image src="../../static/img/busy.png" mode=""></image></view>
  33. <view class="peopleitem" v-for="item in 4"><image src="../../static/img/leisure.png" mode=""></image></view>
  34. </view>
  35. <view class="smitem-bottom">流畅</view>
  36. </view>
  37. </view>
  38. <image class="right-bottom" src="../../static/img/right-bottom.png" mode=""></image>
  39. </view>
  40. </view>
  41. <u-tabbar activeColor="#f42b4e" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar>
  42. </view>
  43. </template>
  44. <script>
  45. import { tabbar } from '@/utils/tabbar.js';
  46. import { auction_gu } from '@/api/hall.js';
  47. export default {
  48. data() {
  49. return {
  50. tabbar: tabbar,
  51. current: 2,
  52. list: [],
  53. page: 1,
  54. limit: 10,
  55. loadingType: 'more'
  56. };
  57. },
  58. onShow() {
  59. this.loadData();
  60. },
  61. methods: {
  62. loadData() {
  63. const obj = this;
  64. if (obj.loadingType == 'nomore' || obj.loadingType == 'loading') {
  65. return;
  66. }
  67. obj.loadingType = 'loading';
  68. auction_gu({ pages: obj.page, limit: obj.limit })
  69. .then(({ data }) => {
  70. console.log(data);
  71. this.list = data;
  72. })
  73. .catch(e => {
  74. console.log(e);
  75. });
  76. },
  77. nav(item) {
  78. uni.navigateTo({
  79. url: '/pages/hall/halllist?id=' + item.id + '&name=' + item.name + '&peoplename=' + item.nickname
  80. });
  81. }
  82. }
  83. };
  84. </script>
  85. <style lang="less">
  86. .center,
  87. page {
  88. height: auto;
  89. min-height: 100%;
  90. background: #ffffff;
  91. }
  92. .top {
  93. position: relative;
  94. width: 750rpx;
  95. height: 346rpx;
  96. .top-bg {
  97. position: absolute;
  98. top: 0;
  99. left: 0;
  100. right: 0;
  101. width: 750rpx;
  102. height: 346rpx;
  103. }
  104. .title {
  105. padding-top: 20rpx;
  106. text-align: center;
  107. position: relative;
  108. z-index: 2;
  109. font-size: 36rpx;
  110. font-family: PingFang SC;
  111. font-weight: bold;
  112. color: #ffffff;
  113. }
  114. }
  115. .hall-main {
  116. margin: -252rpx auto 0;
  117. width: 700rpx;
  118. height: 300rpx;
  119. image {
  120. width: 100%;
  121. height: 100%;
  122. }
  123. }
  124. .hall-center {
  125. margin-top: 34rpx;
  126. }
  127. .shingle-main {
  128. margin: 20rpx auto;
  129. width: 690rpx;
  130. height: 218rpx;
  131. position: relative;
  132. .shingle-bg {
  133. position: absolute;
  134. top: 0;
  135. left: 0;
  136. right: 0;
  137. width: 690rpx;
  138. height: 218rpx;
  139. image {
  140. width: 690rpx;
  141. height: 218rpx;
  142. }
  143. }
  144. .shinglem-title {
  145. position: relative;
  146. z-index: 2;
  147. justify-content: center;
  148. height: 70rpx;
  149. .tbg {
  150. height: 70rpx;
  151. width: 40rpx;
  152. }
  153. .shinglemt-center {
  154. display: flex;
  155. align-items: center;
  156. background: rgba(220, 38, 43, 0.66);
  157. }
  158. .address {
  159. width: 28rpx;
  160. height: 30rpx;
  161. }
  162. .shingle-font {
  163. font-size: 36rpx;
  164. font-family: PingFang SC;
  165. font-weight: bold;
  166. color: #ffffff;
  167. line-height: 70rpx;
  168. margin-left: 14rpx;
  169. }
  170. }
  171. .shingle-mmain {
  172. position: relative;
  173. z-index: 2;
  174. margin-top: 30rpx;
  175. .smmain-item {
  176. width: 33%;
  177. display: flex;
  178. flex-direction: column;
  179. align-items: center;
  180. .smitem-top {
  181. text-align: center;
  182. width: 90%;
  183. font-size: 30rpx;
  184. font-family: PingFang SC;
  185. font-weight: bold;
  186. color: #ffffff;
  187. }
  188. .smitem-bottom {
  189. margin-top: 10rpx;
  190. font-size: 30rpx;
  191. font-family: PingFang SC;
  192. font-weight: 500;
  193. color: #ffffff;
  194. }
  195. .people {
  196. justify-content: center;
  197. .peopleitem {
  198. width: 24rpx;
  199. height: 34rpx;
  200. image {
  201. width: 100%;
  202. height: 100%;
  203. }
  204. }
  205. }
  206. }
  207. .shu {
  208. width: 2rpx;
  209. height: 70rpx;
  210. background: #ffffff;
  211. }
  212. }
  213. .right-bottom {
  214. position: absolute;
  215. z-index: 2;
  216. right: 0;
  217. bottom: 0;
  218. width: 94rpx;
  219. height: 92rpx;
  220. }
  221. }
  222. </style>