From 8e3ee81b6ed824866734b7034604121f370f4201 Mon Sep 17 00:00:00 2001
From: QYF-GitLab1 <1940665526@qq.com>
Date: 星期三, 09 七月 2025 17:55:14 +0800
Subject: [PATCH] 登录、购书码、申请阅读

---
 src/main.js |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/main.js b/src/main.js
index 3cdfe28..f264f2a 100644
--- a/src/main.js
+++ b/src/main.js
@@ -54,16 +54,16 @@
       if (bindingCode.code) {
         let query = {
           code: bindingCode.code,
-          isSocial: true // 鍏紬鍙峰拰寮�鏀惧钩鍙版槸涓嶅悓鐨勪富浣擄紝鍏紬鍙风粦瀹氬井淇′娇鐢╥sSocial=true锛屽紑鏀惧钩鍙帮紙鎵爜缁戝畾锛変娇鐢╥sSocial=false;
+          isSocial: true, // 鍏紬鍙峰拰寮�鏀惧钩鍙版槸涓嶅悓鐨勪富浣擄紝鍏紬鍙风粦瀹氬井淇′娇鐢╥sSocial=true锛屽紑鏀惧钩鍙帮紙鎵爜缁戝畾锛変娇鐢╥sSocial=false;
         };
         MG.identity
           .bindWeChat(query)
-          .then(res => {
+          .then((res) => {
             const url = window.location.href;
             const redirectUrl = url.split("?")[0];
             window.location.href = redirectUrl;
           })
-          .catch(res => {
+          .catch((res) => {
             console.log(res);
           });
       } else {
@@ -72,13 +72,12 @@
     } else {
       // 鎷︽埅濡傛灉鏄櫥褰昪ode
       let loginCode = WeChat.getUrlInfo("weChatLogin");
-      console.log(loginCode, "loginCode");
       if (loginCode.code) {
-        WeChat.login(loginCode.code, data => {
+        WeChat.login(loginCode.code, (data) => {
           toolClass.setCookie(config.tokenKey, data);
           const url = window.location.href;
           const domian = url.split("?")[0];
-          console.log(domian, 'domian');
+          console.log(domian, "domian");
           const routeCode = url.split("#")[1];
           const redirectUrl = domian + "#" + routeCode;
           window.location.href = redirectUrl;
@@ -103,11 +102,11 @@
          */
         let query = {
           code: checkCode.code,
-          appCode: config.appRefCode
+          appCode: config.appRefCode,
         };
         MG.identity
           .chechWechatAccount(query)
-          .then(res => {
+          .then((res) => {
             if (res == true) {
               const url = window.location.href;
               const domian = url.split("?")[0];
@@ -127,7 +126,7 @@
               }
             }
           })
-          .catch(res => {
+          .catch((res) => {
             console.log(res);
           });
       } else {
@@ -138,7 +137,8 @@
         if (ua.match(/MicroMessenger/i) == "micromessenger") {
           toolClass.delCookie(config.tokenKey);
           localStorage.fullPath = to.fullPath;
-          window.location.href = config.requestCtx + "/mobile/textbooks/#" + to.fullPath;
+          window.location.href =
+            config.requestCtx + "/mobile/textbooks/#" + to.fullPath;
           WeChat.getCode("checkWeChat");
         } else {
           WeChat.getCode("weChatLogin");
@@ -153,5 +153,5 @@
 new Vue({
   router,
   store,
-  render: h => h(App)
+  render: (h) => h(App),
 }).$mount("#app");

--
Gitblit v1.9.1