From 997e3c5c8eb796b6dc70195604266e5907c80e42 Mon Sep 17 00:00:00 2001
From: dzc <2388224167@qq.com>
Date: Fri, 10 Jan 2025 11:23:54 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E5=95=86=E6=88=B7=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/tabbar/order.vue | 2 +-
src/pages/wallet/list.vue | 377 +++++++++++++++--------------
src/sheep/api/user.ts | 133 +++++-----
src/sheep/api/wallet.ts | 182 +++++++-------
src/sheep/constant/service-enum.ts | 78 +++---
5 files changed, 397 insertions(+), 375 deletions(-)
diff --git a/src/pages/tabbar/order.vue b/src/pages/tabbar/order.vue
index aca6f60..314d4e4 100644
--- a/src/pages/tabbar/order.vue
+++ b/src/pages/tabbar/order.vue
@@ -14,7 +14,7 @@ const data = {
{ id: null, name: "全部", disabled: false },
{ id: 1, name: "未支付", disabled: false },
{ id: 5, name: "待核销", disabled: false },
- { id: 10, name: "售后中", disabled: false },
+ { id: 10, name: "售后", disabled: false },
{ id: 15, name: "已核销", disabled: false },
],
}
diff --git a/src/pages/wallet/list.vue b/src/pages/wallet/list.vue
index 1665b4d..5ae9644 100644
--- a/src/pages/wallet/list.vue
+++ b/src/pages/wallet/list.vue
@@ -1,6 +1,6 @@
-
-
-
-
-
-
-
-
- 卡号: {{ v.cardNumber }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ v.walletTypeName }}
-
-
-
- 冻结审核中
-
- 正常
- 已冻结
-
-
-
-
-
- ¥{{ hooks.useMoney(v.balance) }}
-
-
-
-
- 绑定
-
-
- 申请冻结
-
-
- 去充值
-
-
-
-
-
+
+
+
+
+
+
+
+ 卡号: {{ v.cardNumber }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ v.walletTypeName }}
+
+
+
+ 冻结审核中
+
+ 正常
+ 已冻结
+
+
+
+
+ ¥{{ hooks.useMoney(v.balance) }}
+
+
+
+ 绑定
+
+
+ 申请冻结
+
+ 去充值
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- 绑定
-
-
-
-
-
-
-
-
-
-
-
- 冻结
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 绑定
+
+
+
+
+
+
+
+
+
+ 冻结
+
+
+
+
+
+
+
-
\ No newline at end of file
+
diff --git a/src/sheep/api/user.ts b/src/sheep/api/user.ts
index 3916873..4ee0591 100644
--- a/src/sheep/api/user.ts
+++ b/src/sheep/api/user.ts
@@ -1,71 +1,70 @@
-import request from "@/sheep/utils/request";
-import { encryption } from "@/sheep/utils/encryption";
+import request from "@/sheep/utils/request"
+import { encryption } from "@/sheep/utils/encryption"
-const basicAuth =
- "Basic " + window.btoa(import.meta.env.VITE_OAUTH2_APP_CLIENT);
+const basicAuth = "Basic " + window.btoa(import.meta.env.VITE_OAUTH2_APP_CLIENT)
export default {
- userInfo: () =>
- request({
- url: "/admin/user/info",
- method: "GET",
- custom: {
- showLoading: false,
- loadingMsg: "登录中",
- },
- }),
+ userInfo: () =>
+ request({
+ url: "/admin/user/info",
+ method: "GET",
+ custom: {
+ showLoading: false,
+ loadingMsg: "登录中",
+ },
+ }),
- auth: (str: any) =>
- request({
- url: `/sys/auth/zzdsso/${str}`,
- method: "GET",
- custom: {
- showLoading: false,
- loadingMsg: "授权中",
- },
- }),
- authsh: (params: any) =>
- request({
- url: `/sys/auth/shjnsso`,
- method: "POST",
- custom: {
- showLoading: false,
- loadingMsg: "授权中",
- },
- data: params,
- }),
- refreshToken: (params: any) =>
- request({
- url: `/sys/auth/refresh-token`,
- method: "POST",
- params,
- custom: {
- showLoading: false,
- },
- }),
- login: (params: any): any => {
- const { username, password, randomStr, code, grant_type, scope } = params;
- const encPassword = encryption(password, import.meta.env.VITE_PWD_ENC_KEY);
- return request({
- url: `/auth/oauth2/token`,
- method: "POST",
- params: {
- username,
- password: password,
- randomStr,
- code,
- grant_type,
- scope,
- },
- data: { password: password },
- header: {
- skipToken: true,
- Authorization: basicAuth,
- "content-type": "application/x-www-form-urlencoded",
- },
- custom: {
- showLoading: false,
- },
- });
- },
-};
+ auth: (str: any) =>
+ request({
+ url: `/sys/auth/zzdsso/${str}`,
+ method: "GET",
+ custom: {
+ showLoading: false,
+ loadingMsg: "授权中",
+ },
+ }),
+ authsh: (params: any) =>
+ request({
+ url: `/sys/auth/shjnsso`,
+ method: "POST",
+ custom: {
+ showLoading: false,
+ loadingMsg: "授权中",
+ },
+ data: params,
+ }),
+ refreshToken: (params: any) =>
+ request({
+ url: `/sys/auth/refresh-token`,
+ method: "POST",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ login: (params: any): any => {
+ const { username, password, randomStr, code, grant_type, scope } = params
+ const encPassword = encryption(password, import.meta.env.VITE_PWD_ENC_KEY)
+ return request({
+ url: `/auth/oauth2/token`,
+ method: "POST",
+ params: {
+ username,
+ password: password,
+ randomStr,
+ code,
+ grant_type,
+ scope,
+ },
+ data: { password: password },
+ header: {
+ skipToken: true,
+ Authorization: basicAuth,
+ "content-type": "application/x-www-form-urlencoded",
+ },
+ custom: {
+ showLoading: false,
+ },
+ })
+ },
+}
diff --git a/src/sheep/api/wallet.ts b/src/sheep/api/wallet.ts
index 8637889..0754360 100644
--- a/src/sheep/api/wallet.ts
+++ b/src/sheep/api/wallet.ts
@@ -1,93 +1,93 @@
-import request from "@/sheep/utils/request";
+import request from "@/sheep/utils/request"
export default {
- all: () =>
- request({
- url: "/wallet/wallet-manage/app/get-all",
- method: "GET",
- custom: {
- showLoading: false,
- },
- }),
- getQrCode: (params: any) =>
- request({
- url: "pay/wallet/get-qr-code",
- method: "GET",
- params,
- custom: {
- showLoading: false,
- },
- }),
- detail: (params: any) =>
- request({
- url: "wallet/wallet-manage/app/detail",
- method: "GET",
- params,
- custom: {
- showLoading: false,
- },
- }),
- bind: (data: any) =>
- request({
- url: "pay/wallet/bind-card",
- method: "POST",
- data,
- custom: {
- showLoading: false,
- },
- }),
- freeze: (data: any) =>
- request({
- url: "pay/wallet/apply-freeze",
- method: "POST",
- data,
- custom: {
- showLoading: false,
- },
- }),
- balanceDetail: (params: any) =>
- request({
- url: "pay/wallet/get-id",
- method: "GET",
- params,
- custom: {
- showLoading: false,
- },
- }),
- transaction: (params: any) =>
- request({
- url: "wallet/wallet-transaction/app/page",
- method: "GET",
- params,
- custom: {
- showLoading: false,
- },
- }),
- summary: (params: any) =>
- request({
- url: "pay/wallet-transaction/get-summary-by-id",
- method: "GET",
- params,
- custom: {
- showLoading: false,
- },
- }),
- rechargeList: (params: any) =>
- request({
- url: "wallet/wallet-recharge-package/app/list",
- method: "GET",
- params,
- custom: {
- showLoading: false,
- },
- }),
- recharge: (data: any) =>
- request({
- url: "wallet/wallet-recharge/app/create",
- method: "POST",
- data,
- custom: {
- showLoading: false,
- },
- }),
-};
+ all: () =>
+ request({
+ url: "/wallet/wallet-manage/app/get-all",
+ method: "GET",
+ custom: {
+ showLoading: false,
+ },
+ }),
+ getQrCode: (params: any) =>
+ request({
+ url: "wallet/wallet-manage/app/get-qr-code",
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ detail: (params: any) =>
+ request({
+ url: "wallet/wallet-manage/app/detail",
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ bind: (data: any) =>
+ request({
+ url: "pay/wallet/bind-card",
+ method: "POST",
+ data,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ freeze: (data: any) =>
+ request({
+ url: "pay/wallet/apply-freeze",
+ method: "POST",
+ data,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ balanceDetail: (params: any) =>
+ request({
+ url: "pay/wallet/get-id",
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ transaction: (params: any) =>
+ request({
+ url: "wallet/wallet-transaction/app/page",
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ summary: (params: any) =>
+ request({
+ url: "pay/wallet-transaction/get-summary-by-id",
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ rechargeList: (params: any) =>
+ request({
+ url: "wallet/wallet-recharge-package/app/list",
+ method: "GET",
+ params,
+ custom: {
+ showLoading: false,
+ },
+ }),
+ recharge: (data: any) =>
+ request({
+ url: "wallet/wallet-recharge/app/create",
+ method: "POST",
+ data,
+ custom: {
+ showLoading: false,
+ },
+ }),
+}
diff --git a/src/sheep/constant/service-enum.ts b/src/sheep/constant/service-enum.ts
index 7a83405..dcf874a 100644
--- a/src/sheep/constant/service-enum.ts
+++ b/src/sheep/constant/service-enum.ts
@@ -1,52 +1,52 @@
const hardwareOrderStatusEnum = {
- 1: "创建订单(未支付)",
- 5: "已经支付",
- 10: "退款",
- 15: "已核销",
-};
+ 1: "创建订单(未支付)",
+ 5: "已经支付",
+ 10: "退款",
+ 15: "已核销",
+}
const hardwareOrderTypeEnum = {
- 1: "线下购买",
- 2: "线上订餐",
- 3: "外来人员",
- 4: "跨单位",
-};
+ 1: "线下购买",
+ 2: "线上订餐",
+ 3: "外来人员",
+ 4: "跨单位",
+}
const hardwarePayTypeEnum = {
- 1: "钱包支付",
- 2: "钱包二维码支付",
- 3: "钱包饭卡支付",
- 4: "人脸识别支付",
- 5: "跨单位二维码支付",
- 6: "外来人员二维码支付",
- 7: "线上订餐二维码支付",
-};
+ 1: "钱包支付",
+ 2: "钱包二维码支付",
+ 3: "钱包饭卡支付",
+ 4: "人脸识别支付",
+ 5: "跨单位二维码支付",
+ 6: "外来人员二维码支付",
+ 7: "线上订餐二维码支付",
+}
const hardwareSaleStatusEnum = {
- 10: "会员申请退款",
- 50: "商家确认退款",
- 61: "会员取消退款",
- 62: "商家拒绝退款",
-};
+ 10: "会员申请退款",
+ 50: "商家确认退款",
+ 61: "会员取消退款",
+ 62: "商家拒绝退款",
+}
const hardwareRefundStatusEnum = {
- 0: "未售后",
- 10: "售后中",
- 20: "售后成功",
- 30: "售后失败",
-};
+ 0: "未售后",
+ 10: "售后",
+ 20: "售后成功",
+ 30: "售后失败",
+}
const boxesBxStatusEnum = {
- "0": "今日空闲",
- "1": "今日部分空闲",
- "2": "今日已满",
-};
+ "0": "今日空闲",
+ "1": "今日部分空闲",
+ "2": "今日已满",
+}
export default {
- hardwareOrderStatusEnum,
- hardwareOrderTypeEnum,
- hardwarePayTypeEnum,
- boxesBxStatusEnum,
- hardwareSaleStatusEnum,
- hardwareRefundStatusEnum,
-};
+ hardwareOrderStatusEnum,
+ hardwareOrderTypeEnum,
+ hardwarePayTypeEnum,
+ boxesBxStatusEnum,
+ hardwareSaleStatusEnum,
+ hardwareRefundStatusEnum,
+}