var u = navigator.userAgent;
this.isAndroid = u.indexOf("Android") > -1 || u.indexOf("Adr") > -1; //安卓端
this.isIos = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //IOS端
if (this.isAndroid) {
//安卓
_.$store.commit("setToken", jsBridge.getToken());
}
if (this.isIos) {
//ios
window["getUserPhone"] = function (res) {
const resData = res.split(",");
_.curUserPhone = resData[1];
_.$store.commit("setToken", resData[0]);
};
}
11-03