Commit cedac2ce authored by mengcuiguang's avatar mengcuiguang

更换包名

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