Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
149973c6
Commit
149973c6
authored
Feb 16, 2019
by
ms-dev
Browse files
结构更新
parent
11306435
Changes
11
Hide whitespace changes
Inline
Side-by-side
src/main/webapp/WEB-INF/manager/mweixin/keyword/form.ftl
deleted
100644 → 0
View file @
11306435
<!--
关键词回复 -->
<
link
rel="stylesheet" href="../../../../static/mweixin/css/keyword-reply.css">
<
div
id="keyword-reply" class="keyword-reply ms-weixin-content" v-if="menuVue.menuActive == '关键词表单'">
<el-container>
<el-header class="ms-header" height="50px">
<el-row>
<el-button class="ms-fr" size="small" icon="el-icon-arrow-left" @click="menuVue.menuActive = '关键词回复'">返回</el-button>
<el-button class="ms-fr" size="small" icon="el-icon-refresh">重置</el-button>
<el-button class="ms-fr" type="success" size="small" icon="el-icon-tickets" @click="menuVue.menuActive = '关键词回复'">保存</el-button>
</el-row>
</el-header>
<el-main class="ms-container" width="100%">
<el-form :model="keywordReplyForm" status-icon :rules="keywordReplyFormRules" ref="keywordReplyForm" label-width="100px">
<el-form-item label="关键词" prop="keyword" class="ms-keyword-input">
<el-row type='flex' justify='space-between' align='center'>
<el-col :span='12'>
<el-input placeholder="请输入内容" v-model="keywordReplyForm.keyword" class="input-with-select" size='mini' maxlength='30' @input='resetWord'>
<el-select v-model="keywordReplyForm.select" slot="prepend" placeholder="请选择">
<el-option label="模糊匹配" value="1"></el-option>
<el-option label="全匹配" value="2"></el-option>
</el-select>
<span slot='suffix' v-text="wordNumber+'/30'"></span>
</el-input>
</el-col>
<el-col>
<i class="el-icon-plus" @click='addKeyWord'></i>
</el-col>
</el-row>
</el-form-item>
<el-form-item class="ms-keyword-reply-content" label="回复内容">
<el-tabs v-model="activeName" @tab-click="" class="keyword-reply-tabs">
<el-tab-pane label="文字" name="text">
<el-input type="textarea" v-model="keywordReplyForm.reply" :autosize="
{
minRows
:
4
,
maxRows
:
4
}
" resize='none'>
</el-input>
<i class="el-icon-delete" @click="keywordReplyForm.reply = ''"></i>
<div class="footer">
<i class="el-icon-star-off"></i>
<a>插入超链接</a>
</div>
</el-tab-pane>
<el-tab-pane label="图片" name="picture">
</el-tab-pane>
<el-tab-pane label="图文" name="article">
</el-tab-pane>
</el-tabs>
</el-form-item>
</el-form>
</el-main>
</el-container>
</
div
>
<
script
>
var keywordReplyVue = new Vue(
{
el
:
'#
keyword-reply
'
,
data
:
{
keywordReplyForm
:
{
keyword
:
""
,
//关键词
select
:
''
,
reply
:
""
,
},
keywordReplyFormRules
:
{
},
activeName
:
'
text
'
,
wordNumber
:
30
,
//剩余字数
},
methods
:
{
//
添加关键词
addKeyWord
:
function
()
{
},
//
计算剩余字数
resetWord
:
function
(
value
)
{
if
(
!
value
)
return
30
;
if
(
value
.length
>=
30
)
{
this
.
$message
.error
(
'任务名称不得超过
30
个字'
)
;
//
这里涉及到获取数据更新之后的
DOM
,需要用
$nextTick
this
.
$nextTick
(
function
()
{
this
.keywordReplyForm.keyword
=
event
.target.value
=
value
.slice
(
0
,
30
)
;
})
this
.wordNumber
=
0
}
else
{
this
.wordNumber
=
30
-
value
.length
}
}
}
}
)
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/keyword/index.ftl
deleted
100644 → 0
View file @
11306435
<!--
关键字列表 -->
<
link
rel="stylesheet" href="../../../../static/mweixin/css/keyword-list.css">
<
div
id="keyword-list" class="keyword-list ms-weixin-content" v-if="menuVue.menuActive == '关键词回复'">
<el-container>
<!--右侧头部-->
<el-header class="ms-header" height="50px">
<el-row>
<el-button type="primary" size="small" icon="el-icon-plus" @click="menuVue.menuActive = '关键词表单'">添加</el-button>
<el-button class="ms-fr" size="small" icon="el-icon-refresh">重置</el-button>
</el-row>
</el-header>
<el-container>
<!--内容头部-->
<el-header class="ms-tr ms-header">
<el-input size="medium" placeholder="请输入内容" suffix-icon="el-icon-search">
</el-input>
</el-header>
<!--素材列表-->
<el-main class="ms-admin-picture-list ms-container">
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="date" label="规则名" width="180" align='center'>
</el-table-column>
<el-table-column prop="name" label="关键词" width="180" align='center'>
</el-table-column>
<el-table-column prop="address" label="消息回复类型" align='center'>
</el-table-column>
<el-table-column prop="address" label="发送对象" align='center'>
</el-table-column>
<el-table-column prop="address" label="回复方式" align='center'>
</el-table-column>
</el-table>
</el-main>
</el-container>
</el-container>
</
div
>
<
script
>
var keywordListVue = new Vue(
{
el
:
'#
keyword-list
'
,
data
:
{
tableData
:
[
{
date
:
'
2016-05-02
'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路
1518
弄'
},
{
date
:
'
2016-05-04
'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路
1517
弄'
},
{
date
:
'
2016-05-01
'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路
1519
弄'
},
{
date
:
'
2016-05-03
'
,
name
:
'王小虎'
,
address
:
'上海市普陀区金沙江路
1516
弄'
}
]
},
methods
:
{
//
获取关键词列表
list
:
function
()
{
}
}
}
)
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/menu.ftl
deleted
100644 → 0
View file @
11306435
<
link
rel="stylesheet" href="../../../static/mweixin/css/menu.css">
<
div
id="menu-vue">
<!--左侧-->
<el-container class="ms-admin-menu">
<!--右侧头部-->
<el-header class="ms-header" height="50px">
<div>
<i class="el-icon-arrow-left"></i>
<span>
吕小布微信号
</span>
</div>
</el-header>
<el-main>
<el-menu class="ms-admin-menu-menu" default-active="0-0">
<template v-for="(menu,i) in menuList">
<!--单个选项-->
<el-menu-item :index="i" @click="menuActive = menu.title" v-if="!menu.sub" v-text="menu.title" class="ms-admin-menu-menu-item"></el-menu-item>
<!--多个选项-->
<el-submenu :index="i+''" v-if="menu.sub" class="ms-admin-submenu">
<template slot="title">
<span v-text="menu.title"></span>
</template>
<el-menu-item class="ms-admin-menu-menu-item" @click="menuActive = sub.title" :index="i+'-'+index" v-for="(sub,index) in menu.sub" v-text="sub.title"></el-menu-item>
</el-submenu>
</template>
</el-menu>
</el-main>
</el-container>
</
div
>
<
script
>
var menuVue = new Vue(
{
el
:
"#menu-vue"
,
data
:
{
menuList
:
[
{
title
:
'图文素材'
,
sub
:
[
{
title
:
'图文'
},
{
title
:
'图片'
}
]
,
},
{
title
:
'自定义菜单'
,
},
{
title
:
'自动回复'
,
sub
:
[
{
title
:
'关注时回复'
},
{
title
:
'消息回复'
},
{
title
:
'关键词回复'
}
]
}
]
,
//左侧导航列表
menuActive
:
'图文'
,
//选中
}
}
)
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/menu/index.ftl
deleted
100644 → 0
View file @
11306435
<!--
自定义菜单 -->
<
link
rel="stylesheet" href="../../../../static/mweixin/css/custom-menu.css" />
<
div
id="custom-menu" class="ms-custom-menu ms-weixin-content" v-if="menuVue.menuActive == '自定义菜单'">
<el-container class="ms-custom-container">
<el-header class="ms-header" height="50px">
<el-row>
<el-button type="danger" size="small" icon="el-icon-delet" @click='menuDel'>删除</el-button>
<el-button size="small" @click="menuSort">菜单排序</el-button>
<el-button class="ms-fr" size="small" icon="el-icon-refresh" @click='resetForm'>重置</el-button>
<el-button type="success" class="ms-fr" size="small" icon="el-icon-tickets" @click='menuSave'>保存</el-button>
<el-button type="success" class="ms-fr" size="small" icon="el-icon-tickets" @click='menuCreate'>发布菜单</el-button>
</el-row>
</el-header>
<el-container class="ms-container">
<el-aside>
<el-container>
<el-header>公众号</el-header>
<el-main></el-main>
<el-footer>
<el-button icon="el-icon-date"></el-button>
<div class="ms-create-menu">
<div class="ms-create-sub-menu" v-for="(menu,index) of mainMenuList" :key="index">
<!-- 父菜单 -->
<el-button type="primary" @click="openSubMenu(index,menu);menu.addSubMenuShow = !menu.addSubMenuShow;$forceUpdate()">
{{
menu
.menuTitle
}}
</el-button>
<div class="sub-menu-list" v-show="menu.addSubMenuShow">
<!-- 子菜单 -->
<el-button v-for="(sub,index) of currentSubMenuList" :key="index" v-text="sub.menuTitle" class="sub-menu-item"
@click='customMenuForm = sub;$forceUpdate();'></el-button>
<!-- 添加子菜单的加号按钮 -->
<el-button icon="el-icon-plus" class="ms-create-btn" @click="addSubMenu"></el-button>
</div>
</div>
<!-- 添加父菜单的加号按钮 -->
<el-button icon="el-icon-plus" @click="addMenu" v-show="addMenuBtn && mainMenuList.length<3" class="add-menu"></el-button>
</div>
</el-footer>
</el-container>
</el-aside>
<el-main>
<el-card class="custom-menu-card" shadow="never">
<div slot="header" class="clearfix">
<span v-text="customMenuForm.menuId ? '修改菜单' : '新建菜单'"></span>
</div>
<el-form ref="customMenuForm" :rules="customMenuFormRules" :model="customMenuForm" label-width="81px">
<el-form-item label="菜单名称" prop="menuTitle" class="ms-custom-menu-name">
<el-input v-model="customMenuForm.menuTitle" size="medium"></el-input>
<span>菜单名称字数不多于5个汉字或10个字母</span>
</el-form-item>
<el-form-item label="菜单内容" class="ms-custom-menu-content" prop='menuUrl'>
<el-input v-model="customMenuForm.menuUrl" size="medium"></el-input>
<span>请输入菜单地址</span>
<!-- <el-tabs v-model="activeName" @tab-click="">
<el-tab-pane label="图片" name="picture">
<span slot="label">
<i class="el-icon-picture"></i>图片</span>
<div onclick="materialBankFormVue.open()">
<i class="el-icon-picture-outline"></i>
<span>从素材库选择</span>
</div>
<div onclick="newPicFormVue.open()">
<i class="el-icon-plus"></i>
<span>新建图片</span>
</div>
</el-tab-pane>
<el-tab-pane label="图文管理" name="article">
<span slot="label">
<i class="el-icon-picture"></i>图文管理</span>
<div onclick="materialBankFormVue.open()">
<i class="el-icon-picture-outline"></i>
<span>从素材库选择</span>
</div>
<div onclick="newPicFormVue.open()">
<i class="el-icon-plus"></i>
<span>新建图文</span>
</div>
</el-tab-pane>
</el-tabs> -->
</el-form-item>
</el-form>
</el-card>
</el-main>
</el-container>
</el-container>
</
div
>
<
script
>
var customMenuVue = new Vue(
{
el
:
"#custom-menu"
,
data
:
{
customMenuForm
:
{
menuTitle
:
""
,
menuUrl
:
""
,
menuId
:
""
,
menuMenuId
:
""
,
//父菜单编号
menuStatus
:
""
,
//菜单状态
0
:不启用
1
:启用
menuStyle
:
""
,
//类型:
1
文本
2
图文
4
外链接
menuType
:
""
,
//菜单属性
0
:
链接
1
:
回复
},
customMenuFormRules
:
{
menuTitle
:
[
{
required
:
true
,
message
:
"请输入菜单名称"
,
trigger
:
[
"blur"
,
"change"
]
},
{
min
:
1
,
max
:
5
,
message
:
"长度在 1 到 5 个字符"
,
trigger
:
[
"blur"
,
"change"
]
}
]
,
menuUrl
:
[
{
required
:
true
,
message
:
'请输入菜单地址'
,
trigger
:
'
change
'
},
{
validator
:
function
(
rule
,
value
,
callback
)
{
/^
(
http
|
https
):
\/\/[\
w
\-_]+
(
\.[\
w
\-_]+
)
+
(
[\
w
\-\.
,
@?^=%&
amp
;
:
/~\+#]
*
[\
w
\-\@?^=%&
amp
;/~\+#]
)
?$/
.test
(
value
)
?
callback
()
:
callback
(
'链接不合法'
)
}
}
]
},
addMenuBtn
:
true
,
//添加菜单按钮
activeName
:
"picture"
,
//导航切换
当前激活面板
mainMenuList
:
[]
,
subMenuList
:
[]
,
//所有的子菜单
currentSubMenuList
:
[]
,
//打开当前父菜单的子菜单列表
currentMenuMenuId
:
''
,
//打开当前父菜单的菜单
ID
},
methods
:
{
menuList
:
function
()
{
var
that
=
this
;
ms
.http.get
(
ms
.manager
+
"/mweixin/menu/list.do"
)
.then
((
res
)
=>
{
console
.log
(
'
res
菜单'
,
res
)
;
that
.mainMenuList
=
[]
that
.subMenuList
=
[]
res
.rows
&&
res
.rows.forEach
(
function
(
item
,
index
)
{
item
.menuMenuId
==
null
&&
that
.mainMenuList.push
(
item
)
item
.menuMenuId
!=
null
&&
that
.subMenuList.push
(
item
)
})
//
初始化显示第一个菜单
if
(
that
.mainMenuList.length
){
that
.customMenuForm
=
that
.mainMenuList
[
0
]
}
else
{
that
.mainMenuList.push
(
that
.customMenuForm
)
//
没有一个菜单的时候
that
.mainMenuList
[
0
]
.menuTitle = '新建菜单'
}
},
(
err
)
=>
{
console
.log
(
err
)
})
},
//
菜单排序
menuSort
:
function
()
{
event
.target.innerText
=
"完成"
;
},
//
添加菜单
addMenu
:
function
()
{
this
.mainMenuList.push
({
menuTitle
:
"新建菜单"
})
;
this
.
$nextTick
(
function
()
{
var
that
=
this
;
A
rray
.prototype.forEach.call
(
document
.querySelectorAll
(
".ms-create-sub-menu"
),
function
(
item
,
index
)
{
item
.style.width
=
'
80
px
';
}
)
;
document
.querySelector
(
".add-menu"
)
.style.width
=
'
80
px
';
})
;
if
(
this
.mainMenuList.length
==
3
)
{
return
(
this
.addMenuBtn
=
false
)
;
}
},
//
添加子菜单
addSubMenu
:
function
()
{
if
(
!
this
.currentMenuMenuId
){
return
this
.
$message
.error
(
"创建子菜单前,必须先创建父菜单"
)
;
}
if
(
this
.currentSubMenuList.length
>
4
)
{
return
this
.
$message
.error
(
"子菜单最多5项"
)
;
}
var
that
=
this
;
console
.log
(
'
that
.currentMenuMenuId
'
,
that
.currentMenuMenuId
)
;
this
.currentSubMenuList.push
({
menuTitle
:
"新建子菜单"
,
menuMenuId
:
that
.currentMenuMenuId
,
})
;
console
.log
(
'
currentSubMenuList
'
,
this
.currentSubMenuList
)
;
},
openSubMenu
(
index
,
menu
)
{
console
.log
(
'
menu
'
,
menu
)
;
var
that
=
this
;
that
.customMenuForm
=
menu
that
.closeAllSubMenu
(
index
)
;
that
.currentSubMenuList
=
[];
that
.currentMenuMenuId
=
menu
.menuId
;
console
.log
(
'
that
.subMenuList
'
,
that
.subMenuList
)
;
that
.subMenuList.forEach
(
function
(
item
,
index
)
{
item
.menuMenuId
==
menu
.menuId
&&
that
.currentSubMenuList.push
(
item
)
})
},
//
关闭所有的子菜单弹出层
closeAllSubMenu
:
function
(
num
)
{
//
确保当前的菜单不被重置成
false
this
.mainMenuList.forEach
(
function
(
item
,
index
)
{
num
!=
index
&&
(
item
.addSubMenuShow
=
false
)
})
},
//
保存菜单
menuSave
:
function
()
{
//
表单校验
var
that
=
this
;
this
.
$refs
.customMenuForm.validate
(
function
(
ispass
,
object
)
{
if
(
ispass
)
{
//
判断保存的菜单类型,这里先简单处理,写死
that
.customMenuForm.menuStatus
=
1
that
.customMenuForm.menuStyle
=
4
//类型:
1
文本
2
图文
4
外链接
that
.customMenuForm.menuType
=
0
//菜单属性
0
:
链接
1
:
回复
ms
.http.post
(
ms
.manager
+
"/mweixin/menu/save.do"
,
that
.customMenuForm
)
.then
(
function
(
res
)
{
that
.customMenuForm.menuStatus
=
that
.customMenuForm.menuStyle
=
that
.customMenuForm.menuType
=
''
if
(
res
.menuId
){
that
.
$message
.success
(
'菜单保存成功'
)
that
.menuList
()
;
}
else
{
that
.
$message
.error
(
res
.resultMsg
)
}
},
function
(
err
)
{
console
.log
(
err
)
})
}
})
},
//
删除菜单
menuDel
:
function
()
{
var
that
=
this
;
//
当存在子菜单的时候,不得删除菜单
if
(
that
.customMenuForm.menuMenuId
==
null
&&
that
.currentSubMenuList.length
){
return
that
.
$message
.error
(
'当前菜单存在子菜单,不得删除'
)
}
if
(
!
that
.customMenuForm.menuId
){
return
that
.
$message
.error
(
'请新建菜单之后,再进行删除'
)
}
this
.
$confirm
(
'此操作将永久删除该菜单
,
是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'
warning
'
})
.then
(()
=>
{
ms
.http.post
(
ms
.manager
+
"/mweixin/menu/delete.do"
,
{
ids
:
that
.customMenuForm.menuId
})
.then
(
function
(
res
)
{
that
.
$message
({
type
:
'
success
'
,
message
:
'删除成功!'
})
;
//
清空表单值
that
.resetForm
()
;
//
刷新菜单列表
that
.menuList
()
;
},
function
(
err
)
{
console
.log
(
err
)
})
})
.catch
(()
=>
{
this
.
$message
({
type
:
'
info
'
,
message
:
'已取消删除'
})
;
})
},
//
发布菜单
menuCreate
:
function
()
{
var
that
=
this
;
this
.
$confirm
(
'此操作将发布公众号菜单
,
是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'
warning
'
})
.then
(()
=>
{
ms
.http.get
(
ms
.manager
+
"/mweixin/menu/create.do"
)
.then
(
function
(
res
)
{
if
(
res
.result
){
that
.
$message
({
type
:
'
success
'
,
message
:
'发布成功!,菜单将于
2
小时后生效'
})
;
}
else
{
that
.
$message
({
type
:
'
error
'
,
message
:
'发布失败!'
})
;
}
},
function
(
err
)
{
console
.log
(
err
)
})
})
.catch
(()
=>
{
this
.
$message
({
type
:
'
info
'
,
message
:
'已取消删除'
})
;
})
},
//
重置
resetForm
:
function
(){
//
this
.
$refs
.customMenuForm.resetFields
()
;未在表单中,清空不了
this
.customMenuForm.menuStatus
=
this
.customMenuForm.menuStyle
=
this
.customMenuForm.menuType
=
this
.customMenuForm.menuTitle
=
this
.customMenuForm.menuUrl
=
''
}
},
mounted
:
function
()
{
this
.menuList
()
;
},
}
);
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/menu/material-bank-form.ftl
deleted
100644 → 0
View file @
11306435
<!--
素材库 -->
<
link
rel="stylesheet" href="../../../../static/mweixin/css/material-bank-form.css">
<
div
id="material-bank-form" class="material-bank-form">
<el-dialog title="选择图片" :visible.sync="isShow" custom-class='ms-weixin-dialog'>
<el-tabs tab-position="left">
<el-tab-pane :label="group.label + '('+group.total+')'" v-for='(group,index) of materialGroup' :key='index'>
<el-upload :file-list='fileList' action="" list-type="picture-card" :on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
<el-dialog :visible.sync="dialogVisible" :modal='false' :title='flieName' custom-class='ms-weixin-dialog'>
<!-- 这是图片放大 -->
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
<el-row type='flex' justify='end'>
<el-col :span='11'>
<el-pagination
@size-change="handleSizeChange"
background
:pager-count="1"
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="10"
layout="prev, pager, next, jumper"
:total="50">
</el-pagination>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="isShow = false" size='mini'>确 定</el-button>
<el-button @click="isShow = false" size='mini'>取 消</el-button>
</div>
</el-dialog>
</
div
>
<
script
>
var materialBankFormVue = new Vue(
{
el
:
'#
material-bank-form
'
,
data
:
{
isShow
:
false
,
materialGroup
:
[
{
label
:
'未分组'
,
total
:
36
,
},
{
label
:
'云创'
,
total
:
12
,
},
{
label
:
'
PM
管理'
,
total
:
16
,
},
]
,
fileList
:
[]
,
//文件列表
dialogImageUrl
:
''
,
//点击放大,触发弹窗里面的图片地址
dialogVisible
:
false
,
flieName
:
""
,
//放大图片的文件名
currentPage
:
''
,
//当前页数
},
watch
:{
fileList
:{
handler
:
function
(
n
,
o
){
console
.log
(
'文件列表'
,
n
)
;
},
deep
:
true
}
},
methods
:
{
//
表单打开
open
:
function
()
{
this
.isShow
=
true
;
},
handlePictureCardPreview
:
function
(
file
){
//
点击预览大图触发的钩子函数
console
.log
(
'
file
'
,
file
)
;
this
.dialogVisible
=
true
;
this
.dialogImageUrl
=
file
.url
this
.flieName
=
file
.name
},
handleRemove
:
function
(){
},
handleSizeChange
:
function
(){
},
handleCurrentChange
:
function
(){
}
}
}
)
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/menu/new-pic-form.ftl
deleted
100644 → 0
View file @
11306435
<!--
新建图片表单 -->
<
link
rel="stylesheet" href="../../../../static/mweixin/css/new-pic-form.css">
<
div
id='new-pic-form' v-show='isShow' class="new-pic-form">
<el-dialog title="选择图片" :visible.sync="isShow" custom-class='ms-weixin-dialog'>
<el-form :model="newPicForm">
<el-form-item label="上传图片" label-width="100px">
<el-upload class="new-pic-upload" :on-preview="handlePreview" :on-remove="handleRemove" :file-list="picList"
list-type="picture">
<el-button size="small" type="primary">本地上传</el-button>
<div slot="tip" class="el-upload__tip">
<dl>
<dt>注意:1.图片上传仅支持bmp、png、jpeg、jpg、gif格式</dt>
<dd>2.同步至微信公众平台的图片最大2M,存在铭飞本地,最大支持5M的图片</dd>
</dl>
</div>
</el-upload>
</el-form-item>
<el-form-item label="选择分组" label-width="100px">
<el-popover placement="top-start" width="350" trigger="click" v-model='popoverShow'>
<el-form label-width="81px" :model="groupForm" ref="groupForm" :rules='groupRule'>
<el-form-item label="创建分组" prop='name'>
<el-input v-model="groupForm.name" size='mini'></el-input>
</el-form-item>
<div class="dialog-footer" style="float:right">
<el-button @click="cancel" size='mini'>取消</el-button>
<el-button type="primary" @click="saveGroup" size='mini'>确定</el-button>
</div>
</el-form>
<el-button slot="reference" icon='el-icon-plus' size='mini'>添加分组</el-button>
</el-popover>
<el-select v-model="selectedOption" placeholder="请选择分组" size='mini'>
<el-option v-for="item in picGroup" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="isShow = false" size='mini'>取 消</el-button>
<el-button type="primary" @click="isShow = false" size='mini'>确 定</el-button>
</div>
</el-dialog>
</
div
>
<
script
>
var newPicFormVue = new Vue(
{
el
:
'#
new-pic-form
'
,
data
:
{
isShow
:
false
,
newPicForm
:
{
},
picGroup
:
[
{
value
:
'
default
'
,
label
:
'默认分组'
},
{
value
:
'
yun
'
,
label
:
'云创'
},
{
value
:
'
pm
'
,
label
:
'
PM
管理系统'
}
]
,
selectedOption
:
''
,
//被选中的选项
picList
:
[]
,
//图片列表
popoverShow
:
false
,
groupForm
:
{
//创建分组
name
:
''
},
//
规则
groupRule
:
{
name
:
[
{
required
:
true
,
message
:
'请输入分组名称'
,
trigger
:
['
blur
'
,
'
change
']
},
{
min
:
1
,
max
:
5
,
message
:
'长度在
1
到
5
个字符'
,
trigger
:
['
blur
'
,
'
change
']
}
]
}
},
methods
:
{
//
表单打开
open
:
function
()
{
this
.isShow
=
true
;
},
//
图片刚加载完
handlePreview
:
function
()
{
},
//
图片删除
handleRemove
:
function
()
{
},
saveGroup
:
function
()
{
var
that
=
this
;
that
.
$refs
.groupForm.validate
(
function
(
pass
,
object
)
{
if
(
pass
)
{
//
校验成功
}
})
},
cancel
:
function
()
{
this
.popoverShow
=
false
this
.
$refs
.groupForm.resetFields
()
},
},
}
)
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/message/index.ftl
deleted
100644 → 0
View file @
11306435
<!--
消息回复 && 关注回复 -->
<
link
rel="stylesheet" href="../../../../static/mweixin/css/message-reply.css">
<
div
id="message-reply" class="ms-message-reply ms-weixin-content" v-if="menuVue.menuActive == '消息回复'||menuVue.menuActive == '关注时回复'">
<el-container class="ms-admin-message-reply">
<el-header class="ms-header" height="50px">
<el-row>
<el-button class="ms-fr" size="small" icon="el-icon-refresh">重置</el-button>
<el-button type="success" class="ms-fr" size="small" icon="el-icon-tickets">保存</el-button>
</el-row>
</el-header>
<el-container>
<el-header class="ms-tr ms-header">
<el-input size="medium" placeholder="请输入内容" suffix-icon="el-icon-search">
</el-input>
</el-header>
<em-main class="ms-container">
<div>回复内容</div>
<el-tabs v-model="activeName" @tab-click="" class="message-reply-tabs">
<el-tab-pane label="文字" name="text">
<el-form ref="messageReplyForm" :rules='messageReplyFormRules' :model="messageReplyForm">
<el-form-item class="ms-message-reply-content">
<el-input type="textarea" v-model="messageReplyForm.reply" :autosize="
{
minRows
:
4
,
maxRows
:
4
}
" resize='none'>
</el-input>
<i class="el-icon-delete" @click="messageReplyForm.reply = ''"></i>
<div class="footer">
<i class="el-icon-star-off"></i>
<!-- 插入超链接 -->
<el-popover placement="top-start" width="350" trigger="click" v-model='popoverShow'>
<el-form label-width="81px" :model="hyperlinkForm" ref="hyperlinkForm" :rules='hyperlinkRule'>
<el-form-item label="文本内容" prop='text'>
<el-input v-model="hyperlinkForm.text" size='mini'></el-input>
</el-form-item>
<el-form-item label="链接地址" prop='link'>
<el-input v-model="hyperlinkForm.link" size='mini'></el-input>
</el-form-item>
<el-form-item style="margin:0">
<el-row type='flex' justify='end'>
<el-col span='6'>
<el-button type="primary" @click="saveLink" size='mini'>保存</el-button>
</el-col>
<el-col span='6'>
<el-button @click="cancelLink" size='mini'>取消</el-button>
</el-col>
</el-row>
</el-form-item>
</el-form>
<a slot="reference">插入超链接</a>
</el-popover>
</div>
</el-form-item>
</el-form>
</el-form>
</el-tab-pane>
<el-tab-pane label="图片" name="picture" class="message-reply-picture">
<div onclick="materialBankFormVue.open()">
<i class="el-icon-picture-outline"></i>
<span>从素材库选择</span>
</div>
<div onclick="newPicFormVue.open()">
<i class="el-icon-plus"></i>
<span>新建图片</span>
</div>
</el-tab-pane>
<el-tab-pane label="图文" name="article" class="message-reply-article">
<div onclick="materialBankFormVue.open()">
<i class="el-icon-picture-outline"></i>
<span>从素材库选择</span>
</div>
<div onclick="newPicFormVue.open()">
<i class="el-icon-plus"></i>
<span>新建图文</span>
</div>
</el-tab-pane>
</el-tabs>
</em-main>
</el-container>
</el-container>
</
div
>
<
script
>
var messageReplyVue = new Vue(
{
el
:
"#message-reply"
,
data
:
{
messageReplyForm
:
{
reply
:
''
,
},
messageReplyFormRules
:
{
name
:
[
{
required
:
true
,
message
:
'请输入菜单名称'
,
trigger
:
['
blur
'
,
'
change
']
},
{
min
:
1
,
max
:
5
,
message
:
'长度在
1
到
5
个字符'
,
trigger
:
['
blur
'
,
'
change
']
}
]
,
},
activeName
:
'
text
'
,
//
超链接
hyperlinkForm
:
{
text
:
""
,
link
:
""
,
},
hyperlinkRule
:
{
text
:
[
{
required
:
true
,
message
:
'请输入超链接显示的文本内容'
,
trigger
:
'
blur
'
},
{
min
:
1
,
max
:
50
,
message
:
'长度在
1
到
50
个字符'
,
trigger
:
'
blur
'
}
]
,
link
:
[
{
required
:
true
,
message
:
'请输入超链接地址'
,
trigger
:
'
change
'
},
{
validator
:
function
(
rule
,
value
,
callback
)
{
/^
(
http
|
https
):
\/\/[\
w
\-_]+
(
\.[\
w
\-_]+
)
+
(
[\
w
\-\.
,
@?^=%&
amp
;
:
/~\+#]
*
[\
w
\-\@?^=%&
amp
;/~\+#]
)
?$/
.test
(
value
)
?
callback
()
:
callback
(
'链接不合法'
)
}
}
]
,
},
popoverShow
:
false
,
//弹出层显示与否的状态值
},
methods
:
{
//
保存超链接
saveLink
:
function
()
{
var
that
=
this
;
that
.
$refs
.hyperlinkForm.validate
(
function
(
boolean
,
object
)
{
if
(
boolean
)
{
//
校验成功
that
.messageReplyForm.reply
=
that
.messageReplyForm.reply
+
`<
a
href
=$
{
that
.hyperlinkForm.link
}
>$
{
that
.hyperlinkForm.text
}
</
a
>`
that
.cancelLink
()
}
})
},
//
取消超链接
cancelLink
:
function
()
{
this
.
$refs
.hyperlinkForm.resetFields
()
;
this
.popoverShow
=
false
},
}
}
)
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/metarial/form.ftl
deleted
100644 → 0
View file @
11306435
<!--
新建图文 -->
<
link
rel="stylesheet" href="../../../../static/mweixin/css/article.css">
<
div
id='article' class="ms-article" v-show="menuVue.menuActive == '新建图文'">
<el-container class="ms-admin-picture">
<!--右侧头部-->
<el-header class="ms-header" height="50px">
<el-row>
<!-- 添加隐藏按钮,主要是为了产生间距 -->
<el-button size="small" type="text"></el-button>
<el-button class="ms-fr" size="small" icon="el-icon-arrow-left" @click="menuVue.menuActive = '关键词回复'">返回</el-button>
<el-button class="ms-fr" size="small" icon="el-icon-refresh">更新</el-button>
<el-button class="ms-fr" type="success" size="small" icon="el-icon-tickets" @click="newsSave">保存</el-button>
</el-row>
</el-header>
<el-container class="ms-container">
<el-aside width="280px">
<!-- 主图文章 -->
<div class="ms-main-article" @click='openMainArticle'>
<img :src="mainArticle.thumbnailUrl || ms.base+'/WEB-INF/manager/images/article-default.png'">
<div class="ms-article-mask"></div>
<span v-text='mainArticle.basicTitle'></span>
</div>
<draggable v-model="subArticleList" :options="
{
draggable
:
'
.ms-article-item
'
}
">
<div v-for="(element,index) in subArticleList" :key="index" class="ms-article-item" @click='updateSubArticle(element,index)'>
<p>
<span v-text='element.basicTitle'></span>
</p>
<img :src="element.basicThumbnails || ms.base+'/WEB-INF/manager/images/article-default-thumb.jpg'">
<div class="ms-article-item-mask"><i class="el-icon-delete" @click='subArticleList.splice(index,1)'></i></div>
</div>
</draggable>
<div class="ms-article-footer">
<el-button size='medium' icon='el-icon-plus' @click='addArticle'>添加图文</el-button>
</div>
</el-aside>
<el-main>
<div class="ms-main-header">
<el-upload
class="ms-pic-upload"
:show-file-list="false"
:on-success="basicPicSuccess"
:before-upload='beforeBasicPicUpload'
:action="ms.web + '/file/upload.do'"
:limit='1'
:disabled='uploadDisable'
:data=
{
uploadFloderPath
:
"/mweixin/news"
}
>
<div class="ms-article-mask" v-show='headMask' @mouseover='headMask=true;' @mouseleave='headMask=false'>
<i class="el-icon-delete" @click="articleForm.thumbnailUrl=mainArticle.basicPic='';uploadDisable=thumbnailShow=false"></i>
</div>
<img v-if="thumbnailShow" :src="articleForm.thumbnailUrl"
class="article-thumbnail" @mouseover='headMask=true;' @mouseleave='headMask=false;'>
<template v-else>
<i class="el-icon-picture"></i>
<span>添加封面</span>
</template>
</el-upload>
<el-form label-width='40px'>
<el-form-item label="标题" prop="">
<el-input size='small' placeholder="请输入图文标题" v-model='articleForm.basicTitle' class='basic-title-input' @input.self="resetWordNum('basicTitle',64)">
<span slot='suffix' v-text="titleWordNumber+'/64'"></span>
</el-input>
</el-form-item>
<el-form-item label="作者" prop="">
<el-input size='small' placeholder="请输入图文作者" v-model='articleForm.articleAuthor' @input.self="resetWordNum('articleAuthor',8)">
<span slot='suffix' v-text="authorWordNumber+'/8'"></span>
</el-input>
</el-form-item>
<!-- @input="resetWordNum(120)" -->
<el-form-item label="摘要" prop="">
<el-input size='small' type='textarea' placeholder="选填,如果不写会默认抓取正文前54个字" :autosize="
{
minRows
:
2
,
maxRows
:
2
}
" resize='none' v-model='articleForm.basicDescription'>
<span slot='suffix' v-text="descWordNumber+'/54'"></span>
</el-input>
</el-form-item>
</el-form>
</div>
<div class="ms-main-body">
<!-- 百度编辑器 -->
<script id="ueditorArticle" type="text/plain" name="articleContent"></script>
</div>
</el-main>
</el-container>
</el-container>
</
div
>
<
script
>
var articleVue = new Vue(
{
el
:
'#
article
'
,
data
:
{
mainArticle
:
{
basicTitle
:
''
,
//标题
articleAuthor
:
''
,
//作者
basicDescription
:
''
,
//摘要
articleContent
:
''
,
//正文
basicThumbnails
:
''
,
//上传封面图片的
url
thumbnailUrl
:
''
,
//缩略图全路径
},
defaultMainArticle
:
''
,
//拷贝主图信息
subArticleList
:
[]
,
//
子文章列表
titleWordNumber
:
64
,
//图文标题剩余字数
authorWordNumber
:
8
,
//图文作者剩余字数
descWordNumber
:
54
,
//摘要
editor
:
null
,
//富文本实例
editorCurrentContent
:
null
,
//当前百度编辑器输入的内容
articleForm
:
{
basicTitle
:
''
,
//标题
articleAuthor
:
''
,
//作者
basicDescription
:
''
,
//摘要
articleContent
:
''
,
//正文
basicThumbnails
:
''
,
//上传封面图片的
url
thumbnailUrl
:
''
,
//缩略图全路径
},
//
文章素材,包括主图文,子图文
articleList
:
[]
,
defaultArticleForm
:
''
,
//拷贝表单值
thumbnailShow
:
false
,
//显示缩略图
headMask
:
false
,
//缩略图删除
uploadDisable
:
false
,
//是否禁止上传
newsCategoryId
:
''
,
//微信分类编号
},
watch
:{
articleForm
:{
handler
:
function
(
n
,
o
){
this
.articleList.length
||
(
this
.mainArticle.basicTitle
=
n
.basicTitle
)
console
.log
(
'
n
文章'
,
n
)
;
},
deep
:
true
,
},
editorCurrentContent
:{
handler
:
function
(
n
,
o
){
console
.log
(
'
n
文章'
,
n
)
;
this
.articleForm.articleContent
=
n
},
deep
:
true
,
},
mainArticle
:{
handler
:
function
(
n
,
o
){
console
.log
(
'
n
文章
444444444444444
'
,
n
)
;
},
deep
:
true
,
},
},
methods
:
{
open
:
function
(
material
){
menuVue
.menuActive
=
'新建图文';
material
&&
material
.newsId
>
0
?
this
.resetForm
(
material
)
:
this
.resetForm
()
},
//
图片上传之前进行数据校验
beforeBasicPicUpload
:
function
(
file
){
var
fileType
=
null
;
['
image
/
jpeg
'
,
'
image
/
png
'
,
'
image
/
jpg
']
.indexOf
(
file
.type
)
>
-1
?
fileType
=
true
:
fileType
=
false
var
isLt2M
=
file
.size
/
1024
/
1024
<
2
;
!
fileType
&&
this
.
$message
.error
(
'文章配图只能是
JPG
、
JPEG
、
PNG
格式!'
)
;
!
isLt2M
&&
this
.
$message
.error
(
'文章配图大小不能超过
2
MB
!'
)
;
return
fileType
&&
isLt2M
;
},
//
图片上传成功函数
basicPicSuccess
:
function
(
url
){
this
.thumbnailShow
=
this
.uploadDisable
=
true
this
.mainArticle.thumbnailUrl
=
this
.articleForm.thumbnailUrl
=
ms
.web
+
url
this
.articleForm.basicThumbnails
=
url
},
//
添加文章
addArticle
:
function
()
{
console
.log
(
'
this
.articleForm1111111
'
,
this
.articleForm
)
;
if
(
this
.subArticleList.length
>
6
)
{
return
this
.
$notify
({
title
:
'添加失败'
,
message
:
'最大图文数量为
7
'
,
type
:
'
warning
'
})
;
}
//
将主图文单独存于数组中
if
(
!
this
.articleList.length
){
this
.mainArticle
=
this
.articleForm
}
console
.log
(
'
this
.articleForm99999999999999
'
,
this
.articleForm
)
;
//
清空百度编辑器
this
.editor.setContent
(
''
)
//
将左侧表单的内容存放到数组中
this
.articleList.push
(
this
.articleForm
)
//
清空表单
console
.log
(
'
this
.articleForm
'
,
this
.articleForm
)
;
console
.log
(
'
this
.articleList
'
,
this
.articleList
)
;
this
.articleForm
=
{
basicTitle
:
''
,
articleAuthor
:
''
,
basicDescription
:
''
,
articleContent
:
''
,
basicThumbnails
:
''
,
thumbnailUrl
:
''
,
}
this
.thumbnailShow
=
false
//显示上传图标
this
.subArticleList.push
({
basicTitle
:
''
,
articleAuthor
:
''
,
basicDescription
:
''
,
articleContent
:
''
,
basicThumbnails
:
''
,
thumbnailUrl
:
''
,
})
},
//
打开修改子文章
updateSubArticle
:
function
(
element
,
index
){
this
.articleForm
=
element
},
//
打开
主文章
openMainArticle
:
function
(){
this
.thumbnailShow
=
true
//显示上传图标
this
.articleForm
=
this
.mainArticle
},
//
计算剩余字数
resetWordNum
:
function
(
type
,
limit
)
{
var
target
=
event
.target
type
.indexOf
(
'
T
itle
'
)
>
-1
?
this
.titleWordNumber
=
limit
-
event
.target.value.length
:
this
.authorWordNumber
=
limit
-
event
.target.value.length
if
(
event
.target.value.length
>=
limit
){
this
.
$message
.error
(
'超出字数限制,请输入不超过'+
limit
+'字符'
)
;
this
.
$nextTick
(
function
(){
//
这里的
event
的
type
是
message
this
.articleForm
[
type
]
= target.value.slice(0,limit-1);
console
.log
(
'
this
.articleForm
[
type
]
',this.articleForm[type]);
})
}
},
//
保存微信文章
newsSave
:
function
(){
var
that
=
this
;
console
.log
(
'
that
.articleForm
'
,
that
.articleForm
)
;
console
.log
(
'
that
.articleList
'
,
that
.articleList
)
;
//
获取百度编辑器内容
//
this
.editorCurrentContent
=
''
ms
.http.post
(
ms
.manager
+
"/weixin/news/save.do"
,{
newsArticle
:
that
.mainArticle
,
articleList
:
JSON
.stringify
(
that
.articleList
),
newsCategoryId
:
that
.newsCategoryId
,
newsIsSyn
:
false
,
newsType
:
1
})
.then
(
function
(
res
)
{
console
.log
(
'
res
'
,
res
)
;
},
function
(
err
)
{
that
.
$message
.error
(
err
)
;
})
},
//
表单重置
新建和修改场景
resetForm
:
function
(
material
){
this
.thumbnailShow
=
material
?
true
:
false
this
.articleForm.thumbnailUrl
=
material
?
material
.newsArticle.basicPic
:
''
this
.mainArticle.basicPic
=
material
?
material
.newsArticle.basicPic
:
''
this
.mainArticle.basicTitle
=
material
?
material
.newsArticle.basicTitle
:
''
//
打开界面默认显示主文章详情
this
.articleForm.basicTitle
=
material
?
material
.newsArticle.basicTitle
:
''
this
.articleForm.articleAuthor
=
material
?
material
.newsArticle.articleAuthor
:
''
this
.articleForm.basicDescription
=
material
?
material
.newsArticle.basicDescription
:
''
var
result
=
'';
result
=
(
material
&&
material
.newsArticle.articleContent
)
?
material
.newsArticle.articleContent
:
''
this
.editor.setContent
(
result
)
this
.subArticleList
=
material
?
material
.articleList
:
[];
this
.
$forceUpdate
()
;
},
},
mounted
:
function
()
{
let
that
=
this
;
//富文本加载
var
URL
=
window
.UEDITOR_HOME_URL
||
"http://mpm.mingsoft.net/static/plugins/ueditor/1.4.3.1/"
;
if
(
this
.editor
==
null
)
{
this
.editor
=
UE
.getEditor
(
'
ueditorArticle
'
,
{
toolbars
:
[
['
fullscreen
'
,
'
undo
'
,
'
redo
'
,
'|'
,
'
bold
'
,
'
italic
'
,
'
underline
'
,
'
strikethrough
'
,
'
removeformat
'
,
'
blockquote
'
,
'|'
,
'
forecolor
'
,
'
backcolor
'
,
'
insertorderedlist
'
,
'
insertunorderedlist
'
,
'|'
,
'
attachment
'
,
'
simpleupload
'
,
'
link
'
]
]
,
imageScaleEnabled
:
true
,
//
服务器统一请求接口路径
serverUrl
:
URL
+
"jsp/msController.jsp?jsonConfig=%7BvideoUrlPrefix:'http://mpm.mingsoft.net/',fileUrlPrefix:'http://mpm.mingsoft.net/',imageUrlPrefix:'http://mpm.mingsoft.net/',imagePathFormat:'/upload/pm/editor/%7Btime%7D',filePathFormat:'/upload/pm/editor/%7Btime%7D',videoPathFormat:'/upload/pm/editor/%7Btime%7D'%7D"
,
autoHeightEnabled
:
true
,
autoFloatEnabled
:
true
,
scaleEnabled
:
false
,
compressSide
:
0
,
maxImageSideLength
:
2000
,
maximumWords
:
80000
,
zIndex
:
10000
,
elementPathEnabled
:
false
,
wordCount
:
false
,
initialFrameWidth
:
'
100
%'
,
initialFrameHeight
:
500
,
})
;
this
.editor.ready
(
function
()
{
var
a
=
$
(
"#ueditor_0"
)
.contents
()[
0
]
.activeElement;
$
(
a
)
.addClass
(
"ms-webkit-scrollbar"
)
.before
(
"<style>.ms-webkit-scrollbar::-webkit-scrollbar,::-webkit-scrollbar{width:10px;/*滚动条宽度*/height:1.5%;/*滚动条高度*/}/*定义滚动条轨道内阴影+圆角*/.ms-webkit-scrollbar::-webkit-scrollbar-track,::-webkit-scrollbar-track{border-radius:10px;/*滚动条的背景区域的圆角*/background-color:#eeeeee;/*滚动条的背景颜色*/}.ms-task-content::-webkit-scrollbar-track{border-radius:10px;background-color:#FFFFFF;}/*定义滑块内阴影+圆角*/.ms-webkit-scrollbar::-webkit-scrollbar-thumb,::-webkit-scrollbar-thumb{border-radius:10px;/*滚动条的圆角*/background-color:#dddddd;/*滚动条的背景颜色*/}</style>"
)
;
})
;
this
.editor.addListener
(
'
contentChange
'
,
function
()
{
that
.editorCurrentContent
=
that
.editor.getContent
()
;
that
.
$message
.success
(
that
.editor.getContent
())
;
})
;
}
}
}
)
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/metarial/index.ftl
deleted
100644 → 0
View file @
11306435
<!--图文素材页-->
<
link
rel="stylesheet" href="../../../static/mweixin/css/material-list.css">
<
div
id="material-list-vue" v-if="menuVue.menuActive == '图文'" class="ms-weixin-content">
<el-container>
<!--右侧头部-->
<el-header class="ms-header" height="50px">
<el-row>
<el-button type="primary" size="small" icon="el-icon-plus" onclick="articleVue.open()">添加</el-button>
<el-button class="ms-fr" size="small" icon="el-icon-refresh">刷新</el-button>
<el-button class="ms-fr" size="small" @click='sync'>同步微信素材</el-button>
</el-row>
</el-header>
<el-container>
<!--内容头部-->
<el-header class="ms-tr ms-header ms-header-select">
<el-select v-model="value1" placeholder="请选择" size="small">
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-select v-model="value2" placeholder="请选择" size="small">
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-button type="primary" icon="el-icon-search" size="small" @click='search'>查询</el-button>
</el-header>
<!--素材列表-->
<el-main class="ms-admin-material-list">
<div class="ms-admin-material-item" v-for="(material,index) in materialList" :key='index'>
<div class="head">
<span v-text="'更新于'+formmateTime(material.newsDateTime)"></span>
<i class="iconfont icon-weixin" v-if='material.newsIsSyn'></i>
</div>
<div class="body">
<span v-text="material.newsArticle.basicTitle"></span>
<img :src="material.newsArticle.basicThumbnails || ms.base+'/WEB-INF/manager/images/data/ms-bg_1.jpg'" />
<p v-text="material.newsArticle.basicDescription"></p>
</div>
<div class="footer">
<i class="el-icon-edit" @click="articleVue.open(material)"></i>
<em></em>
<i class="el-icon-delete" @click='del(material,index)'></i>
</div>
</div>
</el-main>
</el-container>
</el-container>
</
div
>
<
script
>
var materialListVue = new Vue(
{
el
:
"#material-list-vue"
,
data
:
{
options1
:
[
{
value
:
'全部图片'
,
label
:
'全部图片'
}
]
,
options2
:
[
{
value
:
'全部图片'
,
label
:
'全部图片'
}
]
,
value1
:
'全部图片'
,
value2
:
''
,
materialList
:
[]
,
},
methods
:
{
//
获取微信素材
newsList
:
function
()
{
var
that
=
this
;
ms
.http.get
(
ms
.manager
+
"/weixin/news/list.do"
)
.then
(
function
(
res
)
{
that
.materialList
=
res
.rows
console
.log
(
'微信'
,
res
)
;
},
function
(
err
)
{
that
.
$message
.error
(
err
)
})
},
//
删除
del
:
function
(
material
,
index
)
{
var
that
=
this
;
ms
.http.post
(
ms
.manager
+
"/weixin/news/"
+
material
.newsId
+
"/delete.do"
)
.then
(
function
(
res
)
{
if
(
res
.result
){
that
.
$message
.success
(
'素材删除成功'
)
;
that
.materialList.splice
(
index
,
1
)
;
}
},
function
(
err
)
{
that
.
$message
.error
(
err
)
;
})
},
//
同步微信素材
sync
:
function
()
{
},
//
刷新图文素材
refresh
:
function
()
{
},
//
查询
search
:
function
()
{
},
//
格式化时间
formmateTime
:
function
(
time
)
{
var
updateTime
=
/^[
0-9
]
{
4
}
-[
0-9
]
{
2
}
-[
0-9
]
{
2
}
/
.exec
(
time
)
if
(
updateTime
!=
null
)
{
return
updateTime
[
0
]
}
}
},
mounted
:
function
()
{
var
that
=
this
;
//
微信图文素材
that
.newsList
()
;
}
}
)
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/picture/index.ftl
deleted
100644 → 0
View file @
11306435
<!--图片素材页-->
<
link
rel="stylesheet" href="../../../static/mweixin/css/picture-list.css">
<
div
id="picture-list-vue" v-if="menuVue.menuActive == '图片'" class="ms-weixin-content">
<el-container class="ms-admin-picture">
<!--右侧头部-->
<el-header class="ms-header" height="50px">
<el-row>
<el-button type="primary" size="small" icon="el-icon-plus">添加</el-button>
<el-button size="small" icon="el-icon-refresh" class="ms-fr">刷新</el-button>
<el-button size="small" class="ms-fr">同步微信素材</el-button>
</el-row>
</el-header>
<el-container>
<!--内容头部-->
<el-header class="ms-tr ms-header ms-header-select">
<el-select v-model="value1" placeholder="请选择" size="small">
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-select v-model="value2" placeholder="请选择" size="small">
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-button type="primary" icon="el-icon-search" size="small">查询</el-button>
</el-header>
<!--素材列表-->
<el-main class="ms-admin-picture-list">
<el-container>
<el-aside class="ms-admin-picture-item">
<div v-for="picture in pictureList">
<div class="body">
<img :src="picture.img" />
<div>
<input type="checkbox" />
<span v-text="picture.title"></span>
</div>
</div>
<div class="footer">
<i class="el-icon-edit"></i>
<em></em>
<i class="el-icon-download"></i>
<em></em>
<i class="el-icon-delete"></i>
</div>
</div>
</el-aside>
<el-main class="ms-admin-picture-show">
<span>全部图片(6)</span>
<div>
<span>小米(1)</span>
<i class="el-icon-edit"></i>
<i class="el-icon-delete"></i>
</div>
<div>
<span>小米(1)</span>
<i class="el-icon-edit"></i>
<i class="el-icon-delete"></i>
</div>
<p>
<i class="el-icon-plus"></i>新建分组</p>
</el-main>
</el-container>
</el-main>
</el-container>
</el-container>
</
div
>
<
script
>
new Vue(
{
el
:
"#picture-list-vue"
,
data
:
{
options1
:
[
{
value
:
'全部图片'
,
label
:
'全部图片'
}
]
,
options2
:
[
{
value
:
'全部图片'
,
label
:
'全部图片'
}
]
,
value1
:
'全部图片'
,
value2
:
''
,
pictureList
:
[
{
date
:
'
12
月
27
日'
,
title
:
'
HUAWEI
M
ate
20
6
GB
+
64
GB
全网最低价...'
,
img
:
'../
images
/
data
/
ms-bg_1
.jpg
'
,
det
:
'传播名
HUAWEI
M
ate
20
6
GB
+
64
GB
全网最低价,后置摄像头后置莱卡散射,
12000
万亿像素(光脚,
1
/
1.6
光圈)+
1200
万像素(超广角),......'
},
{
date
:
'
12
月
27
日'
,
title
:
'
HUAWEI
M
ate
20
6
GB
+
64
GB
全网最低价...'
,
img
:
'../
images
/
data
/
ms-bg_1
.jpg
'
,
det
:
'传播名
HUAWEI
M
ate
20
6
GB
+
64
GB
全网最低价,后置摄像头后置莱卡散射,
12000
万亿像素(光脚,
1
/
1.6
光圈)+
1200
万像素(超广角),......'
}
]
,
},
methods
:
{},
mounted
:
function
()
{}
}
)
</
script
>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/mweixin/weixin.ftl
deleted
100644 → 0
View file @
11306435
<!
DOCTYPE
html>
<
html
>
<
head
>
<meta charset="UTF-8">
<title></title>
<!-- <#include "/include/head-file.ftl"/> -->
<!--#include virtual="../include/head-file.ftl" -->
</
head
>
<
body
>
<!--#include virtual="menu.ftl" -->
<!--#include virtual="metarial/index.ftl" -->
<!--#include virtual="metarial/form.ftl" -->
<!--#include virtual="picture/index.ftl" -->
<!--#include virtual="keyword/index.ftl" -->
<!--#include virtual="keyword/form.ftl" -->
<!--#include virtual="menu/index.ftl" -->
<!--#include virtual="menu/new-pic-form.ftl" -->
<!--#include virtual="menu/material-bank-form.ftl" -->
<!--#include virtual="message/index.ftl" -->
</
body
>
</
html
>
\ No newline at end of file
Write
Preview
Supports
Markdown
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