123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- <template>
- <view class="content">
- <view class="top">
- <view class="text" v-if="is_member">会员已与{{member_date}}过期</view>
- <view class="text" v-else>开通会员,立享多种特权</view>
- </view>
- <view class="box">
- <view class="title">全年VIP</view>
- <view class="price">¥{{price}}<span style="font-size: 40rpx;">/年</span></view>
- <view class="title" style="margin: 36rpx 0 20rpx;">会员权益</view>
- <u-parse :content="text"></u-parse>
- </view>
- <view class="bottom">
- <view class="hflex acenter">
- <u-checkbox-group @change="checkboxChange">
- <u-checkbox v-model="agree" shape="circle"></u-checkbox>
- </u-checkbox-group>
- <view class="text">已阅读并同意<span class="read" @click="open(0)">《会员服务协议》</span></view>
- </view>
- <view class="button hflex acenter jcenter" @click="openMember">
- <view>确定协议并开通</view>
- </view>
- </view>
- <u-popup :show="pay_show" @close="close" mode="bottom" :round="20" :closeable="true">
- <view class="popup">
- <view class="title">立即支付</view>
- <view class="price">¥{{price}}</view>
- <view class="text1">支付方式</view>
- <view class="box1 hflex acenter jbetween">
- <view class="hflex acenter">
- <u-icon name="weixin-circle-fill" color="#506dff" size="24"></u-icon>
- <view class="box_right">微信支付</view>
- </view>
- <u-checkbox-group @change="checkboxChange1">
- <u-checkbox v-model="agree1" :checked="true" shape="circle"></u-checkbox>
- </u-checkbox-group>
- </view>
- <view class="btn" @click="pay">立即支付</view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- import $api from '@/static/js/api.js'
- var that = ''
- export default {
- data() {
- return {
- text: `
- <p>权益说明:</p>
- <p>1.纯净去广告,优质外刊原著精读,导师领读;</p>
- <p>2.纯净去广告,优质外刊原著精读,导师领读;</p>
- <p>3.纯净去广告,优质外刊原著精读,导师领读;</p>
- <p>4.纯净去广告,优质外刊原著精读,导师领读,纯净去广告,优质外刊原著精读,导师领读;</p>
- `,
- agree: false,
- agree1: true,
- pay_show: false,
- price: 588,
- is_member: 1,
- member_date: '2022-12-01'
- }
- },
- onLoad() {
- that = this
- },
- methods: {
- // 阅读并同意
- checkboxChange(n) {
- this.agree = !this.agree
- },
- // 选择支付方式
- checkboxChange1(n) {
- this.agree1 = !this.agree1
- },
- // 确定协议并开通
- openMember() {
- if(that.agree) {
- that.pay_show = true
- } else {
- $api.info('请先阅读并同意《会员服务协议》')
- }
-
- },
- // 关闭弹窗
- close() {
- that.pay_show = false
- },
- // 立即支付
- pay() {
- if(that.agree1) {
- that.pay_show = true
- } else {
- $api.info('请先选择支付方式')
- }
- }
- },
- }
- </script>
- <style lang="scss" scoped>
- .content {
- background-color: #e4e8f4;
- .top {
- background: url('/static//images/mine/member_bg.png') no-repeat;
- background-size: 100%;
- width: 100%;
- height: 480rpx;
- .text {
- font-size: 26rpx;
- color: #fff;
- padding: 332rpx 0 0 84rpx;
- }
- }
- .box {
- width: 100%;
- height: calc(100vh - 480rpx);
- background-color: #fff;
- border-radius: 40rpx 40rpx 0 0;
- box-sizing: border-box;
- padding: 36rpx 30rpx;
- margin-bottom: 246rpx;
- .title {
- font-size: 40rpx;
- color: #444;
- }
- .price {
- font-size: 60rpx;
- color: #ff2626;
- padding:34rpx 0 52rpx;
- border-bottom: 1rpx solid #f2f2f2;
- }
- }
- .bottom {
- width: 100%;
- height: 246rpx;
- background-color: #fff;
- box-shadow: 0 -2rpx 16rpx 0 rgba(215,215,215,0.5);
- position: fixed;
- bottom: 0;
- box-sizing: border-box;
- padding: 36rpx 30rpx;
- .text {
- font-size: 24rpx;
- color: #9c9c9c;
- }
- .read {
- color: #2a63f3;
- }
- .button {
- width: 690rpx;
- height: 96rpx;
- background-color: #506dff;
- border-radius: 50rpx;
- box-shadow: 0 4rpx 28rpx 0 rgba(132,123,255,0.4);
- font-size: 40rpx;
- color: #fff;
- margin: 40rpx 0 36rpx;
- }
- }
- .popup {
- width: 100%;
- box-sizing: border-box;
- padding: 48rpx 30rpx;
- background-color: #fff;
- .title {
- width: 100%;
- text-align: center;
- font-size: 36rpx;
- color: #222;
- margin-bottom: 50rpx;
- }
- .price {
- width: 100%;
- text-align: center;
- font-size: 60rpx;
- color: #ff2626;
- margin-bottom: 36rpx;
- }
- .text1 {
- font-size: 30rpx;
- color: #222;
- margin-bottom: 28rpx;
- }
- .box1 {
- width: 100%;
- box-sizing: border-box;
- padding: 36rpx 20rpx;
- background-color: #f6f6f6;
- border-radius: 20rpx;
- .box_img {
- width: 48rpx;
- height: 48rpx;
- }
- .box_right {
- margin-left: 20rpx;
- font-size: 26rpx;
- color: #555;
- }
-
- }
- .btn {
- margin-top: 166rpx;
- width: 670rpx;
- height: 96rpx;
- background-color: #506dff;
- border-radius: 50rpx;
- box-shadow: 0 4rpx 28rpx 0 rgba(132,123,255,0.4);
- font-size: 40rpx;
- color: #fff;
- text-align: center;
- line-height: 96rpx;
- // margin: 40rpx 0 36rpx;
- }
- }
- }
- </style>
|