member-renew.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <template>
  2. <view class="container clearfix">
  3. <view class="cm-member-top">
  4. <view class="cm-member-head">
  5. <view class="cm-member-text">
  6. <view class="cm-member-h1">
  7. <text>采美·超级会员</text>
  8. </view>
  9. <view class="cm-member-p">
  10. <text>享专属特权</text>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="cm-member-main">
  16. <view class="title">超级会员套餐</view>
  17. <view class="cm-member-pay">
  18. <view class="pay-item"
  19. v-for="(pay,index) in payList"
  20. :key="index"
  21. :class="{current: tabCurrent === index}"
  22. @click="handleCheckedPay(index,pay)"
  23. >
  24. <view class="hot" v-if="index == 0">推荐</view>
  25. <view class="text-1">{{ pay.month }}</view>
  26. <view class="text-2"> <text>¥</text>{{ pay.money }}</view>
  27. <view class="text-3">{{ pay.text }}</view>
  28. </view>
  29. </view>
  30. <view class="cm-member-button">
  31. <view class="pay-btn pay" @click="hanldPayUrl('/pages/user/member/member-pay')">立即支付{{ payAmount }}元开通</view>
  32. <view class="pay-btn none">抵扣{{ payBeans }}个采美豆开通</view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import { mapState,mapMutations} from 'vuex';
  39. export default {
  40. components:{
  41. },
  42. data() {
  43. return {
  44. StaticUrl:this.$Static,
  45. memberType:0,
  46. tabCurrent:0,
  47. params:{
  48. userId:0,
  49. redemptionCode:'',
  50. source:2,
  51. },
  52. payList:[
  53. {month:'12个月',money:4800,type:1,text:'400元/月',beans:480000},
  54. {month:'3个月',money:1500,type:2,text:'500元/月',beans:150000},
  55. {month:'1个月',money:600,type:3,text:'',beans:60000},
  56. ],
  57. payAmount:4800,
  58. payBeans:480000,
  59. }
  60. },
  61. onLoad() {
  62. },
  63. filters: {
  64. TypeFormat:function(value) {
  65. switch (value) {
  66. case 0:
  67. return '活动券';
  68. break;
  69. case 1:
  70. return '品类券';
  71. break;
  72. case 2:
  73. return '用户专享券';
  74. break;
  75. case 3:
  76. return '店铺券';
  77. break;
  78. case 4:
  79. return '新用户券';
  80. break;
  81. }
  82. }
  83. },
  84. computed: {
  85. ...mapState(['hasLogin','userInfo','identity','isActivity'])
  86. },
  87. methods: {
  88. hanldPayUrl(url){
  89. this.$api.navigateTo(url)
  90. },
  91. handleCheckedPay(index,pay){// 选择会员
  92. this.tabCurrent = index
  93. this.payAmount = pay.money
  94. this.payBeans = pay.beans
  95. }
  96. },
  97. onShow(){
  98. this.$api.getComStorage('userInfo').then((resolve) =>{
  99. this.params.userId = resolve.userId ? resolve.userId : 0;
  100. }).catch(error =>{
  101. console.log('暂无用户信息~')
  102. })
  103. }
  104. }
  105. </script>
  106. <style lang="scss">
  107. .container{
  108. width: 100%;
  109. height: auto;
  110. }
  111. .cm-member-top{
  112. width: 100%;
  113. height: 242rpx;
  114. box-sizing: border-box;
  115. padding: 0 24rpx;
  116. background: url(https://static.caimei365.com/app/img/icon/icon-member-bg01@2x.png) no-repeat;
  117. background-size: cover;
  118. position: relative;
  119. .cm-member-head{
  120. width: 702rpx;
  121. height: 132rpx;
  122. box-sizing: border-box;
  123. padding: 30rpx 32rpx 0 109rpx;
  124. background: url(https://static.caimei365.com/app/img/icon/icon-member-bg02@2x.png) no-repeat;
  125. background-size: cover;
  126. position: absolute;
  127. bottom: 0;
  128. left: 24rpx;
  129. border-radius: 16rpx 16rpx 0 0;
  130. .cm-member-text{
  131. float: left;
  132. .cm-member-h1{
  133. line-height: 42rpx;
  134. font-size: $font-size-30;
  135. color: #55331D;
  136. text-align: left;
  137. margin-bottom: 12rpx;
  138. font-weight: bold;
  139. }
  140. .cm-member-p{
  141. line-height: 30rpx;
  142. font-size: $font-size-22;
  143. color: #55331D;
  144. text-align: left;
  145. }
  146. }
  147. }
  148. }
  149. .cm-member-main{
  150. width: 100%;
  151. box-sizing: border-box;
  152. padding: 40rpx 24rpx;
  153. background-color: #FFFFFF;
  154. margin-bottom: 20rpx;
  155. .title{
  156. font-size: $font-size-32;
  157. line-height: 45rpx;
  158. text-align: left;
  159. color:#55331D;
  160. font-weight: bold;
  161. .small{
  162. font-size: $font-size-24;
  163. color: #E4AA43;
  164. font-weight: normal;
  165. margin-left: 15rpx;
  166. }
  167. }
  168. .cm-member-pay{
  169. width: 100%;
  170. height:236rpx;
  171. margin: 40rpx 0;
  172. .pay-item{
  173. width: 218rpx;
  174. height: 100%;
  175. float: left;
  176. margin-right: 24rpx;
  177. border: 1px solid #F0F0F0;
  178. border-radius: 16rpx;
  179. box-sizing: border-box;
  180. text-align: center;
  181. padding: 40rpx 0;
  182. position: relative;
  183. .hot{
  184. width: 80rpx;
  185. height: 36rpx;
  186. text-align: center;
  187. line-height: 36rpx;
  188. font-size: $font-size-24;
  189. color: #FFFFFF;
  190. background-color: #FF2A2A;
  191. border-radius: 0 8rpx 8rpx 8rpx;
  192. position: absolute;
  193. left: 0;
  194. top: -10rpx;
  195. }
  196. &.current{
  197. background-color: #FDF8EE;
  198. border: 1px solid #F0CC8C;
  199. }
  200. &:last-child{
  201. margin-right: 0;
  202. }
  203. .text-1{
  204. line-height: 40rpx;
  205. font-size: $font-size-28;
  206. margin-bottom: 10rpx;
  207. color: #55331D;
  208. }
  209. .text-2{
  210. line-height: 59rpx;
  211. font-size: $font-size-40;
  212. margin-bottom: 10rpx;
  213. color: #FF2A2A;
  214. font-weight: bold;
  215. text{
  216. font-size: $font-size-26;
  217. }
  218. }
  219. .text-3{
  220. line-height: 33rpx;
  221. font-size: $font-size-24;
  222. color: #666666;
  223. }
  224. }
  225. }
  226. .cm-member-button{
  227. width: 100%;
  228. box-sizing: border-box;
  229. padding: 0 51rpx;
  230. .pay-btn{
  231. width: 100%;
  232. height: 90rpx;
  233. line-height: 90rpx;
  234. border-radius: 50rpx;
  235. text-align: center;
  236. font-size: $font-size-30;
  237. color: #55331D;
  238. box-sizing: border-box;
  239. margin-bottom: $font-size-24;
  240. &.pay{
  241. background: linear-gradient(90deg, #FEE9BA 0%, #F0CB72 100%);
  242. font-weight: bold;
  243. }
  244. &.none{
  245. border: 1px solid #F0CB72;
  246. margin-bottom: 0;
  247. }
  248. }
  249. }
  250. }
  251. </style>