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
208d33a3
Commit
208d33a3
authored
May 19, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
edeaa2e7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
17 deletions
+88
-17
gameApi.js
src/service/api/gameApi.js
+3
-0
base-config.vue
src/views/game/cmh/base-config.vue
+19
-2
form.vue
src/views/game/cmh/form.vue
+14
-9
prize-config.vue
src/views/game/cmh/prize-config.vue
+50
-4
set-rule-dialog.vue
src/views/recharge/components/set-rule-dialog.vue
+2
-2
No files found.
src/service/api/gameApi.js
View file @
208d33a3
...
...
@@ -174,3 +174,6 @@ export const getGameTemplateByType = params => requests(PREFIX + '/game-pro/get-
// 生成小程序游戏链接
export
const
generateMiniProgramLink
=
params
=>
requests
(
'api-admin/get-page-link-game'
,
params
);
//卡券回显 key 卡券ID ; value 卡券状态 0正常 1删除 2失效
export
const
cardView
=
params
=>
requests
(
PREFIX
+
'/game-pro/card-view'
,
params
);
src/views/game/cmh/base-config.vue
View file @
208d33a3
...
...
@@ -9,7 +9,9 @@
<dm-sub-title
type=
"line"
>
展示信息配置
</dm-sub-title>
<div
class=
"mt20"
>
<el-form-item
label=
"游戏模板"
prop=
"templateId"
>
<el-radio
v-for=
"item in templateData"
v-model=
"baseForm.templateId"
:label=
"item.templateId"
:key=
"item.templateId"
>
{{
item
.
templateName
}}
</el-radio>
<el-radio-group
@
change=
"handleTemplateChange"
v-model=
"baseForm.templateId"
>
<el-radio
v-for=
"item in templateData"
:label=
"item.templateId"
:key=
"item.templateId"
>
{{
item
.
templateName
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"游戏背景"
prop=
"backImageUrl"
>
<div
class=
"flex"
>
...
...
@@ -95,7 +97,7 @@
</el-form-item>
</div>
<dm-form-bottom
class=
"footer"
>
<el-button
type=
"primary"
>
保存并下一步
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
保存并下一步
</el-button>
</dm-form-bottom>
</el-form>
</
template
>
...
...
@@ -182,6 +184,12 @@ export default {
}
},
methods
:
{
handleTemplateChange
(
val
)
{
console
.
log
(
val
);
this
.
baseForm
.
templateId
=
val
;
const
data
=
this
.
templateArr
.
filter
(
item
=>
item
.
templateId
==
val
)[
0
];
this
.
handleTemplateArr
(
data
);
},
beforeAvatarUpload
(
file
,
key
,
size1
=
1
)
{
console
.
log
(
file
);
console
.
log
(
size1
);
...
...
@@ -293,6 +301,15 @@ export default {
handleNameChange
(
val
)
{
console
.
log
(
val
);
this
.
$emit
(
'change'
,
this
.
baseForm
);
},
submit
()
{
this
.
$refs
.
form
.
validate
(
val
=>
{
if
(
val
)
{
this
.
$emit
(
'nextStep'
,
{
data
:
this
.
baseForm
});
}
else
{
this
.
scrollToError
(
this
);
}
});
}
}
};
...
...
src/views/game/cmh/form.vue
View file @
208d33a3
...
...
@@ -33,8 +33,8 @@
<dm-step
title=
"步骤三"
@
click
.
native=
"active = 2"
></dm-step>
</dm-steps>
<div
class=
"formContent"
>
<baseConfig
:templateArr=
"templateData"
v-show=
"active == 0"
@
change=
"handleBaseConfigChange"
/>
<prizeConfig
v-show=
"active == 1"
/>
<baseConfig
:templateArr=
"templateData"
v-show=
"active == 0"
@
change=
"handleBaseConfigChange"
@
nextStep=
"data => nextStep(1, data)"
/>
<prizeConfig
v-show=
"active == 1"
@
nextStep=
"data => nextStep(2, data)"
/>
</div>
</div>
</div>
...
...
@@ -109,13 +109,14 @@ export default {
res
.
result
.
forEach
(
item
=>
{
const
{
gameTemplateMaterialList
}
=
item
;
let
materialMap
=
{};
gameTemplateMaterialList
.
forEach
(
val
=>
{
if
(
materialMap
.
hasOwnProperty
(
val
.
materialKey
))
{
materialMap
[
val
.
materialKey
].
push
(
val
);
}
else
{
materialMap
[
val
.
materialKey
]
=
[
val
];
}
});
gameTemplateMaterialList
&&
gameTemplateMaterialList
.
forEach
(
val
=>
{
if
(
materialMap
.
hasOwnProperty
(
val
.
materialKey
))
{
materialMap
[
val
.
materialKey
].
push
(
val
);
}
else
{
materialMap
[
val
.
materialKey
]
=
[
val
];
}
});
item
.
materialMap
=
materialMap
;
});
this
.
templateData
=
res
.
result
;
...
...
@@ -126,6 +127,10 @@ export default {
console
.
log
(
this
.
templateData
);
}
});
},
nextStep
(
step
,
data
)
{
this
.
active
=
step
;
console
.
log
(
data
);
}
}
};
...
...
src/views/game/cmh/prize-config.vue
View file @
208d33a3
...
...
@@ -6,7 +6,15 @@
<template
slot=
"append"
>
%
</
template
>
</el-input>
</el-form-item>
<el-table
:data=
"prizeForm.tableData"
style=
"width:100%"
>
<el-table
:data=
"prizeForm.tableData"
style=
"width:100%"
row-key=
"sort"
ref=
"sortTable"
row-class-name=
"table-row"
>
<el-table-column
width=
"40"
label-class-name=
"tag-head"
>
<
template
>
<el-tooltip
placement=
"top"
content=
"拖动排序"
trigger=
"hover"
effect=
"dark"
popper-class=
"drag-tooltip"
>
<i
class=
"iconfont-components3 icon-cp-tuozhuaipaixu deactive"
/>
</el-tooltip>
</
template
>
</el-table-column>
<el-table-column
min-width=
"136px"
prop=
"prizeType"
>
<
template
slot=
"header"
>
<span
class=
"needCell"
>
奖品类型
</span>
</
template
>
<
template
slot-scope=
"{ row, $index }"
>
...
...
@@ -117,11 +125,12 @@
</
template
>
</el-table-column>
</el-table>
<el-button
@
click=
"addPrize"
class=
"mt16 mb10"
size=
"small"
style=
"border-style: dashed;"
><i
class=
"iconfont icon-Plus"
/>
添加奖项
</el-button>
<el-form-item
label=
"库存提醒"
prop=
"winChance"
>
<el-switch
v-model=
"prizeForm.prizeNoticeFlag"
:active-value=
"1"
:inactive-value=
"0"
/>
</el-form-item>
<el-form-item
label=
"库存低于"
prop=
"prizeNoticeStock"
>
<el-form-item
label=
"库存低于"
prop=
"prizeNoticeStock"
v-show=
"prizeForm.prizeNoticeFlag == 1"
>
<el-form-item
prop=
"prizeNoticeStock"
:rules=
"rules.prizeNoticeStock"
>
<el-input
class=
"w180"
v-model
.
number=
"prizeForm.prizeNoticeStock"
placeholder=
"请输入"
/>
<span
class=
"ml10"
>
件奖品库发送短信提醒
</span>
...
...
@@ -140,6 +149,8 @@
<
script
>
import
dmUploadAvatar
from
'@/components/upload/avatar'
;
import
libCard
from
'@/views/sign/components/lib-card.vue'
;
import
Sortable
from
'sortablejs'
;
import
{
cardView
}
from
'@/service/api/gameApi.js'
;
export
default
{
data
()
{
return
{
...
...
@@ -163,7 +174,8 @@ export default {
tableData
:
[
{
prizeType
:
0
,
prizeRate
:
100
prizeRate
:
100
,
sort
:
0
}
]
},
...
...
@@ -188,7 +200,31 @@ export default {
dmUploadAvatar
,
libCard
},
mounted
()
{
this
.
drag
();
},
methods
:
{
cardView
(
ids
)
{
cardView
({
ids
}).
then
(
res
=>
{
console
.
log
(
res
);
});
},
// 拖拽
drag
()
{
let
that
=
this
;
const
tbody
=
this
.
$refs
.
sortTable
.
$el
.
querySelector
(
'.el-table__body tbody'
);
const
sort
=
Sortable
.
create
(
tbody
,
{
onChoose
(
e
)
{
// 针对icon触发事件
const
isSortIcon
=
e
.
originalEvent
.
target
.
classList
.
contains
(
'icon-cp-tuozhuaipaixu'
);
sort
.
option
(
'sort'
,
isSortIcon
);
},
onEnd
({
newIndex
,
oldIndex
})
{
const
currRow
=
that
.
prizeForm
.
tableData
.
splice
(
oldIndex
,
1
)[
0
];
that
.
prizeForm
.
tableData
.
splice
(
newIndex
,
0
,
currRow
);
}
});
},
handleImgback
(
obj
,
row
)
{
console
.
log
(
obj
,
row
);
},
...
...
@@ -205,7 +241,7 @@ export default {
this
.
prizeForm
.
tableData
=
this
.
prizeForm
.
tableData
.
splice
(
0
);
},
addPrize
()
{
this
.
prizeForm
.
tableData
.
push
({});
this
.
prizeForm
.
tableData
.
push
({
sort
:
this
.
prizeForm
.
tableData
.
length
});
},
del
(
index
)
{
this
.
prizeForm
.
tableData
.
splice
(
index
,
1
);
...
...
@@ -252,10 +288,13 @@ export default {
});
this
.
prizeForm
.
tableData
=
this
.
prizeForm
.
tableData
.
splice
(
0
);
},
submit
()
{
this
.
$refs
.
form
.
validate
(
val
=>
{
if
(
val
)
{
this
.
$emit
(
'nextStep'
,
{
data
:
this
.
prizeForm
});
}
else
{
this
.
scrollToError
(
this
);
}
});
}
...
...
@@ -267,6 +306,13 @@ export default {
.footer
{
width
:
calc
(
100%
-
520px
)
!important
;
}
.table-row
:hover
{
.deactive
{
color
:
#606266
;
display
:
block
;
cursor
:
grabbing
;
}
}
.box
{
position
:
relative
;
height
:
48px
;
...
...
src/views/recharge/components/set-rule-dialog.vue
View file @
208d33a3
...
...
@@ -87,7 +87,7 @@
<el-radio
:label=
"3"
>
活动创建人
</el-radio>
</el-radio-group>
</el-form-item>
<h2
class=
"icon-type-title mb20"
>
<
!-- <
h2 class="icon-type-title mb20">
<div class="mark" />
系统通知
</h2>
...
...
@@ -95,7 +95,7 @@
<el-radio-group v-model="form.jifei">
<el-radio :label="1">活动创建人</el-radio>
</el-radio-group>
</el-form-item>
</el-form-item>
-->
</template>
</el-form>
<div
class=
"footer"
>
...
...
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