Commit bd158035 by xuyl

欢迎语组件修改传递merchantId

1 parent da745d56
......@@ -209,7 +209,10 @@ export default {
type: 'material',
funName: 'material',
groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi
materialListApi: this.$apis.welcomeword.getMaterialListApi,
params: {
merchantId: this.$globalState.session.merchantId
}
},
{
name: '模板',
......@@ -219,7 +222,10 @@ export default {
templateApi: this.$apis.welcomeword.templatePage,
templateUpdateApi: this.$apis.welcomeword.templateUpdate,
templateSaveApi: this.$apis.welcomeword.templateSave,
templateDetailApi: this.$apis.welcomeword.templateDetail
templateDetailApi: this.$apis.welcomeword.templateDetail,
params: {
merchantId: this.$globalState.session.merchantId
}
}
],
attachmentShow: false,
......@@ -329,6 +335,7 @@ export default {
})
this.dataItems = [...this.dataItems, ...this.arrBack]
},
async remoteMethod(searchValue) {
if (searchValue !== '') {
this.searchContentStorage = searchValue
......@@ -352,6 +359,24 @@ export default {
}
},
selectChange(val) {
console.log(val)
// 选择门店时,替换欢迎语组件当中的所有merchantId
this.btnList.forEach(item =>{
if (item.params && item.params.hasOwnProperty('merchantId')){
item.params.merchantId = val
}
if(item.funParams && Object.prototype.toString.call(item.funParams) === '[object Array]'){
item.funParams.forEach(funArr =>{
if (funArr.params && funArr.params.hasOwnProperty('merchantId')){
funArr.params.merchantId = val
}
if (funArr.merchantOpen && funArr.merchantOpen.params && funArr.merchantOpen.params.hasOwnProperty('merchantId')){
funArr.merchantOpen.params.merchantId = val
}
})
}
})
console.log(this.btnList)
this.tagging = []
this.taggingList = []
this.basicForm.crowdList = []
......@@ -359,6 +384,7 @@ export default {
this.isUpdate = true
this.resetMerchantId = val
this.msgMerchantName = val && this.dataItems.find(item => item.msgMerchantId == val).msgMerchantName
},
// 返回
handleCancel() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!