zhongrj
2022-12-27 0b7792d76fa3de436db50185ceeaf0438e83d57e
首页用户名显示设置
3 files modified
10 ■■■■■ changed files
src/router/axios.js 2 ●●● patch | view | raw | blame | history
src/views/lyout/index.vue 6 ●●●●● patch | view | raw | blame | history
vue.config.js 2 ●●● patch | view | raw | blame | history
src/router/axios.js
@@ -31,7 +31,7 @@
    // baseURL: 'http://192.168.0.105:18080/api',
    // baseURL: 'http://192.168.0.115:82',
    // baseURL: 'http://192.168.0.112:18080',
    baseURL: 'http://192.168.0.115:1888/api',
    // baseURL: 'http://192.168.0.115:1888/api',
    // baseURL: 'http://192.168.0.115:82',
    // baseURL: 'http://192.168.0.106:1888/api',
src/views/lyout/index.vue
@@ -154,8 +154,7 @@
    created () {
        this.currentUrl = this.$route.path
        this.user = getUserInfo()
        console.log(this.user, 4451211)
        this.init();
    },
    watch: {
@@ -184,6 +183,9 @@
    },
    methods: {
        init(){
            this.user = this.$store.state.user.userInfo;
        },
        //登出
        goTOLogout () {
            this.$store.dispatch("LogOut").then(() => {
vue.config.js
@@ -153,7 +153,7 @@
    proxy: {
      "/api": {
        // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
        target: "http://192.168.0.115:82",
        target: "http://192.168.0.115:1888/api",
        // ws: true, //启用webSocket
        changeOrigin: true, //开启代理跨域
        pathRewrite: {