meobohui-booth.vue 4.6 KB

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