Commit cedac2ce authored by mengcuiguang's avatar mengcuiguang

更换包名

parent 1adb0589
......@@ -97,7 +97,7 @@
versionName: 'v 1.0.0',
auth: false, // 三要素实名认证
userInfo: null,
pkgName: 'com.mints.minivideo'
pkgName: 'com.mints.dybrightvideo'
}
};
</script>
......
......@@ -2,20 +2,19 @@
<view>
<uni-popup type="bottom" ref="coinPop" :maskClick="false" :isMaskClick="false">
<view style="position: relative;">
<view v-if="agreeFlag"
style="width: 100%;height: 100%;background-color: black;opacity: 0.8;display: flex;position: absolute;z-index: 100;color: white;flex-direction: column;align-items: center;padding:40rpx 0;">
<text style="font-size: 30rpx;">
付费须知 \n
1、看点和会员属于虚拟商品,一经购买不可退换 \n
2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;\n
3、充值看点一般5分钟内到账,如未到账请在“我的”页面联系客服;
</text>
<image @click="agreeFlag=false"
style="width: 30rpx;height: 30rpx;margin-top:150rpx;"
src="@/static/index/ic_quit_white.png"></image>
</view>
<view style="position: relative;">
<view v-if="agreeFlag"
style="width: 100%;height: 100%;background-color: black;opacity: 0.8;display: flex;position: absolute;z-index: 100;color: white;flex-direction: column;align-items: center;padding:40rpx 0;">
<text style="font-size: 30rpx;">
付费须知 \n
1、看点和会员属于虚拟商品,一经购买不可退换 \n
2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;\n
3、充值看点一般5分钟内到账,如未到账请在“我的”页面联系客服;
</text>
<image @click="agreeFlag=false" style="width: 30rpx;height: 30rpx;margin-top:150rpx;"
src="@/static/index/ic_quit_white.png"></image>
</view>
<view class="body" style="width: 100%;height: 100%;">
<scroll-view scroll-y>
<view style="display: flex;flex-direction: column;align-items: flex-end;">
......@@ -27,7 +26,7 @@
</view>
</view>
<view style="display: flex;flex-direction: column;align-items: center;margin-bottom: 20rpx;">
<view style="font-size: 38rpx;color: black;">超多精彩好剧一键解锁</view>
<view style="font-size: 38rpx;color: black;">{{titleText}}</view>
<view class="flex">
<view v-if="point>0" style="display: flex;flex-direction: row;margin-top: 10rpx;">
<view style="font-size: 28rpx;color: #644238;margin-top: 12rpx;">解锁本集:</view>
......@@ -59,7 +58,7 @@
{{item.firstPayPrice}}
</view>
<view class="name row">
<view class="name row" v-if="item.title!=null&&item.title!=''">
{{item.title}}
</view>
......@@ -89,7 +88,7 @@
</view>
</view>
</uni-popup>
</view>
......@@ -122,7 +121,8 @@
vipList: [],
selectedIndex: 0,
agreeFlag: false,
userBean: {},
userBean: {},
titleText: '超多精彩好剧一键解锁',
showClone: false
};
},
......@@ -184,11 +184,6 @@
let that = this;
let vipBean = this.vipList[this.selectedIndex];
// 快手支付
// #ifdef MP-KUAISHOU
// #endif
// 抖音支付
// #ifdef MP-TOUTIAO
this.post({
......@@ -201,92 +196,45 @@
success: ({
data
}) => {
that.ttPay(data, vipBean.largeType);
that.ttPrePay(data, vipBean.largeType);
}
});
// #endif
// 微信虚拟支付
// #ifdef MP-WEIXIN
this.post({
url: '/vip/getVipPayParams/xpay',
data: {
vedioId: that.point <= 0 ? null : that.vedioId,
pid: vipBean.pid
},
showLoading: true,
success: ({
data
}) => {
that.wxVirtuallyPay(data, vipBean.largeType);
}
});
// #endif
},
ttPay(ttData, largeType) {
ttPrePay(ttData, largeType) {
if (!tt.canIUse('requestOrder')) {
message.notify('请升级抖音APP版本');
return
}
let that = this;
tt.pay({
orderInfo: {
order_id: ttData.params.order_id,
order_token: ttData.params.order_token,
},
service: 5,
tt.requestOrder({
data: ttData.params.data,
byteAuthorization: ttData.params.byteAuthorization,
success(res) {
if (res.code == 0) {
// 拉取服务器,是否支付成功
that.queryOrderStatus(largeType, ttData.tidStr)
}
that.ttPay(largeType, res.orderId, ttData);
},
fail(res) {
message.notify(res.errMsg);
// message.notify(res.errMsg);
},
});
},
wxPay(wxData, largeType) {
let wxParams = wxData.params;
ttPay(largeType, oid, ttData) {
if (!tt.canIUse('getOrderPayment')) {
message.notify('请升级抖音APP版本');
return
}
let that = this;
// 发起微信支付
wx.requestPayment({
timeStamp: wxParams.timeStamp,
nonceStr: wxParams.nonceStr,
package: wxParams.packageStr,
signType: wxParams.signType,
paySign: wxParams.paySign,
tt.getOrderPayment({
orderId: oid,
success(res) {
that.queryOrderStatus(largeType, wxData.tid)
that.queryOrderStatus(largeType, ttData.tidStr)
},
fail(res) {}
})
},
wxVirtuallyPay(wxData, largeType) {
// 虚拟支付
let wxParams = wxData.params;
let signDataParams = wxData.params.sigData;
let that = this;
const SDKVersion = wx.getSystemInfoSync().SDKVersion;
if (this.compareVersion(SDKVersion, '2.19.2') >= 0 || wx.canIUse('requestVirtualPayment')) {
wx.requestVirtualPayment({
signData: JSON.stringify(wxData.params.sigData),
paySig: wxParams.paySig,
signature: wxParams.signature,
mode: wxParams.mode,
success(res) {
// 拉取服务器,是否支付成功
that.queryOrderStatus(largeType, wxData.params.sigData.outTradeNo)
},
fail({
errMsg,
errCode
}) {
message.notify(errMsg);
},
})
} else {
message.notify('当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。');
}
fail(res) {
// message.notify(res.errMsg);
},
});
},
queryOrderStatus(largeType, tid) {
let that = this;
......@@ -302,33 +250,6 @@
that.paySuccess(largeType);
}
});
},
compareVersion(_v1, _v2) {
if (typeof _v1 !== 'string' || typeof _v2 !== 'string') return 0
const v1 = _v1.split('.')
const v2 = _v2.split('.')
const len = Math.max(v1.length, v2.length)
while (v1.length < len) {
v1.push('0')
}
while (v2.length < len) {
v2.push('0')
}
for (let i = 0; i < len; i++) {
const num1 = parseInt(v1[i], 10)
const num2 = parseInt(v2[i], 10)
if (num1 > num2) {
return 1
} else if (num1 < num2) {
return -1
}
}
return 0
}
},
watch: {
......
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