member-record.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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>有效期至:2021-10-01</text>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="cm-member-main">
  16. <view class="record-list" v-for="(pay,index) in payList" :key="index" >
  17. <view class="record-list-type">
  18. <view class="list-type-h1"> {{ pay.text }} </view>
  19. <view class="list-type-p"> {{ pay.time }} </view>
  20. </view>
  21. <view class="record-list-text">
  22. <text v-if="pay.type == 1">¥{{ pay.money }}</text>
  23. <text v-else>{{ pay.money }}采美豆</text>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import { mapState,mapMutations} from 'vuex'
  31. export default {
  32. components:{
  33. },
  34. data() {
  35. return {
  36. StaticUrl:this.$Static,
  37. memberType:0,
  38. tabCurrent:0,
  39. params:{
  40. userId:0,
  41. redemptionCode:'',
  42. source:2,
  43. },
  44. payList:[
  45. {month:'1个月',money:'600',type:1,text:'超级会员套餐-1个月',time:'2021-09-28 13:54:48'},
  46. {month:'3个月',money:'1500',type:1,text:'超级会员套餐-3个月',time:'2021-09-28 13:54:48'},
  47. {month:'12个月',money:'4800',type:1,text:'超级会员套餐-12个月',time:'2021-09-28 13:54:48'},
  48. {month:'12个月',money:'48000',type:2,text:'超级会员套餐-12个月',time:'2021-09-28 13:54:48'},
  49. ],
  50. payAmount:4800,
  51. payBeans:480000,
  52. }
  53. },
  54. onLoad() {
  55. },
  56. filters: {
  57. TypeFormat:function(value) {
  58. switch (value) {
  59. case 0:
  60. return '活动券'
  61. break
  62. case 1:
  63. return '品类券'
  64. break
  65. case 2:
  66. return '用户专享券'
  67. break
  68. case 3:
  69. return '店铺券'
  70. break
  71. case 4:
  72. return '新用户券'
  73. break
  74. }
  75. }
  76. },
  77. computed: {
  78. ...mapState(['hasLogin','userInfo','identity','isActivity'])
  79. },
  80. methods: {
  81. handleCheckedPay(index,pay){// 选择会员
  82. this.tabCurrent = index
  83. this.payAmount = pay.money
  84. this.payBeans = pay.beans
  85. }
  86. },
  87. onPullDownRefresh() {
  88. setTimeout(() => {
  89. uni.stopPullDownRefresh()
  90. }, 200)
  91. },
  92. onShow(){
  93. this.$api.getComStorage('userInfo').then((resolve) =>{
  94. this.params.userId = resolve.userId ? resolve.userId : 0
  95. }).catch(error =>{
  96. console.log('暂无用户信息~')
  97. })
  98. }
  99. }
  100. </script>
  101. <style lang="scss">
  102. .container{
  103. width: 100%;
  104. height: auto;
  105. }
  106. .cm-member-top{
  107. width: 100%;
  108. height: 242rpx;
  109. box-sizing: border-box;
  110. padding: 0 24rpx;
  111. background: url(https://static.caimei365.com/app/img/icon/icon-member-bg01@2x.png) no-repeat;
  112. background-size: cover;
  113. position: relative;
  114. .cm-member-head{
  115. width: 702rpx;
  116. height: 132rpx;
  117. box-sizing: border-box;
  118. padding: 30rpx 32rpx 0 109rpx;
  119. background: url(https://static.caimei365.com/app/img/icon/icon-member-bg02@2x.png) no-repeat;
  120. background-size: cover;
  121. position: absolute;
  122. bottom: 0;
  123. left: 24rpx;
  124. border-radius: 16rpx 16rpx 0 0;
  125. .cm-member-text{
  126. float: left;
  127. .cm-member-h1{
  128. line-height: 42rpx;
  129. font-size: $font-size-30;
  130. color: #55331D;
  131. text-align: left;
  132. margin-bottom: 12rpx;
  133. font-weight: bold;
  134. }
  135. .cm-member-p{
  136. line-height: 30rpx;
  137. font-size: $font-size-22;
  138. color: #55331D;
  139. text-align: left;
  140. }
  141. }
  142. }
  143. }
  144. .cm-member-main{
  145. width: 100%;
  146. box-sizing: border-box;
  147. padding: 40rpx 24rpx;
  148. background-color: #FFFFFF;
  149. margin-bottom: 20rpx;
  150. .record-list{
  151. width: 100%;
  152. height: 135rpx;
  153. border-bottom: 1px solid #F0F0F0;
  154. box-sizing: border-box;
  155. padding: 24rpx 0;
  156. .record-list-type{
  157. float: left;
  158. height: 100%;
  159. .list-type-h1{
  160. line-height: 37rpx;
  161. font-size: $font-size-26;
  162. color: #333333;
  163. text-align: left;
  164. margin-bottom: 16rpx;
  165. }
  166. .list-type-p{
  167. line-height: 33rpx;
  168. font-size: $font-size-24;
  169. color: #999999;
  170. text-align: left;
  171. }
  172. }
  173. .record-list-text{
  174. float: right;
  175. line-height: 86rpx;
  176. font-size: $font-size-34;
  177. color: #FF2A2A;
  178. text-align: right;
  179. }
  180. }
  181. }
  182. </style>