init_info.js
1.15 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const info = {
state: {
dev_unid: '',
bodyheight:'',
org:[],
address:[],
facedbdata:[],
province:[],
},
mutations:{
SET_DEV: (state, dev) => {
state.dev_unid = dev;
},
SET_BODYHEIGHT: (state, height) => {
state.bodyheight = height
},
SET_ORG: (state, data) =>{
state.org = data;
},
SET_ADDRESS: (state, data) => {
state.address = data;
},
SET_FACEDB: (state, data) => {
state.facedbdata = data;
},
SET_PROVINCE: (state, data) => {
state.province = data;
}
},
actions: {
GetDev({ commit, state}) {
// getDev().then(response => {
// response.data
// let data = "9cb6e39adc5176b81879f6c22f1d963"
// if( response.data && response.data.length > 0){
// data = response.data[0];
// }
// commit("SET_DEV", data);
// })
},
},
}
/**
* 获取设备IP
*/
// function getDev() {
// return new Promise((reslove, reject) =>{
// axios.get(IP + '/api/v1/devconf_fx/devs?s=' + new Date().getTime()).then(response => {
// reslove(response);
// })
// });
// }
export default info