Commit f3805a8a authored by mengcuiguang's avatar mengcuiguang

代码优化

parent ebc60d19
......@@ -59,8 +59,17 @@
</view>
</view>
<view style="display: flex;flex-direction: column;align-items: center;">
<view style="font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;">
订单中如有疑问,请在个人中心联系客服</view>
<text>请您阅读
<text class="agreementText" @click="goAgreement(1)">《会员服务协议》</text>
<text class="agreementText" @click="goAgreement(2)">《隐私政策》</text>
</text>
<text style="font-size: 30rpx;margin: 20rpx;">
付费须知:
1、会员属于虚拟商品,一经购买不可退换;
2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;
3、充值一般5分钟内到账,如未到账请在“我的”页面联系客服;
</text>
</view>
</scroll-view>
</view>
......@@ -71,7 +80,8 @@
<script>
import common from '@/mixins/common';
import {
message,
message,
navigateTo,
alert
} from '@/utils/fun';
export default {
......@@ -115,6 +125,13 @@
this.$emit('paySuccess', largeType);
this.handleClose();
},
goAgreement(type) {
if (type == 1) {
navigateTo(`/pages/brower/brower?url=https://api.mints-tech.cn/camera-api/agreements/playtogether/syzc.html`)
} else if (type == 2) {
navigateTo(`/pages/brower/brower?url=https://api.mints-tech.cn/camera-api/agreements/playtogether/yhxy.html`)
}
},
handleShow() {
let that = this;
if (wx.getSystemInfoSync().platform == 'ios') {
......@@ -202,55 +219,55 @@
// 符合首充
vipBean = this.firstPayList[0];
}
if(this.os=='ios'){
this.post({
url: '/vip/getVipPayParams',
data: {
vedioId: that.point <= 0 ? null : that.vedioId,
pid: vipBean.pid,
payChannel: 'WEIXIN'
},
showLoading: true,
success: ({
data
}) => {
that.wxPay(data, vipBean.largeType);
}
});
}else{
this.post({
url: '/vip/getVipPayParams/xpay',
data: {
vedioId: that.point <= 0 ? null : that.vedioId,
pid: vipBean.pid,
os: that.os,
payChannel: 'WEIXIN'
},
showLoading: true,
success: ({
data
}) => {
that.wxVirtuallyPay(data, vipBean.largeType);
}
});
if (this.os == 'ios') {
this.post({
url: '/vip/getVipPayParams',
data: {
vedioId: that.point <= 0 ? null : that.vedioId,
pid: vipBean.pid,
payChannel: 'WEIXIN'
},
showLoading: true,
success: ({
data
}) => {
that.wxPay(data, vipBean.largeType);
}
});
} else {
this.post({
url: '/vip/getVipPayParams/xpay',
data: {
vedioId: that.point <= 0 ? null : that.vedioId,
pid: vipBean.pid,
os: that.os,
payChannel: 'WEIXIN'
},
showLoading: true,
success: ({
data
}) => {
that.wxVirtuallyPay(data, vipBean.largeType);
}
});
}
},
wxPay(wxData, largeType) {
let wxParams = wxData.params;
let that = this;
// 发起微信支付
wx.requestPayment({
timeStamp: wxParams.timeStamp,
nonceStr: wxParams.nonceStr,
package: wxParams.packageStr,
signType: wxParams.signType,
paySign: wxParams.paySign,
success(res) {
that.paySuccess(largeType);
},
fail(res) {}
})
},
wxPay(wxData, largeType) {
let wxParams = wxData.params;
let that = this;
// 发起微信支付
wx.requestPayment({
timeStamp: wxParams.timeStamp,
nonceStr: wxParams.nonceStr,
package: wxParams.packageStr,
signType: wxParams.signType,
paySign: wxParams.paySign,
success(res) {
that.paySuccess(largeType);
},
fail(res) {}
})
},
wxVirtuallyPay(wxData, largeType) {
// 虚拟支付
......@@ -359,6 +376,9 @@
display: flex;
flex-direction: column;
align-items: center;
}
.agreementText {
color: #387ef4;
}
.section {
......@@ -442,5 +462,7 @@
transform: translate(0, -50%);
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment