From ce0da69b5f08254fc25da325771a5ecf10be3eb1 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Sun, 2 Mar 2025 13:25:35 +0800 Subject: [PATCH] sc --- .env.base | 4 +- src/api/xjapplet/discount.js | 42 +++++ src/api/xjapplet/resell.js | 32 ++++ src/api/xjapplet/vip.js | 43 ++++- src/api/xjapplet/vipdatabase.js | 67 +++++++ src/api/xjapplet/xjdatabase.js | 51 +---- src/components/Pagination/index.vue | 2 +- src/config/axios/service.ts | 3 +- src/views/XjApplet/Resell/index.vue | 41 +++- .../XjApplet/Vip/components/UserDiscount.vue | 24 ++- .../XjApplet/Vip/components/VipDiscount.vue | 163 +++++++++------- src/views/XjApplet/Vip/components/VipType.vue | 128 ++++++------- src/views/XjApplet/Vip/components/VipUser.vue | 74 ++++---- .../VipData/conponents/SecretData.vue | 123 ++++++------ .../VipData/conponents/SimpleData.vue | 97 +++++----- .../XjDatabase/Components/QuestionAddForm.vue | 178 ++++++++++-------- src/views/XjApplet/XjDatabase/index.vue | 96 +++++----- 17 files changed, 709 insertions(+), 459 deletions(-) create mode 100644 src/api/xjapplet/discount.js create mode 100644 src/api/xjapplet/resell.js create mode 100644 src/api/xjapplet/vipdatabase.js diff --git a/.env.base b/.env.base index a466367..7e7deac 100644 --- a/.env.base +++ b/.env.base @@ -4,8 +4,8 @@ VITE_NODE_ENV=development VITE_DEV=true # 请求路径 -# VITE_BASE_URL='http://47.98.161.246:48080' -VITE_BASE_URL='http://114.55.169.15:48080' +VITE_BASE_URL='http://47.98.161.246:48080' +# VITE_BASE_URL='http://114.55.169.15:48080' # 小程序接口请求路劲 VITE_APPLET_URL='https://cloud.ahduima.com' diff --git a/src/api/xjapplet/discount.js b/src/api/xjapplet/discount.js new file mode 100644 index 0000000..6cba610 --- /dev/null +++ b/src/api/xjapplet/discount.js @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +export const getVipDiscountList = async (params) => { + return await request.get({ + url: '/admin-api/applet/xunjia/member/discount/list', + params: params + }) +} + +export const addVipDiscount = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/member/discount/add', + data + }) +} + +export const updateVipDiscount = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/member/discount/update', + data + }) +} + +export const deleteVipDiscount = async (id) => { + return await request.delete({ + url: '/admin-api/applet/xunjia/member/discount/delete?discountId=' + id + }) +} + +export const getUserDiscountList = async (params) => { + return await request.get({ + url: '/admin-api/applet/xunjia/user/discount/list', + params: params + }) +} + +export const giveUserDiscount = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/user/discount/add', + data + }) +} diff --git a/src/api/xjapplet/resell.js b/src/api/xjapplet/resell.js new file mode 100644 index 0000000..4042167 --- /dev/null +++ b/src/api/xjapplet/resell.js @@ -0,0 +1,32 @@ +import request from '@/config/axios' + +export const getResellList = async (params) => { + return await request.get({ + url: '/admin-api/applet/xunjia/distribution/list', + params: params + }) +} + +export const addResell = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/distribution/add', + data + }) +} + +export const updateResell = async (data) => { + return await request.put({ + url: '/admin-api/applet/xunjia/distribution/update', + data + }) +} +export const deleteResell = async (id) => { + return await request.delete({ + url: '/admin-api/applet/xunjia/distribution/delete?distributionId=' + id + }) +} +export const getResellDetail = async (id) => { + return await request.get({ + url: '/admin-api/applet/xunjia/distribution/' + id + }) +} diff --git a/src/api/xjapplet/vip.js b/src/api/xjapplet/vip.js index ee97ced..5581edd 100644 --- a/src/api/xjapplet/vip.js +++ b/src/api/xjapplet/vip.js @@ -2,7 +2,48 @@ import request from '@/config/axios' export const getUserMemberList = async (params) => { return await request.get({ - url: 'http://xj.ahduima.com/xunjia/driver-api/tdSysUserMember/duima/user/member/list', + url: '/admin-api/applet/xunjia/user/member/list', + params: params + }) +} + +export const giveUserMember = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/user/member/add', + data + }) +} + +export const getVipTypeList = async (params) => { + return await request.get({ + url: '/admin-api/applet/xunjia/member/list', + params: params + }) +} + +export const addVipType = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/member/add', + data + }) +} + +export const updateVipType = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/member/update', + data + }) +} + +export const deleteVipType = async (id) => { + return await request.delete({ + url: '/admin-api/applet/xunjia/member/memberId?id=' + id + }) +} + +export const getVipTypeOptions = async (params) => { + return await request.get({ + url: '/admin-api/applet/xunjia/member/simple-list', params: params }) } diff --git a/src/api/xjapplet/vipdatabase.js b/src/api/xjapplet/vipdatabase.js new file mode 100644 index 0000000..2eca4d0 --- /dev/null +++ b/src/api/xjapplet/vipdatabase.js @@ -0,0 +1,67 @@ +import request from '@/config/axios' + +export const addJx = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/question/jx/add', + data: data + }) +} + +export const getJxQuestionList = async (params) => { + return await request.get({ + url: '/admin-api/applet/xunjia/question/jx/list', + params: params + }) +} + +export const delJxData = async (id) => { + return await request.delete({ + url: `/admin-api/applet/xunjia/question/jx/delete?id=${id}` + }) +} + +export const addMj = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/secret/add', + data: data + }) +} + +export const getMjList = async (params) => { + return await request.get({ + url: '/admin-api/applet/xunjia/secret/list', + params: params + }) +} + +export const delMj = async (secretId) => { + return await request.delete({ + url: `/admin-api/applet/xunjia/secret/delete?secretId=${secretId}` + }) +} + +export const clearMj = async (secretId) => { + return await request.delete({ + url: `/admin-api/applet/xunjia/secret/clear?secretId=${secretId}` + }) +} + +export const getMjQuestionList = async (params) => { + return await request.get({ + url: '/admin-api/applet/xunjia/secret/question/list', + params: params + }) +} + +export const addMjQuestion = async (data) => { + return await request.post({ + url: '/admin-api/applet/xunjia/secret/question/add', + data: data + }) +} + +export const delMjQuestion = async (id) => { + return await request.delete({ + url: `/admin-api/applet/xunjia/secret/question/delete?id=${id}` + }) +} diff --git a/src/api/xjapplet/xjdatabase.js b/src/api/xjapplet/xjdatabase.js index 31cee6a..3cebccf 100644 --- a/src/api/xjapplet/xjdatabase.js +++ b/src/api/xjapplet/xjdatabase.js @@ -1,41 +1,41 @@ import request from '@/config/axios' export const searchQuestion = async (param) => { return await request.get({ - url: 'http://localhost/tiku-api/tiku/xunjia/question/list', + url: '/admin-api/applet/xunjia/question/list', params: param }) } export const updateQuestion = async (data) => { return await request.put({ - url: 'http://localhost/tiku-api/tiku/xunjia/question/update', + url: '/admin-api/applet/xunjia/question/update', data: data }) } export const addQuestion = async (data) => { return await request.post({ - url: 'http://localhost/tiku-api/tiku/xunjia/question/add', + url: '/admin-api/applet/xunjia/question/add', data: data }) } export const deleteQuestion = async (id) => { return await request.delete({ - url: 'http://localhost/tiku-api/tiku/xunjia/question/delete?id=' + id + url: '/admin-api/applet/xunjia/question/delete?id=' + id }) } export const uploadFile = async (data) => { return await request.post({ - url: 'http://localhost/tiku-api/tiku/xunjia/question/upload', + url: '/admin-api/applet/xunjia/question/upload', data: data }) } export const getQuestionSort = async (param) => { return await request.get({ - url: 'http://localhost/tiku-api/tiku/xunjia/question/sort/list', + url: '/admin-api/applet/xunjia/question/sort/list', params: param }) } @@ -46,42 +46,3 @@ export const getMjList = async (params) => { params: params }) } - -export const addMj = async (data) => { - return await request.post({ - url: 'http://localhost/tiku-api/tiku/xunjia/secret/add', - data: data - }) -} - -export const delMj = async (secretId) => { - return await request.delete({ - url: `http://localhost/tiku-api/tiku/xunjia/secret/delete?secretId=${secretId}` - }) -} - -export const clearMj = async (secretId) => { - return await request.delete({ - url: `http://localhost/tiku-api/tiku/xunjia/secret/clear?secretId=${secretId}` - }) -} - -export const getMjQuestionList = async (params) => { - return await request.get({ - url: 'http://localhost/tiku-api/tiku/xunjia/secret/question/list', - params: params - }) -} - -export const addMjQuestion = async (data) => { - return await request.post({ - url: 'http://localhost/tiku-api/tiku/xunjia/secret/question/add', - data: data - }) -} - -export const delMjQuestion = async (id) => { - return await request.delete({ - url: `http://localhost/tiku-api/tiku/xunjia/secret/question/delete?id=${id}` - }) -} diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index cb9cb9e..31d41fc 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -6,7 +6,7 @@ v-model:page-size="pageSize" :small="small" :background="true" - :page-sizes="[10, 20, 30, 50, 100]" + :page-sizes="[10, 50, 100, 500, 1000]" :pager-count="pagerCount" :total="total" class="float-right mt-15px mb-15px" diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index cb8a704..5663222 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -140,8 +140,7 @@ service.interceptors.response.use( // 二进制数据则直接返回 if ( response.request.responseType === 'blob' || - response.request.responseType === 'arraybuffer' || - !data.code + response.request.responseType === 'arraybuffer' ) { return response.data } diff --git a/src/views/XjApplet/Resell/index.vue b/src/views/XjApplet/Resell/index.vue index 5096ea0..89a2f88 100644 --- a/src/views/XjApplet/Resell/index.vue +++ b/src/views/XjApplet/Resell/index.vue @@ -12,14 +12,17 @@ 新增 - + - + @@ -60,11 +63,13 @@ diff --git a/src/views/XjApplet/Vip/components/UserDiscount.vue b/src/views/XjApplet/Vip/components/UserDiscount.vue index bcdce40..dc8e04f 100644 --- a/src/views/XjApplet/Vip/components/UserDiscount.vue +++ b/src/views/XjApplet/Vip/components/UserDiscount.vue @@ -55,7 +55,7 @@ diff --git a/src/views/XjApplet/Vip/components/VipDiscount.vue b/src/views/XjApplet/Vip/components/VipDiscount.vue index 677c493..264bee6 100644 --- a/src/views/XjApplet/Vip/components/VipDiscount.vue +++ b/src/views/XjApplet/Vip/components/VipDiscount.vue @@ -7,20 +7,19 @@ - + - - + + + + @@ -34,8 +33,8 @@ - - + + {{ discountDesc }} - + - + - + @@ -90,15 +89,6 @@ }} - - - diff --git a/src/views/XjApplet/Vip/components/VipType.vue b/src/views/XjApplet/Vip/components/VipType.vue index b912f3a..45731ea 100644 --- a/src/views/XjApplet/Vip/components/VipType.vue +++ b/src/views/XjApplet/Vip/components/VipType.vue @@ -2,30 +2,20 @@
- + - + - - - - - 查询 新增会员类型 - + @@ -33,29 +23,17 @@ - - + - + + @@ -72,8 +50,8 @@ - - + + @@ -99,23 +77,11 @@ - - - - - + + + 用户购买 + 客服赠送 + @@ -130,10 +96,11 @@ diff --git a/src/views/XjApplet/Vip/components/VipUser.vue b/src/views/XjApplet/Vip/components/VipUser.vue index 2966c87..82f6716 100644 --- a/src/views/XjApplet/Vip/components/VipUser.vue +++ b/src/views/XjApplet/Vip/components/VipUser.vue @@ -5,36 +5,36 @@ - + - - + 查询 赠送会员 - + - + - - + + - + - - + + @@ -72,9 +72,11 @@ diff --git a/src/views/XjApplet/VipData/conponents/SecretData.vue b/src/views/XjApplet/VipData/conponents/SecretData.vue index cc2abe8..64822f8 100644 --- a/src/views/XjApplet/VipData/conponents/SecretData.vue +++ b/src/views/XjApplet/VipData/conponents/SecretData.vue @@ -1,29 +1,26 @@