自定义菜单
为了更便捷的访问应用内的某个功能,增加了自定义菜单功能。

API
请求地址为: {你的API地址}/message/menu
请求参数
名称 | 类型 | 说明 |
---|---|---|
id | int | 应用ID |
返回参数
名称 | 类型 | 说明 |
---|---|---|
name | string | 菜单名称 |
app | string | 应用地址,更多地址类型,可查看“应用短ID”文档 |
children | array | 子菜单列表 |
children.name | string | 子菜单名称 |
children.app | string | 应用地址,更多地址类型,可查看“应用短ID”文档 |
接口示例
php
<?php
$json_data = file_get_contents('php://input');
$data_array = json_decode($json_data, true);
$id = (int)$data_array['id']; // 应用ID
$query = [
[
'name' => '审批指南',
'app' => 'https://******/__UNI__A32122A.wgt',
],
[
'name' => '审批记录',
'app' => 'https://******.com/',
],
[
'name' => '快捷入口',
'app' => '', // 这里一定要为空值
'children' => [
[
'name' => '请假申请',
'app' => 'https://******/__UNI__53832368.wgt',
],
[
'name' => '出差申请',
'app' => 'app://two',
],
[
'name' => '快速报销',
'app' => 'app://one',
]
]
]
];
echo json_encode($query, 256);
// echo json_encode([]); // 返回为空数组时,则不显示自定义菜单