This commit is contained in:
parent
1a576ed7a3
commit
951c23c8e7
|
@ -1,4 +1,4 @@
|
|||
NODE_ENV = 'development'
|
||||
|
||||
# 邮储音视频
|
||||
VITE_BASE_URL = 'https://gateway.dev.cdlsxd.cn/ycav'
|
||||
VITE_BASE_URL = 'https://gateway.dev.cdlsxd.cn'
|
||||
|
|
|
@ -38,3 +38,10 @@ export const refundOrder = (params) => http({
|
|||
method:'POST',
|
||||
...params
|
||||
})
|
||||
|
||||
//获取联登的sm3加密的签名
|
||||
export const getSM3Sign = (params) => http({
|
||||
url:'/v1/order/getSign',
|
||||
method:'POST',
|
||||
...params
|
||||
})
|
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue