diff --git a/test_client/src/api/crm.js b/test_client/src/api/crm.js index 2928e23..8e19519 100644 --- a/test_client/src/api/crm.js +++ b/test_client/src/api/crm.js @@ -94,6 +94,13 @@ export function unbindConsumer(id) { }) } +export function claimConsumer(id) { + return request({ + url: `/crm/consumer/${id}/claim/`, + method: 'put', + }) +} + export function getConsumerRoleAll(query) { return request({ url: '/crm/consumerrole/', diff --git a/test_client/src/router/index.js b/test_client/src/router/index.js index 805bc94..b5c6636 100644 --- a/test_client/src/router/index.js +++ b/test_client/src/router/index.js @@ -116,6 +116,12 @@ export const asyncRoutes = [ component: () => import('@/views/crm/consumer.vue'), meta: { title: '学员列表', icon: '', perms: ['consumer_view'] } }, + { + path: 'claim', + name: 'Claim', + component: () => import('@/views/crm/claim.vue'), + meta: { title: '认领学员', icon: '', perms: ['consumer_view'] } + }, { path: 'consumerrule', name: 'ConsumerRule', diff --git a/test_client/src/store/getters.js b/test_client/src/store/getters.js index 1854b88..389dde4 100644 --- a/test_client/src/store/getters.js +++ b/test_client/src/store/getters.js @@ -4,6 +4,7 @@ const getters = { token: state => state.user.token, avatar: state => state.user.avatar, name: state => state.user.name, + username: state=> state.user.username, perms: state => state.user.perms, permission_routes: state => state.permission.routes } diff --git a/test_client/src/views/crm/claim.vue b/test_client/src/views/crm/claim.vue new file mode 100644 index 0000000..f99e89e --- /dev/null +++ b/test_client/src/views/crm/claim.vue @@ -0,0 +1,177 @@ + + + diff --git a/test_client/src/views/crm/consumer.vue b/test_client/src/views/crm/consumer.vue index 21c1180..c927b6c 100644 --- a/test_client/src/views/crm/consumer.vue +++ b/test_client/src/views/crm/consumer.vue @@ -182,11 +182,11 @@ - +