owl-cli 7.32.0 → 7.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,7 +31,7 @@ function getUserByToken(token){
|
|
|
31
31
|
return {id:'0'}
|
|
32
32
|
}
|
|
33
33
|
var user = owl_mall_uService.get(user_id);
|
|
34
|
-
return user;
|
|
34
|
+
return {user:user,server_token:server_token};
|
|
35
35
|
}
|
|
36
36
|
function checklogin() {
|
|
37
37
|
var magic = $.getSystemProperty("magic");
|
|
@@ -64,8 +64,10 @@ function checklogin() {
|
|
|
64
64
|
var params = JSON.parse($body);
|
|
65
65
|
var token = params._req_token
|
|
66
66
|
if(token){
|
|
67
|
-
var
|
|
68
|
-
|
|
67
|
+
var token_detail = getUserByToken(token);
|
|
68
|
+
var token_user = token_detail.user;
|
|
69
|
+
var server_token = token_detail.server_token;
|
|
70
|
+
if(token_user && server_token){
|
|
69
71
|
var env = {
|
|
70
72
|
now: new Date().getTime(),
|
|
71
73
|
loginUserId: token_user.id,
|
|
@@ -73,9 +75,9 @@ function checklogin() {
|
|
|
73
75
|
// loginUser:loginUser,
|
|
74
76
|
shopId: m,
|
|
75
77
|
warehouseId: "",
|
|
76
|
-
roleId:
|
|
77
|
-
orgId:
|
|
78
|
-
orgIds:
|
|
78
|
+
roleId: server_token.role_id,
|
|
79
|
+
orgId: server_token.org_id,
|
|
80
|
+
orgIds: [server_token.org_id],
|
|
79
81
|
m: m
|
|
80
82
|
}
|
|
81
83
|
return env;
|