zhang_li
8 months ago
7 changed files with 70 additions and 1763 deletions
@ -1,3 +1,3 @@ |
|||
|
|||
VITE_BASE_URL=http://192.168.0.106:12080/admin-api |
|||
VITE_BASE_URL=http://localhost:12080/admin-api |
|||
VITE_BASE_URL_IMAGE=http://localhost:12080/admin-api |
File diff suppressed because one or more lines are too long
@ -1,14 +0,0 @@ |
|||
import CryptoJS from 'crypto-js' |
|||
/** |
|||
* @word 要加密的内容 |
|||
* @keyWord String 服务器随机返回的关键字 |
|||
* */ |
|||
export function aesEncrypt(word, keyWord = "XwKsGlMcdPMEhR1B") { |
|||
var key = CryptoJS.enc.Utf8.parse(keyWord); |
|||
var srcs = CryptoJS.enc.Utf8.parse(word); |
|||
var encrypted = CryptoJS.AES.encrypt(srcs, key, { |
|||
mode: CryptoJS.mode.ECB, |
|||
padding: CryptoJS.pad.Pkcs7 |
|||
}); |
|||
return encrypted.toString(); |
|||
} |
@ -1,17 +0,0 @@ |
|||
import config from '@/config' |
|||
const baseUrl = config.baseUrl |
|||
export const myRequest = (option = {}) => { |
|||
return new Promise((reslove, reject) => { |
|||
uni.request({ |
|||
url: baseUrl + option.url, |
|||
data: option.data, |
|||
method: option.method || "GET", |
|||
success: (result) => { |
|||
reslove(result) |
|||
}, |
|||
fail: (error) => { |
|||
reject(error) |
|||
} |
|||
}) |
|||
}) |
|||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue