|
|
|
@ -2,13 +2,14 @@ |
|
|
|
<view> |
|
|
|
<view class="flex lf-p-30"> |
|
|
|
<view> |
|
|
|
<image src="../../static/center/shop-logo.png" style="height: 120rpx;width: 120rpx;" mode="aspectFill"></image> |
|
|
|
<image :src="info.avatar" style="height: 120rpx;width: 120rpx;border-radius: 50%;" mode="aspectFill"></image> |
|
|
|
</view> |
|
|
|
<view class="flex flex-direction lf-p-l-20 justify-center"> |
|
|
|
<view class="lf-font-32 lf-m-b-10 text-black1 lf-line-2">时空网的内部网友</view> |
|
|
|
<view class="lf-font-28 lf-color-gray">会员未开通</view> |
|
|
|
<view class="lf-font-32 lf-m-b-10 text-black1 lf-line-2">{{info.nickname}}</view> |
|
|
|
<view class="lf-font-28 lf-color-gray" v-if="!info.isTalnet">会员未开通</view> |
|
|
|
<view class="lf-font-28 lf-color-gray" v-else>会员已开通</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<self-line/> |
|
|
|
<view> |
|
|
|
<view class="lf-p-t-30 lf-p-l-32 lf-flex-wrap"> |
|
|
|
@ -29,13 +30,15 @@ |
|
|
|
<view class="flex justify-between align-center text-center lf-p-l-32 lf-p-r-32 lf-p-t-30 lf-p-b-30 solid-bottom"> |
|
|
|
<view class="flex justify-around align-center text-center"> |
|
|
|
<view class="lf-row-center"> |
|
|
|
<image src="../../static/center/loginout.png" mode="widthFix" style="width: 44rpx;height: 38rpx;"></image> |
|
|
|
<text class="lf-iconfont lf-icon-weixinzhifu lf-font-48" style="color: #09BB07;"></text> |
|
|
|
</view> |
|
|
|
<view class="lf-font-38 lf-m-l-20 lf-w-100 text-black1">微信支付</view> |
|
|
|
<view class="lf-font-36 lf-m-l-20 lf-w-100 text-black1">微信支付</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<image src="../../static/images/system/paysuccess.png" mode="widthFix" style="width: 40rpx;height: 40rpx;"></image> |
|
|
|
<checkbox-group @change="checkboxChangepay" style="display: inline-block;"> |
|
|
|
<checkbox class="lf-text-vertical" style="" :checked="checkedpay"></checkbox> |
|
|
|
</checkbox-group> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -49,7 +52,7 @@ |
|
|
|
</checkbox-group> |
|
|
|
<view class="lf-m-l-10 lf-font-24 lf-color-gray" style="display: inline-block;"> |
|
|
|
<text>已阅读并同意</text> |
|
|
|
<text @click="enterAgree" class="text-orange">《会员服务协议》</text> |
|
|
|
<text @click="enterAgree" class="text-orange">《{{agreement.title}}》</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="padding-lr-lg"> |
|
|
|
@ -66,6 +69,10 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
checked: false, // 是否勾选协议 |
|
|
|
info: {}, |
|
|
|
ifPay: true, |
|
|
|
checkedpay: true, |
|
|
|
agreement: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -73,10 +80,79 @@ |
|
|
|
checkboxChange(event){ |
|
|
|
this.checked = event.detail.value.length > 0; |
|
|
|
}, |
|
|
|
//勾选支付方式 |
|
|
|
checkboxChangepay(event){ |
|
|
|
this.checkedpay = event.detail.value.length > 0; |
|
|
|
}, |
|
|
|
getAgree(){ |
|
|
|
this.$http(this.API.API_WXLOGIN_VIEW,{type: 'vip'}).then(res => { |
|
|
|
this.agreement = res.data.agreement; |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 进入查看协议 |
|
|
|
enterAgree(){ |
|
|
|
this.$url('/pages/agreement/agreement?id='+ this.agreement.article_id); |
|
|
|
}, |
|
|
|
getData(){ |
|
|
|
this.$http(this.API.API_USER_CENTER).then(res => { |
|
|
|
this.info = res.data; |
|
|
|
}) |
|
|
|
}, |
|
|
|
subimitApply() { |
|
|
|
if(!this.checkedpay) { |
|
|
|
this.$msg('请选择付款方式!') |
|
|
|
return |
|
|
|
} |
|
|
|
if(!this.checked) { |
|
|
|
this.$msg('请认真阅读并同意协议!') |
|
|
|
return |
|
|
|
} |
|
|
|
if(!this.ifPay) return; |
|
|
|
this.ifPay = false; |
|
|
|
this.$http(this.API.API_PRPAID, { |
|
|
|
goods_id: 0, |
|
|
|
goods_specs_id: 0, |
|
|
|
number: 1, |
|
|
|
payment_desc: 3, |
|
|
|
share_one: this.info.id |
|
|
|
}).then(res => { |
|
|
|
this.order_id = res.data.order_id |
|
|
|
uni.requestPayment({ |
|
|
|
orderInfo: res.data.order_num, |
|
|
|
timeStamp: res.data.timeStamp, |
|
|
|
nonceStr: res.data.nonceStr, |
|
|
|
package: res.data.package, |
|
|
|
signType: res.data.signType, |
|
|
|
paySign: res.data.paySign, |
|
|
|
success: (res) => { |
|
|
|
this.ifPay = true |
|
|
|
this.$url('/pages/order/pay-success?ifSuccess=1&type=3&order_id='+this.order_id,{type: 'redirect'}) |
|
|
|
}, |
|
|
|
fail: (err) => { |
|
|
|
this.ifPay = true |
|
|
|
this.$url('/pages/order/pay-success?ifSuccess=2&type=3&order_id='+this.order_id,{type: 'redirect'}) |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
this.ifPay = true |
|
|
|
if(err.code == 9997) { |
|
|
|
uni.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '是否同意前往手机授权?', |
|
|
|
success: e => { |
|
|
|
if (!e.confirm) return; |
|
|
|
this.$routerGo('/pages/login/index?type=phone') |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
this.getData() |
|
|
|
this.getAgree() |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|