fc89095b0461332cbf40744c5907878d08fa7c41..fb69937cc5ca45dab3412636fdecdaf063156147
2025-08-13 zouyu
浪潮平台对接单点登录3
fb6993 对比 | 目录
2025-08-13 zouyu
浪潮平台对接单点登录2
39798e 对比 | 目录
2025-08-13 zouyu
浪潮平台对接单点登录
c545f8 对比 | 目录
已修改6个文件
40 ■■■■■ 文件已修改
.env.production 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
index.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/tideLogin.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.production
@@ -1,5 +1,5 @@
# 页面标题
VITE_APP_TITLE = MIS系统(管理信息系统)
VITE_APP_TITLE = MOM(制造运营管理系统)
# 生产环境配置
VITE_APP_ENV = 'production'
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>MOM(制造运营管理系统)</title>
  <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
  <style>
    html,
@@ -212,4 +212,4 @@
  <script type="module" src="/src/main.js"></script>
</body>
</html>
</html>
src/main.js
@@ -76,7 +76,7 @@
app.config.globalProperties.addDateRange = addDateRange;
app.config.globalProperties.selectDictLabel = selectDictLabel;
app.config.globalProperties.selectDictLabels = selectDictLabels;
app.config.globalProperties.javaApi = "http://114.132.189.42:8099";
app.config.globalProperties.javaApi = "http://10.136.12.71:8014";
app.config.globalProperties.HaveJson = (val) => {
  return JSON.parse(JSON.stringify(val));
};
src/store/modules/user.js
@@ -109,12 +109,12 @@
          })
        })
      },
      TideLogin({ commit }, code) {
      TideLogin(code) {
        return new Promise((resolve, reject) => {
          tideLogin(code)
              .then((res) => {
                setToken(res.token);
                commit("SET_TOKEN", res.token);
                this.token = res.token
                Vue.prototype.uploadHeader = {
                  Authorization: "Bearer " + res.token,
                };
src/views/tideLogin.vue
@@ -1,23 +1,15 @@
<template>
  <div></div>
</template>
<script>
import store from "@/store";
export default {
  data() {
    return {}
  },
  created() {
    this.goLogin()
  },
  computed: {},
  methods: {
     goLogin() {
      store.dispatch('TideLogin', {code : this.$route.query.code}).then(() => {
        this.$router.push({ path: this.redirect || "/" }).catch(() => { });
      })
    }
  }
<script setup>
import useUserStore from '@/store/modules/user'
const userStore = useUserStore()
let { proxy } = getCurrentInstance()
function goLogin() {
  userStore.TideLogin({code : proxy.$route.query.code}).then(() => {
    proxy.$router.push({ path: redirect || "/" }).catch(() => { });
  })
}
goLogin()
</script>
<style scoped></style>
vite.config.js
@@ -9,7 +9,7 @@
  const baseUrl =
    VITE_APP_ENV == "development"
      ? "http://192.168.1.147:7003" // 开发环境后端接口
      : "http://10.136.12.71:7003"; // 生产环境后端接口
      : "http://10.136.12.71:8014"; // 生产环境后端接口
  return {
    // 部署生产环境和开发环境下的URL。