Commit 7e6de198 by 庄冰

wxtoken

parent bb93a0f7
......@@ -7,7 +7,7 @@ const system=require("../../system");
class WxTokenCache extends CacheBase{
constructor(){
super();
this.prefix="wx_policy_token_wx8aa8a8d4ff3da8bd";
this.prefix="wx_wx8aa8a8d4ff3da8bd";
this.restClient = system.getObject("util.restClient");
this.wxTokenSve = system.getObject("service.common.wxTokenSve");
}
......@@ -27,6 +27,7 @@ class WxTokenCache extends CacheBase{
}
if(!obj){//无缓存
var newobj = await this.wxTokenSve.getToken();
console.log(newobj);
if(newobj && newobj.access_token){
var newobjstring=JSON.stringify(newobj);
await this.redisClient.rpushWithEx(key,newobjstring,7000);
......
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