Commit 7100ae0b by 蒋勇

d

parent 04e5c26e
...@@ -19,9 +19,9 @@ class APIBase{ ...@@ -19,9 +19,9 @@ class APIBase{
if(!req.xctx.appkey){ if(!req.xctx.appkey){
return [-200,"请求头缺少应用x-app-key"] return [-200,"请求头缺少应用x-app-key"]
}else{ }else{
let app=await this.cacheManager["AppCache"].cache(req.xctx.appkey); // let app=await this.cacheManager["AppCache"].cache(req.xctx.appkey);
req.xctx.appid=app.id; // req.xctx.appid=app.id;
pobj.app_id=app.id;//传递参数对象里注入app_id // pobj.app_id=app.id;//传递参数对象里注入app_id
} }
//平台注册时,companyid,companykey都为空 //平台注册时,companyid,companykey都为空
//自由注册时,companykey不能为空 //自由注册时,companykey不能为空
......
...@@ -65,7 +65,7 @@ class CtlBase { ...@@ -65,7 +65,7 @@ class CtlBase {
// if(!req.xctx.companyid && !req.xctx.companykey){ // if(!req.xctx.companyid && !req.xctx.companykey){
// return [-200,"请求头缺少应用x-app-key"] // return [-200,"请求头缺少应用x-app-key"]
// } // }
if (!req.xctx.companyid && req.xctx.fromcompanykey && req.xctx.fromcompanykey != "null") { if (!req.xctx.companyid && req.xctx.fromcompanykey && req.xctx.fromcompanykey != "null" && req.xctx.fromcompanykey!="undefined") {
let comptmp = await this.cacheManager["CompanyCache"].cache(req.xctx.fromcompanykey); let comptmp = await this.cacheManager["CompanyCache"].cache(req.xctx.fromcompanykey);
req.xctx.companyid = comptmp.id; req.xctx.companyid = comptmp.id;
} }
......
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