Commit 2315c64a authored by youjie's avatar youjie

no message

parent 0270e134
...@@ -17,14 +17,19 @@ const request = (cmd:string,msg:any): Promise<HttpResponse>=>{ ...@@ -17,14 +17,19 @@ const request = (cmd:string,msg:any): Promise<HttpResponse>=>{
msg = datas??{} msg = datas??{}
let token = ""; let token = "";
let key = ""; let key = "";
let groupId = ""
let timestamp = (new Date()).valueOf(); let timestamp = (new Date()).valueOf();
if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.token) { if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.token) {
token = Store.state.user?.token?.access_token token = Store.state.user?.token?.access_token
key = Store.state.user?.secretKey key = Store.state.user?.secretKey
} }
if (localStorage.vuex && JSON.parse(localStorage.vuex).user?.userDetail) {
groupId = Store.state.user?.userDetail?.groupId
}
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`); var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var postData = { var postData = {
"groupId": groupId,
"msg": msg, "msg": msg,
"cmd": cmd, "cmd": cmd,
"timestamp": timestamp, "timestamp": timestamp,
......
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