Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
wanda-ball
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0b2a01d3
authored
Jun 03, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
环境命令区分
parent
e8ae8eea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
build/build.js
+1
-1
package.json
+1
-1
src/modules/js/api.js
+7
-6
No files found.
build/build.js
View file @
0b2a01d3
...
...
@@ -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
()
...
...
package.json
View file @
0b2a01d3
...
...
@@ -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"
:
""
},
...
...
src/modules/js/api.js
View file @
0b2a01d3
...
...
@@ -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-t
api.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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment