Commit 594c7e74 by 李伟康

fix(boutique): 优化客户邀约接待流程

- 在客户邀约接待过程中增加异步处理
- 添加条件判断,根据 start 函数的返回值决定是否继续执行后续操作
1 parent 9b759e64
...@@ -103,7 +103,7 @@ export default { ...@@ -103,7 +103,7 @@ export default {
} }
]), ]),
loadComplete: false, loadComplete: false,
requested: false requested: false
} }
}, },
onBackPress (options) { onBackPress (options) {
...@@ -222,9 +222,9 @@ export default { ...@@ -222,9 +222,9 @@ export default {
}, },
// 查询素材 // 查询素材
async getSoure () { async getSoure () {
let baseConfigData = await uni.$api.systemApi.getBoutiqueMockData(true), let baseConfigData = await uni.$api.systemApi.getBoutiqueMockData(true),
{moduleList, toolList, defaultCarId } = baseConfigData { moduleList, toolList, defaultCarId } = baseConfigData
this.$store.state.boutique.baseConfigData = baseConfigData this.$store.state.boutique.baseConfigData = baseConfigData
this.moduleList = moduleList this.moduleList = moduleList
this.toolList = toolList this.toolList = toolList
this.defaultCarId = defaultCarId this.defaultCarId = defaultCarId
...@@ -327,9 +327,12 @@ export default { ...@@ -327,9 +327,12 @@ export default {
/**客户邀约接待 */ /**客户邀约接待 */
reception (customer) { reception (customer) {
this.currentCarId = '' this.currentCarId = ''
this.$nextTick(() => { this.$nextTick(async () => {
let { customerType } = this let { customerType } = this
if (customerType == -1) this.start(false) //开始接待 if (customerType == -1) {
const flag = await this.start(false)
if (!flag) return
} //开始接待
this.customerType = 0 this.customerType = 0
this.jumpPage() this.jumpPage()
this.$nextTick(() => this.$store.dispatch('setCustomerInfo', customer)) this.$nextTick(() => this.$store.dispatch('setCustomerInfo', customer))
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!