From 0e2ea3959164c2b5719bb906ee5408e92890981b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 9 Sep 2023 10:06:32 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=EF=BC=9A=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member/experience-record/index.ts | 20 ---------- src/utils/dict.ts | 2 +- src/views/mall/trade/order/index.vue | 4 +- ...ecord.vue => UserExperienceRecordList.vue} | 38 +++++++++---------- .../{UserOrder.vue => UserOrderList.vue} | 18 ++++++++- src/views/member/user/detail/index.vue | 8 ++-- 6 files changed, 41 insertions(+), 49 deletions(-) rename src/views/member/user/detail/{UserExperienceRecord.vue => UserExperienceRecordList.vue} (91%) rename src/views/member/user/detail/{UserOrder.vue => UserOrderList.vue} (95%) diff --git a/src/api/member/experience-record/index.ts b/src/api/member/experience-record/index.ts index 07f839d3..6d40a48d 100644 --- a/src/api/member/experience-record/index.ts +++ b/src/api/member/experience-record/index.ts @@ -20,23 +20,3 @@ export const getExperienceRecordPage = async (params) => { export const getExperienceRecord = async (id: number) => { return await request.get({ url: `/member/experience-record/get?id=` + id }) } - -// 新增会员经验记录 -export const createExperienceRecord = async (data: ExperienceRecordVO) => { - return await request.post({ url: `/member/experience-record/create`, data }) -} - -// 修改会员经验记录 -export const updateExperienceRecord = async (data: ExperienceRecordVO) => { - return await request.put({ url: `/member/experience-record/update`, data }) -} - -// 删除会员经验记录 -export const deleteExperienceRecord = async (id: number) => { - return await request.delete({ url: `/member/experience-record/delete?id=` + id }) -} - -// 导出会员经验记录 Excel -export const exportExperienceRecord = async (params) => { - return await request.download({ url: `/member/experience-record/export-excel`, params }) -} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 3286d0bb..f898ed58 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -138,7 +138,7 @@ export enum DICT_TYPE { BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type', // ========== PAY 模块 ========== - PAY_CHANNEL_CODE = 'pay_channel_code_type', // 支付渠道编码类型 + PAY_CHANNEL_CODE = 'pay_channel_code', // 支付渠道编码类型 PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态 PAY_REFUND_STATUS = 'pay_refund_status', // 退款订单状态 PAY_NOTIFY_STATUS = 'pay_notify_status', // 商户支付回调状态 diff --git a/src/views/mall/trade/order/index.vue b/src/views/mall/trade/order/index.vue index d0f1b682..dec14eaa 100644 --- a/src/views/mall/trade/order/index.vue +++ b/src/views/mall/trade/order/index.vue @@ -267,7 +267,7 @@ @@ -287,6 +295,8 @@ import { createImageViewer } from '@/components/ImageViewer' import * as TradeOrderApi from '@/api/mall/trade/order' import { FormInstance, TableColumnCtx } from 'element-plus' +const { push } = useRouter() // 路由跳转 + const { userId }: { userId: number } = defineProps({ userId: { type: Number, @@ -376,6 +386,12 @@ const spanMethod = ({ row, rowIndex, columnIndex }: SpanMethodProps) => { } } } + +/** 查看订单详情 */ +const openDetail = (id: number) => { + push({ name: 'TradeOrderDetail', params: { orderId: id } }) +} + /** 初始化 **/ onMounted(async () => { queryParams.userId = userId diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index b0967ae5..6e4eb13f 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -37,14 +37,14 @@ - 余额(WIP) - + 售后管理(WIP) 收藏记录(WIP) @@ -66,9 +66,9 @@ import UserAccountInfo from './UserAccountInfo.vue' import UserAddressList from './UserAddressList.vue' import UserPointList from './UserPointList.vue' import UserSignList from './UserSignList.vue' -import UserExperienceRecord from './UserExperienceRecord.vue' +import UserExperienceRecordList from './UserExperienceRecordList.vue' import { CardTitle } from '@/components/Card/index' -import UserOrder from '@/views/member/user/detail/UserOrder.vue' +import UserOrderList from '@/views/member/user/detail/UserOrderList.vue' defineOptions({ name: 'MemberDetail' })