meobohui-booth.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view class="container home clearfix">
  3. <!-- 展位图 -->
  4. <view class="container-page clearfix">
  5. <view class="tui-group-list">
  6. <view class="floor-item-booth" v-for="(booths,index) in boothList" :key="index" @click="previewImg(index)">
  7. <view class="floor-item-booth-image">
  8. <image :src="booths.image" class="floor-item-image" mode="" ></image>
  9. </view>
  10. <view class="floor-item-text">
  11. <view class="floor-item-p one">{{booths.name}}</view>
  12. <view class="floor-item-p two">展位号:{{booths.num}}</view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. <!-- 侧边 -->
  18. <scroll-top :isScrollTop="isScrollTop" :bottom="50"></scroll-top>
  19. </view>
  20. </template>
  21. <script>
  22. import authorize from '@/common/config/authorize.js'
  23. import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
  24. import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
  25. import { mapState,mapMutations} from 'vuex';
  26. var isPreviewImg;
  27. export default {
  28. components:{
  29. pageFloor,
  30. supplierList,
  31. },
  32. data() {
  33. return {
  34. userID:0,
  35. current:0,
  36. mode:'round',
  37. modallayer:false,
  38. isLogin:false,
  39. skeletonShow: true,
  40. boothList:[
  41. {image:'http://static.caimei365.com/app/meibohui/meibo_img_02.jpg',name:'GMS(可现场体验)',num:'B区 12.2馆C31'},
  42. {image:'http://static.caimei365.com/app/meibohui/meibo_img_03.jpg',name:'优斐斯',num:'A区 4.2号馆A31'},
  43. {image:'http://static.caimei365.com/app/meibohui/meibo_img_04.jpg',name:'唯美概念(可现场体验)',num:'B区 12.2馆B41'},
  44. {image:'http://static.caimei365.com/app/meibohui/meibo_img_05.jpg',name:'美生美(可现场体验)',num:'B区 12.2馆B39'},
  45. {image:'http://static.caimei365.com/app/meibohui/meibo_img_06.jpg',name:'品辉(可现场体验)',num:'B区 11.2馆H49'},
  46. {image:'http://static.caimei365.com/app/meibohui/meibo_img_07.jpg',name:'和创元(可现场体验)',num:'B区 11.2馆F41'},
  47. {image:'http://static.caimei365.com/app/meibohui/meibo_img_08.jpg',name:'瑞恺迪(可现场体验)',num:'B区 12.2 馆E40'},
  48. {image:'http://static.caimei365.com/app/meibohui/meibo_img_09.jpg',name:'塑美颜(可现场体验)',num:'B区11.2 D41'},
  49. {image:'http://static.caimei365.com/app/meibohui/meibo_img_10.jpg',name:'塑美颜(可现场体验)',num:'B区13.2 K29'}
  50. ],
  51. productImage:[],
  52. isScrollTop:false,
  53. }
  54. },
  55. onLoad() {
  56. //处理商品图片列表
  57. this.boothList.forEach(item =>{
  58. this.productImage.push(item.image);
  59. })
  60. },
  61. computed: {
  62. ...mapState(['hasLogin','userInfo','identity','isActivity'])
  63. },
  64. methods: {
  65. ...mapMutations(['login','logout']),
  66. previewImg (index) {//顶部商品图片预览
  67. isPreviewImg = true
  68. let previewUrls = this.productImage
  69. uni.previewImage({
  70. current: index, //图片索引
  71. urls: previewUrls, //必须是http图片,本地图片无效
  72. longPressActions:''
  73. })
  74. },
  75. },
  76. onPageScroll(e){//实时获取到滚动的值
  77. if(e.scrollTop>400){
  78. this.isScrollTop = true
  79. }else{
  80. this.isScrollTop = false
  81. }
  82. },
  83. onPullDownRefresh() {//下拉刷新
  84. uni.stopPullDownRefresh()
  85. },
  86. onShareAppMessage(res){//分享转发
  87. if (res.from === 'button') {
  88. // 来自页面内转发按钮
  89. }
  90. return {
  91. title: '生美医美正品采购服务平台',
  92. path: '/h5/pages/activity/meobohui',
  93. imageUrl:'https://static.caimei365.com/app/img/bg/min-banner.jpg'
  94. }
  95. },
  96. onShow(){
  97. }
  98. }
  99. </script>
  100. <style lang="scss">
  101. page{
  102. background-color: #F7F7F7;
  103. }
  104. .container-page{
  105. background-color: #F7F7F7;
  106. width: 100%;
  107. height: auto;
  108. box-sizing: border-box;
  109. padding:24rpx;
  110. float: left;
  111. }
  112. .tui-group-list{
  113. width: 100%;
  114. height: auto;
  115. .floor-item-booth{
  116. width: 339rpx;
  117. height: 382rpx;
  118. float: left;
  119. margin-right: 24rpx;
  120. margin-bottom: 24rpx;
  121. background-color: #FFFFFF;
  122. border-radius: 16rpx;
  123. &:nth-child(2n){
  124. margin-right: 0;
  125. }
  126. .floor-item-booth-image{
  127. width: 100%;
  128. height: 240rpx;
  129. .floor-item-image{
  130. width: 100%;
  131. height: 100%;
  132. display: block;
  133. border-radius: 16rpx 16rpx 0 0;
  134. }
  135. }
  136. .floor-item-text{
  137. width: 100%;
  138. height: 142rpx;
  139. box-sizing: border-box;
  140. padding: 31rpx 16rpx;
  141. .floor-item-p{
  142. width: 100%;
  143. line-height: 40rpx;
  144. text-align: left;
  145. font-size: $font-size-24;
  146. white-space: nowrap;
  147. text-overflow: ellipsis;
  148. overflow: hidden;
  149. &.one{
  150. color: #333333;
  151. }
  152. &.two{
  153. color: #999999;
  154. }
  155. }
  156. }
  157. }
  158. }
  159. .container-section{
  160. width: 100%;
  161. height: auto;
  162. background-color: #F7F7F7;
  163. }
  164. </style>