|
@@ -1,3 +1,4 @@
|
|
|
+/********** 本地环境 start **********/
|
|
|
const dev = {
|
|
|
baseURL: 'http://192.168.0.179:82/api',
|
|
|
host: 'localhost',
|
|
@@ -28,8 +29,9 @@ export default {
|
|
|
title: process.env.npm_package_name || '',
|
|
|
meta: [
|
|
|
{ charset: 'utf-8' },
|
|
|
- { name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
|
- // { name: 'viewport', content: 'width=device-width, user-csalable=yes, initial-scale=0.25, minimum-scale=0.1, maximum-scale=0.25' },
|
|
|
+ // { name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
|
+ // 移动端视口
|
|
|
+ { name: 'viewport', content: 'width=device-width, user-csalable=yes, initial-scale=0.25, minimum-scale=0.1, maximum-scale=0.25' },
|
|
|
{ name: 'nuxtConfigDescription', content: process.env.npm_package_description || '' },
|
|
|
{name:'applicable-device',content:'pc'},
|
|
|
{ 'http-equiv':"Cache-Control",content:'no-transform' },
|
|
@@ -45,6 +47,8 @@ export default {
|
|
|
*/
|
|
|
css: [
|
|
|
'element-ui/lib/theme-chalk/index.css',
|
|
|
+ // 移动端栅格
|
|
|
+ // 'element-ui/lib/theme-chalk/display.css',
|
|
|
'@/assets/scss/main.scss'
|
|
|
],
|
|
|
/*
|
|
@@ -86,15 +90,115 @@ export default {
|
|
|
// 异步加载样式 默认false
|
|
|
extractCSS: true
|
|
|
},
|
|
|
- // server: {
|
|
|
- // port 端口,默认3000,nuxt默认
|
|
|
- // port: 3000, // default: 3000
|
|
|
- // host:连接服务器主机名
|
|
|
- // host: '192.168.0.79' // default: localhost,
|
|
|
- // },
|
|
|
axios: {
|
|
|
// node连接服务器地址(调用后台接口地址)
|
|
|
// baseURL: 'http://182.92.186.22:83/api',
|
|
|
baseURL: 'http://192.168.0.179:8100',
|
|
|
},
|
|
|
};
|
|
|
+/********** 本地环境 end **********/
|
|
|
+
|
|
|
+/********** 正式环境打包 start **********/
|
|
|
+/*const dev = {
|
|
|
+ baseURL: 'http://192.168.0.179:82/api',
|
|
|
+ host: 'localhost',
|
|
|
+}
|
|
|
+const pro = {
|
|
|
+ baseURL: 'https://www.mtavip.com/api',
|
|
|
+ host: 'https://www.mtavip.com/api',
|
|
|
+}
|
|
|
+
|
|
|
+const isDev = true;
|
|
|
+
|
|
|
+export default {
|
|
|
+ /!*
|
|
|
+ ** Nuxt rendering mode
|
|
|
+ ** See https://nuxtjs.org/api/configuration-mode
|
|
|
+ *!/
|
|
|
+ mode: 'universal',
|
|
|
+ /!*
|
|
|
+ ** Nuxt target
|
|
|
+ ** See https://nuxtjs.org/api/configuration-target
|
|
|
+ *!/
|
|
|
+ target: 'server',
|
|
|
+ /!*
|
|
|
+ ** Headers of the page
|
|
|
+ ** See https://nuxtjs.org/api/configuration-head
|
|
|
+ *!/
|
|
|
+ head: {
|
|
|
+ title: process.env.npm_package_name || '',
|
|
|
+ meta: [
|
|
|
+ { charset: 'utf-8' },
|
|
|
+ // { name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
|
+ // 移动端视口
|
|
|
+ { name: 'viewport', content: 'width=device-width, user-csalable=yes, initial-scale=0.25, minimum-scale=0.1, maximum-scale=0.25' },
|
|
|
+ { name: 'nuxtConfigDescription', content: process.env.npm_package_description || '' },
|
|
|
+ {name:'applicable-device',content:'pc'},
|
|
|
+ { 'http-equiv':"Cache-Control",content:'no-transform' },
|
|
|
+ { 'http-equiv':"Cache-Control",content:'no-siteapp' },
|
|
|
+
|
|
|
+ ],
|
|
|
+ link: [
|
|
|
+ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ /!*
|
|
|
+ ** Global CSS
|
|
|
+ *!/
|
|
|
+ css: [
|
|
|
+ 'element-ui/lib/theme-chalk/index.css',
|
|
|
+ // 移动端栅格
|
|
|
+ 'element-ui/lib/theme-chalk/display.css',
|
|
|
+ '@/assets/scss/main.scss'
|
|
|
+ ],
|
|
|
+ /!*
|
|
|
+ ** Plugins to load before mounting the App
|
|
|
+ ** https://nuxtjs.org/guide/plugins
|
|
|
+ *!/
|
|
|
+ plugins: [
|
|
|
+ '@/plugins/element-ui', '~/plugins/axios.http', {src:'~plugins/loadsh.js',ssr: false},{src:'~plugins/consult.js',ssr: false},
|
|
|
+ ],
|
|
|
+ /!*
|
|
|
+ ** Auto import components
|
|
|
+ ** See https://nuxtjs.org/api/configuration-components
|
|
|
+ *!/
|
|
|
+ components: true,
|
|
|
+ /!*
|
|
|
+ ** Nuxt.js dev-modules
|
|
|
+ *!/
|
|
|
+ buildModules: [],
|
|
|
+ /!**
|
|
|
+ * 环境变量设置 新闻 拼路径时的根级别路径 多用于a标签 href属性
|
|
|
+ *!/
|
|
|
+ env: {
|
|
|
+ baseUrl: 'https://www.mtavip.com'
|
|
|
+ },
|
|
|
+ /!**
|
|
|
+ * loading 进度条样式
|
|
|
+ *!/
|
|
|
+ loading: false,
|
|
|
+ /!*
|
|
|
+ ** Nuxt.js modules
|
|
|
+ *!/
|
|
|
+ modules: ['@nuxtjs/axios'],
|
|
|
+ /!*
|
|
|
+ ** Build configuration
|
|
|
+ ** See https://nuxtjs.org/api/configuration-build/
|
|
|
+ *!/
|
|
|
+ build: {
|
|
|
+ transpile: [/^element-ui/],
|
|
|
+ // 异步加载样式 默认false
|
|
|
+ extractCSS: true
|
|
|
+ },
|
|
|
+ server: {
|
|
|
+ // port 端口,默认3000,nuxt默认
|
|
|
+ port: 3000, // default: 3000
|
|
|
+ // host:连接服务器主机名
|
|
|
+ host: '192.168.0.79' // default: localhost,
|
|
|
+ },
|
|
|
+ axios: {
|
|
|
+ // 正式环境
|
|
|
+ baseURL: 'https://www.mtavip.com/api',
|
|
|
+ },
|
|
|
+};*/
|
|
|
+/********** 正式环境打包 end **********/
|