Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
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
marketing-web
marketing
Commits
70b5883a
Commit
70b5883a
authored
Apr 25, 2019
by
chenxin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cx' into 'dev'
Cx See merge request
!11
parents
910088a7
38091b03
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
72 additions
and
69 deletions
+72
-69
webpack.base.conf.js
build/webpack.base.conf.js
+18
-20
webpack.dev.conf.js
build/webpack.dev.conf.js
+32
-36
dev.env.js
config/dev.env.js
+4
-4
index.js
config/index.js
+7
-7
index.js
src/config/index.js
+2
-0
upload.js
src/directives/upload.js
+1
-1
form.vue
src/views/game/znm/form.vue
+7
-0
consume.vue
src/views/recharge/consume.vue
+1
-1
No files found.
build/webpack.base.conf.js
View file @
70b5883a
'use strict'
const
path
=
require
(
'path'
)
const
utils
=
require
(
'./utils'
)
const
config
=
require
(
'../config'
)
const
vueLoaderConfig
=
require
(
'./vue-loader.conf'
)
'use strict'
;
const
path
=
require
(
'path'
)
;
const
utils
=
require
(
'./utils'
)
;
const
config
=
require
(
'../config'
)
;
const
vueLoaderConfig
=
require
(
'./vue-loader.conf'
)
;
function
resolve
(
dir
)
{
return
path
.
join
(
__dirname
,
'..'
,
dir
)
function
resolve
(
dir
)
{
return
path
.
join
(
__dirname
,
'..'
,
dir
)
;
}
const
createLintingRule
=
()
=>
({
test
:
/
\.(
js|vue
)
$/
,
loader
:
"eslint-loader"
,
enforce
:
"pre"
,
include
:
[
resolve
(
"src"
),
resolve
(
"test"
)],
loader
:
'eslint-loader'
,
enforce
:
'pre'
,
include
:
[
resolve
(
'src'
),
resolve
(
'test'
)],
options
:
{
// fix: true,
formatter
:
require
(
"eslint-friendly-formatter"
),
formatter
:
require
(
'eslint-friendly-formatter'
),
emitWarning
:
!
config
.
dev
.
showEslintErrorsInOverlay
}
});
module
.
exports
=
{
context
:
path
.
resolve
(
__dirname
,
'../'
),
entry
:
[
'babel-polyfill'
,
'./src/main.js'
],
entry
:
[
'babel-polyfill'
,
'./src/main.js'
],
output
:
{
path
:
config
.
build
.
assetsRoot
,
filename
:
'[name].js'
,
publicPath
:
process
.
env
.
NODE_ENV
===
'production'
?
config
.
build
.
assetsPublicPath
:
config
.
dev
.
assetsPublicPath
publicPath
:
process
.
env
.
NODE_ENV
===
'production'
?
config
.
build
.
assetsPublicPath
:
config
.
dev
.
assetsPublicPath
},
resolve
:
{
extensions
:
[
'.js'
,
'.vue'
,
'.json'
],
alias
:
{
'vue$'
:
'vue/dist/vue.esm.js'
,
'@'
:
resolve
(
'src'
)
,
vue
$
:
'vue/dist/vue.esm.js'
,
'@'
:
resolve
(
'src'
)
}
},
module
:
{
...
...
@@ -82,9 +80,9 @@ module.exports = {
]
},
externals
:
{
'vue'
:
'Vue'
,
vue
:
'Vue'
,
'vue-router'
:
'VueRouter'
,
'vuex'
:
'Vuex'
,
vuex
:
'Vuex'
// 'axios': 'axios'
},
node
:
{
...
...
@@ -99,4 +97,4 @@ module.exports = {
tls
:
'empty'
,
child_process
:
'empty'
}
}
}
;
build/webpack.dev.conf.js
View file @
70b5883a
'use strict'
const
utils
=
require
(
'./utils'
)
const
webpack
=
require
(
'webpack'
)
const
config
=
require
(
'../config'
)
const
merge
=
require
(
'webpack-merge'
)
const
path
=
require
(
'path'
)
const
baseWebpackConfig
=
require
(
'./webpack.base.conf'
)
const
CopyWebpackPlugin
=
require
(
'copy-webpack-plugin'
)
const
HtmlWebpackPlugin
=
require
(
'html-webpack-plugin'
)
const
FriendlyErrorsPlugin
=
require
(
'friendly-errors-webpack-plugin'
)
const
portfinder
=
require
(
'portfinder'
)
'use strict'
;
const
utils
=
require
(
'./utils'
)
;
const
webpack
=
require
(
'webpack'
)
;
const
config
=
require
(
'../config'
)
;
const
merge
=
require
(
'webpack-merge'
)
;
const
path
=
require
(
'path'
)
;
const
baseWebpackConfig
=
require
(
'./webpack.base.conf'
)
;
const
CopyWebpackPlugin
=
require
(
'copy-webpack-plugin'
)
;
const
HtmlWebpackPlugin
=
require
(
'html-webpack-plugin'
)
;
const
FriendlyErrorsPlugin
=
require
(
'friendly-errors-webpack-plugin'
)
;
const
portfinder
=
require
(
'portfinder'
)
;
const
HOST
=
process
.
env
.
HOST
const
PORT
=
process
.
env
.
PORT
&&
Number
(
process
.
env
.
PORT
)
const
HOST
=
process
.
env
.
HOST
;
const
PORT
=
process
.
env
.
PORT
&&
Number
(
process
.
env
.
PORT
)
;
const
devWebpackConfig
=
merge
(
baseWebpackConfig
,
{
module
:
{
...
...
@@ -24,9 +24,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
devServer
:
{
clientLogLevel
:
'warning'
,
historyApiFallback
:
{
rewrites
:
[
{
from
:
/.*/
,
to
:
path
.
posix
.
join
(
config
.
dev
.
assetsPublicPath
,
'index.html'
)
},
],
rewrites
:
[{
from
:
/.*/
,
to
:
path
.
posix
.
join
(
config
.
dev
.
assetsPublicPath
,
'index.html'
)
}]
},
hot
:
true
,
contentBase
:
false
,
// since we use CopyWebpackPlugin.
...
...
@@ -34,14 +32,12 @@ const devWebpackConfig = merge(baseWebpackConfig, {
host
:
HOST
||
config
.
dev
.
host
,
port
:
PORT
||
config
.
dev
.
port
,
open
:
config
.
dev
.
autoOpenBrowser
,
overlay
:
config
.
dev
.
errorOverlay
?
{
warnings
:
false
,
errors
:
true
}
:
false
,
overlay
:
config
.
dev
.
errorOverlay
?
{
warnings
:
false
,
errors
:
true
}
:
false
,
publicPath
:
config
.
dev
.
assetsPublicPath
,
proxy
:
config
.
dev
.
proxyTable
,
quiet
:
true
,
// necessary for FriendlyErrorsPlugin
watchOptions
:
{
poll
:
config
.
dev
.
poll
,
poll
:
config
.
dev
.
poll
}
},
plugins
:
[
...
...
@@ -66,30 +62,30 @@ const devWebpackConfig = merge(baseWebpackConfig, {
}
])
]
})
})
;
module
.
exports
=
new
Promise
((
resolve
,
reject
)
=>
{
portfinder
.
basePort
=
process
.
env
.
PORT
||
config
.
dev
.
port
portfinder
.
basePort
=
process
.
env
.
PORT
||
config
.
dev
.
port
;
portfinder
.
getPort
((
err
,
port
)
=>
{
if
(
err
)
{
reject
(
err
)
reject
(
err
)
;
}
else
{
// publish the new Port, necessary for e2e tests
process
.
env
.
PORT
=
port
process
.
env
.
PORT
=
port
;
// add port to devServer config
devWebpackConfig
.
devServer
.
port
=
port
devWebpackConfig
.
devServer
.
port
=
port
;
// Add FriendlyErrorsPlugin
devWebpackConfig
.
plugins
.
push
(
new
FriendlyErrorsPlugin
({
compilationSuccessInfo
:
{
messages
:
[
`Your application is running here: http://
${
devWebpackConfig
.
devServer
.
host
}
:
${
port
}
`
],
},
onErrors
:
config
.
dev
.
notifyOnErrors
?
utils
.
createNotifierCallback
()
:
undefined
}))
devWebpackConfig
.
plugins
.
push
(
new
FriendlyErrorsPlugin
(
{
compilationSuccessInfo
:
{
messages
:
[
`Your application is running here: http://
${
devWebpackConfig
.
devServer
.
host
}
:
${
port
}
`
]
},
onErrors
:
config
.
dev
.
notifyOnErrors
?
utils
.
createNotifierCallback
()
:
undefined
})
);
resolve
(
devWebpackConfig
)
resolve
(
devWebpackConfig
)
;
}
})
})
})
;
})
;
config/dev.env.js
View file @
70b5883a
'use strict'
const
merge
=
require
(
'webpack-merge'
)
const
prodEnv
=
require
(
'./prod.env'
)
'use strict'
;
const
merge
=
require
(
'webpack-merge'
)
;
const
prodEnv
=
require
(
'./prod.env'
)
;
module
.
exports
=
merge
(
prodEnv
,
{
NODE_ENV
:
'"development"'
})
})
;
config/index.js
View file @
70b5883a
...
...
@@ -10,13 +10,13 @@ module.exports = {
assetsSubDirectory
:
'static'
,
assetsPublicPath
:
'/'
,
proxyTable
:
{
// '/dmApi/':
{
// target:'http://gicdev.demogic.com/
',
// changeOrigin:
true,
// pathRewrite:
{
// '^/dmApi':
''
//
}
//
}
'/dmApi/'
:
{
target
:
'http://192.168.1.154:86
'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/dmApi'
:
''
}
}
},
// Various Dev Server settings
...
...
src/config/index.js
View file @
70b5883a
export
default
{
// eslint-disable-next-line
api
:
process
.
env
[
'NODE_ENV'
]
===
'development'
?
'http://gicdev.demogic.com/'
:
window
.
location
.
protocol
+
'//'
+
window
.
location
.
host
+
'/'
||
''
// http://gicdev.demogic.com/
// http://192.168.1.154:86/
};
src/directives/upload.js
View file @
70b5883a
...
...
@@ -46,7 +46,7 @@ export default {
return
;
}
// 启用限制图片大小
if
(
binding
.
value
.
limit
.
type
)
{
if
(
binding
.
value
.
limit
&&
binding
.
value
.
limit
.
type
)
{
const
{
width
,
height
}
=
binding
.
value
.
limit
;
verificationPicFile
(
el
,
width
,
height
)
.
then
(
res
=>
{
...
...
src/views/game/znm/form.vue
View file @
70b5883a
...
...
@@ -8,6 +8,9 @@
<el-form-item
label=
"LOGO上传"
prop=
"logoImg"
class=
"width50"
>
<dm-upload-avatar
:model
.
sync=
"form.logoImg"
width=
"auto"
label=
"上传图片"
tips=
" 请上传高度为80px的PNG透明背景图片"
></dm-upload-avatar>
</el-form-item>
<el-form-item
label=
"次数限制"
prop=
"attendLimitCounts"
class=
"width50"
>
<el-input-number
controls-position=
"right"
v-model=
"form.attendLimitCounts"
:precision=
"0"
:min=
"1"
:max=
"9999"
class=
"w150"
size=
"small"
></el-input-number>
</el-form-item>
<el-form-item
label=
"游戏时间"
prop=
"dateTime"
class=
"width50"
>
<el-date-picker
:picker-options=
"pickerOptions"
:default-time=
"['00:00:00', '23:59:59']"
class=
"w400"
v-model=
"form.dateTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
></el-date-picker>
</el-form-item>
...
...
@@ -96,6 +99,7 @@ export default {
form
:
{
gameActivityId
:
''
,
gameName
:
''
,
attendLimitCounts
:
1
,
logoImg
:
{
code
:
''
,
imgUrl
:
''
...
...
@@ -123,6 +127,7 @@ export default {
},
rules
:
{
gameName
:
{
type
:
'string'
,
required
:
true
,
message
:
'游戏标题不能为空'
,
trigger
:
'blur'
},
attendLimitCounts
:
{
type
:
'number'
,
required
:
true
,
message
:
'游戏次数限制不能为空'
,
trigger
:
'blur'
},
logoImg
:
{
type
:
'object'
,
required
:
true
,
message
:
'logo不能为空'
,
trigger
:
'blur'
},
dateTime
:
{
type
:
'array'
,
required
:
true
,
message
:
'游戏时间不能为空'
,
trigger
:
'blur'
},
gameIntroduction
:
{
type
:
'string'
,
required
:
true
,
message
:
'游戏说明不能为空'
,
trigger
:
'blur'
},
...
...
@@ -227,6 +232,7 @@ export default {
this
.
form
=
Object
.
assign
(
this
.
form
,
{
gameActivityId
:
gameDetail
.
gameActivityId
,
gameName
:
gameDetail
.
gameName
,
attendLimitCounts
:
gameDetail
.
attendLimitCounts
,
logoImg
:
{
code
:
gameDetail
.
logoImgFieldCode
,
imgUrl
:
gameDetail
.
logoImgUrl
...
...
@@ -306,6 +312,7 @@ export default {
if
(
valid
)
{
let
params
=
{
gameName
:
this
.
form
.
gameName
,
// 是 String 游戏名称
attendLimitCounts
:
this
.
form
.
attendLimitCounts
,
// 游戏次数限制
logoImgUrl
:
this
.
form
.
logoImg
.
imgUrl
,
// 是 String LOGO上传 url
logoImgFieldCode
:
this
.
form
.
logoImg
.
code
,
// 是 String LOGO上传 code
gameStartTime
:
formatDateTimeByType
(
this
.
form
.
dateTime
[
0
],
'yyyy-MM-dd-HH-mm'
),
// 是 String 开始时间 “2018-05-23 11:00”
...
...
src/views/recharge/consume.vue
View file @
70b5883a
...
...
@@ -160,7 +160,7 @@
<img
:src=
"scope.row.memberImgUrl || defaultAvatar"
width=
"32"
height=
"32"
alt=
""
/>
<div
class=
"inline-block"
>
<p>
{{
scope
.
row
.
memberName
||
'--'
}}
</p>
<p
class=
"fz13 gray"
>
{{
scope
.
row
.
receivePhone
||
'--'
}}
</p>
<p
class=
"fz13 gray"
>
{{
scope
.
row
.
memberPhoneNumber
||
'--'
}}
</p>
</div>
</
template
>
</el-table-column>
...
...
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