hall.vue 5.9 KB

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