diff --git a/app/public/manifest.json b/app/public/manifest.json new file mode 100644 index 0000000..02c23c5 --- /dev/null +++ b/app/public/manifest.json @@ -0,0 +1,16 @@ +{ + "name": "Essay", + "short_name": "Essay", + "icons": [ + { + "src": "/public/favicon.png", + "type": "image/png", + "sizes": "400x400" + } + ], + "start_url": "/", + "scope": "/", + "display": "standalone", + "background_color": "#fff", + "theme_color": "#fff" +} diff --git a/app/public/sw.js b/app/public/sw.js new file mode 100644 index 0000000..13eccff --- /dev/null +++ b/app/public/sw.js @@ -0,0 +1,3 @@ +self.addEventListener('fetch', function (e) { + console.log('正在请求:' + e.request.url); +}); diff --git a/app/service/user.js b/app/service/user.js index 1232861..4fb5717 100644 --- a/app/service/user.js +++ b/app/service/user.js @@ -97,7 +97,7 @@ class UserService extends Service { return jwt.verify(token, key, (err, decoded) => { if (err) { // JWT验证失败,可能是过期或无效 - this.logger.error('token 验证失败', err); + this.logger.warn('token 验证失败', err); return { status: -1, data: 'token解析失败', diff --git a/app/view/theme/layout.ejs b/app/view/theme/layout.ejs index 20786de..4d19bcd 100644 --- a/app/view/theme/layout.ejs +++ b/app/view/theme/layout.ejs @@ -27,6 +27,7 @@ <%}%> + <%- include('./style.ejs') -%> @@ -151,7 +152,7 @@ <%- include('./script.ejs') -%> diff --git a/app/view/theme/script.ejs b/app/view/theme/script.ejs index 2757707..afeba8a 100644 --- a/app/view/theme/script.ejs +++ b/app/view/theme/script.ejs @@ -1,5 +1,3 @@ - - diff --git a/config/config.default.js b/config/config.default.js index d1ef416..67edb62 100644 --- a/config/config.default.js +++ b/config/config.default.js @@ -6,7 +6,8 @@ * @param {Egg.EggAppInfo} appInfo app info */ module.exports = appInfo => { - console.log(appInfo.root); + // console.log(appInfo.root); + /** * built-in config * @type {Egg.EggAppConfig}