From fe837c3f5cc3aec41031d0f338a424b8b7949137 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 20 十一月 2024 16:07:14 +0800
Subject: [PATCH] 2024-11-20

---
 src/index.js                                             |   13 +++++++++++--
 src/api/index.js                                         |    7 +------
 src/menu/components/share/actioncomponent/formconfig.jsx |    1 +
 3 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/api/index.js b/src/api/index.js
index f7994bd..93d56cf 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -175,12 +175,7 @@
    * @description 娓稿鐧诲綍
    */
   getTouristMsg (binding_type, appid, openid, memberid, scanId) {
-    let _SessionUid = localStorage.getItem('SessionUid')
-
-    if (!_SessionUid) { // 鎵嬪姩娓呴櫎SessionUid鏃讹紝瀹炴椂鐢熸垚
-      _SessionUid = Utils.getuuid()
-      localStorage.setItem('SessionUid', _SessionUid)
-    }
+    let _SessionUid = localStorage.getItem('SessionUid') || ''
 
     let param = {
       func: 's_visitor_login',
diff --git a/src/index.js b/src/index.js
index ee2706d..e8d944c 100644
--- a/src/index.js
+++ b/src/index.js
@@ -12,14 +12,23 @@
 import '@/assets/css/viewstyle.scss'
 
 if (!localStorage.getItem('SessionUid')) {
-  localStorage.setItem('SessionUid', (() => {
+  let sid = (() => {
     let uuid = []
     let _options = '0123456789abcdefghigklmnopqrstuv'
     for (let i = 0; i < 32; i++) {
       uuid.push(_options.substr(Math.floor(Math.random() * 0x20), 1))
     }
     return uuid.join('')
-  })())
+  })()
+
+  if (/_mk_sid=[0-9a-z]{32}/.test(document.cookie)) {
+    sid = document.cookie.match(/_mk_sid=[0-9a-z]{32}/)[0].split('=')[1]
+  } else {
+    document.cookie = '_mk_sid=' + sid
+  }
+
+  localStorage.setItem('SessionUid', sid)
+
 }
 
 fetch('../options.json')
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index b2c5d4b..c9f2c24 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -220,6 +220,7 @@
       { value: 'expPdf', text: '瀵煎嚭PDF' },
       { value: 'shareLink', text: '鍒嗕韩閾炬帴' },
       { value: 'openLocation', text: '鎵撳紑鍦板浘'},
+      { value: 'wxPublicAuth', text: '寰俊鍏紬鍙锋巿鏉�'},
       { value: 'logout', text: '閫�鍑�' },
       { value: 'goBack', text: '杩斿洖' },
     ]

--
Gitblit v1.8.0