Commit 0fb5e7c8 by cocomilk2012

update

parent 29a4079f
Showing with 27 additions and 9 deletions
...@@ -253,22 +253,40 @@ export default { ...@@ -253,22 +253,40 @@ 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就走新的充值逻辑;
const userAgent = navigator.userAgent.toLowerCase(); //TODO:安卓的单独判断
if (userAgent.indexOf("qqxbua") != -1) { try {
let tempArr = userAgent.split("qqxbua:"); const userAgent = navigator.userAgent.toLowerCase();
if (tempArr.length > 1) { let isAndroid =
const tempStr = tempArr[1]; userAgent.indexOf("android") > -1 || u.indexOf("adr") > -1; //android终端
const QQXBUA = JSON.parse(tempStr); if (isAndroid) {
let version = QQXBUA.version; let temp = userAgent.split("teammix/")[1];
let version = temp.split("(android")[0];
console.log("version=", version); console.log("version=", version);
if (version < "2.1.9") { if (version < "2.1.9") {
this.toPay_old(); this.toPay_old();
} else { } else {
this.toPay_new(); this.toPay_new();
} }
} else if (userAgent.indexOf("qqxbua") != -1) {
let tempArr = userAgent.split("qqxbua:");
if (tempArr.length > 1) {
const tempStr = tempArr[1];
const QQXBUA = JSON.parse(tempStr);
let version = QQXBUA.version;
console.log("version=", version);
if (version < "2.1.9") {
this.toPay_old();
} else {
this.toPay_new();
}
}
} else {
this.toPay_old();
} }
} else { } catch (error) {
console.log(error);
this.toPay_old(); this.toPay_old();
} }
}, },
......
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