金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

171 lines
3.9 KiB

  1. <template>
  2. <view>
  3. <lf-nav title="会员权益" :showIcon="true" :spreadOut="false" bgColor="transparent" titleColor="#fff"></lf-nav>
  4. <view class="head">
  5. <view class="bg-left"></view>
  6. <view class="bg-right"></view>
  7. <scroll-view class="scroll-view" :scroll-x="true" :scroll-into-view="oView">
  8. <view class="head-content">
  9. <view class="item" :id="'view-'+ index"
  10. :style="{width: 100 / 4 +'%'}"
  11. v-for="(item, index) in 5" :key="index"
  12. @click="current = index">
  13. <view class="icon">
  14. <text class="lf-iconfont icon-huiyuan2 lf-color-primary lf-font-60"></text>
  15. </view>
  16. <view class="name">免费雨伞租赁</view>
  17. <view class="active" v-if="current == index"></view>
  18. </view>
  19. </view>
  20. </scroll-view>
  21. </view>
  22. <view class="content">
  23. <view class="primary-title">平时2倍积分</view>
  24. <view class="secondary-title">适用人群</view>
  25. <view class="text">金卡</view>
  26. <view class="secondary-title">特权内容</view>
  27. <view class="text">
  28. <view>1平日购物结账时出示会员码尊享2倍积分</view>
  29. <view>2平日购物结账时出示会员码尊享2倍积分</view>
  30. <view>3平日购物结账时出示会员码尊享2倍积分平日购物结账时出示会员码尊享2倍积分</view>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data(){
  38. return {
  39. current: null, // 当前选中的下标
  40. oView: '' // scroll跳转到哪个view下
  41. }
  42. },
  43. onLoad(options){
  44. // TODO 待对接传入current
  45. // setTimeout(() => {
  46. // this.current = options.current;
  47. // this.oView = `view-${options.current}`;
  48. // }, 500);
  49. },
  50. methods: {
  51. }
  52. }
  53. </script>
  54. <style>
  55. page{
  56. overflow-x: hidden;
  57. }
  58. </style>
  59. <style lang="scss" scoped="scoped">
  60. .head{
  61. width: 750rpx;
  62. height: 443rpx;
  63. background: linear-gradient(90deg, #22A2A0 0%, #187B7A 100%);
  64. position: relative;
  65. overflow: hidden;
  66. display: flex;
  67. align-items: flex-end;
  68. box-sizing: border-box;
  69. color: #FFFFFF;
  70. .bg-left{
  71. position: absolute;
  72. width: 196rpx;
  73. height: 196rpx;
  74. border-radius: 50%;
  75. background-color: rgba(255,255,255,0.04);
  76. left: -92rpx;
  77. bottom: 60rpx;
  78. }
  79. .bg-right{
  80. position: absolute;
  81. width: 520rpx;
  82. height: 520rpx;
  83. border-radius: 50%;
  84. background-color: rgba(255,255,255,0.04);
  85. right: -168rpx;
  86. top: -122rpx;
  87. }
  88. .scroll-view{
  89. height: 236rpx;
  90. width: 750rpx;
  91. .head-content{
  92. width: max-content;
  93. height: 236rpx;
  94. display: flex;
  95. .item{
  96. display: flex;
  97. flex-direction: column;
  98. align-items: center;
  99. box-sizing: border-box;
  100. padding: 0 20rpx;
  101. position: relative;
  102. .icon{
  103. width: 100rpx;
  104. height: 100rpx;
  105. background: #FFFFFF;
  106. border-radius: 50%;
  107. display: flex;
  108. justify-content: center;
  109. align-items: center;
  110. color: #FFFFFF;
  111. }
  112. .name{
  113. width: 148rpx;
  114. margin-top: 10rpx;
  115. font-size: 24rpx;
  116. color: #FFFFFF;
  117. text-align: center;
  118. }
  119. .active{
  120. position: absolute;
  121. bottom: 0;
  122. left: calc(50% - 25rpx);
  123. width: 0rpx;
  124. height: 0rpx;
  125. border-left: 25rpx solid transparent;
  126. border-right: 25rpx solid transparent;
  127. border-bottom: 28rpx solid #FFFFFF;
  128. }
  129. }
  130. }
  131. }
  132. }
  133. .content{
  134. padding: 30rpx 32rpx;
  135. .primary-title{
  136. font-size: 32rpx;
  137. color: #222222;
  138. font-weight: bold;
  139. position: relative;
  140. width: max-content;
  141. z-index: 2;
  142. margin-bottom: 60rpx;
  143. &::before{
  144. position: absolute;
  145. content: '';
  146. bottom: 0;
  147. left: 0;
  148. width: 100%;
  149. height: 16rpx;
  150. border-radius: 8rpx;
  151. background-color: #8AB8B7;
  152. z-index: -1;
  153. }
  154. }
  155. .secondary-title{
  156. font-size: 28rpx;
  157. color: #777777;
  158. margin-bottom: 10rpx;
  159. }
  160. .text{
  161. font-size: 28rpx;
  162. color: #222222;
  163. margin-bottom: 40rpx;
  164. }
  165. }
  166. </style>