Authored by ccbikai

代码格式化

... ... @@ -79,4 +79,4 @@ require('./dispatch')(app);
// listener
app.listen(config.port, function() {
console.log('yohobuy start');
});
\ No newline at end of file
});
... ...
... ... @@ -14,11 +14,11 @@ const config = require('../../config/common');
* wechat登录
*/
passport.use(new WeixinStrategy({
clientID: config.wechat.appID,
clientSecret: config.wechat.appSecret,
clientID: config.thirdLogin.wechat.appID,
clientSecret: config.thirdLogin.wechat.appSecret,
callbackURL: `${config.siteUrl}/passport/login/wechat/callback`,
requireState: false,
scope: 'snsapi_userinfo'
}, (accessToken, refreshToken, profile, done) => {
done(null, profile);
}));
\ No newline at end of file
}));
... ...
... ... @@ -66,4 +66,4 @@ const wechat = {
}
};
exports.wechat = wechat;
\ No newline at end of file
exports.wechat = wechat;
... ...
... ... @@ -37,4 +37,4 @@ app.use(passport.session());
// router
app.use(require('./router'));
module.exports = app;
\ No newline at end of file
module.exports = app;
... ...
... ... @@ -15,6 +15,10 @@ class Auth {
method: 'app.passport.signinByOpenID'
};
if (shoppingKey) {
param.shopping_key = shoppingKey;
}
return api.get('', sign.apiSign(param));
}
... ... @@ -44,4 +48,4 @@ class Auth {
}
}
module.exports = Auth;
\ No newline at end of file
module.exports = Auth;
... ...
... ... @@ -15,4 +15,4 @@ const router = express.Router(); // eslint-disable-line
router.get('/login/wechat', login.wechat.beforeLogin, login.wechat.login); // 登录
router.get('/login/wechat/callback', login.wechat.callback);
module.exports = router;
\ No newline at end of file
module.exports = router;
... ...
... ... @@ -48,9 +48,11 @@ module.exports = {
prettyPrint: true
}
},
wechat: {
appID: 'wx3ae21dcbb82ad672',
appSecret: 'e78afb2321e6a19085767e1a0f0d52c1'
thirdLogin: {
wechat: {
appID: 'wx3ae21dcbb82ad672',
appSecret: 'e78afb2321e6a19085767e1a0f0d52c1'
}
}
};
... ... @@ -76,4 +78,4 @@ if (isProduction) {
useOneapm: true,
useCache: true
});
}
\ No newline at end of file
}
... ...