fix: 修改微信
This commit is contained in:
parent
69f8f46f0e
commit
11e9702553
25
reduce.html
25
reduce.html
|
@ -234,26 +234,21 @@
|
|||
if (res.code == 200) {
|
||||
sessionStorage.setItem("lastid", self.goodInfo.product_id);
|
||||
this.orderId = res.data.order_number;
|
||||
|
||||
let ua = navigator.userAgent.toLowerCase(); //判断用户打开链接环境
|
||||
if (self.plaflam == 1) {
|
||||
//支付宝-微信环境中不能唤起支付宝
|
||||
self.toLinkAlipay();
|
||||
}
|
||||
if (self.plaflam == 2) {
|
||||
//微信
|
||||
// if (ua.indexOf("dingtalk") > -1) {
|
||||
// //在钉钉内置环境打开,不能唤起微信小程序
|
||||
// self.openErrorDialog("请在其他浏览器打开!");
|
||||
// } else {
|
||||
if (this.goodInfo.entity.is_webview == 1) {
|
||||
// 第一步:如果是微信
|
||||
if (ua.match(/MicroMessenger/i) == "micromessenger") {
|
||||
this.publicCollection(res.data.order_number);
|
||||
} else {
|
||||
//唤起微信福利官小程序
|
||||
window.location.replace(res.data.redirect_url);
|
||||
return
|
||||
}
|
||||
|
||||
// }
|
||||
// 如果是支付宝
|
||||
if (ua.match(/Alipay/i) == "alipay") {
|
||||
self.toLinkAlipay();
|
||||
return;
|
||||
}
|
||||
// 其它方式 唤起微信福利官小程序
|
||||
window.location.replace(res.data.redirect_url);
|
||||
} else {
|
||||
self.openErrorDialog(res.message);
|
||||
if (res.code == 403) {
|
||||
|
|
Loading…
Reference in New Issue