From 87132db907b1609b306d9753861584c2a23ba542 Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Tue, 16 Nov 2021 10:12:22 +0800
Subject: [PATCH] 再次优化跨端通讯

---
 bases/Fetcher.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/bases/Fetcher.js b/bases/Fetcher.js
index 697b59b..a20fe5b 100644
--- a/bases/Fetcher.js
+++ b/bases/Fetcher.js
@@ -187,6 +187,7 @@
         });
     }
 
+    // 小程序中,保存 cookies
     _saveCookies(cookies) {
         const localCookies = JSON.parse(Taro.getStorageSync('cookies') || '{}');
         cookies.forEach(cookie => {
@@ -196,6 +197,7 @@
         Taro.setStorageSync('cookies', JSON.stringify(localCookies));
     }
 
+    // 小程序中,获取 cookies
     _getCookies() {
         const localCookies = JSON.parse(Taro.getStorageSync('cookies') || '{}');
         const cookiesArr = [];
@@ -386,9 +388,9 @@
             if (process.env.TARO_ENV === 'weapp') {
                 Taro.navigateTo({ url: '/pages/home/index/index?mode=login' });
             }
-            // 在App中,直接跳转登陆页
+            // 在App中,跳转到首页取消登陆
             if (project.appHybrid) {
-                Taro.reLaunch({ url: '/pages/home/login/login' });
+                Taro.navigateTo({ url: '/pages/home/index/index?mode=logout' });
             }
             return null;
         } else {

--
Gitblit v1.9.1