Commit 0fb5e7c8 by cocomilk2012

update

parent 29a4079f
Showing with 20 additions and 2 deletions
...@@ -253,9 +253,23 @@ export default { ...@@ -253,9 +253,23 @@ export default {
//event.persisted是否是缓存 //event.persisted是否是缓存
location.reload(); location.reload();
}; };
//TODO:根据UA判断:如果App版本<2.1.9就走原来的充值逻辑;如果App版本>=2.1.9就走新的充值逻辑; //根据UA判断:如果App版本<2.1.9就走原来的充值逻辑;如果App版本>=2.1.9就走新的充值逻辑;
//TODO:安卓的单独判断
try {
const userAgent = navigator.userAgent.toLowerCase(); const userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf("qqxbua") != -1) { let isAndroid =
userAgent.indexOf("android") > -1 || u.indexOf("adr") > -1; //android终端
if (isAndroid) {
let temp = userAgent.split("teammix/")[1];
let version = temp.split("(android")[0];
console.log("version=", version);
if (version < "2.1.9") {
this.toPay_old();
} else {
this.toPay_new();
}
} else if (userAgent.indexOf("qqxbua") != -1) {
let tempArr = userAgent.split("qqxbua:"); let tempArr = userAgent.split("qqxbua:");
if (tempArr.length > 1) { if (tempArr.length > 1) {
const tempStr = tempArr[1]; const tempStr = tempArr[1];
...@@ -271,6 +285,10 @@ export default { ...@@ -271,6 +285,10 @@ export default {
} else { } else {
this.toPay_old(); this.toPay_old();
} }
} catch (error) {
console.log(error);
this.toPay_old();
}
}, },
toPay_new() { toPay_new() {
console.log("topay_new"); console.log("topay_new");
......
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 sign in to comment