Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
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
黄媛媛
ElectricitySheep
Commits
2cde568c
Commit
2cde568c
authored
Nov 11, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
87429131
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
667 additions
and
87 deletions
+667
-87
pluginCenter.vue
src/components/sallCenter/pluginCenter.vue
+30
-66
sysindex.vue
src/components/sysindex.vue
+250
-0
menu.vue
src/components/system/menu.vue
+0
-1
minimenu.vue
src/components/system/minimenu.vue
+0
-1
pluglist.vue
src/components/system/pluglist.vue
+232
-0
setmarketingplug.vue
src/components/system/setmarketingplug.vue
+120
-0
sysmenu.vue
src/components/system/sysmenu.vue
+1
-1
index.js
src/router/index.js
+34
-18
No files found.
src/components/sallCenter/pluginCenter.vue
View file @
2cde568c
...
...
@@ -10,15 +10,15 @@
}
.plugin-list
{
flex-wrap
:
wrap
;
margin-left
:
-20px
;
flex-wrap
:
wrap
;
margin-left
:
-20px
;
}
.plugin-item
{
border
:
1px
solid
#ebebeb
;
background
:
#fff
;
padding
:
20px
;
width
:
252px
;
width
:
252px
;
margin
:
0
0
20px
20px
;
transition
:
250ms
;
position
:
relative
;
...
...
@@ -74,74 +74,18 @@
<h3
class=
"plugin_ListTitle"
>
已安装
</h3>
</div>
<div
class=
"plugin-list"
flex=
"dir:left"
>
<div
flex=
"dir:left box:first"
class=
"plugin-item"
@
click=
"goDiyCenter('Fsetting')"
>
<div
style=
"padding-right: 12px;"
><img
src=
"../../assets/img/sallCenter/icon.png"
style=
"width: 50px; height: 50px; display: block;"
></div>
<div>
<div
class=
"display-name"
>
微信小程序
</div>
<div
flex=
"box:last"
>
<div
class=
"name"
>
wxapp
</div>
</div>
</div>
</div>
<div
flex=
"dir:left box:first"
class=
"plugin-item"
@
click=
"goDiyCenter('Ftemplate')"
>
<div
style=
"padding-right: 12px;"
><img
src=
"../../assets/img/sallCenter/Diy.png"
style=
"width: 50px; height: 50px; display: block;"
></div>
<div>
<div
class=
"display-name"
>
DIY装修
</div>
<div
flex=
"box:last"
>
<div
class=
"name"
>
diy
</div>
</div>
<template
v-for=
"(item,index) in DefaultList"
>
<div
:key=
"index"
flex=
"dir:left box:first"
:class=
"item.IconClass"
@
click=
"goDiyCenter(item.PlugUrl)"
>
<div
style=
"padding-right: 12px;"
><img
:src=
"item.Icon"
style=
"width: 50px; height: 50px; display: block;"
>
</div>
</div>
<div
flex=
"dir:left box:first"
class=
"plugin-item"
@
click=
"goDiyCenter('authorize')"
>
<div
style=
"padding-right: 12px;"
><img
src=
"../../assets/img/sallCenter/em.png"
style=
"width: 50px; height: 50px; display: block;"
></div>
<div>
<div
class=
"display-name"
>
资产管理
</div>
<div
flex=
"box:last"
>
<div
class=
"name"
>
authorize
</div>
</div>
</div>
</div>
<div
flex=
"dir:left box:first"
class=
"plugin-item"
@
click=
"goDiyCenter('FShareMain')"
>
<div
style=
"margin-right: 12px;background:rgb(51, 153, 255);height:50px;"
><img
src=
"../../assets/img/sallCenter/circle.png"
style=
"width: 50px; height: 50px; display: block;"
></div>
<div>
<div
class=
"display-name"
>
一键发圈
</div>
<div
class=
"display-name"
>
{{
item
.
PlugName
}}
</div>
<div
flex=
"box:last"
>
<div
class=
"name"
>
一键保存,高效发圈
</div>
<div
class=
"name"
>
{{
item
.
PlugSubName
}}
</div>
</div>
</div>
</div>
<div
flex=
"dir:left box:first"
class=
"plugin-item"
@
click=
"goDiyCenter('directorIndex')"
>
<div
style=
"margin-right: 12px;background:rgb(51, 153, 255);height:50px;"
><img
src=
"../../assets/img/sallCenter/circle.png"
style=
"width: 50px; height: 50px; display: block;"
></div>
<div>
<div
class=
"display-name"
>
司导专区
</div>
<div
flex=
"box:last"
>
<div
class=
"name"
>
出行靠司导、安心
</div>
</div>
</div>
</div>
<div
flex=
"dir:left box:first"
class=
"plugin-item"
@
click=
"goDiyCenter('educationIndex')"
>
<div
style=
"margin-right: 12px;background:rgb(51, 153, 255);height:50px;"
><img
src=
"../../assets/img/sallCenter/circle.png"
style=
"width: 50px; height: 50px; display: block;"
></div>
<div>
<div
class=
"display-name"
>
教育模块
</div>
<div
flex=
"box:last"
>
<div
class=
"name"
>
改变命运,学习成就未来
</div>
</div>
</div>
</div>
<div
flex=
"dir:left box:first"
class=
"plugin-item"
@
click=
"goDiyCenter('offlineIndex')"
>
<div
style=
"margin-right: 12px;background:rgb(51, 153, 255);height:50px;"
><img
src=
"../../assets/img/sallCenter/circle.png"
style=
"width: 50px; height: 50px; display: block;"
></div>
<div>
<div
class=
"display-name"
>
线下服务
</div>
<div
flex=
"box:last"
>
<div
class=
"name"
>
Below-the-Line
</div>
</div>
</div>
</div>
</
template
>
</div>
<div
style=
"display:none"
>
<div
flex=
"cross:center"
style=
"margin-top:20px;"
>
...
...
@@ -175,7 +119,8 @@
currentUser
:
{},
isChecked
:
1
,
Height
:
0
,
isShow
:
1
,
isShow
:
1
,
DefaultList
:
[],
//默认列表
};
},
created
()
{
...
...
@@ -191,9 +136,28 @@
}
});
window
.
open
(
routeData
.
href
,
"_blank"
);
},
//获取插件列表
getPlugList
()
{
this
.
apipost
(
"/api/MContent/GetMarketingPlugList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempData
=
res
.
data
.
data
;
if
(
tempData
&&
tempData
.
length
>
0
)
{
tempData
.
forEach
(
item
=>
{
if
(
item
.
PlugType
==
1
)
{
this
.
DefaultList
=
item
.
SubList
}
});
}
console
.
log
(
"this.DefaultList "
,
this
.
DefaultList
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
}
},
mounted
()
{
this
.
getPlugList
();
this
.
Height
=
document
.
documentElement
.
clientHeight
-
60
;
//监听浏览器窗口变化
window
.
onresize
=
()
=>
{
...
...
src/components/sysindex.vue
0 → 100644
View file @
2cde568c
<
style
>
.sysindex
{
height
:
100%
;
display
:
flex
;
-webkit-box-orient
:
horizontal
;
-ms-flex-direction
:
row
;
flex-direction
:
row
;
-webkit-box-flex
:
1
;
-ms-flex
:
1
;
flex
:
1
;
-ms-flex-preferred-size
:
auto
;
flex-basis
:
auto
;
-webkit-box-sizing
:
border-box
;
box-sizing
:
border-box
;
min-width
:
0
;
font-size
:
14px
;
}
.sysindex
.mainLeftMenu
{
position
:
relative
;
display
:
flex
;
flex-direction
:
row
;
color
:
#fff
;
}
.sysindex
.leftMenu1
{
background
:
#444444
;
cursor
:
pointer
;
width
:
200px
;
height
:
100%
;
overflow-y
:
auto
;
-webkit-user-select
:
none
;
-moz-user-select
:
none
;
-ms-user-select
:
none
;
user-select
:
none
;
}
.sysindex
.asideInner
{
background
:
rgba
(
0
,
0
,
0
,
0.15
);
padding
:
6px
6px
;
width
:
100%
;
border-radius
:
3px
;
font-weight
:
bold
;
}
.sysindex
.F_Logo
{
height
:
60px
;
background
:
#464d54
;
color
:
#f2f2f2
;
cursor
:
pointer
;
font-weight
:
bold
;
text-align
:
center
;
padding
:
0
15px
;
display
:
flex
;
align-items
:
center
;
}
.sysindex
.mainRightContent
{
width
:
100%
;
height
:
100%
;
min-width
:
0
;
background-color
:
#f3f3f3
;
}
.sysindex
.mainRightTop
{
width
:
100%
;
height
:
60px
;
background
:
#fff
;
display
:
flex
;
justify-content
:
space-between
;
color
:
#909399
;
}
.sysindex
.mainRightLeft
{
width
:
110px
;
height
:
60px
;
line-height
:
62px
;
text-align
:
center
;
margin-left
:
30px
;
cursor
:
pointer
;
position
:
relative
;
top
:
-2px
;
}
.sysindex
.marinRightList
{
display
:
flex
;
flex-wrap
:
wrap
;
align-items
:
center
;
width
:
300px
;
float
:
right
;
}
.sysindex
.marinRightList
ul
{
display
:
flex
;
width
:
100%
;
justify-content
:
space-around
;
}
.sysindex
.marinRightList
ul
li
{
display
:
block
;
list-style-type
:
none
;
cursor
:
pointer
;
color
:
#909399
;
outline
:
none
;
border
:
none
;
}
.sysindex
.main_routerPage
{
padding
:
20px
;
overflow-y
:
scroll
;
}
.sysindex
.sysindexUU
{
position
:
fixed
;
width
:
200px
;
height
:
100%
;
position
:
fixed
;
top
:
60px
;
left
:
0
;
overflow
:
auto
;
z-index
:
5
;
background-color
:
rgb
(
84
,
92
,
100
);
}
.sysindex
.sysindexUU
.menu_item
{
font-size
:
14px
;
color
:
#303133
;
padding
:
0
20px
;
cursor
:
pointer
;
-webkit-transition
:
border-color
.3s
,
background-color
.3s
,
color
.3s
;
transition
:
border-color
.3s
,
background-color
.3s
,
color
.3s
;
box-sizing
:
border-box
;
height
:
56px
;
line-height
:
56px
;
list-style
:
none
;
white-space
:
nowrap
;
color
:
#fff
;
display
:
flex
;
align-items
:
center
;
}
.sysindex
.sysindexUU
.menu_item
i
{
margin-right
:
5px
;
width
:
24px
;
text-align
:
center
;
font-size
:
18px
;
vertical-align
:
middle
;
color
:
#909399
;
}
.sysindex
.menu_item
:hover
{
background-color
:
rgba
(
67
,
74
,
80
);
}
.sysindex
.F_Logo
:hover
{
background-color
:
#30353a
;
color
:
#fff
;
}
.sysindex
.Fchecked
{
color
:
rgb
(
255
,
208
,
75
)
!important
;
}
.sysindex
.Fchecked
i
{
color
:
rgb
(
255
,
208
,
75
)
!important
;
}
</
style
>
<
template
>
<div
class=
"sysindex"
>
<div
class=
"mainLeftMenu"
>
<div
class=
"leftMenu1"
>
<div
class=
"F_Logo"
>
<div
class=
"asideInner"
@
click=
"CommonJump('mallIndex')"
>
{{
currentUser
.
MallName
}}
</div>
</div>
<ul
class=
"sysindexUU"
>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/menu'}" @click="isChecked='/menu',CommonJump('menu')">
<i
class=
"el-icon-menu"
></i><span>
商城菜单
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/minimenu'}" @click="isChecked='/minimenu',CommonJump('minimenu')">
<i
class=
"el-icon-menu"
></i><span>
小程序菜单
</span>
</li>
<li
class=
"menu_item"
:class=
"
{'Fchecked':isChecked=='/pluglist'}" @click="isChecked='/pluglist',CommonJump('pluglist')">
<i
class=
"el-icon-menu"
></i><span>
营销插件
</span>
</li>
</ul>
</div>
</div>
<div
class=
"mainRightContent"
>
<div
class=
"mainRightTop"
>
<div
class=
"mainRightLeft"
>
微信小程序
</div>
<div
class=
"marinRightList"
>
<ul>
<li
style=
"display:none"
>
>缓存
</li>
<li
style=
"display:none"
>
title="教程管理">
<el-dropdown
trigger=
"click"
>
<span
class=
"el-dropdown-link"
>
教程管理
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item>
操作教程
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
<li
:title=
"currentUser.MallName"
>
<el-dropdown
trigger=
"click"
>
<span
class=
"el-dropdown-link"
>
{{
currentUser
.
MallName
}}
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
disabled
>
{{
currentUser
.
MallName
}}
</el-dropdown-item>
<el-dropdown-item
disabled
>
{{
currentUser
.
Account
}}
(
{{
currentUser
.
MobilePhone
}}
)
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"CommonJump('index')"
>
返回系统
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</li>
</ul>
</div>
</div>
<div
class=
"main_routerPage"
:style=
"
{height: Height+'px'}">
<router-view
/>
</div>
</div>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
currentUser
:
{},
isChecked
:
''
,
Height
:
0
};
},
created
()
{
this
.
currentUser
=
this
.
getLocalStorage
();
this
.
isChecked
=
this
.
$route
.
path
;
},
methods
:
{},
mounted
()
{
this
.
Height
=
document
.
documentElement
.
clientHeight
-
60
;
//监听浏览器窗口变化
window
.
onresize
=
()
=>
{
this
.
Height
=
document
.
documentElement
.
clientHeight
-
60
}
}
};
</
script
>
src/components/system/menu.vue
View file @
2cde568c
...
...
@@ -37,7 +37,6 @@
<button
type=
"button"
class=
"normalBtn"
@
click=
"msg.pageIndex=1,getPageList()"
>
查询
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"menuDialog=true,resetMsg()"
>
新增
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"CommonJump('sysmenu',
{})">设置商城菜单
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"CommonJump('minimenu',
{})">小程序菜单
</button>
</div>
<table
class=
"commonTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
>
<tr>
...
...
src/components/system/minimenu.vue
View file @
2cde568c
...
...
@@ -41,7 +41,6 @@
<button
type=
"button"
class=
"normalBtn"
@
click=
"msg.pageIndex=1,getPageList()"
>
查询
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"menuDialog=true,resetMsg()"
>
新增
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"CommonJump('setminipage',
{})">设置小程序菜单
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"CommonJump('menu',
{})">系统菜单
</button>
</div>
<table
class=
"commonTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
>
<tr>
...
...
src/components/system/pluglist.vue
0 → 100644
View file @
2cde568c
<
style
>
.pluglistDiv
{
padding
:
20px
;
}
.pluglistDiv
.query-box
{
width
:
100%
;
padding
:
0
0
20px
;
border-bottom
:
1px
solid
#ccc
;
position
:
relative
;
text-align
:
right
;
}
.pluglistDiv
.normalBtn
{
color
:
#fff
;
padding
:
0
15px
;
height
:
30px
;
background
:
#e95252
;
border
:
1px
solid
#e95252
;
cursor
:
pointer
;
border-radius
:
15px
;
margin-left
:
10px
;
outline
:
none
;
}
</
style
>
<
template
>
<div
class=
"pluglistDiv"
>
<div
class=
"query-box"
>
名称:
<el-input
type=
"text"
style=
"width:234px;"
size=
"small"
v-model=
"msg.PlugName"
clearable
@
keyup
.
enter
.
native=
"msg.pageIndex=1,getPageList()"
></el-input>
<button
type=
"button"
class=
"normalBtn"
@
click=
"msg.pageIndex=1,getPageList()"
>
查询
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"marketingPlugDialog=true,resetMsg()"
>
新增
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"CommonJump('setmarketingplug',
{})">设置营销插件
</button>
</div>
<table
class=
"commonTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
>
<tr>
<th>
编号
</th>
<th>
类型
</th>
<th>
名称
</th>
<th>
子项名称
</th>
<th>
链接
</th>
<th>
图标
</th>
<th>
样式
</th>
<th>
状态
</th>
<th>
操作
</th>
</tr>
<tr
v-for=
"(item,index) in dataList"
:key=
"index"
>
<td>
{{
item
.
PId
}}
</td>
<td>
{{
item
.
PlugTypeName
}}
</td>
<td>
{{
item
.
PlugName
}}
</td>
<td>
{{
item
.
PlugSubName
}}
</td>
<td>
{{
item
.
PlugUrl
}}
</td>
<td>
{{
item
.
Icon
}}
</td>
<td>
{{
item
.
IconClass
}}
</td>
<td>
<el-switch
v-model=
"item.Status"
active-color=
"#409EFF"
:active-value=
"0"
:inactive-value=
"1"
@
change=
"delMarketingPlug(item)"
>
</el-switch>
</td>
<td>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"修改"
placement=
"top-start"
>
<el-button
type=
"primary"
icon=
"el-icon-edit"
@
click=
"getMarketingPlug(item.PId)"
circle
style=
"padding:6px;"
>
</el-button>
</el-tooltip>
</td>
</tr>
</table>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
v-if=
"dataList.length>0"
layout=
"total,prev, pager, next, jumper"
:page-size=
"msg.pageSize"
:total=
"total"
>
</el-pagination>
<!-- 新增营销插件 -->
<el-dialog
title=
"营销插件"
:visible
.
sync=
"marketingPlugDialog"
width=
"500px"
>
<el-form
:model=
"addMsg"
ref=
"addMsg"
label-width=
"150px"
>
<el-form-item
label=
"插件类型"
>
<el-select
size=
"small"
v-model=
"addMsg.PlugType"
>
<el-option
v-for=
"(item) in PlugTypeList"
:label=
"item.Name"
:key=
"item.Id"
:value=
"item.Id"
>
</el-option>
</el-select>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"50"
v-model=
"addMsg.PlugSubName"
></el-input>
</el-form-item>
<el-form-item
label=
"插件名称"
>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"50"
v-model=
"addMsg.PlugName"
></el-input>
</el-form-item>
<el-form-item
label=
"插件子项名称"
>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"50"
v-model=
"addMsg.PlugSubName"
></el-input>
</el-form-item>
<el-form-item
label=
"跳转链接"
>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"50"
v-model=
"addMsg.PlugUrl"
></el-input>
</el-form-item>
<el-form-item
label=
"图片地址"
>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"255"
v-model=
"addMsg.Icon"
></el-input>
</el-form-item>
<el-form-item
label=
"样式"
prop=
"IconClass"
>
<el-input
type=
"text"
style=
"width:234px"
size=
"small"
maxlength=
"100"
v-model=
"addMsg.IconClass"
></el-input>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"marketingPlugDialog = false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"submitForm('addMsg')"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
loading
:
false
,
marketingPlugDialog
:
false
,
currentPage
:
1
,
total
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
20
,
PlugName
:
""
,
//插件名称
},
dataList
:
[],
addMsg
:
{
PId
:
0
,
//插件编号
PlugType
:
0
,
//插件类型(1-默认,2-营销工具)
PlugName
:
''
,
//插件名称
PlugSubName
:
''
,
//插件子项名称
PlugUrl
:
''
,
//跳转路径
Icon
:
""
,
//图标
IconClass
:
''
,
//样色
},
PlugTypeList
:
[{
Id
:
1
,
Name
:
"默认"
},
{
Id
:
2
,
Name
:
"营销工具"
},
],
};
},
created
()
{
},
methods
:
{
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getPageList
();
},
submitForm
(
addMsg
)
{
//提交创建、修改营销插件
this
.
$refs
[
addMsg
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
addMarketingPlug
();
}
else
{
return
false
;
}
});
},
//重置参数
resetMsg
()
{
this
.
addMsg
.
PId
=
0
;
this
.
addMsg
.
PlugName
=
""
;
this
.
addMsg
.
PlugSubName
=
""
;
this
.
addMsg
.
PlugUrl
=
""
;
this
.
addMsg
.
Icon
=
""
;
this
.
addMsg
.
IconClass
=
""
;
},
//获取分页数据
getPageList
()
{
this
.
apipost
(
"/api/MContent/GetMarketingPlugPageList"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//添加修改营销插件
addMarketingPlug
()
{
this
.
apipost
(
"/api/MContent/SetMarketingPlug"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getPageList
();
this
.
marketingPlugDialog
=
false
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//根据编号获取营销插件
getMarketingPlug
(
Id
)
{
this
.
apipost
(
"/api/MContent/GetMarketingPlug"
,
{
PId
:
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
res
.
data
.
data
;
this
.
marketingPlugDialog
=
true
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//修改营销插件状态
delMarketingPlug
(
item
)
{
var
that
=
this
;
var
tipMsg
=
""
;
if
(
item
.
Status
==
0
)
{
tipMsg
=
"是否启用此插件?"
;
}
else
{
tipMsg
=
"是否禁用此插件?"
;
}
that
.
Confirm
(
tipMsg
,
function
()
{
that
.
apipost
(
"/api/MContent/RemoveMarketingPlug"
,
{
PId
:
item
.
PId
,
Status
:
item
.
Status
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getPageList
();
}
else
{
that
.
Info
(
res
.
data
.
message
);
}
})
});
}
},
mounted
()
{
this
.
getPageList
();
}
};
</
script
>
src/components/system/setmarketingplug.vue
0 → 100644
View file @
2cde568c
<
style
>
.setmarketingplugDiv
{
padding
:
20px
;
}
.setmarketingplugDiv
.query-box
{
width
:
100%
;
padding
:
0
0
20px
;
border-bottom
:
1px
solid
#ccc
;
position
:
relative
;
text-align
:
right
;
}
.setmarketingplugDiv
.normalBtn
{
color
:
#fff
;
padding
:
0
15px
;
height
:
30px
;
background
:
#e95252
;
border
:
1px
solid
#e95252
;
cursor
:
pointer
;
border-radius
:
15px
;
margin-left
:
10px
;
outline
:
none
;
}
</
style
>
<
template
>
<div
class=
"setmarketingplugDiv"
>
<div
class=
"query-box"
>
<button
type=
"button"
class=
"normalBtn"
@
click=
"setMiniProgramPage()"
>
保存
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"CommonJump('pluglist',
{})">插件中心
</button>
</div>
<table
class=
"commonTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
>
<tr>
<th>
插件类型
</th>
<th>
插件名称
</th>
</tr>
<tr
v-for=
"(item,index) in dataList"
:key=
"index"
>
<td>
<el-checkbox
v-model=
"item.IsChecked"
:key=
"index"
@
change=
"ChangeItem(item)"
>
{{
item
.
PlugTypeName
}}
</el-checkbox>
</td>
<td
style=
"text-align:left; padding-left:5px;"
>
<template
v-for=
"(subItem,subIndex) in item.SubList"
>
<el-checkbox
v-model=
"subItem.IsChecked"
:key=
"subIndex"
>
{{
subItem
.
PlugName
}}
</el-checkbox>
</
template
>
</td>
</tr>
</table>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
loading
:
false
,
dataList
:
[],
TenantId
:
0
,
//商户Id
};
},
created
()
{
},
methods
:
{
ChangeItem
(
item
)
{
if
(
item
.
SubList
&&
item
.
SubList
.
length
>
0
)
{
item
.
SubList
.
forEach
(
subItem
=>
{
subItem
.
IsChecked
=
item
.
IsChecked
;
})
}
},
//获取分页数据
getPageList
()
{
this
.
apipost
(
"/api/MContent/GetMarketingConfigList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
;
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
//添加修改插件
setMiniProgramPage
()
{
var
setArray
=
[];
//新增修改的数组
if
(
this
.
dataList
&&
this
.
dataList
.
length
>
0
)
{
this
.
dataList
.
forEach
(
item
=>
{
if
(
item
.
SubList
&&
item
.
SubList
.
length
>
0
)
{
item
.
SubList
.
forEach
(
subItem
=>
{
if
(
subItem
.
IsChecked
)
{
setArray
.
push
({
PConfigId
:
0
,
PlugId
:
subItem
.
PId
,
TenantId
:
this
.
TenantId
});
}
})
}
})
}
if
(
setArray
.
length
==
0
)
{
this
.
Info
(
"请选择要操作的插件!"
);
return
;
}
this
.
apipost
(
"/api/MContent/SetMarketingConfig"
,
setArray
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getPageList
();
this
.
Success
(
res
.
data
.
message
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
},
mounted
()
{
this
.
TenantId
=
this
.
getLocalStorage
().
TenantId
;
this
.
getPageList
();
}
};
</
script
>
src/components/system/sysmenu.vue
View file @
2cde568c
...
...
@@ -28,7 +28,7 @@
<div
class=
"tenantmenuDiv"
>
<div
class=
"query-box"
>
<button
type=
"button"
class=
"normalBtn"
@
click=
"setMiniProgramPage()"
:disabled=
"isDisabled"
>
{{
btnText
}}
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"CommonJump('menu',
{})">
系统
菜单
</button>
<button
type=
"button"
class=
"normalBtn"
@
click=
"CommonJump('menu',
{})">
商城
菜单
</button>
</div>
<table
class=
"commonTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
>
<tr>
...
...
src/router/index.js
View file @
2cde568c
...
...
@@ -37,24 +37,40 @@ export default new Router({
component
:
resolve
=>
require
([
'@/components/index'
],
resolve
),
},
{
path
:
'/menu'
,
name
:
'menu'
,
component
:
resolve
=>
require
([
'@/components/system/menu'
],
resolve
),
},
{
path
:
'/minimenu'
,
//小程序菜单管理
name
:
'minimenu'
,
component
:
resolve
=>
require
([
'@/components/system/minimenu'
],
resolve
),
},
{
path
:
'/sysmenu'
,
//设置商城菜单
name
:
'sysmenu'
,
component
:
resolve
=>
require
([
'@/components/system/sysmenu'
],
resolve
),
},
{
path
:
'/setminipage'
,
//设置小程序菜单
name
:
'setminipage'
,
component
:
resolve
=>
require
([
'@/components/system/setminipage'
],
resolve
),
path
:
'/sysindex'
,
//系统相关设置
name
:
'sysindex'
,
component
:
resolve
=>
require
([
'@/components/sysindex'
],
resolve
),
children
:
[{
path
:
'/menu'
,
name
:
'menu'
,
component
:
resolve
=>
require
([
'@/components/system/menu'
],
resolve
),
},
{
path
:
'/minimenu'
,
//小程序菜单管理
name
:
'minimenu'
,
component
:
resolve
=>
require
([
'@/components/system/minimenu'
],
resolve
),
},
{
path
:
'/setminipage'
,
//设置小程序菜单
name
:
'setminipage'
,
component
:
resolve
=>
require
([
'@/components/system/setminipage'
],
resolve
),
},
{
path
:
'/sysmenu'
,
//设置商城菜单
name
:
'sysmenu'
,
component
:
resolve
=>
require
([
'@/components/system/sysmenu'
],
resolve
),
},
{
path
:
'/pluglist'
,
//营销中心插件列表
name
:
'pluglist'
,
component
:
resolve
=>
require
([
'@/components/system/pluglist'
],
resolve
),
},
{
path
:
'/setmarketingplug'
,
//设置营销插件
name
:
'setmarketingplug'
,
component
:
resolve
=>
require
([
'@/components/system/setmarketingplug'
],
resolve
),
},
]
},
{
path
:
'/Fsetting'
,
//微信小程序设置
...
...
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