diff --git a/src/sheep/api/apply.ts b/src/sheep/api/apply.ts index cb0baa4..a8f9c50 100644 --- a/src/sheep/api/apply.ts +++ b/src/sheep/api/apply.ts @@ -1,67 +1,46 @@ -import request from "@/sheep/utils/request"; +import request from "@/sheep/utils/request" export default { - foreignList: (params: any) => - request({ - url: "wallet/wallet-foreign/app/page-join", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - foreignDetail: (params: any) => - request({ - url: "wallet/wallet-foreign/app/detail", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - codeList: (params: any) => - request({ - url: "wallet/wallet-code-use/app/code-list", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - foreignApply: (data: any) => - request({ - url: "wallet/wallet-foreign/app/apply", - method: "POST", - data, - custom: { - showLoading: false, - }, - }), - strideList: (params: any) => - request({ - url: "wallet/wallet-stride/app/page-join", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - strideDetail: (params: any) => - request({ - url: "wallet/wallet-stride/app/detail", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - strideApply: (data: any) => - request({ - url: "wallet/wallet-stride/app/apply", - method: "POST", - data, - custom: { - showLoading: false, - }, - }), -}; + foreignList: (params: any) => + request({ + url: "wallet/wallet-foreign/app/page-join", + method: "GET", + params, + }), + foreignDetail: (params: any) => + request({ + url: "wallet/wallet-foreign/app/detail", + method: "GET", + params, + }), + codeList: (params: any) => + request({ + url: "wallet/wallet-code-use/app/code-list", + method: "GET", + params, + }), + foreignApply: (data: any) => + request({ + url: "wallet/wallet-foreign/app/apply", + method: "POST", + data, + }), + strideList: (params: any) => + request({ + url: "wallet/wallet-stride/app/page-join", + method: "GET", + params, + }), + strideDetail: (params: any) => + request({ + url: "wallet/wallet-stride/app/detail", + method: "GET", + params, + }), + strideApply: (data: any) => + request({ + url: "wallet/wallet-stride/app/apply", + method: "POST", + data, + }), +} diff --git a/src/sheep/api/boxes.ts b/src/sheep/api/boxes.ts index e626e56..dea6e6e 100644 --- a/src/sheep/api/boxes.ts +++ b/src/sheep/api/boxes.ts @@ -1,58 +1,40 @@ -import request from "@/sheep/utils/request"; +import request from "@/sheep/utils/request" export default { - page: (params: any) => - request({ - url: "canteen/boxesInfo/appPage", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - detail: (params: any) => - request({ - url: "canteen/boxesInfo/getInfo", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - apply: (data: any) => - request({ - url: "canteen/boxesInfo/create", - method: "POST", - data, - custom: { - showLoading: false, - }, - }), - cancel: (data: any) => - request({ - url: "canteen/boxesInfo/cancel", - method: "GET", - data, - custom: { - showLoading: false, - }, - }), - get: (data: any) => - request({ - url: "canteen/boxesInfo/get", - method: "GET", - data, - custom: { - showLoading: false, - }, - }), - MyBookingPage: (data: any) => - request({ - url: "canteen/boxesInfo/getMyBookingPage", - method: "GET", - data, - custom: { - showLoading: false, - }, - }), -}; + page: (params: any) => + request({ + url: "canteen/boxesInfo/appPage", + method: "GET", + params, + }), + detail: (params: any) => + request({ + url: "canteen/boxesInfo/getInfo", + method: "GET", + params, + }), + apply: (data: any) => + request({ + url: "canteen/boxesInfo/create", + method: "POST", + data, + }), + cancel: (data: any) => + request({ + url: "canteen/boxesInfo/cancel", + method: "GET", + data, + }), + get: (data: any) => + request({ + url: "canteen/boxesInfo/get", + method: "GET", + data, + }), + MyBookingPage: (data: any) => + request({ + url: "canteen/boxesInfo/getMyBookingPage", + method: "GET", + data, + }), +} diff --git a/src/sheep/api/common.ts b/src/sheep/api/common.ts index c245088..a229e8f 100644 --- a/src/sheep/api/common.ts +++ b/src/sheep/api/common.ts @@ -1,13 +1,10 @@ -import request from "@/sheep/utils/request"; +import request from "@/sheep/utils/request" export default { - setting: (params: any) => - request({ - url: "wallet/wallet-setting/app/get-setting", - method: "GET", - params, - custom: { - showLoading: false, - }, - }), -}; + setting: (params: any) => + request({ + url: "wallet/wallet-setting/app/get-setting", + method: "GET", + params, + }), +} diff --git a/src/sheep/api/door.ts b/src/sheep/api/door.ts index 608992a..b6c69f7 100644 --- a/src/sheep/api/door.ts +++ b/src/sheep/api/door.ts @@ -11,9 +11,6 @@ export default { url: "hard/hard-auth/app/get-auth-hard-door", method: "POST", data, - custom: { - showLoading: false, - }, }), /** * app获取智能柜授权信息 @@ -25,9 +22,6 @@ export default { url: "hard/hard-auth/app/get-auth-hard-door", method: "POST", data, - custom: { - showLoading: false, - }, }), /** * app查询智能柜列表(有分页) @@ -37,9 +31,6 @@ export default { url: "hard/hard-door-manager/app/page", method: "GET", params, - custom: { - showLoading: false, - }, }), /** @@ -51,9 +42,6 @@ export default { url: "hard/hard-door-manager/app/detail", method: "GET", params, - custom: { - showLoading: false, - }, }), /** @@ -66,9 +54,6 @@ export default { url: "hard/hard-spu/app/putaway", method: "POST", data, - custom: { - showLoading: false, - }, }), /** @@ -81,9 +66,6 @@ export default { url: "hard/hard-spu/app/un-putaway", method: "POST", data, - custom: { - showLoading: false, - }, }), /** * app查询货柜补货商品列表 @@ -95,9 +77,6 @@ export default { url: "hard/hard-spu/app/cabinet-putaway-list", method: "GET", params, - custom: { - showLoading: false, - }, }), /** @@ -110,9 +89,6 @@ export default { url: "hard/hard-spu/app/cabinet-list", method: "GET", params, - custom: { - showLoading: false, - }, }), /** @@ -125,9 +101,6 @@ export default { url: "hard/hard-spu-repertory/app/repertory-done", method: "POST", data, - custom: { - showLoading: false, - }, }), /** @@ -140,9 +113,6 @@ export default { url: "hard/hard-door-flow/app/open-repertory", method: "POST", data, - custom: { - showLoading: false, - }, }), /** @@ -155,9 +125,6 @@ export default { url: "hard/hard-spu/app/page", method: "GET", params, - custom: { - showLoading: false, - }, }), /** * app检修开门 @@ -169,9 +136,6 @@ export default { url: "hard/hard-door-flow/app/open-access", method: "POST", data, - custom: { - showLoading: false, - }, }), /** * app检修关门 @@ -183,8 +147,5 @@ export default { url: "hard/hard-door-flow/app/close-access", method: "POST", data, - custom: { - showLoading: false, - }, }), } diff --git a/src/sheep/api/face.ts b/src/sheep/api/face.ts index 253c35a..c7a200c 100644 --- a/src/sheep/api/face.ts +++ b/src/sheep/api/face.ts @@ -1,49 +1,34 @@ -import request from "@/sheep/utils/request"; +import request from "@/sheep/utils/request" export default { - page: (params: any) => - request({ - url: `/admin/user-face/app/page-join`, - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - del: (params: any) => - request({ - url: `/admin/user-face/app`, - method: "DELETE", - params, - custom: { - showLoading: false, - }, - }), - create: (data: any) => - request({ - url: `/admin/user-face/app`, - method: "POST", - data, - custom: { - showLoading: false, - }, - }), - get: (params: any) => - request({ - url: `/admin/user-face/app/detail`, - method: "GET", - params, - custom: { - showLoading: false, - }, - }), - put: (data: any) => - request({ - url: `/admin/user-face/app`, - method: "PUT", - data, - custom: { - showLoading: false, - }, - }), -}; + page: (params: any) => + request({ + url: `/admin/user-face/app/page-join`, + method: "GET", + params, + }), + del: (params: any) => + request({ + url: `/admin/user-face/app`, + method: "DELETE", + params, + }), + create: (data: any) => + request({ + url: `/admin/user-face/app`, + method: "POST", + data, + }), + get: (params: any) => + request({ + url: `/admin/user-face/app/detail`, + method: "GET", + params, + }), + put: (data: any) => + request({ + url: `/admin/user-face/app`, + method: "PUT", + data, + }), +} diff --git a/src/sheep/api/flowStatistics.ts b/src/sheep/api/flowStatistics.ts index 40cb68e..e6e847b 100644 --- a/src/sheep/api/flowStatistics.ts +++ b/src/sheep/api/flowStatistics.ts @@ -9,9 +9,6 @@ export default { url: "/hard/hard-total/app/mch-water-day", method: "GET", params, - custom: { - showLoading: false, - }, }), /** * app查询商户全部流水记录 @@ -21,8 +18,5 @@ export default { url: "/hard/hard-total/app/mch-water-total", method: "GET", params, - custom: { - showLoading: false, - }, }), } diff --git a/src/sheep/api/food.ts b/src/sheep/api/food.ts index a139f93..9ac3f8d 100644 --- a/src/sheep/api/food.ts +++ b/src/sheep/api/food.ts @@ -10,54 +10,36 @@ export default { current: data.current, size: data.size, }, - custom: { - showLoading: false, - }, }), classify: (params: any) => request({ url: `/canteen/canteenOnlineCategory/app/getAllSimple`, method: "GET", params, - custom: { - showLoading: false, - }, }), product: (params: any) => request({ url: `/canteen/canteenOnlineSpu/app/getCanteenSpuList`, method: "GET", params, - custom: { - showLoading: false, - }, }), getShopCar: (params: any) => request({ url: `/hard/hard-car/app/mch-detail`, method: "GET", params, - custom: { - showLoading: false, - }, }), updateShopCar: (data: any) => request({ url: `/hard/hard-car/app/save-or-upload`, method: "POST", data, - custom: { - showLoading: false, - }, }), checkSpuStock: (params) => { return request({ url: "/canteen/canteenOnlineSpu/app/checkSpuStock", method: "GET", params, - custom: { - showLoading: false, - }, }) }, } diff --git a/src/sheep/api/hard.ts b/src/sheep/api/hard.ts index 93f8000..b00cbb1 100644 --- a/src/sheep/api/hard.ts +++ b/src/sheep/api/hard.ts @@ -6,9 +6,6 @@ export default { url: "hard/hard-auth/app/get-auth-hard-door", method: "POST", data, - custom: { - showLoading: false, - }, }), /** * app获取智能柜授权信息 @@ -21,8 +18,5 @@ export default { url: "hard/hard-auth/app/auth-hard-door", method: "POST", data, - custom: { - showLoading: false, - }, }), } diff --git a/src/sheep/api/individualOrder.ts b/src/sheep/api/individualOrder.ts index a03969b..d5bae5f 100644 --- a/src/sheep/api/individualOrder.ts +++ b/src/sheep/api/individualOrder.ts @@ -6,25 +6,16 @@ export default { url: "/hard/hard-order/app/mch-page-join", method: "GET", params, - custom: { - showLoading: false, - }, }), refuseRefund: (data: { id: string; auditReason: string }) => request({ url: "/hard/hard-after-sale/app/mch-disagree", method: "POST", data, - custom: { - showLoading: false, - }, }), agreeRefund: (params: { id: string }) => request({ url: `/hard/hard-after-sale/app/mch-agree?id=${params.id}`, method: "POST", - custom: { - showLoading: false, - }, }), } diff --git a/src/sheep/api/merchant.ts b/src/sheep/api/merchant.ts index 7da8223..42d7ff0 100644 --- a/src/sheep/api/merchant.ts +++ b/src/sheep/api/merchant.ts @@ -6,27 +6,18 @@ export default { url: "/wallet/mch-manage/app/page-join", method: "GET", params, - custom: { - showLoading: false, - }, }), childrenPage: (params: any) => request({ url: "/wallet/mch-manage/app/children-page-join", method: "GET", params, - custom: { - showLoading: false, - }, }), detail: (params: any): Promise => request({ url: "/wallet/mch-manage/app/detail", method: "GET", params, - custom: { - showLoading: false, - }, }), /** * 店铺分类查询 @@ -36,9 +27,6 @@ export default { url: "/wallet/mch-catgory/app/select", method: "GET", params, - custom: { - showLoading: false, - }, }), /** * 宁波银行登录 @@ -47,8 +35,5 @@ export default { request({ url: "/wallet/mch-manage/app/lb-login", method: "GET", - custom: { - showLoading: false, - }, }), } diff --git a/src/sheep/api/order.ts b/src/sheep/api/order.ts index fd79faf..98d1e0f 100644 --- a/src/sheep/api/order.ts +++ b/src/sheep/api/order.ts @@ -6,36 +6,24 @@ export default { url: `/hard/hard-order/app/caneen-page-join`, method: "GET", params, - custom: { - showLoading: false, - }, }), supPage: (params: any) => request({ url: `/hard/hard-order/app/sup-page-join`, method: "GET", params, - custom: { - showLoading: false, - }, }), detail: (params: any) => request({ url: `/hard/hard-order/app/detail`, method: "GET", params, - custom: { - showLoading: false, - }, }), shopCarList: (params: any) => request({ url: `/hard/hard-car/app/order-id`, method: "GET", params, - custom: { - showLoading: false, - }, }), /** * 预约时间列表 @@ -44,8 +32,5 @@ export default { request({ url: "/hard/hard-appt/app/list", method: "GET", - custom: { - showLoading: false, - }, }), } diff --git a/src/sheep/api/pay.ts b/src/sheep/api/pay.ts index 13def0f..42ba4a6 100644 --- a/src/sheep/api/pay.ts +++ b/src/sheep/api/pay.ts @@ -23,9 +23,6 @@ export default { url: "/hard/hard-order/app/create-order", method: "GET", params, - custom: { - showLoading: false, - }, }) }, // 创建二维码订单 @@ -34,9 +31,6 @@ export default { url: "/hard/hard-order/app/create-order-scan-qrcode", method: "POST", data, - custom: { - showLoading: false, - }, }) }, // 结算 @@ -45,9 +39,6 @@ export default { url: "/hardware/order/submit-order", method: "POST", data, - custom: { - showLoading: false, - }, }) }, // 退款 @@ -56,9 +47,6 @@ export default { url: "/hardware/order/refund", method: "GET", params, - custom: { - showLoading: false, - }, }) }, // 转账 @@ -67,9 +55,6 @@ export default { url: "/wallet/wallet-rule-transaction/app/transfer-accounts", method: "POST", data, - custom: { - showLoading: false, - }, }) }, } diff --git a/src/sheep/api/refund.ts b/src/sheep/api/refund.ts index 428adbf..0566aa1 100644 --- a/src/sheep/api/refund.ts +++ b/src/sheep/api/refund.ts @@ -1,32 +1,32 @@ -import request from "@/sheep/utils/request"; +import request from "@/sheep/utils/request" export default { - create: (data: any) => { - return request({ - url: "/hard/hard-after-sale/app/create", - method: "POST", - data, - }); - }, - cancel: (params: any) => { - return request({ - url: "/hard/hard-after-sale/app/cancel", - method: "GET", - params, - }); - }, - get: (params: any) => { - return request({ - url: "/hard/hard-after-sale/app/detail-by-order-id", - method: "GET", - params, - }); - }, - history: (params: any) => { - return request({ - url: "/hard/hard-after-sale/app/history", - method: "GET", - params, - }); - }, -}; + create: (data: any) => { + return request({ + url: "/hard/hard-after-sale/app/create", + method: "POST", + data, + }) + }, + cancel: (params: any) => { + return request({ + url: "/hard/hard-after-sale/app/cancel", + method: "GET", + params, + }) + }, + get: (params: any) => { + return request({ + url: "/hard/hard-after-sale/app/detail-by-order-id", + method: "GET", + params, + }) + }, + history: (params: any) => { + return request({ + url: "/hard/hard-after-sale/app/history", + method: "GET", + params, + }) + }, +} diff --git a/src/sheep/api/shop.ts b/src/sheep/api/shop.ts index 20f6be5..6740982 100644 --- a/src/sheep/api/shop.ts +++ b/src/sheep/api/shop.ts @@ -6,36 +6,24 @@ export default { url: `/supermarket/supermarketCategory/app/simpleAll`, method: "GET", params, - custom: { - showLoading: false, - }, }), getSupermarketSpuList: (data: any) => request({ url: `/supermarket/supermarketSpu/app/selectListAll`, method: "POST", data, - custom: { - showLoading: false, - }, }), getSupermarketSpuDetail: (params: any) => request({ url: `/supermarket/supermarketSpu/app/SpuDetails`, method: "GET", params, - custom: { - showLoading: false, - }, }), checkSpuStock: (params) => { return request({ url: "/supermarket/supermarketSpu/app/checkSpuStock", method: "GET", params, - custom: { - showLoading: false, - }, }) }, } diff --git a/src/sheep/api/user.ts b/src/sheep/api/user.ts index d249dae..140b108 100644 --- a/src/sheep/api/user.ts +++ b/src/sheep/api/user.ts @@ -4,65 +4,40 @@ import { encryption } from "@/sheep/utils/encryption" // 将 Basic Auth 字符串提取为常量 const BASIC_AUTH = "Basic " + window.btoa(import.meta.env.VITE_OAUTH2_APP_CLIENT) -// 定义接口类型 -interface LoginParams { - username: string - password: string - randomStr: string - code: string - grant_type: string - scope: string -} - export default { // 获取用户信息 userInfo: (): Promise => request({ url: "/admin/user/info", method: "GET", - custom: { - showLoading: false, - loadingMsg: "登录中", - }, }), - // 浙政钉授权 + // 浙政钉授权登录 auth: (token: string): Promise => request({ url: "/thirdparty/thirdPartyOAth2/zzdsso", method: "POST", data: { token }, - custom: { - showLoading: false, - loadingMsg: "授权中", - }, }), - // 诗画授权 + // 诗画授权登录 authsh: (data: { accountId: string; sessionId: string }): Promise => request({ url: "/thirdparty/thirdPartyOAth2/shjnsso", method: "POST", - custom: { - showLoading: false, - loadingMsg: "授权中", - }, data, }), // 刷新token - refreshToken: (params: { refreshToken: string }) => - request({ - url: `/sys/auth/refresh-token`, - method: "POST", - params, - custom: { - showLoading: false, - }, - }), + // refreshToken: (params: { refreshToken: string }) => + // request({ + // url: `/sys/auth/refresh-token`, + // method: "POST", + // params, + // }), - // 登录 - login: (params: LoginParams) => { + // 账号密码登录 + login: (params: any) => { const { username, password, randomStr, code, grant_type, scope } = params const encPassword = encryption(password, import.meta.env.VITE_PWD_ENC_KEY) @@ -83,9 +58,6 @@ export default { Authorization: BASIC_AUTH, "content-type": "application/x-www-form-urlencoded", }, - custom: { - showLoading: false, - }, }) }, // 判断是否是商户角色 @@ -93,27 +65,18 @@ export default { request({ url: "/admin/role/isMchUser", method: "GET", - custom: { - showLoading: false, - }, }), // 判断用户移动端角色 userRole: () => request({ url: "/admin/role/app/user-role", method: "GET", - custom: { - showLoading: false, - }, }), // 根据手机号发送验证码 getMobilePhoneCode: (mobilePhone: string) => request({ url: `/thirdparty/thirdPartyOAth2/loginSms?mobilePhone=${mobilePhone}`, method: "POST", - custom: { - showLoading: false, - }, }), // 设备认证 verifyDevice: (data: { mobilePhone: string; code: string }) => @@ -121,8 +84,5 @@ export default { url: "/thirdparty/thirdPartyOAth2/verify-device", method: "POST", data, - custom: { - showLoading: false, - }, }), } diff --git a/src/sheep/api/wallet.ts b/src/sheep/api/wallet.ts index 187ba66..a8be597 100644 --- a/src/sheep/api/wallet.ts +++ b/src/sheep/api/wallet.ts @@ -5,90 +5,60 @@ export default { 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: "wallet/wallet-active/app/bind-card", method: "POST", data, - custom: { - showLoading: false, - }, }), freeze: (data: any) => request({ url: "wallet/wallet-freeze/app/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, - }, }), /** * 是够能够使用智能柜 @@ -98,8 +68,5 @@ export default { url: "wallet/wallet-manage/app/is-use-door", method: "GET", data: {}, - custom: { - showLoading: false, - }, }), }