Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
common-templete
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
汤强勇
common-templete
Commits
d248cba5
Commit
d248cba5
authored
Feb 28, 2019
by
liuying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webpack打包生成jsp文件配置
parent
4a0fba1a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
46 additions
and
35 deletions
+46
-35
webpack.base.conf.js
build/webpack.base.conf.js
+1
-1
webpack.prod.conf.js
build/webpack.prod.conf.js
+3
-2
index.js
config/index.js
+19
-0
prod.dev.env.js
config/prod.dev.env.js
+1
-1
prod.uat.env.js
config/prod.uat.env.js
+1
-1
index.html
index.html
+12
-3
index.vue
src/pages/home/index.vue
+6
-19
AddMessage.vue
src/pages/marketingCenter/components/AddMessage.vue
+2
-2
index.js
src/router/index.js
+1
-6
No files found.
build/webpack.base.conf.js
View file @
d248cba5
...
...
@@ -120,5 +120,5 @@ module.exports = {
net
:
'empty'
,
tls
:
'empty'
,
child_process
:
'empty'
,
}
,
}
}
build/webpack.prod.conf.js
View file @
d248cba5
...
...
@@ -70,13 +70,14 @@ const webpackConfig = merge(baseWebpackConfig, {
new
HtmlWebpackPlugin
({
filename
:
process
.
env
.
NODE_ENV
===
'testing'
?
'index.html'
:
path
.
resolve
(
__dirname
,
`../dist/
${
env
.
project
.
replace
(
/
[
'"
]
/g
,
""
)}
/index.
html
`
),
:
path
.
resolve
(
__dirname
,
`../dist/
${
env
.
project
.
replace
(
/
[
'"
]
/g
,
""
)}
/index.
jsp
`
),
template
:
'index.html'
,
...
config
.
webpackHtml
,
inject
:
true
,
minify
:
{
removeComments
:
true
,
collapseWhitespace
:
true
,
removeAttributeQuotes
:
true
removeAttributeQuotes
:
true
,
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
...
...
config/index.js
View file @
d248cba5
...
...
@@ -5,6 +5,25 @@
const
path
=
require
(
'path'
)
module
.
exports
=
{
webpackHtml
:{
jspTitle
:
`
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<%@ page isELIgnored="false"%>
`
,
css
:
`
<%@ include file="/WEB-INF/include/css.jsp"%>
<link rel="stylesheet" href="\${ctx }/vendors/bootstrap-multiselect-master/dist/css/bootstrap-multiselect.css">
<link rel="stylesheet" href="\${ctx}/css/apps/auto-marketing/filter.css?v=\${v}" />
`
,
menu
:
`
<%@ include file="/WEB-INF/include/menu.jsp"%>
`
,
footer
:
`
<%@ include file="/WEB-INF/include/js.jsp"%>
<script type="text/javascript" src="\${ctx}/vendors/bootstrap-multiselect-master/dist/js/bootstrap-multiselect.js"></script>
`
},
dev
:
{
// Paths
assetsSubDirectory
:
'static'
,
...
...
config/prod.dev.env.js
View file @
d248cba5
module
.
exports
=
{
"host"
:
"'//wxapp.hotwind.net'"
,
'project'
:
"'
crm
/vue'"
,
'project'
:
"'
wxcrm-web
/vue'"
,
'requestUrl'
:
"'crm'"
}
config/prod.uat.env.js
View file @
d248cba5
module
.
exports
=
{
host
:
"'//10.0.16.178:8080'"
,
project
:
"'crm/
vue
'"
,
project
:
"'crm/
uat
'"
,
requestUrl
:
"'crm'"
,
}
index.html
View file @
d248cba5
<
%=
htmlWebpackPlugin
.
options
.
jspTitle
%
>
<!DOCTYPE html>
<html>
<head>
...
...
@@ -10,9 +11,17 @@
<script src="http://apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
<script src="http://apps.bdimg.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<
%=
htmlWebpackPlugin
.
options
.
css
%
>
</head>
<body>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
<body
class=
"nav-sm"
>
<div
class=
"container body"
>
<div
class=
"main_container"
>
<
%=
htmlWebpackPlugin
.
options
.
menu
%
>
<div
class=
"right_col"
role=
"main"
style=
"font-size: 13px;"
>
<div
id=
"app"
></div>
</div>
</div>
</div>
</body>
<
%=
htmlWebpackPlugin
.
options
.
footer
%
>
</html>
src/pages/home/index.vue
View file @
d248cba5
<
template
>
<div
class=
"wrapper"
>
<
home-sidebar></home-sidebar
>
<
!--
<home-sidebar></home-sidebar>
--
>
<section
class=
"main"
>
<
home-header></home-header
>
<
!--
<home-header></home-header>
--
>
<div
class=
"content-box"
>
<
menus-edit
/
>
<div
class=
"content"
>
<
!--
<menus-edit
/>
--
>
<div
class=
"content
-c
"
>
<transition
name=
"move"
mode=
"out-in"
>
<!--
<keep-alive
exclude=
"prize"
>
-->
<router-view></router-view>
...
...
@@ -18,22 +18,14 @@
</
template
>
<
script
>
import
{
mapActions
}
from
'vuex'
import
HomeSidebar
from
'components/Sidebar'
import
HomeHeader
from
'components/Header'
import
menusEdit
from
'components/menus/edit'
export
default
{
data
()
{
return
{
}
},
components
:
{
HomeSidebar
,
HomeHeader
,
menusEdit
},
created
()
{
this
.
getMenus
()
//
this.getMenus()
},
methods
:
{
...
mapActions
([
...
...
@@ -53,18 +45,13 @@ export default {
display
flex
position
relative
.content-box
/*position absolute*/
display
inline-block
flex
1
margin-top
58px
/*top 58px*/
/*bottom 0*/
width
80
%
-webkit-transition
left
0
.3s
ease-in-out
transition
left
0
.3s
ease-in-out
background
#F3F2F8
min-height
720px
.content
.content
-c
width
auto
padding
15px
</
style
>
src/pages/marketingCenter/components/AddMessage.vue
View file @
d248cba5
...
...
@@ -32,7 +32,7 @@
<img
src=
"@/assets/images/temp.png"
>
</span>
<p
class=
"icon-wechat-msg title-center"
>
营销模板消息
</p>
</div>
</div>
</div>
</el-col>
<el-col
:span=
"10"
class=
"button-right"
>
...
...
@@ -175,7 +175,7 @@ export default {
.left-icon
height
140px
.icon-left
width
5
0
%
width
2
0
%
.icon-right
,
.icon-left
padding
20px
0
text-align
center
...
...
src/router/index.js
View file @
d248cba5
...
...
@@ -7,14 +7,9 @@ export default new Router({
base
:
`/
${
config
.
project
}
/`
,
routes
:
[
{
path
:
'/login'
,
name
:
'Login'
,
component
:
()
=>
import
(
/* webpackChunkName: 'wxlogin' */
'@/pages/login'
),
},
{
// path: '/salesCenter/activity/lotteryActivity.do',
path
:
'/'
,
name
:
'
test
'
,
name
:
'
home
'
,
component
:
()
=>
import
(
/* web packChunkName: 'wxhome' */
'@/pages/home'
),
children
:
[
{
...
...
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