60 changed files with 1694 additions and 125 deletions
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
|
||||
|
// res.json({code:200})
|
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
|
||||
|
res.json({code:200}) |
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
|
||||
|
res.json({code:200}) |
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
|
||||
|
res.send({code:200}) |
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
|
||||
|
// res.send({code:200})
|
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req,res) |
||||
|
// res.send({code:200})
|
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (ctx, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(ctx,next) |
||||
|
// res.send({code:200})
|
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req,res) |
||||
|
// res.send({code:200})
|
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
// console.log(req,res)
|
||||
|
// res.send({code:200})
|
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
// console.log(req,res)
|
||||
|
// res.send({code:200})
|
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,11 @@ |
|||||
|
export default function (req, res, next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
// console.log(req,res)
|
||||
|
res.status(200).send('<p>12355</p>') |
||||
|
// res 是 Node.js http response 对象
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (ctx) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
// console.log(req,res)
|
||||
|
ctx.body={ |
||||
|
code:200 |
||||
|
} |
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (req,res) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req,res) |
||||
|
ctx.body={ |
||||
|
code:200 |
||||
|
} |
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (req,res) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req,res) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (req,res) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (req,res) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(res) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (req,res) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req.btx) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (req,res) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req.ctx) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (req,res) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req.ctx.body={code:200}) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
// next()
|
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (req,res) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req.ctx.body={code:200}) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,12 @@ |
|||||
|
export default function (req,res,next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req.ctx.body={code:200}) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,13 @@ |
|||||
|
export default function (req,res,next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req.ctx.body={code:200}) |
||||
|
console.log(req.ctx.body={code:200}) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,13 @@ |
|||||
|
export default function (req,res,next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req.ctx.body={code:200}) |
||||
|
console.log(res.ctx.body={code:200}) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,13 @@ |
|||||
|
export default function (req,res,next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
console.log(req.ctx.body={code:200}) |
||||
|
console.log(res) |
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,13 @@ |
|||||
|
export default function (req,res,next) { |
||||
|
// req 是 Node.js http request 对象
|
||||
|
// console.log(req.ctx.body={code:200})
|
||||
|
// console.log(res)
|
||||
|
// ctx.body={
|
||||
|
// code:200
|
||||
|
// }
|
||||
|
//next是一个调用下一个中间件的函数
|
||||
|
// 如果您的中间件不是最终执行,请不要忘记在最后调用next!
|
||||
|
next() |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,4 @@ |
|||||
|
|
||||
|
|
||||
|
@import "./common.scss"; |
||||
|
|
@ -0,0 +1,7 @@ |
|||||
|
|
||||
|
|
||||
|
@import "./common.scss"; |
||||
|
|
||||
|
html{ |
||||
|
|
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
|
||||
|
|
||||
|
@import "./common.scss"; |
||||
|
|
||||
|
html{ |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
|
||||
|
|
||||
|
@import "./common.scss"; |
||||
|
|
||||
|
html{ |
||||
|
width: 100vw; |
||||
|
height: 100vh; |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
<template> |
||||
|
<div class="default layout"> |
||||
|
<nuxt /> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
components: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.default.layout{ |
||||
|
background: #F5F5D5; |
||||
|
width: 100vw; |
||||
|
height: 100vh; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,19 @@ |
|||||
|
<template> |
||||
|
<div class="default layout"> |
||||
|
<nuxt /> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
components: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.default.layout{ |
||||
|
background: #F5F5D5; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,19 @@ |
|||||
|
<template> |
||||
|
<div class="default layout"> |
||||
|
<nuxt /> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
components: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.default.layout{ |
||||
|
background: #F5F5D5; |
||||
|
width: 100vw; |
||||
|
height: 100vh; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,17 @@ |
|||||
|
<template> |
||||
|
<div class="default layout"> |
||||
|
<nuxt /> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
components: {} |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.default.layout { |
||||
|
background: #f5f5d5; |
||||
|
width: 100vw; |
||||
|
height: 100vh; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,20 @@ |
|||||
|
<template> |
||||
|
<div class="default layout"> |
||||
|
<nuxt /> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
components: {} |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.default.layout { |
||||
|
background: #f5f5d5; |
||||
|
position: fixed; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
top: 0; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,20 @@ |
|||||
|
<template> |
||||
|
<div class="default layout"> |
||||
|
<nuxt /> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
components: {} |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.default.layout { |
||||
|
background: #f5f5d5; |
||||
|
position: fixed; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
top: 0; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,80 @@ |
|||||
|
const path = require('path'); |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
title: process.env.npm_package_name || '', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
'bootstrap-vue/nuxt', |
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3} |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,80 @@ |
|||||
|
const path = require('path'); |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
title: process.env.npm_package_name || '', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3} |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
const path = require('path'); |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
title: process.env.npm_package_name || '', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
npm_package_name:'Beer', |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3} |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
const path = require('path'); |
||||
|
console.log(process) |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
title: process.env.npm_package_name || '', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
npm_package_name:'Beer', |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3} |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
const path = require('path'); |
||||
|
console.log(process.env) |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
title: process.env.npm_package_name || '', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
npm_package_name:'Beer', |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3} |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
const path = require('path'); |
||||
|
console.log(process.env.npm_package_name) |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
title: process.env.npm_package_name || '', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
npm_package_name:'Beer', |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3} |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
const path = require('path'); |
||||
|
console.log(process.env.npm_package_name) |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
// process.env.npm_package_name ||
|
||||
|
title: 'Beer', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3} |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
const path = require('path'); |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
// process.env.npm_package_name ||
|
||||
|
title: 'Beer', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3} |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
const path = require('path'); |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
// process.env.npm_package_name ||
|
||||
|
title: 'Beer', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3}, |
||||
|
proxy: true |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,85 @@ |
|||||
|
const path = require('path'); |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
// process.env.npm_package_name ||
|
||||
|
title: 'Beer', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3}, |
||||
|
proxy: true |
||||
|
}, |
||||
|
proxy: { |
||||
|
'/api/': 'http://api.example.com' |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
'~/api/auth' |
||||
|
] |
||||
|
} |
@ -0,0 +1,85 @@ |
|||||
|
const path = require('path'); |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
// process.env.npm_package_name ||
|
||||
|
title: 'Beer', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3}, |
||||
|
proxy: true |
||||
|
}, |
||||
|
proxy: { |
||||
|
'/api/': 'http://api.example.com' |
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
{path:'/api/auth', handler:'~/api/auth'} |
||||
|
] |
||||
|
} |
@ -0,0 +1,85 @@ |
|||||
|
const path = require('path'); |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
// process.env.npm_package_name ||
|
||||
|
title: 'Beer', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3}, |
||||
|
proxy: true |
||||
|
}, |
||||
|
proxy: { |
||||
|
// '/api/': 'http://api.example.com'
|
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
{path:'/api/auth', handler:'~/api/auth'} |
||||
|
] |
||||
|
} |
@ -0,0 +1,86 @@ |
|||||
|
const path = require('path'); |
||||
|
module.exports = { |
||||
|
mode: 'universal', |
||||
|
/* |
||||
|
** Headers of the page |
||||
|
*/ |
||||
|
head: { |
||||
|
// process.env.npm_package_name ||
|
||||
|
title: 'Beer', |
||||
|
meta: [ |
||||
|
{charset: 'utf-8'}, |
||||
|
{name: 'viewport', content: 'width=device-width, initial-scale=1, shrink-to-fit=no'}, |
||||
|
{hid: 'description', name: 'description', content: process.env.npm_package_description || ''} |
||||
|
], |
||||
|
link: [ |
||||
|
{rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'} |
||||
|
] |
||||
|
}, |
||||
|
env: { |
||||
|
baseUrl: process.env.BASE_URL || 'http://localhost:3000' |
||||
|
}, |
||||
|
/* |
||||
|
** Customize the progress-bar color |
||||
|
*/ |
||||
|
loading: {color: '#fff'}, |
||||
|
/* |
||||
|
** Global CSS |
||||
|
*/ |
||||
|
css: [ |
||||
|
'reset-css/reset.css', |
||||
|
], |
||||
|
/* |
||||
|
** Plugins to load before mounting the App |
||||
|
*/ |
||||
|
plugins: [ |
||||
|
'~/plugins/axios', |
||||
|
'~/plugins/global-components' |
||||
|
], |
||||
|
/* |
||||
|
** Nuxt.js dev-modules |
||||
|
*/ |
||||
|
devModules: [], |
||||
|
/* |
||||
|
** Nuxt.js modules |
||||
|
*/ |
||||
|
modules: [ |
||||
|
'@nuxtjs/style-resources', |
||||
|
// 使用bootstrap-vue
|
||||
|
// 'bootstrap-vue/nuxt',
|
||||
|
'@nuxtjs/axios' |
||||
|
], |
||||
|
//https://axios.nuxtjs.org/setup
|
||||
|
axios: { |
||||
|
// proxyHeaders: false
|
||||
|
retry: {retries: 3}, |
||||
|
proxy: true |
||||
|
}, |
||||
|
proxy: { |
||||
|
// 跟下面的冲突了
|
||||
|
// '/api/': 'http://api.example.com'
|
||||
|
}, |
||||
|
styleResources: { |
||||
|
// your settings here
|
||||
|
sass: [], |
||||
|
scss: ['./assets/style/_global.scss'], |
||||
|
less: [], |
||||
|
stylus: [] |
||||
|
}, |
||||
|
/* |
||||
|
** Build configuration |
||||
|
*/ |
||||
|
build: { |
||||
|
/* |
||||
|
** You can extend webpack config here |
||||
|
*/ |
||||
|
extend(config, ctx) { |
||||
|
config.resolve.alias['@pages'] = path.resolve(__dirname, 'pages'); |
||||
|
config.resolve.alias['@assets'] = path.resolve(__dirname, 'assets'); |
||||
|
config.resolve.alias['@components'] = path.resolve(__dirname, 'components'); |
||||
|
config.resolve.alias['@images'] = path.resolve(__dirname, 'assets', 'images'); |
||||
|
} |
||||
|
}, |
||||
|
serverMiddleware: [ |
||||
|
{path:'/api/auth', handler:'~/api/auth'} |
||||
|
] |
||||
|
} |
@ -0,0 +1,47 @@ |
|||||
|
<template> |
||||
|
<b-container> |
||||
|
{{ip}} |
||||
|
<b-row> |
||||
|
<b-col md="4" sm="2">1 of 3</b-col> |
||||
|
<b-col md="4" sm="2">2 of 3</b-col> |
||||
|
<b-col md="4" sm="8">3 of 3</b-col> |
||||
|
</b-row> |
||||
|
</b-container> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
middleware: 'auth', |
||||
|
//用于请求数据,返回的数据会作用在data上 |
||||
|
async asyncData({ $axios }) { |
||||
|
const ip = await $axios.$get('http://icanhazip.com'); |
||||
|
return { ip } |
||||
|
}, |
||||
|
//无法在内部使用this获取组件实例 |
||||
|
//fetch 方法用于在渲染页面前填充应用的状态树(store)数据 |
||||
|
//与 asyncData 方法类似,不同的是它不会设置组件的数据。 |
||||
|
async fetch ({ store, params,$axios }) { |
||||
|
let ip = await $axios.$get('http://icanhazip.com') |
||||
|
store.commit('todos/SET_IP', ip) |
||||
|
}, |
||||
|
mounted(){ |
||||
|
console.log(this.$store) |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
ip: '0.0.0.0' |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
async fetchSomething() { |
||||
|
const ip = await this.$axios.$get('http://icanhazip.com'); |
||||
|
this.ip = ip |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='scss'> |
||||
|
@import "style"; |
||||
|
|
||||
|
</style> |
@ -0,0 +1,41 @@ |
|||||
|
<template> |
||||
|
<b-container> |
||||
|
{{ip}} |
||||
|
<b-row> |
||||
|
<b-col md="4" sm="2">1 of 3</b-col> |
||||
|
<b-col md="4" sm="2">2 of 3</b-col> |
||||
|
<b-col md="4" sm="8">3 of 3</b-col> |
||||
|
</b-row> |
||||
|
</b-container> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
middleware: 'auth', |
||||
|
//用于请求数据,返回的数据会作用在data上 |
||||
|
async asyncData({ $axios }) { |
||||
|
return { } |
||||
|
}, |
||||
|
//无法在内部使用this获取组件实例 |
||||
|
//fetch 方法用于在渲染页面前填充应用的状态树(store)数据 |
||||
|
//与 asyncData 方法类似,不同的是它不会设置组件的数据。 |
||||
|
async fetch ({ store, params,$axios }) { |
||||
|
|
||||
|
}, |
||||
|
mounted(){ |
||||
|
|
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='scss'> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,31 @@ |
|||||
|
<template> |
||||
|
<b-container> |
||||
|
|
||||
|
</b-container> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
async asyncData({ $axios }) { |
||||
|
return { } |
||||
|
}, |
||||
|
async fetch ({ store, params,$axios }) { |
||||
|
|
||||
|
}, |
||||
|
mounted(){ |
||||
|
|
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='scss'> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,31 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
async asyncData({ $axios }) { |
||||
|
return { } |
||||
|
}, |
||||
|
async fetch ({ store, params,$axios }) { |
||||
|
|
||||
|
}, |
||||
|
mounted(){ |
||||
|
|
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='scss'> |
||||
|
|
||||
|
</style> |
Before Width: | Height: | Size: 926 B |
@ -1,47 +1,31 @@ |
|||||
<template> |
<template> |
||||
<b-container> |
<div> |
||||
{{ip}} |
|
||||
<b-row> |
</div> |
||||
<b-col md="4" sm="2">1 of 3</b-col> |
|
||||
<b-col md="4" sm="2">2 of 3</b-col> |
|
||||
<b-col md="4" sm="8">3 of 3</b-col> |
|
||||
</b-row> |
|
||||
</b-container> |
|
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
export default { |
export default { |
||||
middleware: 'auth', |
|
||||
//用于请求数据,返回的数据会作用在data上 |
|
||||
async asyncData({ $axios }) { |
async asyncData({ $axios }) { |
||||
const ip = await $axios.$get('http://icanhazip.com'); |
return { } |
||||
return { ip } |
|
||||
}, |
}, |
||||
//无法在内部使用this获取组件实例 |
|
||||
//fetch 方法用于在渲染页面前填充应用的状态树(store)数据 |
|
||||
//与 asyncData 方法类似,不同的是它不会设置组件的数据。 |
|
||||
async fetch ({ store, params,$axios }) { |
async fetch ({ store, params,$axios }) { |
||||
let ip = await $axios.$get('http://icanhazip.com') |
|
||||
store.commit('todos/SET_IP', ip) |
|
||||
}, |
}, |
||||
mounted(){ |
mounted(){ |
||||
console.log(this.$store) |
|
||||
}, |
}, |
||||
data() { |
data() { |
||||
return { |
return { |
||||
ip: '0.0.0.0' |
|
||||
} |
} |
||||
}, |
}, |
||||
methods: { |
methods: { |
||||
async fetchSomething() { |
|
||||
const ip = await this.$axios.$get('http://icanhazip.com'); |
|
||||
this.ip = ip |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
</script> |
</script> |
||||
|
|
||||
<style lang='scss'> |
<style lang='scss'> |
||||
@import "style"; |
|
||||
|
|
||||
</style> |
</style> |
||||
|
@ -1,85 +0,0 @@ |
|||||
<template> |
|
||||
<b-container fluid> |
|
||||
<div class="panel"> |
|
||||
<form class="vform"> |
|
||||
<b-img src="https://picsum.photos/125/125/?image=58" center rounded fluid alt="Center image" |
|
||||
style="margin-bottom: 20px;"></b-img> |
|
||||
<div class="vinput"> |
|
||||
<div class="vtitle"> |
|
||||
<span class="title">账号</span> |
|
||||
<span class="subtitle">(账号|邮箱|手机)</span> |
|
||||
</div> |
|
||||
<b-form-input class="input" type="text" v-model="account" placeholder="请输入您的账号"></b-form-input> |
|
||||
<div class="vtitle"> |
|
||||
<span class="title">密码</span> |
|
||||
<span class="subtitle">(文字+数字)</span> |
|
||||
</div> |
|
||||
<b-form-input class="input" type="password" v-model="password" placeholder="请输入您的密码"></b-form-input> |
|
||||
</div> |
|
||||
<b-button block variant="primary" @click="login"> |
|
||||
<div v-if="isLoging" class="loading"> |
|
||||
<BaseLoading></BaseLoading> |
|
||||
</div> |
|
||||
<div v-if="!isLoging">登录</div> |
|
||||
</b-button> |
|
||||
</form> |
|
||||
</div> |
|
||||
</b-container> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
export default { |
|
||||
data() { |
|
||||
return { |
|
||||
isLoging:false, |
|
||||
account: '', |
|
||||
password:'', |
|
||||
error:'' |
|
||||
} |
|
||||
}, |
|
||||
methods:{ |
|
||||
login(){ |
|
||||
this.$router.replace('/') |
|
||||
console.log(this) |
|
||||
this.isLoging = !this.isLoging |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style lang='scss' scoped> |
|
||||
.panel { |
|
||||
background: #fff; |
|
||||
width: 500px; |
|
||||
/*height: 500px;*/ |
|
||||
border-radius: 2%; |
|
||||
box-sizing: content-box; |
|
||||
position: fixed; |
|
||||
top: 50%; |
|
||||
left: 50%; |
|
||||
transform: translateX(-50%) translateY(-50%); |
|
||||
text-align: left; |
|
||||
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2); |
|
||||
@media only screen and (max-width: 767px) { |
|
||||
width: 90%; |
|
||||
} |
|
||||
.vform { |
|
||||
margin: 50px auto; |
|
||||
width: 80%; |
|
||||
.input { |
|
||||
margin: 20px 0; |
|
||||
} |
|
||||
} |
|
||||
.vtitle { |
|
||||
.title { |
|
||||
font-size: 20px; |
|
||||
font-weight: bold; |
|
||||
} |
|
||||
.subtitle { |
|
||||
font-size: 12px; |
|
||||
color: rgba(0, 0, 0, 0.44); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
</style> |
|
Loading…
Reference in new issue