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
8b1c2715
Commit
8b1c2715
authored
Jun 22, 2022
by
crushh
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/游戏营销' into dev
parents
f15a5ae0
41e94930
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
28 deletions
+50
-28
base-config.vue
src/views/game/cmh/base-config.vue
+45
-22
form.vue
src/views/game/cmh/form.vue
+2
-3
gameTemplate.vue
src/views/game/cmh/gameTemplate.vue
+3
-3
No files found.
src/views/game/cmh/base-config.vue
View file @
8b1c2715
...
...
@@ -9,7 +9,7 @@
<dm-sub-title
type=
"line"
>
展示信息配置
</dm-sub-title>
<div
class=
"mt20"
style=
"margin-bottom: 32px"
>
<el-form-item
label=
"游戏模板"
prop=
"templateId"
>
<el-radio-group
@
change=
"handleTemplateChange"
v-model=
"baseForm.templateId"
:disabled=
"isDisabled"
>
<el-radio-group
@
change=
"handleTemplateChange"
v-model=
"baseForm.templateId"
:disabled=
"isDisabled"
class=
"radioGroup"
>
<el-radio
v-for=
"item in templateData"
:label=
"item.templateId"
:key=
"item.templateId"
>
{{
item
.
templateName
}}
</el-radio>
</el-radio-group>
</el-form-item>
...
...
@@ -171,7 +171,8 @@ export default {
linkData
:
{}
},
isAdd
:
this
.
$route
.
meta
.
type
===
'add'
,
isCopy
:
this
.
$route
.
meta
.
type
===
'copy'
isCopy
:
this
.
$route
.
meta
.
type
===
'copy'
,
isEdit
:
this
.
$route
.
meta
.
type
===
'edit'
};
},
props
:
{
...
...
@@ -211,9 +212,9 @@ export default {
},
watch
:
{
templateArr
(
val
)
{
this
.
templateData
=
val
;
if
(
this
.
isAdd
)
{
const
data
=
val
[
0
];
if
(
this
.
isAdd
||
this
.
isCopy
)
{
this
.
templateData
=
val
.
filter
(
item
=>
item
.
statusFlag
==
1
);
const
data
=
this
.
templateData
[
0
];
this
.
baseForm
.
templateId
=
data
.
templateId
;
this
.
handleTemplateArr
(
data
.
gameTemplateMaterialList
);
this
.
$emit
(
'change'
,
this
.
baseForm
);
...
...
@@ -221,25 +222,43 @@ export default {
},
echoData
(
val
)
{
let
{
gameExt
}
=
val
;
let
initTemp
=
false
;
this
.
baseForm
=
Object
.
assign
(
this
.
baseForm
,
val
);
if
(
this
.
baseForm
.
adsFlag
)
{
this
.
adsImageUrl
=
{
imgUrl
:
gameExt
.
adsImageUrl
&&
gameExt
.
adsImageUrl
.
materialValue
,
code
:
gameExt
.
adsImageUrl
&&
gameExt
.
adsImageUrl
.
materialValue
};
}
const
currentTemp
=
this
.
templateData
.
filter
(
item
=>
item
.
templateId
==
this
.
baseForm
.
templateId
)[
0
];
let
currentTemp
=
this
.
templateArr
.
filter
(
item
=>
item
.
templateId
==
this
.
baseForm
.
templateId
)[
0
];
if
(
this
.
isEdit
)
{
this
.
templateData
=
this
.
templateArr
.
filter
(
item
=>
item
.
statusFlag
==
1
||
item
.
templateId
==
this
.
baseForm
.
templateId
);
}
if
(
this
.
isCopy
&&
currentTemp
.
statusFlag
==
0
)
{
currentTemp
=
this
.
templateArr
.
filter
(
item
=>
item
.
statusFlag
==
1
)[
0
];
this
.
baseForm
.
templateId
=
currentTemp
.
templateId
;
initTemp
=
true
;
this
.
$message
.
info
(
'原游戏模板已失效,已重置默认模板'
);
}
let
obj
=
{};
// let arr = ['backMusic
Url'];
let
arr
=
[
'noticeImageUrl'
,
'shareCard'
,
'shareReport'
,
'prizeStyleJson'
,
'backImage
Url'
];
let
keys
=
Object
.
keys
(
gameExt
);
console
.
log
(
keys
);
currentTemp
.
gameTemplateMaterialList
.
forEach
(
item
=>
{
if
(
item
.
materialKey
==
'backMusicUrl'
)
{
this
.
backMusicOptions
.
push
(
item
);
}
else
if
(
!
keys
.
includes
(
item
.
materialKey
))
{
obj
[
item
.
materialKey
]
=
item
;
}
// if (!arr.includes(item.materialKey) && !keys.includes(item.materialKey)) {
// obj[item.materialKey] = item;
// }
});
if
(
initTemp
)
{
let
currentTempObj
=
{};
currentTemp
.
gameTemplateMaterialList
.
forEach
(
item
=>
{
currentTempObj
[
item
.
materialKey
]
=
item
;
});
keys
.
forEach
(
key
=>
{
if
(
arr
.
includes
(
key
))
{
gameExt
[
key
]
=
currentTempObj
[
key
];
}
});
}
obj
=
Object
.
assign
(
obj
,
gameExt
);
// 详情的素材库与模板接口的默认有值的素材库取交集
this
.
handleTemplateArr
(
Object
.
values
(
obj
),
'echo'
);
this
.
selectLink
.
linkData
=
this
.
baseForm
.
mpUrlView
?
JSON
.
parse
(
this
.
baseForm
.
mpUrlView
)
:
{};
...
...
@@ -251,18 +270,19 @@ export default {
},
methods
:
{
handleDateChange
(
val
,
type
)
{
console
.
log
(
val
,
type
);
this
.
$emit
(
'change'
,
this
.
baseForm
);
if
(
type
==
'adsFlag'
)
{
this
.
$nextTick
(
_
=>
{
const
adsImg
=
document
.
getElementsByClassName
(
'adsImg'
);
adsImg
[
0
].
scrollIntoView
({
// 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间
block
:
'center'
,
// 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior
:
'smooth'
});
const
formContent
=
document
.
getElementById
(
'formContent'
);
formContent
.
scrollTop
=
formContent
.
scrollHeight
+
500
;
// adsImg[0].scrollIntoView({
// // 滚动到指定节点
// // 值有start,center,end,nearest,当前显示在视图区域中间
// block: 'center',
// // 值有auto、instant,smooth,缓动动画(当前是慢速的)
// behavior: 'smooth'
// });
});
}
else
if
(
type
==
'gameTime'
&&
this
.
baseForm
.
gameTime
&&
this
.
baseForm
.
gameTime
.
length
)
{
this
.
baseForm
.
gameTime
[
1
]
=
this
.
baseForm
.
gameTime
[
1
]
+
86399000
;
...
...
@@ -352,7 +372,6 @@ export default {
}
}
});
console
.
log
(
this
.
baseForm
);
},
handleListen
()
{
this
.
isPlay
=
!
this
.
isPlay
;
...
...
@@ -428,7 +447,6 @@ export default {
this
.
gameExt
.
forEach
(
item
=>
{
gameExt
[
item
.
materialKey
]
=
item
;
});
console
.
log
(
gameExt
);
Object
.
keys
(
data
).
forEach
(
key
=>
{
if
(
gameExt
[
key
])
{
gameExt
[
key
].
materialValue
=
data
[
key
];
...
...
@@ -555,4 +573,9 @@ img {
.footer
{
width
:
calc
(
100%
-
520px
)
!important
;
}
.radioGroup
{
.el-radio
+
.el-radio
{
margin-left
:
0
;
}
}
</
style
>
src/views/game/cmh/form.vue
View file @
8b1c2715
...
...
@@ -35,7 +35,7 @@
<dm-step
title=
"2.奖项配置"
></dm-step>
<dm-step
title=
"3.规则配置"
></dm-step>
</dm-steps>
<div
class=
"formContent"
>
<div
class=
"formContent"
id=
"formContent"
>
<baseConfig
ref=
"baseConfig"
:gameStatus=
"gameStatus"
:templateArr=
"templateData"
:echoData=
"baseForm"
v-show=
"active == 0"
@
change=
"handleBaseConfigChange"
@
nextStep=
"nextStep"
/>
<prizeConfig
ref=
"prizeConfig"
:gameStatus=
"gameStatus"
:invalidCard=
"invalidCard"
:prizeMax=
"prizeMax"
:echoData=
"prizeForm"
:prizeMin=
"prizeMin"
v-show=
"active == 1"
@
nextStep=
"nextStep"
@
prevStep=
"step => active--"
/>
<ruleConfig
ref=
"ruleConfig"
:gameStatus=
"gameStatus"
:templateId=
"templateId"
:gameTime=
"gameTime"
:shareImgData=
"shareImgData"
:echoData=
"ruleForm"
v-show=
"active == 2"
@
nextStep=
"nextStep"
@
prevStep=
"step => active--"
@
submit=
"submitForm"
:btnLoading=
"btnLoading"
@
change=
"handleRuleConfigChange"
/>
...
...
@@ -139,7 +139,6 @@ export default {
watch
:
{
templateId
(
val
)
{
const
data
=
this
.
templateData
.
filter
(
item
=>
item
.
templateId
==
val
)[
0
];
console
.
log
(
data
);
const
{
prizeMax
,
prizeMin
}
=
data
;
this
.
prizeMax
=
prizeMax
;
this
.
prizeMin
=
prizeMin
;
...
...
@@ -266,7 +265,7 @@ export default {
this
.
templateData
=
res
.
result
;
if
(
this
.
isAdd
)
{
this
.
$route
.
meta
.
refresh
=
false
;
const
{
templateId
}
=
res
.
result
[
0
];
const
{
templateId
}
=
this
.
templateData
.
filter
(
item
=>
item
.
statusFlag
==
1
)
[
0
];
this
.
templateId
=
templateId
;
this
.
loading
=
false
;
}
else
{
...
...
src/views/game/cmh/gameTemplate.vue
View file @
8b1c2715
...
...
@@ -270,9 +270,9 @@ export default {
adsFlag
:
0
,
rightBtn
:
{
5
:
'background: #0CC6DA;box-shadow: inset 2px 1px 1px 0px rgba(255, 255, 255, 0.5);'
,
3
:
'background:
#27292B;opacity: 0.5
;'
,
2
:
'background:
#27292B;opacity: 0.75
;'
,
1
:
'background:
##27292B;opacity: 0.5
;'
3
:
'background:
rgba(39, 41, 43,0.5)
;'
,
2
:
'background:
rgba(39, 41, 43,0.75)
;'
,
1
:
'background:
rgba(39, 41, 43,0.5)
;'
},
textColor
:
{
1
:
'color:#38BCCC'
,
...
...
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