This commit is contained in:
xiaogang 2025-09-22 09:20:12 +08:00
parent 1a576ed7a3
commit 951c23c8e7
3 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,4 @@
NODE_ENV = 'development'
# 邮储音视频
VITE_BASE_URL = 'https://gateway.dev.cdlsxd.cn/ycav'
VITE_BASE_URL = 'https://gateway.dev.cdlsxd.cn'

View File

@ -37,4 +37,11 @@ export const refundOrder = (params) => http({
url:'/v1/order/refund',
method:'POST',
...params
})
//获取联登的sm3加密的签名
export const getSM3Sign = (params) => http({
url:'/v1/order/getSign',
method:'POST',
...params
})

View File

@ -1,4 +1,6 @@
import md5 from "js-md5";
import getSM3Sign from '@/api/ycysp'
export default function useCode() {
return new Promise((resolve, reject) => {
const authCallback = (params) => {
@ -6,10 +8,12 @@ export default function useCode() {
const { code } = params;
resolve(code);
};
const getNewAuthorization = () => {
const getNewAuthorization = async () => {
let appId = import.meta.env.VITE_YCNC_APPID;
let time = Date.now().toString();
let secret = import.meta.env.VITE_YCNC_SECRET;
//调用接口获取sign签名
// const _sign = await getSM3Sign({appId,time})
let signBefore = appId + time + secret;
let sign = md5(signBefore); //普通md5
let param = {