Commit d9d74f13 by 李伟康

commit

1 parent 37494e86
...@@ -139,13 +139,7 @@ export default { ...@@ -139,13 +139,7 @@ export default {
popKey: 'employeeBoxVisible' popKey: 'employeeBoxVisible'
} }
], ],
customerInfo: { customerInfo: this.$store.state.user.customerInfo
customerName: '',
carModel: '',
phoneNumber: '',
salesUuid: '',
staffName: ''
}
} }
}, },
mounted () { mounted () {
......
...@@ -150,6 +150,7 @@ export default { ...@@ -150,6 +150,7 @@ export default {
}, },
// 完成接待 // 完成接待
done () { done () {
this.$store.dispatch('clearCustomerInfo')
this.stopAudio(); this.stopAudio();
uni.navigateBack(); uni.navigateBack();
}, },
......
...@@ -10,24 +10,42 @@ ...@@ -10,24 +10,42 @@
export default { export default {
state () { state () {
return { return {
customerInfo: {}, customerInfo: {
customerName: '',
carModel: '',
phoneNumber: '',
salesUuid: '',
staffName: ''
},
}; };
}, },
mutations: { mutations: {
getCustomerInfo(state){ getCustomerInfo (state) {
return state.customerInfo return state.customerInfo
}, },
setCustomerInfo (state, data) { setCustomerInfo (state, data) {
state.customerInfo = data state.customerInfo = data
}, },
clearCustomerInfo(state){
state.customerInfo = {
customerName: '',
carModel: '',
phoneNumber: '',
salesUuid: '',
staffName: ''
}
}
}, },
actions: { actions: {
// 获取用户详情 // 获取用户详情
async getCustomerInfo ({ commit }) { getCustomerInfo ({state}) {
return commit('getCustomerInfo') return state.customerInfo
}, },
async setCustomerInfo ({ commit }, value) { setCustomerInfo ({ commit }, value) {
commit('setCustomerInfo', value); commit('setCustomerInfo', value);
}, },
clearCustomerInfo({commit}){
commit('clearCustomerInfo')
}
}, },
}; };
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!