Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing-opeartion
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
gic-web
marketing-opeartion
Commits
fb421d8e
Commit
fb421d8e
authored
Jun 17, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
25ac2d36
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
91 additions
and
90 deletions
+91
-90
operation.js
src/api/operation.js
+8
-0
routes.js
src/router/routes.js
+1
-1
component.less
src/styles/component.less
+12
-0
request.js
src/utils/request.js
+1
-1
template-config.vue
src/views/activity/template-config.vue
+4
-39
template-detail.vue
src/views/activity/template-detail.vue
+0
-0
template-list.vue
src/views/activity/template-list.vue
+65
-49
No files found.
src/api/operation.js
View file @
fb421d8e
...
...
@@ -72,6 +72,14 @@ let gameApi = {
method
:
'post'
,
url
:
'/game-config/get-game-template-list'
},
initTemplate
:
{
method
:
'post'
,
url
:
'/game-config/init-template'
},
batchupdateTemplateSort
:
{
method
:
'post'
,
url
:
'/game-config/batch-Update-Template-sort'
},
updateTemplateStatus
:
'/game-config/update-template-status'
};
...
...
src/router/routes.js
View file @
fb421d8e
...
...
@@ -59,7 +59,7 @@ export const routes = [
component
:
_import
(
'activity'
,
'template-list'
)
},
{
path
:
'template-detail/:
id
'
,
path
:
'template-detail/:
type
'
,
name
:
'新建游戏模板'
,
component
:
_import
(
'activity'
,
'template-detail'
)
}
...
...
src/styles/component.less
View file @
fb421d8e
...
...
@@ -44,6 +44,18 @@
.w140{
width: 140px;
}
.pl20{
padding-left: 20px;
}
.pt10{
padding-top: 10px;
}
.pb10{
padding-bottom: 10px;
}
.border-bottom{
border-bottom: 1px solid #E4E7ED;
}
.image-tip {
margin: 6px 0 14px;
font-size: 12px;
...
...
src/utils/request.js
View file @
fb421d8e
...
...
@@ -39,7 +39,7 @@ const request = (opt, params) => {
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
(
requestConfig
).
then
(
res
=>
{
let
resp
=
res
.
data
;
if
(
resp
.
errorCode
!=
0
)
{
if
(
resp
.
errorCode
!=
0
&&
resp
.
code
!=
0
)
{
Message
({
message
:
resp
.
message
||
'未知错误'
,
type
:
'warning'
...
...
src/views/activity/template-config.vue
View file @
fb421d8e
...
...
@@ -27,45 +27,9 @@ console.log(fetch);
export
default
{
data
()
{
return
{
list
:
[
{
templateType
:
1
,
configNum
:
18
},
{
templateType
:
2
,
configNum
:
18
},
{
templateType
:
3
,
configNum
:
0
},
{
templateType
:
4
,
configNum
:
18
},
{
templateType
:
5
,
configNum
:
18
},
{
templateType
:
6
,
configNum
:
18
},
{
templateType
:
7
,
configNum
:
18
}
],
list
:
[],
typeMap
:
{
1
:
'盲盒1'
,
2
:
'盲盒2'
,
3
:
'盲盒3'
,
4
:
'盲盒4'
,
5
:
'盲盒5'
,
6
:
'盲盒6'
,
7
:
'盲盒7'
1
:
'盲盒'
}
};
},
...
...
@@ -75,7 +39,8 @@ export default {
methods
:
{
getList
()
{
fetch
.
getGameTemplateConfig
().
then
((
res
)
=>
{
console
.
log
(
res
);
const
{
result
}
=
res
;
this
.
list
=
result
;
});
}
}
...
...
src/views/activity/template-detail.vue
View file @
fb421d8e
This diff is collapsed.
Click to expand it.
src/views/activity/template-list.vue
View file @
fb421d8e
<
template
>
<div
style=
"padding: 20px"
>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-row
type=
"flex"
align=
"middle"
style=
"margin-right: 10px"
>
<el-input
@
change=
"getList"
placeholder=
"请输入模板名称"
prefix-icon=
"el-icon-search"
v-model=
"searchParams.templateName"
clearable
style=
"width: 260px; margin-right: 10px"
>
</el-input>
<el-select
v-model=
"searchParams.statusFlag"
clearable
placeholder=
"模板状态"
@
change=
"getList"
>
<el-option
v-for=
"item in categoryList"
:key=
"item"
:label=
"item"
:value=
"item.activityCategoryId"
>
</el-option>
</el-select>
<div>
<div
class=
"pt10 pb10 pl20 border-bottom"
>
<el-breadcrumb
separator-class=
"el-icon-arrow-right"
>
<el-breadcrumb-item
:to=
"
{ path: '/activity/template-config' }">营销游戏配置
</el-breadcrumb-item>
<el-breadcrumb-item>
模板列表
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
style=
"padding: 20px"
>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-row
type=
"flex"
align=
"middle"
style=
"margin-right: 10px"
>
<el-input
@
change=
"getList"
placeholder=
"请输入模板名称"
prefix-icon=
"el-icon-search"
v-model=
"searchParams.templateName"
clearable
style=
"width: 260px; margin-right: 10px"
>
</el-input>
<el-select
v-model=
"searchParams.statusFlag"
clearable
placeholder=
"模板状态"
@
change=
"getList"
>
<el-option
v-for=
"item in statusList"
:key=
"item.label"
:label=
"item.label"
:value=
"item.val"
>
</el-option>
</el-select>
</el-row>
<el-row
type=
"flex"
align=
"middle"
>
<el-button
type=
"primary"
@
click=
"addTemplate()"
>
新增模板
</el-button>
</el-row>
</el-row>
<el-row
type=
"flex"
align=
"middle"
>
<el-button
type=
"primary"
@
click=
"addTemplate()"
>
新增模板
</el-button>
</el-row>
</el-row>
<el-table
row-key=
"sort"
ref=
"sortTable"
row-class-name=
"table-row"
:data=
"list"
style=
"margin-top: 20px"
v-loading=
"loading"
>
<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
label=
"模板名称"
min-width=
"290px"
prop=
"templateName"
>
</el-table-column>
<el-table-column
label=
"展示数量"
min-width=
"310px"
prop=
"prizeMax"
>
</el-table-column>
<el-table-column
label=
"模板状态"
min-width=
"306px"
prop=
"statusFlag"
>
<
template
slot-scope=
"{ row }"
>
<el-switch
v-model=
"row.statusFlag"
@
change=
"handleSwitch(row.statusFlag, row.templateId)"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"255px"
>
<
template
slot-scope=
"{ row }"
>
<el-row
type=
"flex"
>
<el-button
type=
"text"
@
click=
"edit(row)"
>
编辑
</el-button>
</el-row>
</
template
>
</el-table-column>
</el-table>
<el-table
row-key=
"sort"
ref=
"sortTable"
row-class-name=
"table-row"
:data=
"list"
style=
"margin-top: 20px"
v-loading=
"loading"
>
<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
label=
"模板名称"
min-width=
"290px"
prop=
"templateName"
>
</el-table-column>
<el-table-column
label=
"展示数量"
min-width=
"310px"
prop=
"prizeMax"
>
</el-table-column>
<el-table-column
label=
"模板状态"
min-width=
"306px"
prop=
"statusFlag"
>
<
template
slot-scope=
"{ row }"
>
<el-switch
v-model=
"row.statusFlag"
@
change=
"handleSwitch(row.statusFlag, row.templateId)"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
min-width=
"255px"
>
<
template
slot-scope=
"{ row }"
>
<el-row
type=
"flex"
>
<el-button
type=
"text"
@
click=
"edit(row)"
>
编辑
</el-button>
</el-row>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</template>
...
...
@@ -48,21 +56,15 @@ export default {
statusFlag
:
''
},
loading
:
false
,
list
:
[
{
statusFlag
:
0
,
prizeMax
:
9
,
templateName
:
'盲盒11111'
},
list
:
[],
statusList
:
[
{
statusFlag
:
1
,
prizeMax
:
9
,
templateName
:
'盲盒2222'
label
:
'关闭'
,
val
:
0
},
{
statusFlag
:
0
,
prizeMax
:
8
,
templateName
:
'盲盒3333'
label
:
'开启'
,
val
:
1
}
]
};
...
...
@@ -77,7 +79,8 @@ export default {
fetch
.
getGameTemplatList
(
this
.
searchParams
)
.
then
((
res
)
=>
{
console
.
log
(
res
);
const
{
result
}
=
res
;
this
.
list
=
result
;
})
.
finally
((
_
)
=>
{
this
.
loading
=
false
;
...
...
@@ -112,10 +115,23 @@ export default {
sort
.
option
(
'sort'
,
isSortIcon
);
},
onEnd
({
newIndex
,
oldIndex
})
{
const
currRow
=
that
.
list
.
splice
(
oldIndex
,
1
)[
0
];
that
.
list
.
splice
(
newIndex
,
0
,
currRow
);
console
.
log
(
newIndex
);
// const currRow = that.list.splice(oldIndex, 1)[0];
// that.list.splice(newIndex, 0, currRow);
const
arr
=
that
.
list
.
map
((
item
,
index
)
=>
{
return
{
sort
:
index
,
templateId
:
item
.
templateId
};
});
console
.
log
(
arr
);
// that.batchupdateTemplateSort({ sort: newIndex, templateId: currRow.templateId });
that
.
batchupdateTemplateSort
(
arr
);
}
});
},
batchupdateTemplateSort
(
arr
)
{
fetch
.
batchupdateTemplateSort
(
arr
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
getList
();
});
}
}
};
...
...
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