xwt
2025-06-10 676db89a661ba8af8da04f4503c39b1bc0d2c25e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import Vue from 'vue'
import Vuex from 'vuex'
 
//引入vuex插件 进行状态管理
Vue.use(Vuex) 
const store = new Vuex.Store({
    state: { 
        id: 'id',
        serverInfo:{//服务信息
            networkFlag:'内网', 
            serverURLInt:'http://192.168.11.251:10055',//服务器体检 10.0.1.104:10054
            serverURL:'http://localhost:10055',//本地调试地址
            //serverAPI:'http://localhost:5184/api',//当前正在使用的服务器,默认为外网  localhost
            //serverAPI:'http://192.168.1.22:10054/api',//当前正在使用的服务器,默认为外网  10054为正式API
            //serverAPI:'http://192.168.1.104:10055/api',//当前正在使用的服务器,默认为外网  10055为测试API
            serverAPI:'http://36.26.21.214:10055/api',
        }
    },
    mutations: {
        test(state,id){
            state.id = id;
        }
    },
    getters:{
        currentColor(state){
            return state.colorList[state.colorIndex]
        }
    },
    actions: {
        // lazy loading openid
    }
})
 
export default store