diff --git a/src/api/modules/http.js b/src/api/modules/http.js index b457a65..89c4a7a 100644 --- a/src/api/modules/http.js +++ b/src/api/modules/http.js @@ -824,6 +824,24 @@ export function keyWordsMatching(obj) { }) } +// 修改销讲业务 +export function updateMarketingBusiness(obj) { + return request({ + url: 'autoSR/customer/updateMarketingBusiness', + method: 'post', + data: obj + }) +} + +// 获取销讲业务模板 +export function marketingBusinessNoApi(params) { + return request({ + url: 'autoSR/customer/marketingBusiness', + method: 'get', + params: params + }) +} + //小程序权限 export function geTmenu(query) { diff --git a/src/router/axios.js b/src/router/axios.js index 08df179..47ff382 100644 --- a/src/router/axios.js +++ b/src/router/axios.js @@ -63,7 +63,6 @@ axios.interceptors.response.use(res => { NProgress.done() const status = Number(res.status) || 200 const message = res.data.msg || errorCode[status] || errorCode['default'] - // if (status === 401) { if (status === 401 || status === 500) { idx++ if(idx==1){ diff --git a/src/views/Receive/index.vue b/src/views/Receive/index.vue index db1732f..10194f2 100644 --- a/src/views/Receive/index.vue +++ b/src/views/Receive/index.vue @@ -27,6 +27,12 @@ align-items: center; " > +
+
+ 切换销讲业务 +
+
确认
+ + + + +
+
销讲业务:
+ + + + +
+ +
@@ -1288,6 +1328,10 @@ import { saveAs } from "file-saver"; export default { data() { return { + showSalesBusiness: false, // 更换销讲业务 + templateList: [], // 销讲业务列表 + marketingBusiness: '', // 选中的销讲业务 + keyWordsList: [], imgArr: [ "", @@ -1450,6 +1494,39 @@ export default { }, methods: { + // 确认切换销讲业务 + enterSalesBusiness() { + this.$api.http.updateMarketingBusiness({ + marketingBusiness: this.marketingBusiness, + id: this.fileId, + }).then(res=> { + console.log(res, 'cnmcm,cxcvnklfdkldflkfdalk') + if (res.code == 10000) { + this.$message.success(res.message); + this.init() + this.showSalesBusiness = false + } else { + this.$message.error(res.message); + } + }) + }, + + // 销讲模板列表 + marketingBusinessNoApi() { + this.$api.http.marketingBusinessNoApi({ + houseId: localStorage.getItem("houseId"), + status: 0, // 固定传0 + }).then(res => { + console.log(res, 'asdklasjdkasljsalkd') + if (res.code == 10000) { + this.templateList = res.data + } + }) + }, + + // 修改销讲业务模板 + updateMarketingBusiness() {}, + changeshow1(item) { item.show = !item.show; }, @@ -2137,6 +2214,7 @@ export default { this.findCARKeywords(); this.findBannedWordsByCusId(); this.Getsthetransliteratecontent(); + this.marketingBusinessNoApi(); }); },