元数据
元数据用于展示当前登录账户的相关统计数据。
可根据不同的成员权限返回不同的统计数据。
如:部门经理查看的是部门下的所有数据,而部门成员则查看的是自己的数据。

API
请求地址为: {你的API地址}/profile/mine
请求参数
名称 | 类型 | 说明 |
---|---|---|
version | string | 当前App的版本号 |
返回参数
名称 | 类型 | 说明 |
---|---|---|
update | string | 值: false 或 true,当为 true 时表示App有新版本 |
info | array | 我的信息 |
info.nickname | string | 用户昵称 |
info.url | string | 用户头像 |
meta | array | 元数据 |
meta.name | string | 元数据名称 |
meta.count | string | 元数据统计值 |
meta.url | string | 应用地址,更多地址类型,可查看“应用短ID”文档。为空时则无向右箭头的点击跳转动作 |
items | array | Cell列表 |
items.name | string | Cell标题 |
items.icon | string | Cell图标, 只支持 https://remixicon.com/ |
items.url | string | 跳转地址,应用地址或远程网址 |
接口示例
php
<?php
$json_data = file_get_contents('php://input');
$data_array = json_decode($json_data, true);
$version = $data_array['version']; // 当前App的版本号
$query = [
'info' => [
'nickname' => '刘先生',
'url' => 'http://******/avatar_4.jpg',
],
'meta' => [
[
'name' => '我的客户',
'count' => '22',
'url' => 'app://one',
],
[
'name' => '订单数',
'count' => '3,831',
'url' => '',
],
[
'name' => '销售额',
'count' => '¥1,283,923',
'url' => 'app://two@to/pages/chart/index',
]
],
'update' => 'false', // 为 true 时表示有新版本
'items' => [
[
'name' => '帮助中心',
'icon' => 'chart-pie',
'url' => 'app://one',
],
[
'name' => '我的订单',
'icon' => 'http://******/list.png',
'url' => 'https://demo.com',
],
]
];
echo json_encode($query, 256);