Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 202fcf19
authored
Nov 07, 2022
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增应用管理功能
1 parent
fd8dc8e2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
165 additions
and
63 deletions
linkwe-pc/src/api/internalCollaborate/appManage.js
linkwe-pc/src/router/index.js
linkwe-pc/src/views/internalCollaborate/appManage.vue
linkwe-pc/src/api/internalCollaborate/appManage.js
View file @
202fcf1
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
const
service
=
window
.
CONFIG
.
services
.
system
+
window
.
CONFIG
.
services
.
wecom
+
'/weapp'
const
service
=
window
.
CONFIG
.
services
.
system
+
window
.
CONFIG
.
services
.
wecom
+
'/agent'
const
serviceMsg
=
service
+
'/msg'
// 应用管理
/**
/**
* 列表
* 列表
* @param {*} params
* @param {*} params
*/
*/
export
function
getList
()
{
export
function
getList
()
{
return
request
({
return
request
({
url
:
service
+
'/list'
url
:
service
+
'/list'
,
})
})
}
}
/**
/**
* 更新
* 删除
* @param {*} params
*/
export
function
remove
(
id
)
{
return
request
({
url
:
service
+
`/delete/
${
id
}
`
,
method
:
'delete'
,
})
}
/**
* 添加应用
* @param {*} data
* @param {*} data
* {
{
* agentId number 非必须企业应用的id
"agentId": "应用ID",
reportLocationFlag number 非必须企业应用是否打开地理位置上报 0:不上报;1:进入会话上报;
"secret": "应用密钥"
logoMediaid number 非必须企业应用头像的mediaid,通过素材管理接口上传图片获得mediaid,上传后会自动裁剪成方形和圆形两个头像
}
agentName number 非必须企业应用名称,长度不超过32个utf8字符
* @returns
description number 非必须企业应用详情,长度为4至120个utf8字符
*/
redirectDomain number 非必须企业应用可信域名
export
function
add
(
data
)
{
isreportenter number 非必须是否上报用户进入应用事件。0:不接收;1:接收。
return
request
({
home_url number 非必须应用主页url。url必须以http或者https开头
url
:
service
+
'/pull'
,
id string 必须主键id
method
:
'post'
,
* }
data
,
*/
export
function
update
(
data
)
{
return
request
({
url
:
service
+
'/updateWeApp'
,
method
:
'put'
,
data
})
})
}
}
// 添加
/**
export
function
add
(
data
)
{
* 编辑应用信息
* @param {*} data
{
description:'', // string 企业应用详情
homeUrl:'', // string 应用主页url
logoUrl:'', // string 企业应用头像
name:'', // string 企业应用名称
redirectDomain:'', // string 企业应用可信域名
}
* @returns
*/
export
function
update
(
data
)
{
return
request
({
url
:
service
+
`/update/
${
data
.
id
}
`
,
method
:
'PUT'
,
data
,
})
}
// 应用消息
export
const
appMsg
=
{
/**
* 获取历史消息列表
* @param {*} params
{
endTime:'', // string date-time 发送结束时间
startTime:'', // string date-time 发送开始时间
status:'',// integer int32状态
title:'', // string 标题
}
*/
getList
(
params
)
{
return
request
({
url
:
service
+
'/list'
,
params
,
})
},
/**
* 应用消息详情
* @param {*} id
*/
getDetail
(
id
)
{
return
request
({
url
:
service
+
`/get/
${
id
}
`
,
})
},
/**
* 撤销应用消息
* @param {*} id
*/
revoke
(
id
)
{
return
request
({
url
:
service
+
`/revoke/
${
id
}
`
,
})
},
/**
* 新增应用消息
* @param {*} data
{
agentId:'', // integer int32 应用ID
planSendTime: '', // string date-time 计划时间
scopeType:'', // integer int32 范围类型 1-全部 2-自定义
sendTime: '', // string date-time 发送时间
sendType:'', // integer int32 发送方式 1-立即发送 2-定时发送
title: '', // string 消息标题
toParty: '', // string 示例值 接收消息的部门
toTag: '', // string 示例值 接收消息的标签
toUser: '', // string 示例值 接收消息的成员
WeMessageTemplate:{
appId: '', // string 小程序appid(可以在微信公众平台上查询),必须是关联到企业的小程序应用
content: '', // string 文本内容(文本消息必传)
description: '', // string 消息的描述(视频、文本卡片、图文 必传)
linkUrl: '', // string 点击后跳转的链接。最长2048字节,请确保包含了协议头(http/https) (文本卡片、图文 必传)
mediaId: '', // string 素材id(语音、视频、文件 必传)
msgType: '', // string 消息类型 文本:text, 图片:image, 语音:voice, 视频:video, 文件:file, 文本卡片:textcard, 图文:news, 图文消息:link, 小程序:miniprogram
picUrl: '', // string 图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图 1068*455,小图150*150。(文本卡片、图文 必传)
title: '', // string 消息的标题(视频、文本卡片、图文 必传)
}
}
*/
add
(
data
)
{
return
request
({
return
request
({
url
:
service
+
'/addWeApp
'
,
url
:
serviceMsg
+
'/add
'
,
method
:
'post'
,
method
:
'post'
,
data
data
,
})
},
// 保存应用消息 data同上
save
(
data
)
{
return
request
({
url
:
serviceMsg
+
'/save'
,
method
:
'post'
,
data
,
})
},
// 修改应用消息 data同上
update
(
data
)
{
return
request
({
url
:
service
+
`/update/
${
data
.
id
}
`
,
method
:
'PUT'
,
data
,
})
},
/**
* 删除
* @param {*} id
*/
remove
(
id
)
{
return
request
({
url
:
service
+
`/delete/
${
id
}
`
,
method
:
'delete'
,
})
})
},
}
}
linkwe-pc/src/router/index.js
View file @
202fcf1
...
@@ -32,44 +32,25 @@ import visitor from '@/layout/visitor'
...
@@ -32,44 +32,25 @@ import visitor from '@/layout/visitor'
// 开发路由,总后台配置完菜单务必删除或注释,只在开发环境生效
// 开发路由,总后台配置完菜单务必删除或注释,只在开发环境生效
const
devRoutes
=
[
const
devRoutes
=
[
// {
{
// path: '/smartForms',
path
:
'/internalCollaborate'
,
// component: Layout,
component
:
Layout
,
// hidden: true,
hidden
:
true
,
// meta: {
meta
:
{
// title: '商品中心',
title
:
'应用管理'
,
// },
},
// children: [
children
:
[
// {
{
// path: 'list',
path
:
'list'
,
// component: (resolve) => require(['@/views/drainageCode/smartForms/index'], resolve),
component
:
(
resolve
)
=>
require
([
'@/views/internalCollaborate/appManage'
],
resolve
),
// meta: {
meta
:
{
// title: '商品管理',
title
:
''
,
// activeMenu: '/commodityCenter/commodityManage',
activeMenu
:
'/commodityCenter/commodityManage'
,
// breadcrumb: true,
breadcrumb
:
true
,
// },
},
// },
},
// {
],
// path: 'add',
},
// component: (resolve) => require(['@/views/drainageCode/smartForms/add'], resolve),
// meta: {
// title: '商品管理',
// activeMenu: '/commodityCenter/commodityManage',
// breadcrumb: true,
// },
// },
// {
// path: 'smartFormStatistics',
// component: (resolve) =>
// require(['@/views/drainageCode/smartForms/statistics/index'], resolve),
// meta: {
// title: '商品管理',
// activeMenu: '/commodityCenter/commodityManage',
// breadcrumb: true,
// },
// },
// ],
// },
{
{
path
:
'/commodityCenter'
,
path
:
'/commodityCenter'
,
component
:
Layout
,
component
:
Layout
,
...
...
linkwe-pc/src/views/internalCollaborate/appManage.vue
View file @
202fcf1
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment