注销逻辑调整
This commit is contained in:
parent
c3627c8629
commit
8bfa454681
|
@ -203,6 +203,8 @@ export default {
|
||||||
content: "确定注销吗?",
|
content: "确定注销吗?",
|
||||||
showCancel: true,
|
showCancel: true,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
|
if(!res.confirm){return}
|
||||||
|
console.log(res,'res--')
|
||||||
// 确定退出
|
// 确定退出
|
||||||
let u = navigator.userAgent;
|
let u = navigator.userAgent;
|
||||||
let isAndroid =
|
let isAndroid =
|
||||||
|
|
|
@ -189,44 +189,46 @@ export default {
|
||||||
|
|
||||||
toPage(path,item) {
|
toPage(path,item) {
|
||||||
if(item.title === '注销'){
|
if(item.title === '注销'){
|
||||||
|
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "确定注销吗?",
|
content: "确定注销吗?",
|
||||||
showCancel: true,
|
showCancel: true,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
// 确定退出
|
if(res.confirm){
|
||||||
let u = navigator.userAgent;
|
// 确定退出
|
||||||
let isAndroid =
|
let u = navigator.userAgent;
|
||||||
u.indexOf("Android") > -1 || u.indexOf("Adr") > -1; //android
|
let isAndroid =
|
||||||
// let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios
|
u.indexOf("Android") > -1 || u.indexOf("Adr") > -1; //android
|
||||||
try {
|
// let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios
|
||||||
if (isAndroid && AndroidJs) {
|
try {
|
||||||
console.log("%c%s", "color:red", "安卓--调用返回方法");
|
if (isAndroid && AndroidJs) {
|
||||||
const reqRow = {
|
console.log("%c%s", "color:red", "安卓--调用返回方法");
|
||||||
name: "logout",
|
const reqRow = {
|
||||||
data: "",
|
name: "logout",
|
||||||
};
|
data: "",
|
||||||
AndroidJs.func(JSON.stringify(reqRow)); // 给安卓传参
|
};
|
||||||
} else {
|
AndroidJs.func(JSON.stringify(reqRow)); // 给安卓传参
|
||||||
console.log("%c%s", "color:red", "苹果--调用返回方法");
|
} else {
|
||||||
const reqRow = {
|
console.log("%c%s", "color:red", "苹果--调用返回方法");
|
||||||
name: "back-iphone",
|
const reqRow = {
|
||||||
data: "",
|
name: "back-iphone",
|
||||||
};
|
data: "",
|
||||||
window.webkit.messageHandlers.func.postMessage(
|
};
|
||||||
JSON.stringify(reqRow)
|
window.webkit.messageHandlers.func.postMessage(
|
||||||
); // 给ios 传参
|
JSON.stringify(reqRow)
|
||||||
|
); // 给ios 传参
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e, "e-----判断安卓苹果类型出错");
|
||||||
}
|
}
|
||||||
} catch (e) {
|
return
|
||||||
console.log(e, "e-----判断安卓苹果类型出错");
|
|
||||||
}
|
}
|
||||||
return
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!path) return;
|
if (!path) return;
|
||||||
|
|
||||||
useRouter(path, {}, "navigateTo");
|
useRouter(path, {}, "navigateTo");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue