退出问题
This commit is contained in:
parent
b860aea6d2
commit
0d3361b7bc
|
@ -14,7 +14,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="cell-list-box">
|
<view class="cell-list-box">
|
||||||
<view class="cell-list-group">
|
<view class="cell-list-group">
|
||||||
<view class="cell-list-item" v-for="item in cellList" @click="toPage(item.path)">
|
<view class="cell-list-item" v-for="item in cellList" @click="toPage(item.path,item)">
|
||||||
<view class="cell-list-item-left">
|
<view class="cell-list-item-left">
|
||||||
<image
|
<image
|
||||||
style="width: 60rpx; height: 60rpx"
|
style="width: 60rpx; height: 60rpx"
|
||||||
|
@ -172,6 +172,34 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
toPage(path) {
|
toPage(path) {
|
||||||
|
if(item.title === '注销'){
|
||||||
|
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-----判断安卓苹果类型出错");
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
if (!path) return;
|
if (!path) return;
|
||||||
useRouter(path, {}, "navigateTo");
|
useRouter(path, {}, "navigateTo");
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view v-if="true" style="display:flex">
|
<view v-if="true" style="display:flex">
|
||||||
<u-button type="error" @click="testFn">调试录入卡片</u-button>
|
<u-button type="error" @click="testFn">调试录入卡片</u-button>
|
||||||
<u-button type="error" @click="test1Fn">调试token过期</u-button>
|
<!-- <u-button type="error" @click="test1Fn">调试token过期</u-button> -->
|
||||||
</view>
|
</view>
|
||||||
<daySelect @dateChange="onDateChange" />
|
<daySelect @dateChange="onDateChange" />
|
||||||
<view v-if="isToday" class="task-info">
|
<view v-if="isToday" class="task-info">
|
||||||
|
|
|
@ -38,7 +38,8 @@ export default {
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
methods: {
|
methods: {
|
||||||
login1Fn() {
|
login1Fn() {
|
||||||
this.phone = "13800451500";
|
// this.phone = "13800451500";
|
||||||
|
this.phone = "18174010561";
|
||||||
this.pwd = "123456";
|
this.pwd = "123456";
|
||||||
|
|
||||||
const normalTabBar = [
|
const normalTabBar = [
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<view
|
<view
|
||||||
class="cell-list-item"
|
class="cell-list-item"
|
||||||
v-for="item in cellList"
|
v-for="item in cellList"
|
||||||
@click="toPage(item.path)"
|
@click="toPage(item.path,item)"
|
||||||
>
|
>
|
||||||
<view class="cell-list-item-left">
|
<view class="cell-list-item-left">
|
||||||
<image
|
<image
|
||||||
|
@ -187,7 +187,35 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toPage(path) {
|
toPage(path,item) {
|
||||||
|
if(item.title === '注销'){
|
||||||
|
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-----判断安卓苹果类型出错");
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
if (!path) return;
|
if (!path) return;
|
||||||
|
|
||||||
useRouter(path, {}, "navigateTo");
|
useRouter(path, {}, "navigateTo");
|
||||||
|
|
Loading…
Reference in New Issue