123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- <template>
- <view class="container clearfix">
- <view class="cm-member-top">
- <view class="cm-member-head">
- <view class="cm-member-text">
- <view class="cm-member-h1">
- <text>采美·超级会员</text>
- </view>
- <view class="cm-member-p">
- <text>享专属特权</text>
- </view>
- </view>
- </view>
- </view>
- <view class="cm-member-main">
- <view class="title">超级会员套餐</view>
- <view class="cm-member-pay">
- <view class="pay-item"
- v-for="(pay,index) in payList"
- :key="index"
- :class="{current: tabCurrent === index}"
- @click="handleCheckedPay(index,pay)"
- >
- <view class="hot" v-if="index == 0">推荐</view>
- <view class="text-1">{{ pay.month }}</view>
- <view class="text-2"> <text>¥</text>{{ pay.money }}</view>
- <view class="text-3">{{ pay.text }}</view>
- </view>
- </view>
- <view class="cm-member-button">
- <view class="pay-btn pay" @click="hanldPayUrl('/pages/user/member/member-pay')">立即支付{{ payAmount }}元开通</view>
- <view class="pay-btn none">抵扣{{ payBeans }}个采美豆开通</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { mapState,mapMutations} from 'vuex';
- export default {
- components:{
-
- },
- data() {
- return {
- StaticUrl:this.$Static,
- memberType:0,
- tabCurrent:0,
- params:{
- userId:0,
- redemptionCode:'',
- source:2,
- },
- payList:[
- {month:'12个月',money:4800,type:1,text:'400元/月',beans:480000},
- {month:'3个月',money:1500,type:2,text:'500元/月',beans:150000},
- {month:'1个月',money:600,type:3,text:'',beans:60000},
- ],
- payAmount:4800,
- payBeans:480000,
- }
- },
- onLoad() {
-
- },
- filters: {
- TypeFormat:function(value) {
- switch (value) {
- case 0:
- return '活动券';
- break;
- case 1:
- return '品类券';
- break;
- case 2:
- return '用户专享券';
- break;
- case 3:
- return '店铺券';
- break;
- case 4:
- return '新用户券';
- break;
- }
- }
- },
- computed: {
- ...mapState(['hasLogin','userInfo','identity','isActivity'])
- },
- methods: {
- hanldPayUrl(url){
- this.$api.navigateTo(url)
- },
- handleCheckedPay(index,pay){// 选择会员
- this.tabCurrent = index
- this.payAmount = pay.money
- this.payBeans = pay.beans
- }
- },
- onShow(){
- this.$api.getComStorage('userInfo').then((resolve) =>{
- this.params.userId = resolve.userId ? resolve.userId : 0;
- }).catch(error =>{
- console.log('暂无用户信息~')
- })
- }
- }
- </script>
- <style lang="scss">
- .container{
- width: 100%;
- height: auto;
- }
- .cm-member-top{
- width: 100%;
- height: 242rpx;
- box-sizing: border-box;
- padding: 0 24rpx;
- background: url(https://static.caimei365.com/app/img/icon/icon-member-bg01@2x.png) no-repeat;
- background-size: cover;
- position: relative;
- .cm-member-head{
- width: 702rpx;
- height: 132rpx;
- box-sizing: border-box;
- padding: 30rpx 32rpx 0 109rpx;
- background: url(https://static.caimei365.com/app/img/icon/icon-member-bg02@2x.png) no-repeat;
- background-size: cover;
- position: absolute;
- bottom: 0;
- left: 24rpx;
- border-radius: 16rpx 16rpx 0 0;
- .cm-member-text{
- float: left;
- .cm-member-h1{
- line-height: 42rpx;
- font-size: $font-size-30;
- color: #55331D;
- text-align: left;
- margin-bottom: 12rpx;
- font-weight: bold;
- }
- .cm-member-p{
- line-height: 30rpx;
- font-size: $font-size-22;
- color: #55331D;
- text-align: left;
- }
- }
- }
- }
- .cm-member-main{
- width: 100%;
- box-sizing: border-box;
- padding: 40rpx 24rpx;
- background-color: #FFFFFF;
- margin-bottom: 20rpx;
- .title{
- font-size: $font-size-32;
- line-height: 45rpx;
- text-align: left;
- color:#55331D;
- font-weight: bold;
- .small{
- font-size: $font-size-24;
- color: #E4AA43;
- font-weight: normal;
- margin-left: 15rpx;
- }
- }
- .cm-member-pay{
- width: 100%;
- height:236rpx;
- margin: 40rpx 0;
- .pay-item{
- width: 218rpx;
- height: 100%;
- float: left;
- margin-right: 24rpx;
- border: 1px solid #F0F0F0;
- border-radius: 16rpx;
- box-sizing: border-box;
- text-align: center;
- padding: 40rpx 0;
- position: relative;
- .hot{
- width: 80rpx;
- height: 36rpx;
- text-align: center;
- line-height: 36rpx;
- font-size: $font-size-24;
- color: #FFFFFF;
- background-color: #FF2A2A;
- border-radius: 0 8rpx 8rpx 8rpx;
- position: absolute;
- left: 0;
- top: -10rpx;
- }
- &.current{
- background-color: #FDF8EE;
- border: 1px solid #F0CC8C;
- }
- &:last-child{
- margin-right: 0;
- }
- .text-1{
- line-height: 40rpx;
- font-size: $font-size-28;
- margin-bottom: 10rpx;
- color: #55331D;
- }
- .text-2{
- line-height: 59rpx;
- font-size: $font-size-40;
- margin-bottom: 10rpx;
- color: #FF2A2A;
- font-weight: bold;
- text{
- font-size: $font-size-26;
- }
- }
- .text-3{
- line-height: 33rpx;
- font-size: $font-size-24;
- color: #666666;
- }
-
- }
- }
- .cm-member-button{
- width: 100%;
- box-sizing: border-box;
- padding: 0 51rpx;
- .pay-btn{
- width: 100%;
- height: 90rpx;
- line-height: 90rpx;
- border-radius: 50rpx;
- text-align: center;
- font-size: $font-size-30;
- color: #55331D;
- box-sizing: border-box;
- margin-bottom: $font-size-24;
- &.pay{
- background: linear-gradient(90deg, #FEE9BA 0%, #F0CB72 100%);
- font-weight: bold;
- }
- &.none{
- border: 1px solid #F0CB72;
- margin-bottom: 0;
- }
- }
- }
- }
- </style>
|