Commit f6780eff by 姜雷

修改登出后跳转逻辑

parent b767d38b
...@@ -6,9 +6,12 @@ import { IMyApp } from '../../app'; ...@@ -6,9 +6,12 @@ import { IMyApp } from '../../app';
const app = getApp<IMyApp>(); const app = getApp<IMyApp>();
Page({ Page({
onLoad() { onLoad(option) {
console.log(option);
if (app.globalData.token) { if (app.globalData.token) {
this.tokenLoagin(); this.tokenLoagin();
} else if (option.logout) {
// this.codeLogin();
} else { } else {
this.codeLogin(); this.codeLogin();
} }
......
...@@ -52,7 +52,7 @@ Component({ ...@@ -52,7 +52,7 @@ Component({
{ {
name: '退出登录', name: '退出登录',
icon: '../../../images/btn_Sign_out@2x.png', icon: '../../../images/btn_Sign_out@2x.png',
url: '/pages/index/index', url: '/pages/index/index?logout=true',
reLaunch: true, reLaunch: true,
}, },
{}, {},
......
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 to comment