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
e1e46ad6
Commit
e1e46ad6
authored
Aug 23, 2022
by
黄冷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/朋友圈卡片' into master
parents
43e3e5ab
adb1c640
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
9 deletions
+44
-9
base-config.vue
src/views/game/cmh/base-config.vue
+6
-1
form.vue
src/views/game/cmh/form.vue
+7
-2
info.vue
src/views/game/cmh/info.vue
+1
-0
rule-config.vue
src/views/game/cmh/rule-config.vue
+30
-6
No files found.
src/views/game/cmh/base-config.vue
View file @
e1e46ad6
...
...
@@ -147,6 +147,7 @@ export default {
adsFlag
:
0
,
bulletFlag
:
0
,
backMusicUrlObj
:
''
// addMomentsCard: false
},
gameExt
:
{},
adsImageUrl
:
{
imgUrl
:
''
,
code
:
''
},
...
...
@@ -238,7 +239,7 @@ export default {
this
.
$message
.
info
(
'原游戏模板已失效,已重置默认模板'
);
}
let
obj
=
{};
let
arr
=
[
'noticeImageUrl'
,
'shareCard'
,
'shareReport'
,
'prizeStyleJson'
,
'backImageUrl'
];
let
arr
=
[
'noticeImageUrl'
,
'shareCard'
,
'shareReport'
,
'
momentsCard'
,
'
prizeStyleJson'
,
'backImageUrl'
];
let
keys
=
Object
.
keys
(
gameExt
);
currentTemp
.
gameTemplateMaterialList
.
forEach
(
item
=>
{
...
...
@@ -246,6 +247,9 @@ export default {
this
.
backMusicOptions
.
push
(
item
);
}
else
if
(
!
keys
.
includes
(
item
.
materialKey
))
{
obj
[
item
.
materialKey
]
=
item
;
// if (item.materialKey == 'momentsCard') {
// this.baseForm.addMomentsCard = true;
// }
}
});
if
(
initTemp
)
{
...
...
@@ -372,6 +376,7 @@ export default {
}
}
});
console
.
log
(
this
.
baseForm
);
},
handleListen
()
{
this
.
isPlay
=
!
this
.
isPlay
;
...
...
src/views/game/cmh/form.vue
View file @
e1e46ad6
...
...
@@ -224,7 +224,7 @@ export default {
});
},
handleBaseConfigChange
(
data
)
{
const
{
backMusicFlag
,
adsFlag
,
backImageUrl
,
noticeImageUrl
,
adsImageUrl
,
bulletImageUrl
,
bulletFlag
,
gameName
,
templateId
,
shareCard
,
shareReport
,
gameTime
,
shareCardSize0
,
shareCardSize1
,
shareReportSize1
,
shareReportSize0
}
=
data
;
const
{
backMusicFlag
,
adsFlag
,
backImageUrl
,
noticeImageUrl
,
adsImageUrl
,
bulletImageUrl
,
bulletFlag
,
gameName
,
templateId
,
shareCard
,
momentsCard
,
shareReport
,
gameTime
,
shareCardSize0
,
shareCardSize1
,
shareReportSize1
,
shareReportSize0
,
momentsCardSize0
,
momentsCardSize1
}
=
data
;
this
.
previewData
=
{
backMusicFlag
,
backImageUrl
,
noticeImageUrl
,
adsImageUrl
,
bulletImageUrl
,
bulletFlag
,
adsFlag
};
this
.
previewData
.
boxImg
=
data
.
prizeStyleJson
[
0
].
imageNoSelectUrl
;
this
.
previewData
=
Object
.
assign
({},
this
.
previewData
);
...
...
@@ -236,7 +236,11 @@ export default {
shareCardSize0
,
shareCardSize1
,
shareReportSize1
,
shareReportSize0
shareReportSize0
,
momentsCard
,
momentsCardSize0
,
momentsCardSize1
// addMomentsCard
};
this
.
gameTime
=
gameTime
;
},
...
...
@@ -322,6 +326,7 @@ export default {
gameRuleConditionList
.
forEach
(
item
=>
{
if
(
item
.
conditionType
==
1
)
{
gameExt
.
shareCard
.
materialValue
=
item
.
conditionJson
.
shareCard
;
gameExt
.
momentsCard
.
materialValue
=
item
.
conditionJson
.
momentsCard
;
gameExt
.
shareReport
.
materialValue
=
item
.
conditionJson
.
shareReport
;
gameRuleInfo
.
shareRuleDesc
=
item
.
conditionJson
.
shareTitle
;
}
...
...
src/views/game/cmh/info.vue
View file @
e1e46ad6
...
...
@@ -167,6 +167,7 @@
<
div
class
=
"shareTitle"
>
邀请分享样式
<
/div
>
<
p
>
小程序卡片标题
:
{{
item
.
conditionJson
.
shareTitle
}}
<
/p
>
<
p
class
=
"flex"
>
小程序卡片图片
:
<
img
:
src
=
"item.conditionJson.shareCard"
alt
=
"游戏背景"
style
=
"width: 100px;height: 75px;margin-left: 10px;"
/><
/p
>
<
p
class
=
"flex"
v
-
if
=
"item.conditionJson.momentsCard"
>
分享朋友圈
:
<
img
:
src
=
"item.conditionJson.momentsCard"
alt
=
"游戏背景"
style
=
"width: 100px;height: 178px;margin-left: 39px;"
/><
/p
>
<
p
class
=
"flex"
>
分享海报
:
<
img
:
src
=
"item.conditionJson.shareReport"
alt
=
"游戏背景"
style
=
"width: 100px;height: 178px;margin-left: 53px;"
/><
/p
>
<
/div
>
<
/div
>
...
...
src/views/game/cmh/rule-config.vue
View file @
e1e46ad6
...
...
@@ -103,6 +103,16 @@
<div
class=
"tips mt6"
>
图片建议尺寸
{{
shareCardSize0
}}
,格式 jpg/jpeg/png,大小
{{
shareCardSize1
}}
M以内。
</div>
</el-form-item>
<el-form-item
label=
"分享朋友圈"
label-width=
"122px"
>
<div
class=
"flex"
>
<img
:src=
"item.conditionJson.momentsCard"
alt=
"游戏背景"
style=
"width: 100px;height: 178px;"
/>
<el-upload
class=
"avatar-uploader"
action=
"123"
:show-file-list=
"false"
:disabled=
"isDisabled"
:before-upload=
"file => beforeAvatarUpload(file, 'momentsCard', momentsCardSize1)"
>
<el-button
type=
"text"
class=
"ml16"
:disabled=
"isDisabled"
>
替换图片
</el-button>
</el-upload>
</div>
<div
class=
"tips mt6"
>
图片建议尺寸
{{
momentsCardSize0
}}
,格式 jpg/jpeg/png,大小
{{
momentsCardSize1
}}
M以内。
</div>
</el-form-item>
<el-form-item
label=
"分享海报"
label-width=
"122px"
>
<div
class=
"flex"
>
<img
:src=
"item.conditionJson.shareReport"
alt=
"游戏背景"
style=
"width: 100px;height: 178px;"
/>
...
...
@@ -120,10 +130,10 @@
</div>
</el-form-item>
<el-form-item
label=
"每人最多可玩次数"
prop=
"playTimes"
:rules=
"rules.playTimes"
>
<el-input
v-model
.
number=
"ruleForm.playTimes"
class=
"w140"
placeholder=
"上限1000"
:disabled=
"isDisabled"
/>
次游戏次数
</el-form-item>
<el-form-item
label=
"分享"
prop=
"shareFlag"
>
<
!--
<
el-form-item
label=
"分享"
prop=
"shareFlag"
>
<el-switch
v-model=
"ruleForm.shareFlag"
:active-value=
"1"
:inactive-value=
"0"
/>
<div
class=
"tips mt6"
>
关闭后用户无法分享小程序
</div>
</el-form-item>
</el-form-item>
-->
<linktools
:linkVisible
.
sync=
"show"
:remove=
"[5, 35]"
:linkData=
"ruleForm.gameRuleConditionList[1].conditionJson.mpUrlView"
:can-save=
"true"
@
linkSelect=
"onSaveLink"
/>
<dm-form-bottom
class=
"footer"
>
<el-button
@
click=
"prevStep"
>
上一步
</el-button>
...
...
@@ -180,7 +190,7 @@ export default {
memberType
:
0
,
memberDesc
:
''
,
playConditionFlag
:
1
,
shareFlag
:
0
,
shareFlag
:
1
,
playTimes
:
''
,
filterJsonView
:
''
,
shareImageUrl
:
''
,
...
...
@@ -215,6 +225,7 @@ export default {
subscribeMsg
:
'恭喜你已完成助力'
,
shareTitle
:
'我正在参加幸运大盲盒,邀请你一起参加!'
,
shareCard
:
''
,
momentsCard
:
''
,
shareReport
:
''
}
}
...
...
@@ -237,8 +248,12 @@ export default {
boolVal
:
true
,
shareCardSize0
:
''
,
shareCardSize1
:
1
,
momentsCardSize0
:
''
,
momentsCardSize1
:
1
,
shareReportSize1
:
1
,
shareReportSize0
:
''
shareReportSize0
:
''
,
addMomentsCard
:
false
,
momentsCard
:
''
};
},
props
:
{
...
...
@@ -260,15 +275,19 @@ export default {
},
watch
:
{
shareImgData
(
val
)
{
console
.
log
(
val
.
shareCard
);
const
{
shareCard
,
shareReport
,
shareCardSize0
,
shareCardSize1
,
shareReportSize1
,
shareReportSize0
}
=
val
;
const
{
shareCard
,
shareReport
,
shareCardSize0
,
shareCardSize1
,
shareReportSize1
,
shareReportSize0
,
momentsCard
,
momentsCardSize0
,
momentsCardSize1
}
=
val
;
this
.
ruleForm
.
gameRuleConditionList
[
2
].
conditionJson
.
shareCard
=
shareCard
;
this
.
ruleForm
.
gameRuleConditionList
[
2
].
conditionJson
.
momentsCard
=
momentsCard
;
this
.
ruleForm
.
gameRuleConditionList
[
2
].
conditionJson
.
shareReport
=
shareReport
;
this
.
ruleForm
.
shareImageUrl
=
shareCard
;
this
.
shareCardSize0
=
shareCardSize0
;
this
.
shareCardSize1
=
shareCardSize1
;
this
.
momentsCardSize0
=
momentsCardSize0
;
this
.
momentsCardSize1
=
momentsCardSize1
;
this
.
shareReportSize1
=
shareReportSize1
;
this
.
shareReportSize0
=
shareReportSize0
;
// this.addMomentsCard = addMomentsCard;
// this.momentsCard = momentsCard;
this
.
ruleForm
.
gameRuleConditionList
=
this
.
ruleForm
.
gameRuleConditionList
.
splice
(
0
);
},
echoData
(
val
)
{
...
...
@@ -285,6 +304,9 @@ export default {
item
.
conditionId
=
obj
[
item
.
type
].
conditionId
;
}
});
// if (this.addMomentsCard) {
// this.ruleForm.gameRuleConditionList[2].conditionJson.momentsCard = this.momentsCard;
// }
}
if
(
this
.
isEdit
)
{
if
(
memberType
==
1
)
{
...
...
@@ -378,6 +400,8 @@ export default {
if
(
key
==
'shareCard'
)
{
this
.
ruleForm
.
gameRuleConditionList
[
2
].
conditionJson
.
shareCard
=
data
.
result
.
qcloudImageUrl
;
this
.
ruleForm
.
shareImageUrl
=
data
.
result
.
qcloudImageUrl
;
}
else
if
(
key
==
'momentsCard'
)
{
this
.
ruleForm
.
gameRuleConditionList
[
2
].
conditionJson
.
momentsCard
=
data
.
result
.
qcloudImageUrl
;
}
else
{
this
.
ruleForm
.
gameRuleConditionList
[
2
].
conditionJson
.
shareReport
=
data
.
result
.
qcloudImageUrl
;
}
...
...
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