From c1b2ba0d6fe16e3a27ce15f35aea8ef0ef23de76 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期五, 26 十二月 2025 17:44:51 +0800
Subject: [PATCH] 代码调整7
---
src/views/tideLogin.vue | 4 ++--
src/store/modules/user.js | 11 ++++++-----
index.html | 2 +-
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/index.html b/index.html
index 5b7efd4..f375898 100644
--- a/index.html
+++ b/index.html
@@ -7,7 +7,7 @@
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="/favicon.ico">
- <title>MIS锛堢鐞嗕俊鎭郴缁燂級</title>
+ <title>鎵垮寘鍟嗙鐞嗙郴缁�</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>
html,
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 1c0d1d2..f525305 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -109,15 +109,16 @@
})
})
},
- TideLogin({ commit }, code) {
+ TideLogin( code) {
return new Promise((resolve, reject) => {
tideLogin(code)
.then((res) => {
setToken(res.token);
- commit("SET_TOKEN", res.token);
- Vue.prototype.uploadHeader = {
- Authorization: "Bearer " + res.token,
- };
+ this.token = res.token
+ // commit("SET_TOKEN", res.token);
+ // Vue.prototype.uploadHeader = {
+ // Authorization: "Bearer " + res.token,
+ // };
resolve();
})
.catch((error) => {
diff --git a/src/views/tideLogin.vue b/src/views/tideLogin.vue
index a96165e..ef6f580 100644
--- a/src/views/tideLogin.vue
+++ b/src/views/tideLogin.vue
@@ -2,7 +2,7 @@
<div></div>
</template>
<script>
-import store from "@/store";
+import useUserStore from '@/store/modules/user'
export default {
data() {
return {}
@@ -13,7 +13,7 @@
computed: {},
methods: {
goLogin() {
- store.dispatch('TideLogin', {code : this.$route.query.code}).then(() => {
+ useUserStore().TideLogin( {code : this.$route.query.code}).then(() => {
this.$router.push({ path: this.redirect || "/" }).catch(() => { });
})
}
--
Gitblit v1.9.3