hall.vue 4.8 KB

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