Commit 34e288df authored by zhengke's avatar zhengke

修改

parent 8299b9ba
......@@ -9,8 +9,7 @@ export default{
//ERP本地缓存
Vue.prototype.md5 = md5;
Vue.prototype.getLocalStorage = function () {
console.log('进入~~~~~~')
var localStorageData = window.localStorage["userInfo"];
var localStorageData = window.localStorage["loginUserInfo"];
if (localStorageData !== undefined && localStorageData != 'undefined') {
return JSON.parse(localStorageData);
} else {
......@@ -87,24 +86,28 @@ export default{
var apiurl = this.domainManager().PostUrl;
this.apiurl = apiurl;
var branchId = tokenData.data.School_Id;
var departmentId = 1;
var departmentName = 1;
var groupName = tokenData.data.GroupName;
var branchName = tokenData.data.SchoolName;
var uName = tokenData.data.AccountName;
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
let tempLanguage = 0;
if (localStorage.language && localStorage.language != '') {
if (localStorage.language == "zh-TW") {
tempLanguage = 1;
} else if (localStorage.language == "Japanese") {
tempLanguage = 2;
}
}
var postData = {
"msg": msg,
"cmd": cmd,
"timestamp": timestamp,
"token": token,
"sign": md5Str,
"languageId": tempLanguage
"branchId":branchId, //公司id
"departmentId":departmentId, //部门id
"groupName":groupName, //集团名称
"branchName":branchName, //公司名称
"departmentName":departmentName, //部门名称
"uName":uName //用户名称
}
this.$http.post(apiurl, postData, {
headers: {
......
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