diff --git a/src/api/pay/merchant.js b/src/api/pay/merchant.js new file mode 100644 index 0000000..28c7262 --- /dev/null +++ b/src/api/pay/merchant.js @@ -0,0 +1,22 @@ +/* + * @Author: ch + * @Date: 2022-07-04 15:20:02 + * @LastEditors: ch + * @LastEditTime: 2022-07-04 15:50:39 + * @Description: file content + */ +import request from '@/utils/request.js'; +export const getMerchantList = (params) => { + return request({ + url: '/payCenter/mchInfo/page', + method: 'get', + params, + }); +}; +export const getMerchantPlatform = (params) => { + return request({ + url: '/payCenter/mchInfo/mchCode', + method: 'get', + params, + }); +}; diff --git a/src/store/modules/chat/chat.js b/src/store/modules/chat/chat.js index 8edd291..a8bdfa4 100644 --- a/src/store/modules/chat/chat.js +++ b/src/store/modules/chat/chat.js @@ -2,7 +2,7 @@ * @Author: ch * @Date: 2022-06-07 15:41:05 * @LastEditors: ch - * @LastEditTime: 2022-06-14 15:26:44 + * @LastEditTime: 2022-07-04 11:34:14 * @Description: file content */ import * as api from '@/api/chat'; @@ -166,7 +166,7 @@ const actions = { /** * 提交转移会话 */ - submitTransferSession: ({}, data) => { + submitTransferSession: (context, data) => { return api .transferCustomerService({ storeId: 1, diff --git a/src/store/modules/goods/comment.js b/src/store/modules/goods/comment.js index 62c6461..54f8239 100644 --- a/src/store/modules/goods/comment.js +++ b/src/store/modules/goods/comment.js @@ -150,10 +150,6 @@ const actions = { data.commentTimeBegin = data.dateRange[0]; data.commentTimeEnd = data.dateRange[1]; } - if (data.scoreList) { - data.commentScoreList = data.scoreList.join(','); - delete data.scoreList; - } delete data.dateRange; delete data.pagingCode; const res = await api.commentList({ @@ -171,7 +167,7 @@ const actions = { commit('setTotal', res?.total || 0); } }, - async updateShow({}, params) { + async updateShow(context, params) { const res = await api.updateCommentShow(params); if (!res) { ElMessage.error('状态更新失败!'); @@ -188,7 +184,7 @@ const actions = { commit('setDetail', res); return Promise.resolve(res); }, - async add({}, data) { + async add(context, data) { const res = await api.commentAdd(data); if (!res) { ElMessage.error('回复失败'); diff --git a/src/store/modules/pay/merchant.js b/src/store/modules/pay/merchant.js new file mode 100644 index 0000000..9dfa924 --- /dev/null +++ b/src/store/modules/pay/merchant.js @@ -0,0 +1,60 @@ +/* + * @Author: ch + * @Date: 2022-07-04 15:21:30 + * @LastEditors: ch + * @LastEditTime: 2022-07-04 16:22:14 + * @Description: file content + */ +import * as api from '@/api/pay/merchant.js'; +const state = { + list: [], + detail: {}, + total: 0, + opts: { + status: [ + { + value: false, + label: '启用', + }, + { + value: true, + label: '禁用', + }, + ], + platform: [], + }, +}; +const getters = {}; +const mutations = { + setList: (state, data) => (state.list = data), + setPlatform: (state, data) => (state.opts.platform = data), + setTotal: (state, data) => (state.total = data), + setDetail: (state, data) => (state.detail = data), +}; +const actions = { + async search({ rootGetters, commit }, params) { + let data = { ...params }; + let pagingCode = params.pagingCode; + const res = await api.getMerchantList({ + ...rootGetters['local/page'](pagingCode), + ...data, + }); + if (res) { + commit('setList', res?.records || []); + commit('setTotal', res?.total || 0); + } + }, + async getMerchantPlatform({ commit }, params) { + const res = await api.getMerchantPlatform(); + if (res) { + commit('setPlatform', res || []); + } + }, +}; + +export default { + state, + getters, + mutations, + actions, +}; diff --git a/src/views/pay/application/index.vue b/src/views/pay/application/index.vue new file mode 100644 index 0000000..eda6813 --- /dev/null +++ b/src/views/pay/application/index.vue @@ -0,0 +1,166 @@ + + + + diff --git a/src/views/pay/merchant/index.vue b/src/views/pay/merchant/index.vue new file mode 100644 index 0000000..f3ada3b --- /dev/null +++ b/src/views/pay/merchant/index.vue @@ -0,0 +1,242 @@ + + + +