提交 3dbf0901 编写于 作者: DCloud_JSON's avatar DCloud_JSON

更新 修复 App 端打开支付链接出错的问题

上级 eb39105b
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
+ encodeURIComponent('/uni_modules/uni-trade/pages/order-payment/order-payment?order_id='+this.orderInfo.order_id) + encodeURIComponent('/uni_modules/uni-trade/pages/order-payment/order-payment?order_id='+this.orderInfo.order_id)
+ '&oauthToken=' + oauthToken + '&oauthToken=' + oauthToken
console.log('url',url) console.log('url',url)
window.open(url, '_blank') uniIm.utils.openURL(url)
} }
} }
} }
......
...@@ -250,5 +250,25 @@ export default { ...@@ -250,5 +250,25 @@ export default {
}catch(e){ }catch(e){
console.error('getTempFileURL error', e) console.error('getTempFileURL error', e)
} }
} },
openURL(href) {
// #ifdef APP-PLUS
plus.runtime.openURL(href);
return
// #endif
// #ifdef H5
window.open(href)
return
// #endif
// 其他例如:鸿蒙或者小程序环境,直接复制链接
uni.setClipboardData({
data: href
});
uni.showModal({
content: '链接已复制到剪贴板,您可以粘贴到浏览器中打开',
showCancel: false
});
},
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册