brand.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view class="container clearfix" >
  3. <view class="banner" :style="{paddingBottom :isIphoneX ? '120rpx' : '60rpx'}" v-if="isBannerHome">
  4. <image :class="'banner-img'+index" :src="item" mode="" v-for="(item,index) in image1" :key="index"></image>
  5. </view>
  6. <view class="banner" :style="{paddingBottom :isIphoneX ? '120rpx' : '60rpx'}" v-if="isBannerOems">
  7. <image :class="'banner-imgs'+(index+1)" :src="item" mode="" v-for="(item,index) in image2" :key="index"></image>
  8. </view>
  9. <view class="container-btn" :style="{paddingBottom :isIphoneX ? '68rpx' : '34rpx'}">
  10. <view class="btn" @click="NavToH5Page(1)">
  11. <view class="btn-text small">BRAND OEM SERVICE</view>
  12. <view class="btn-text">品牌OEM服务</view>
  13. </view>
  14. <view class="btn" @click="NavToH5Page(2)" v-if="isBannerHome">
  15. <view class="btn-text small">KNOW MORE ABOUT CAIMEI365</view>
  16. <view class="btn-text">查看更多</view>
  17. </view>
  18. <view class="btn" @click="NavToH5Page(3)" v-if="isBannerOems">
  19. <view class="btn-text">BACK</view>
  20. <view class="btn-text">返回首页</view>
  21. </view>
  22. </view>
  23. <!-- 侧边 -->
  24. <scroll-top :isScrollTop="isScrollTop" :bottom="300"></scroll-top>
  25. </view>
  26. </template>
  27. <script>
  28. import { mapState,mapMutations} from 'vuex';
  29. export default{
  30. data(){
  31. return{
  32. isIphoneX:this.$store.state.isIphoneX,
  33. isBannerHome:true,
  34. isBannerOems:false,
  35. image1:[
  36. 'https://www.caimei365.com//img/investment/h5_1.jpg',
  37. 'https://www.caimei365.com//img/investment/h5_2.jpg',
  38. 'https://www.caimei365.com//img/investment/h5_3.jpg'
  39. ],
  40. image2:[
  41. 'https://www.caimei365.com//img/investment/h5_4.jpg',
  42. 'https://www.caimei365.com//img/investment/h5_5.jpg'
  43. ],
  44. isScrollTop:false
  45. }
  46. },
  47. onLoad(option) {
  48. },
  49. methods:{
  50. NavToH5Page(index) {//跳转H5超皮秒防伪查询
  51. switch(index){
  52. case 1:
  53. this.$api.navigateTo(`/h5/pages/activity/activity?id=223`)
  54. break;
  55. case 2:
  56. this.isBannerHome = false
  57. this.isBannerOems = true
  58. break;
  59. case 3:
  60. this.isBannerHome = true
  61. this.isBannerOems = false
  62. break;
  63. }
  64. }
  65. },
  66. onPageScroll(e){//实时获取到滚动的值
  67. if(e.scrollTop>400){
  68. this.isScrollTop = true
  69. }else{
  70. this.isScrollTop = false
  71. }
  72. },
  73. onShow() {
  74. }
  75. }
  76. </script>
  77. <style lang="scss">
  78. page{
  79. background-color: #FFFFFF;
  80. }
  81. .container{
  82. width: 100%;
  83. height: auto;
  84. .container-btn{
  85. width: 100%;
  86. box-sizing: border-box;
  87. padding: 7rpx 24rpx;
  88. background-color: #FFFFFF;
  89. position: fixed;
  90. display: flex;
  91. bottom: 0;
  92. left: 0;
  93. z-index: 999;
  94. .btn{
  95. flex: 1;
  96. background-image: linear-gradient(270deg, #1045e1 0%, #2bb4ff 100%);
  97. line-height: 84rpx;
  98. border-radius: 42rpx;
  99. text-align: center;
  100. font-size: 26rpx;
  101. color: #FFFFFF;
  102. padding: 13rpx;
  103. box-sizing:border-box;
  104. margin: 0 10rpx;
  105. .btn-text{
  106. width: 100%;
  107. height: 29rpx;
  108. float: left;
  109. line-height: 29rpx;
  110. font-size: $font-size-24;
  111. color: #FFFFFF;
  112. text-align: center;
  113. &.small{
  114. font-size: 18rpx;
  115. }
  116. }
  117. }
  118. }
  119. .banner{
  120. width: 100%;
  121. height: auto;
  122. float: left;
  123. .banner-img0{
  124. width: 100%;
  125. height: 1817rpx;
  126. display: block;
  127. }
  128. .banner-img1{
  129. width: 100%;
  130. height: 2677rpx;
  131. display: block;
  132. }
  133. .banner-img2{
  134. width: 100%;
  135. height: 1678rpx;
  136. display: block;
  137. }
  138. .banner-imgs1{
  139. width: 100%;
  140. height: 2403rpx;
  141. display: block;
  142. }
  143. .banner-imgs2{
  144. width: 100%;
  145. height: 1077rpx;
  146. display: block;
  147. }
  148. .banner-img4{
  149. width: 100%;
  150. height: 2500rpx;
  151. display: block;
  152. }
  153. }
  154. }
  155. </style>