zouyu
7 小时以前 c1b2ba0d6fe16e3a27ce15f35aea8ef0ef23de76
代码调整7
已修改3个文件
17 ■■■■ 文件已修改
index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tideLogin.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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,
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) => {
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(() => { });
      })
    }