|
@@ -36,12 +36,12 @@ module.exports = app => {
|
|
|
if (!ctx.app.config.is_debug) {
|
|
|
await ctx.service.maintain.syncMaintainData();
|
|
|
}
|
|
|
-
|
|
|
const renderData = {
|
|
|
maintainData,
|
|
|
maintainConst,
|
|
|
errorMessage,
|
|
|
hostUrl: ctx.protocol + '://' + ctx.host,
|
|
|
+ appid: ctx.app.config.wxCode.appid,
|
|
|
};
|
|
|
await ctx.render('login/login.ejs', renderData);
|
|
|
}
|
|
@@ -56,6 +56,7 @@ module.exports = app => {
|
|
|
try {
|
|
|
const client = new OAuth(ctx.app.config.wxCode.appid, ctx.app.config.wxCode.appsecret);
|
|
|
const token = await client.getAccessToken(code);
|
|
|
+ ctx.session.wxbindtoken = token;
|
|
|
// const user = await client.getUser(token.data.openid);
|
|
|
// console.log(user);
|
|
|
if (!token) {
|