Commit c641f592 by 李伟康

修复轻改领券页面监听不到输入信息

1 parent 07466c8f
...@@ -28,9 +28,15 @@ export default { ...@@ -28,9 +28,15 @@ export default {
* 监听客户信息是否发生变化 * 监听客户信息是否发生变化
* @param {object} val 监听客户信息 * @param {object} val 监听客户信息
*/ */
customerInfo: { // customerInfo: {
handler(val) { // handler(val) {
this.handler(val, this.updateCustomerInfo) // this.handler(val, this.updateCustomerInfo)
// },
// deep: true
// },
customerKey:{
handler() {
this.handler(this.customerInfo, this.updateCustomerInfo)
}, },
deep: true deep: true
}, },
...@@ -52,7 +58,7 @@ export default { ...@@ -52,7 +58,7 @@ export default {
}, },
computed: { computed: {
...mapState(['user.customerInfo']), ...mapState(['user.customerInfo']),
...mapGetters(['customerInfo', 'receptionStatus', 'booksList', 'receptionTrack', 'receptionKey']) ...mapGetters(['customerInfo', 'receptionStatus', 'booksList', 'receptionTrack', 'receptionKey','customerKey'])
}, },
methods: { methods: {
...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setPerRecordNumber']), ...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setPerRecordNumber']),
......
...@@ -9,4 +9,5 @@ export default { ...@@ -9,4 +9,5 @@ export default {
receptionStatus: (state) => state.audio.receptionStatus, receptionStatus: (state) => state.audio.receptionStatus,
booksList: (state) => state.audio.booksList, booksList: (state) => state.audio.booksList,
receptionKey: (state) => state.user.receptionKey, receptionKey: (state) => state.user.receptionKey,
customerKey: (state) => state.user.customerKey
}; };
...@@ -32,7 +32,8 @@ export default { ...@@ -32,7 +32,8 @@ export default {
viewKey: Date.now(), viewKey: Date.now(),
boutiqueCarList:[], boutiqueCarList:[],
receptionKey:Date.now(), //接待记录埋点KEY receptionKey:Date.now(), //接待记录埋点KEY
defaultCarId:'' defaultCarId:'',
customerKey:Date.now(), //客户信息KEY
}; };
}, },
mutations: { mutations: {
...@@ -43,6 +44,7 @@ export default { ...@@ -43,6 +44,7 @@ export default {
// state.customerInfo = data; // state.customerInfo = data;
uni.$storage.set("customerInfo", JSON.stringify(data)); uni.$storage.set("customerInfo", JSON.stringify(data));
state.customerInfo = data state.customerInfo = data
state.customerKey = Date.now()
}, },
clearCustomerInfo (state) { clearCustomerInfo (state) {
const info = { const info = {
...@@ -56,6 +58,7 @@ export default { ...@@ -56,6 +58,7 @@ export default {
}; };
uni.$storage.set("customerInfo", JSON.stringify(info)); uni.$storage.set("customerInfo", JSON.stringify(info));
state.customerInfo = info state.customerInfo = info
state.customerKey = Date.now()
}, },
}, },
actions: { actions: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!