user.js
1.05 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
/*
* @Description:
* @Author: huyue
* @Date: 2024-04-07 18:15:11
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-04-09 19:49:48
*/
// import { setToken, getToken, removeToken } from '@/utils/token';;
export default {
state() {
return {
customerInfo: {
customerName: "",
carModel: "",
phoneNumber: "",
salesUuid: "",
staffName: "",
},
};
},
mutations: {
getCustomerInfo(state) {
return state.customerInfo;
},
setCustomerInfo(state, data) {
state.customerInfo = data;
},
clearCustomerInfo(state) {
state.customerInfo = {
customerName: "",
carModel: "",
phoneNumber: "",
salesUuid: "",
staffName: "",
};
},
},
actions: {
// 获取用户详情
getCustomerInfo({ state }) {
return state.customerInfo;
},
setCustomerInfo({ commit }, value) {
commit("setCustomerInfo", value);
},
clearCustomerInfo({ commit }) {
commit("clearCustomerInfo");
},
},
};