Commit 6495fd8b authored by 张伯涛's avatar 张伯涛

加密问题修改

parent 0a975ffd
......@@ -31,5 +31,5 @@ export const exportRecyclePumpAlarmData = (item) => {
// return httpTwo.get(`/busFireExtinguisher/test3`,'','',{responseType:'blob'})
// }
export const getAudio = (item) => {
return httpTwo.get(`/busFireExtinguisher/test3?audioUrl=${item}`,'','',{responseType:'blob'})
return httpTwo.get(`/busFireExtinguisher/test4?audioUrl=${item}`,'','',{responseType:'blob'})
}
import httpTwo from '../httpTwo'
import qs from "qs";
import { encrypt } from '../../utils/jsencrypt.js'
import { encrypt,encryptTwo } from '../../utils/jsencrypt.js'
// 获取随机uuid
export const getAuthUUID = params => {
......@@ -17,8 +17,14 @@ export const createToken = params => {
const sign = qs.stringify({
sign: encrypt(params)
})
const headers = {'Content-Type': 'application/x-www-form-urlencoded'}
return httpTwo.post(`/auth/createToken`, sign,headers).then(res => res).catch(function (error) {
console.log('params',params)
const data = {
userId: encryptTwo(params.userId),
username: encryptTwo(params.username),
uuid: encryptTwo(params.uuid),
}
// const headers = {'Content-Type': 'application/x-www-form-urlencoded'}
return httpTwo.post(`/auth/createToken`, data).then(res => res).catch(function (error) {
console.log(error);
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment