Commit f3805a8a authored by mengcuiguang's avatar mengcuiguang

代码优化

parent ebc60d19
...@@ -59,8 +59,17 @@ ...@@ -59,8 +59,17 @@
</view> </view>
</view> </view>
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;align-items: center;">
<view style="font-size: 24rpx;color: gray;margin-top: 16rpx;margin-bottom: 18rpx;"> <text>请您阅读
订单中如有疑问,请在个人中心联系客服</view> <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> </view>
</scroll-view> </scroll-view>
</view> </view>
...@@ -71,7 +80,8 @@ ...@@ -71,7 +80,8 @@
<script> <script>
import common from '@/mixins/common'; import common from '@/mixins/common';
import { import {
message, message,
navigateTo,
alert alert
} from '@/utils/fun'; } from '@/utils/fun';
export default { export default {
...@@ -115,6 +125,13 @@ ...@@ -115,6 +125,13 @@
this.$emit('paySuccess', largeType); this.$emit('paySuccess', largeType);
this.handleClose(); 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() { handleShow() {
let that = this; let that = this;
if (wx.getSystemInfoSync().platform == 'ios') { if (wx.getSystemInfoSync().platform == 'ios') {
...@@ -202,55 +219,55 @@ ...@@ -202,55 +219,55 @@
// 符合首充 // 符合首充
vipBean = this.firstPayList[0]; vipBean = this.firstPayList[0];
} }
if(this.os=='ios'){ if (this.os == 'ios') {
this.post({ this.post({
url: '/vip/getVipPayParams', url: '/vip/getVipPayParams',
data: { data: {
vedioId: that.point <= 0 ? null : that.vedioId, vedioId: that.point <= 0 ? null : that.vedioId,
pid: vipBean.pid, pid: vipBean.pid,
payChannel: 'WEIXIN' payChannel: 'WEIXIN'
}, },
showLoading: true, showLoading: true,
success: ({ success: ({
data data
}) => { }) => {
that.wxPay(data, vipBean.largeType); that.wxPay(data, vipBean.largeType);
} }
}); });
}else{ } else {
this.post({ this.post({
url: '/vip/getVipPayParams/xpay', url: '/vip/getVipPayParams/xpay',
data: { data: {
vedioId: that.point <= 0 ? null : that.vedioId, vedioId: that.point <= 0 ? null : that.vedioId,
pid: vipBean.pid, pid: vipBean.pid,
os: that.os, os: that.os,
payChannel: 'WEIXIN' payChannel: 'WEIXIN'
}, },
showLoading: true, showLoading: true,
success: ({ success: ({
data data
}) => { }) => {
that.wxVirtuallyPay(data, vipBean.largeType); that.wxVirtuallyPay(data, vipBean.largeType);
} }
}); });
} }
}, },
wxPay(wxData, largeType) { wxPay(wxData, largeType) {
let wxParams = wxData.params; let wxParams = wxData.params;
let that = this; let that = this;
// 发起微信支付 // 发起微信支付
wx.requestPayment({ wx.requestPayment({
timeStamp: wxParams.timeStamp, timeStamp: wxParams.timeStamp,
nonceStr: wxParams.nonceStr, nonceStr: wxParams.nonceStr,
package: wxParams.packageStr, package: wxParams.packageStr,
signType: wxParams.signType, signType: wxParams.signType,
paySign: wxParams.paySign, paySign: wxParams.paySign,
success(res) { success(res) {
that.paySuccess(largeType); that.paySuccess(largeType);
}, },
fail(res) {} fail(res) {}
}) })
}, },
wxVirtuallyPay(wxData, largeType) { wxVirtuallyPay(wxData, largeType) {
// 虚拟支付 // 虚拟支付
...@@ -359,6 +376,9 @@ ...@@ -359,6 +376,9 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
}
.agreementText {
color: #387ef4;
} }
.section { .section {
...@@ -442,5 +462,7 @@ ...@@ -442,5 +462,7 @@
transform: translate(0, -50%); transform: translate(0, -50%);
} }
} }
} }
</style> </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