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