耀实惠小程序
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.

184 lines
5.0 KiB

  1. <template>
  2. <view class="vip flex-1">
  3. <view class="vip-header flex">
  4. <view class="flex align-start vip-header-avatar">
  5. <u-avatar :src="src" size="120"></u-avatar>
  6. <text class="font-28 text-white m-l-20 m-t-10">今今呀呀~</text>
  7. </view>
  8. </view>
  9. <view class="vip-container position-absolute bg-white flex">
  10. <scroll-view scroll-y>
  11. <view class="vip-container-box">
  12. <view class="vip-container-box-title flex align-center justify-center m-b-30">
  13. <view class="vip-container-box-title-icon"><image :src="vipImg" mode="widthFix"></image></view>
  14. <text class="m-l-10 font-32 text-black font-weight-bold">会员购物 更省钱更实惠</text>
  15. </view>
  16. <view class="vip-container-box-grid flex align-center justify-between flex-wrap">
  17. <view
  18. class="vip-container-box-grid-item flex flex-column align-center justify-center m-b-16"
  19. :class="{ 'vip-container-box-grid-item-active': gridActive === item.id }"
  20. v-for="item in gridData"
  21. :key="item.id"
  22. @click="gridActive = item.id"
  23. >
  24. <text class="font-34 grid-text font-weight-bold m-b-16">{{ item.name }}</text>
  25. <text class="font-30 grid-text m-b-16">{{ item.price }}</text>
  26. <view class="grid-text grid-scale">
  27. <text>原价</text>
  28. <text class="text-through">{{ item.originalPrice }}</text>
  29. </view>
  30. </view>
  31. </view>
  32. <view>
  33. <view class="vip-container-box-tips flex align-center m-b-30">
  34. <view class="vip-container-box-tips-icon"><image :src="vipImg" mode="widthFix"></image></view>
  35. <text class="m-l-10 font-32 text-black font-weight-bold">次卡专属权益</text>
  36. </view>
  37. <view class="vip-container-box-list flex align-center m-b-16">
  38. <image class="vip-container-box-list-icon" :src="tipImg" mode="widthFix"></image>
  39. <text class="m-l-16 font-28 text-black font-weight-bold">有效期30分钟</text>
  40. </view>
  41. <view class="vip-container-box-list flex align-center m-b-16">
  42. <image class="vip-container-box-list-icon" :src="tipImg" mode="widthFix"></image>
  43. <text class="m-l-16 font-28 text-black font-weight-bold">有效期30分钟</text>
  44. </view>
  45. <view class="vip-container-box-list flex align-center m-b-16">
  46. <image class="vip-container-box-list-icon" :src="tipImg" mode="widthFix"></image>
  47. <text class="m-l-16 font-28 text-black font-weight-bold">开通后可享受次卡会员价和返消费金</text>
  48. </view>
  49. </view>
  50. </view>
  51. </scroll-view>
  52. </view>
  53. <view class="position-fixed vip-btn overflow-hidden flex align-center">
  54. <view class="flex-1 vip-btn-left font-34 flex align-center justify-center h-100">
  55. <view class="flex align-end lineHeight-1">
  56. <text class="vip-btn-left-icon"></text>
  57. <text>365</text>
  58. <text class="vip-btn-left-txt m-l-2">开通即享特权</text>
  59. </view>
  60. </view>
  61. <view class="flex-1 vip-btn-right font-34 flex align-center justify-center h-100 font-weight-bold" @click="open">立即开通</view>
  62. </view>
  63. <!-- <payment-box confirmText="付款" ref="payment" @change="change" @confirm="confirm" @hide="hide"></payment-box> -->
  64. </view>
  65. </template>
  66. <script>
  67. import { IMG_URL } from '@/env.js'
  68. export default {
  69. data() {
  70. return {
  71. vipImg: IMG_URL + 'vip/vip.png',
  72. tipImg: IMG_URL + 'vip/tip.png',
  73. src: IMG_URL + 'test.png',
  74. idData: [
  75. { id: 0, name: '次卡', price: '39元/30分钟', originalPrice: '999' },
  76. { id: 1, name: '银卡', price: '39元/30分钟', originalPrice: '999' },
  77. { id: 2, name: '金卡', price: '39元/30分钟', originalPrice: '999' },
  78. { id: 3, name: '钻石卡', price: '39元/30分钟', originalPrice: '999' }
  79. ],
  80. gridActive: null
  81. };
  82. },
  83. onReady() {
  84. },
  85. methods: {
  86. open() {
  87. console.log('微信支付')
  88. },
  89. }
  90. };
  91. </script>
  92. <style lang="scss" scoped>
  93. .vip {
  94. &-header {
  95. position: absolute;
  96. top: 0;
  97. left: 50%;
  98. transform: translateX(-50%);
  99. width: 110%;
  100. height: 360rpx;
  101. background: #000;
  102. border-radius: 0 0 50% 50%;
  103. padding: 30rpx calc(45rpx + 5vw);
  104. }
  105. &-container {
  106. width: calc(100vw - 32rpx);
  107. height: calc(100vh - 170rpx);
  108. bottom: 0;
  109. left: 50%;
  110. transform: translateX(-50%);
  111. border-radius: 60rpx 60rpx 0 0;
  112. &-box {
  113. padding: 20rpx 58rpx;
  114. &-title {
  115. &-icon {
  116. width: 45rpx;
  117. }
  118. }
  119. &-grid {
  120. margin-bottom: 50rpx;
  121. &-item {
  122. width: 280rpx;
  123. height: 220rpx;
  124. border-radius: 20rpx;
  125. background: #f5f5f5;
  126. &-active {
  127. background: #ffedcf;
  128. .grid-text {
  129. color: #8b5b13;
  130. }
  131. }
  132. }
  133. }
  134. &-tips {
  135. &-icon {
  136. width: 60rpx;
  137. }
  138. }
  139. &-list {
  140. &-icon {
  141. width: 21rpx;
  142. }
  143. }
  144. }
  145. }
  146. &-btn {
  147. left: 50%;
  148. bottom: 50rpx;
  149. transform: translateX(-50%);
  150. width: 620rpx;
  151. height: 90rpx;
  152. border-radius: 40rpx;
  153. &-left {
  154. background: #302f2d;
  155. color: #ffda85;
  156. &-icon {
  157. font-size: 16rpx;
  158. }
  159. &-txt {
  160. font-size: 14rpx;
  161. }
  162. }
  163. &-right {
  164. background: #ffda85;
  165. color: #6f4920;
  166. }
  167. }
  168. }
  169. .grid-text {
  170. color: #000;
  171. }
  172. .grid-scale {
  173. font-size: 18rpx;
  174. }
  175. </style>