Commit bd158035 by xuyl

欢迎语组件修改传递merchantId

1 parent da745d56
...@@ -209,7 +209,10 @@ export default { ...@@ -209,7 +209,10 @@ export default {
type: 'material', type: 'material',
funName: 'material', funName: 'material',
groupListApi: this.$apis.welcomeword.getGroupListApi, groupListApi: this.$apis.welcomeword.getGroupListApi,
materialListApi: this.$apis.welcomeword.getMaterialListApi materialListApi: this.$apis.welcomeword.getMaterialListApi,
params: {
merchantId: this.$globalState.session.merchantId
}
}, },
{ {
name: '模板', name: '模板',
...@@ -219,7 +222,10 @@ export default { ...@@ -219,7 +222,10 @@ export default {
templateApi: this.$apis.welcomeword.templatePage, templateApi: this.$apis.welcomeword.templatePage,
templateUpdateApi: this.$apis.welcomeword.templateUpdate, templateUpdateApi: this.$apis.welcomeword.templateUpdate,
templateSaveApi: this.$apis.welcomeword.templateSave, templateSaveApi: this.$apis.welcomeword.templateSave,
templateDetailApi: this.$apis.welcomeword.templateDetail templateDetailApi: this.$apis.welcomeword.templateDetail,
params: {
merchantId: this.$globalState.session.merchantId
}
} }
], ],
attachmentShow: false, attachmentShow: false,
...@@ -329,6 +335,7 @@ export default { ...@@ -329,6 +335,7 @@ export default {
}) })
this.dataItems = [...this.dataItems, ...this.arrBack] this.dataItems = [...this.dataItems, ...this.arrBack]
}, },
async remoteMethod(searchValue) { async remoteMethod(searchValue) {
if (searchValue !== '') { if (searchValue !== '') {
this.searchContentStorage = searchValue this.searchContentStorage = searchValue
...@@ -352,6 +359,24 @@ export default { ...@@ -352,6 +359,24 @@ export default {
} }
}, },
selectChange(val) { 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.tagging = []
this.taggingList = [] this.taggingList = []
this.basicForm.crowdList = [] this.basicForm.crowdList = []
...@@ -359,6 +384,7 @@ export default { ...@@ -359,6 +384,7 @@ export default {
this.isUpdate = true this.isUpdate = true
this.resetMerchantId = val this.resetMerchantId = val
this.msgMerchantName = val && this.dataItems.find(item => item.msgMerchantId == val).msgMerchantName this.msgMerchantName = val && this.dataItems.find(item => item.msgMerchantId == val).msgMerchantName
}, },
// 返回 // 返回
handleCancel() { handleCancel() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!