Commit 0b2a01d3 by hank

环境命令区分

parent e8ae8eea
......@@ -9,7 +9,7 @@ const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
console.log(process.env.BUILD_ENV)
const spinner = ora('building for production...')
spinner.start()
......
......@@ -8,7 +8,7 @@
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"build": "cross-env NODE_ENV=production node build/build.js",
"buildtest": "cross-env NODE_ENV=development node build/build.js",
"buildtest": "cross-env BUILD_ENV=dev NODE_ENV=development node build/build.js",
"rename": "node tools.js",
"postbuild": ""
},
......
......@@ -15,24 +15,25 @@
const mode = process.env.NODE_ENV
const BUILD_ENV = process.env.BUILD_ENV
const weburl = 'https://wanda-h5.bdideal.com'
// 正式地址
// var url = mode === 'development' ? 'http://web-comment.canskj.cn' : 'http://wanda-qj.iyunfish.com'
// 测试地址
var url = mode === 'development' ? 'https://wanda-video-tapi.bdideal.com' : 'https://wanda-video-tapi.bdideal.com'
var url = mode === 'development' ? 'https://wanda-video-tapi.bdideal.com' : BUILD_ENV==='dev' ? 'https://wanda-video-tapi.bdideal.com' : 'https://wanda-video-api.bdideal.com'
console.log('mode', mode, url)
// api地址
var h5Url = mode === 'development' ? '/video-test' : BUILD_ENV==='dev' ? '/video-test' : '/video'
var server = url;
var extra = '7';
//防封包装的地址
var wrapHref = weburl + '/video-test/index.html';
var wrapHref = weburl + h5Url + '/index.html';
//首页地址
var indexHref = weburl + '/video-test/index.html';
var indexHref = weburl + h5Url + '/index.html';
// 个人中心地址
var userCenterHref = weburl + '/video-test/user.html';
var shareImg = weburl + '/video-test/static/share.jpg';
var userCenterHref = weburl + h5Url + '/user.html';
var shareImg = weburl + h5Url + '/static/share.jpg';
var signHref = 'http://mr-static.maxrocky.com/h5/wanda/dzgp/index.html'
export default{
server,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment