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
66a4a652
Commit
66a4a652
authored
May 25, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
8dc50a78
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
14 deletions
+23
-14
form.vue
src/views/game/cmh/form.vue
+7
-6
prize-config.vue
src/views/game/cmh/prize-config.vue
+11
-4
rule-config.vue
src/views/game/cmh/rule-config.vue
+5
-4
No files found.
src/views/game/cmh/form.vue
View file @
66a4a652
...
...
@@ -28,9 +28,9 @@
</div>
<div
class=
"rightForm"
>
<dm-steps
:active=
"active"
simple
>
<dm-step
title=
"1.基础配置"
@
click
.
native=
"active = 0"
></dm-step>
<dm-step
title=
"2.奖项配置"
@
click
.
native=
"active = 1"
></dm-step>
<dm-step
title=
"3.规则配置"
@
click
.
native=
"active = 2"
></dm-step>
<dm-step
title=
"1.基础配置"
></dm-step>
<dm-step
title=
"2.奖项配置"
></dm-step>
<dm-step
title=
"3.规则配置"
></dm-step>
</dm-steps>
<div
class=
"formContent"
>
<baseConfig
:gameStatus=
"gameStatus"
:templateArr=
"templateData"
:echoData=
"baseForm"
v-show=
"active == 0"
@
change=
"handleBaseConfigChange"
@
nextStep=
"data => nextStep(1, data)"
/>
...
...
@@ -142,9 +142,10 @@ export default {
this
.
gameStatus
=
status
;
}
const
{
ruleId
,
winChance
,
filterJson
,
filterJsonView
,
memberDesc
,
memberType
,
playConditionFlag
,
playTimes
,
shareFlag
,
shareImageUrl
,
shareRuleDesc
}
=
gameRuleInfo
;
gameRuleConditionList
.
forEach
(
item
=>
{
item
.
conditionJson
=
JSON
.
parse
(
item
.
conditionJson
);
});
gameRuleConditionList
&&
gameRuleConditionList
.
forEach
(
item
=>
{
item
.
conditionJson
=
JSON
.
parse
(
item
.
conditionJson
);
});
let
cardIdArr
=
[];
gamePrizeList
.
forEach
(
item
=>
{
if
(
item
.
prizeType
==
2
)
{
...
...
src/views/game/cmh/prize-config.vue
View file @
66a4a652
...
...
@@ -156,9 +156,7 @@ import Sortable from 'sortablejs';
export
default
{
data
()
{
const
prizeNoticeStockVal
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
prizeForm
.
prizeNoticeFlag
)
{
console
.
log
(
value
);
console
.
log
(
new
RegExp
(
'([1-9]{1}
\\
d{0,9})|(0{1})'
).
test
(
value
));
if
(
this
.
prizeForm
.
prizeNoticeFlag
==
1
)
{
if
(
!
new
RegExp
(
'([1-9]{1}
\\
d{0,9})|(0{1})'
).
test
(
value
))
{
callback
(
new
Error
(
'请输入不超过1000000的数字'
));
return
;
...
...
@@ -393,18 +391,27 @@ export default {
},
submit
()
{
let
invalid
=
false
;
let
arr
=
[];
this
.
prizeForm
.
gamePrizeList
.
forEach
(
item
=>
{
if
(
item
.
prizeType
==
2
&&
item
.
status
!=
0
&&
!
item
.
isOld
)
{
invalid
=
true
;
this
.
$message
.
error
(
`
${
item
.
prizeName
}
已
${
item
.
status
==
1
?
'删除'
:
'失效'
}
,请重新关联奖品`
);
return
;
}
if
(
item
.
prizeType
==
0
)
{
arr
.
push
(
item
);
}
});
if
(
!
arr
.
length
)
{
this
.
$message
.
error
(
'请至少包含一个谢谢参与的奖项'
);
return
;
}
if
(
invalid
)
return
;
this
.
$refs
.
prizeForm
.
validate
((
val
,
obj
)
=>
{
if
(
val
)
{
const
data
=
{
...
this
.
prizeForm
};
let
data
=
{
...
this
.
prizeForm
};
data
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
data
.
gamePrizeList
.
forEach
(
item
=>
{
if
(
item
.
prizeImageUrl
)
{
item
.
prizeImageUrl
=
item
.
prizeImageUrl
.
imgUrl
||
''
;
...
...
src/views/game/cmh/rule-config.vue
View file @
66a4a652
...
...
@@ -129,7 +129,7 @@ import gicNewMemberGroup from '@/components/dm-new-member-group/index.vue';
export
default
{
data
()
{
const
filterJsonVal
=
(
rule
,
value
,
callback
)
=>
{
if
(
(
this
.
ruleForm
.
memberType
==
0
&&
!
this
.
ruleForm
.
hasSearchData
)
||
(
this
.
ruleForm
.
memberType
==
1
&&
!
this
.
selectedGroupIds
)
)
{
if
(
this
.
ruleForm
.
memberType
==
1
&&
!
this
.
selectedGroupIds
)
{
callback
(
new
Error
(
'请选择参与人群'
));
return
;
}
...
...
@@ -253,9 +253,10 @@ export default {
echoData
(
val
)
{
const
{
ruleId
,
filterJson
,
filterJsonView
,
gameRuleConditionList
,
memberDesc
,
memberType
,
playConditionFlag
,
playTimes
,
shareFlag
,
shareImageUrl
,
shareRuleDesc
,
memberWeightView
,
creatorId
}
=
val
;
let
obj
=
{};
gameRuleConditionList
.
forEach
(
item
=>
{
obj
[
item
.
conditionType
]
=
item
;
});
gameRuleConditionList
&&
gameRuleConditionList
.
forEach
(
item
=>
{
obj
[
item
.
conditionType
]
=
item
;
});
this
.
ruleForm
.
gameRuleConditionList
.
forEach
(
item
=>
{
if
(
obj
[
item
.
type
])
{
item
.
conditionType
=
obj
[
item
.
type
].
conditionType
;
...
...
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