feat:商户权限

This commit is contained in:
dzc committed 2025-01-10 11:23:54 +08:00
1 parent a619a7c3fd
commit 997e3c5c8e
5 files changed
+397 -375

No files matched your search

+66 -67
View File
@@ -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,
},
})
},
}
+91 -91
View File
@@ -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,
},
}),
}