From afd240b11738b018ec8dbc93dd1d0f4e2af11274 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sun, 24 May 2020 23:43:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=81=94=E7=B3=BB=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_client/src/api/crm.js | 6 +++++ test_client/src/api/user.js | 2 ++ test_client/src/views/crm/consumer.vue | 25 ++++++++++++++++++-- test_client/src/views/news/news.vue | 2 +- test_mini/pages/article/detail.wxml | 2 +- test_mini/pages/lianxi/main.wxml | 2 +- test_mini/pages/main/main.js | 32 ++++++++++++++++++-------- test_mini/pages/my/index.wxml | 2 +- 8 files changed, 58 insertions(+), 15 deletions(-) diff --git a/test_client/src/api/crm.js b/test_client/src/api/crm.js index 8ce4497..dd1a3f5 100644 --- a/test_client/src/api/crm.js +++ b/test_client/src/api/crm.js @@ -77,4 +77,10 @@ export function exportConsumer(query) { method: 'get', params: query }) +} +export function unbindConsumer(id) { + return request({ + url: `/crm/consumer/${id}/unbind`, + method: 'get', + }) } \ No newline at end of file diff --git a/test_client/src/api/user.js b/test_client/src/api/user.js index 294797f..a72fe94 100644 --- a/test_client/src/api/user.js +++ b/test_client/src/api/user.js @@ -63,3 +63,5 @@ export function deleteUser(id, data) { data }) } + + diff --git a/test_client/src/views/crm/consumer.vue b/test_client/src/views/crm/consumer.vue index 1968abd..42505ec 100644 --- a/test_client/src/views/crm/consumer.vue +++ b/test_client/src/views/crm/consumer.vue @@ -132,7 +132,7 @@ {{ scope.row.create_time }} - + @@ -231,7 +238,8 @@ import { updateConsumer, importConsumer, exportConsumer, - deleteConsumers + deleteConsumers, + unbindConsumer } from "@/api/crm"; import { getSubjectAll } from "@/api/question"; import { getWorkScopeAll } from "@/api/examtest"; @@ -399,6 +407,19 @@ export default { this.$refs["consumerForm"].clearValidate(); }); }, + handleUnbind(scope) { + unbindConsumer(scope.row.id).then(res => { + if(res.code>=200){ + this.$message({ + type: "success", + message: "解绑成功!" + }); + this.getList() + } + }).catch(err => { + console.error(err) + }) + }, handleDelete(scope) { this.$confirm("确认删除该用户吗?将丢失数据!", "警告", { confirmButtonText: "确认", diff --git a/test_client/src/views/news/news.vue b/test_client/src/views/news/news.vue index c9df686..1e3fa62 100644 --- a/test_client/src/views/news/news.vue +++ b/test_client/src/views/news/news.vue @@ -48,7 +48,7 @@ - +