Commit 2315c64a authored by youjie's avatar youjie

no message

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