hall.vue 5.5 KB

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