Commit 920f239d by sunchao

积分兑换

parent 657746c1
...@@ -123,53 +123,66 @@ ...@@ -123,53 +123,66 @@
orderNo:this.partnerTradeNo, orderNo:this.partnerTradeNo,
amount:this.exchangeAmount, amount:this.exchangeAmount,
userId:uni.getStorageSync('cffp_userId'), userId:uni.getStorageSync('cffp_userId'),
userReName:'孙超'
} }
console.log(JSON.stringify(this.aliWithdrawalResVO)) console.log(JSON.stringify(this.aliWithdrawalResVO))
api.aliWithdrawal(this.aliWithdrawalResVO).then((res)=>{ api.aliWithdrawal(this.aliWithdrawalResVO).then((res)=>{
console.log(res) console.log(res)
if(res['data']['isAuth'] == 1){ if(res['success']){
// APP: if(res['data']['isAuth'] == 1){
// #ifdef APP-PLUS // APP:
let urls= this.aliWithdrawalResVO.aliAuthUrl; // #ifdef APP-PLUS
urls=encodeURIComponent(urls); let urls= this.aliWithdrawalResVO.aliAuthUrl;
// 判断平台 urls=encodeURIComponent(urls);
if (plus.os.name == 'Android') { // 判断平台
plus.runtime.openURL( if (plus.os.name == 'Android') {
'alipays://platformapi/startapp?appId=20000067&url=' + urls, plus.runtime.openURL(
res => { 'alipays://platformapi/startapp?appId=20000067&url=' + urls,
//这里写打开URL地址失败后的处理 res => {
console.log(res); //这里写打开URL地址失败后的处理
uni.showModal({ console.log(res);
content: '本机未检测到对应客户端,是否打开浏览器访问页面?', uni.showModal({
success: function (res) { content: '本机未检测到对应客户端,是否打开浏览器访问页面?',
if (res.confirm) { success: function (res) {
//plus.runtime.openURL(); if (res.confirm) {
} //plus.runtime.openURL();
} }
}); }
}, });
'com.eg.android.AlipayGphone' },
); 'com.eg.android.AlipayGphone'
} else if (plus.os.name == 'iOS') { );
plus.runtime.openURL( } else if (plus.os.name == 'iOS') {
'alipay://platformapi/startapp?appId=20000067&url=' + urls, plus.runtime.openURL(
res => { 'alipay://platformapi/startapp?appId=20000067&url=' + urls,
console.log(res); res => {
uni.showModal({ console.log(res);
content: '本机未检测到对应客户端,是否打开浏览器访问页面?', uni.showModal({
success: function (res) { content: '本机未检测到对应客户端,是否打开浏览器访问页面?',
if (res.confirm) { success: function (res) {
//plus.runtime.openURL(url); if (res.confirm) {
} //plus.runtime.openURL(url);
} }
}); }
}, });
'com.eg.android.AlipayGphone' },
); 'com.eg.android.AlipayGphone'
);
}
// #endif
} }
// #endif }else{
uni.showModal({
content: res['message'],
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} }
}) })
}, },
//微信去提现 //微信去提现
......
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