|
@@ -66,8 +66,6 @@ class LoginService extends CrudService {
|
|
|
},
|
|
|
dataType: 'json',
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
user.remark = vipuser.data.id;
|
|
|
}
|
|
|
|
|
@@ -83,20 +81,36 @@ class LoginService extends CrudService {
|
|
|
user.menus = JSON.stringify(_menus);
|
|
|
const token = await this.createJwt(user);
|
|
|
await this.app.redis.set(key, token, 'EX', 60 * 60 * 24);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ let logFlag = false;
|
|
|
+
|
|
|
+ if(_user.role === '4' || _user.role === '5' || _user.role === '6'){
|
|
|
+ const applydata = { user_id: user.id};
|
|
|
+ const url = 'http://127.0.0.1:9004/api/live/dock/getapply/';
|
|
|
+ const apply = await this.ctx.curl(url, {
|
|
|
+ method: 'post',
|
|
|
+ headers: {
|
|
|
+ 'content-type': 'application/json',
|
|
|
+ },
|
|
|
+ dataType: 'json',
|
|
|
+ data: JSON.stringify(applydata),
|
|
|
+ });
|
|
|
+ console.log('-----------------------------apply');
|
|
|
+ console.log(apply);
|
|
|
+ }else if(_user.role === '2' || _user.role === '8'){
|
|
|
+ logFlag = true;
|
|
|
+ }
|
|
|
+ if(logFlag){
|
|
|
+ const operationlogdata = { login_id: user.id, login_name: user.name, login_role: user.role, type: '0', operation_edit: '登录' };
|
|
|
+ const url = 'http://127.0.0.1:9004/api/market/operationlog/';
|
|
|
+ const operationlog = await this.ctx.curl(url, {
|
|
|
+ method: 'post',
|
|
|
+ headers: {
|
|
|
+ 'content-type': 'application/json',
|
|
|
+ },
|
|
|
+ dataType: 'json',
|
|
|
+ data: JSON.stringify(operationlogdata),
|
|
|
+ });
|
|
|
+ }
|
|
|
return { key };
|
|
|
}
|
|
|
|