brand.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. let path ='https://static.caimei365.com/app/caimei-activity-h5/html/2020/caimeih5_99.html'
  54. this.$api.navigateTo(`/pages/h5/activity/activity?link=${path}&title=品牌OEM服务`)
  55. break;
  56. case 2:
  57. this.isBannerHome = false
  58. this.isBannerOems = true
  59. break;
  60. case 3:
  61. this.isBannerHome = true
  62. this.isBannerOems = false
  63. break;
  64. }
  65. }
  66. },
  67. onPageScroll(e){//实时获取到滚动的值
  68. if(e.scrollTop>400){
  69. this.isScrollTop = true
  70. }else{
  71. this.isScrollTop = false
  72. }
  73. },
  74. onShow() {
  75. }
  76. }
  77. </script>
  78. <style lang="scss">
  79. page{
  80. background-color: #FFFFFF;
  81. }
  82. .container{
  83. width: 100%;
  84. height: auto;
  85. .container-btn{
  86. width: 100%;
  87. box-sizing: border-box;
  88. padding: 7rpx 24rpx;
  89. background-color: #FFFFFF;
  90. position: fixed;
  91. display: flex;
  92. bottom: 0;
  93. left: 0;
  94. z-index: 999;
  95. .btn{
  96. flex: 1;
  97. background-image: linear-gradient(270deg, #1045e1 0%, #2bb4ff 100%);
  98. line-height: 84rpx;
  99. border-radius: 42rpx;
  100. text-align: center;
  101. font-size: 26rpx;
  102. color: #FFFFFF;
  103. padding: 13rpx;
  104. box-sizing:border-box;
  105. margin: 0 10rpx;
  106. .btn-text{
  107. width: 100%;
  108. height: 29rpx;
  109. float: left;
  110. line-height: 29rpx;
  111. font-size: $font-size-24;
  112. color: #FFFFFF;
  113. text-align: center;
  114. &.small{
  115. font-size: 18rpx;
  116. }
  117. }
  118. }
  119. }
  120. .banner{
  121. width: 100%;
  122. height: auto;
  123. float: left;
  124. .banner-img0{
  125. width: 100%;
  126. height: 1817rpx;
  127. display: block;
  128. }
  129. .banner-img1{
  130. width: 100%;
  131. height: 2677rpx;
  132. display: block;
  133. }
  134. .banner-img2{
  135. width: 100%;
  136. height: 1678rpx;
  137. display: block;
  138. }
  139. .banner-imgs1{
  140. width: 100%;
  141. height: 2403rpx;
  142. display: block;
  143. }
  144. .banner-imgs2{
  145. width: 100%;
  146. height: 1077rpx;
  147. display: block;
  148. }
  149. .banner-img4{
  150. width: 100%;
  151. height: 2500rpx;
  152. display: block;
  153. }
  154. }
  155. }
  156. </style>