当前位置:网站首页>漏刻有时文档系统之XE培训系统二次开发配置手册
漏刻有时文档系统之XE培训系统二次开发配置手册
2022-08-01 19:42:00 【漏刻有时】
@医师培训管理系统配置手册
前言
开放平台支持您将xiaoe店铺与其他平台进行数据打通,从而更好地运营用户,支撑业务决策。本说明文档是基于xiaoe云平台API的配置、调用、二次开发的操作手册。
一、环境部署
小鹅云平台配置
- 创建应用获取client_id、client_secret以及授权店铺ID;
- IP白名单配置;
在IP白名单内的IP地址作为来源,获取access_token接口才可调用成功。
服务器环境部署
首次配置服务器,会出现file_exists(),open_basedir restriction in effect错误提示。
解决方案:
- 宝塔找到对应网站,设置,网站目录中将防跨站攻击(open_basedir)选项取消勾选即可;
- 删除根目录下的user.ini
二、数据库字典配置
po_admin 管理员系统
user_roles,//角色:0超管1单位管理2市管3区管4省管;1.后台首页的跳转页;2.操作菜单隐藏与显示;
user_menu,//左侧菜单权限;
user_auth,//用户是否可登录后台;
获取用户user_id
/*获取用户user_id * $phone,string,手机号 * $page_size,number,页数 */
function getUser($phone, $page_size = "10")
{
require_once __DIR__ . '/libs/Client.php';
$client = new Client();
$url = "https://api.xiaoe-tech.com/xe.user.batch.get/2.0.0";
$method = "post";
$params = ['phone' => $phone, 'page_size' => $page_size];
$result = $client->request($method, $url, $params);
//返回结果集;
//die(json_encode($result));
//返回码正常且总数为1,则返回对应的user_id;
$res = array();
if ($result['code'] == 0 && $result['data']['total'] == 1) {
$res['code'] = 0;
$res['msg'] = 'success';
$res['user_id'] = $result['data']['list'][0]['user_id'];
die(json_encode($res));
} else {
$res['code'] = $result['code'];
$res['user_id'] = $result['data']['list'][0]['user_id'];
$res['msg'] = 'API获取user_id异常';
die(json_encode($res));
}
}
注册用户
/*注册用户 * $data,类型:array,用户信息; * data.wx_name 否 string 真实姓名 * data.nickname 否 string 微信 用户昵称 * data.country 否 string 国家 * data.province 否 string 省份 * data.city 否 string 城市 * data.gender 否 int 性别 0-无 1-男 2-女 * data.company 否 string 单位 */
function syncUser($data)
{
require_once __DIR__ . '/libs/Client.php';
$client = new Client();
$url = "https://api.xiaoe-tech.com/xe.user.register/1.0.0";
$method = "post";
$params = ['data' => $data];
$result = $client->request($method, $url, $params);
//返回结果集;
//die(json_encode($result));
//返回码正常且总数为1,则返回对应的user_id;
$res = array();
//新注册用户;
if ($result['code'] == 0 && $result['data']['user_exists'] <> 0) {
$res['code'] = 0;
$res['msg'] = '已注册用户';
$res['user_id'] = $result['data']['user_id'];
return json_encode($res);
} else {
$res['code'] = $result['code'];
$res['msg'] = '新注册用户';
$res['user_id'] = $result['data']['user_id'];
return json_encode($res);
}
}
总结
提示:这里对文章进行总结:
@lockdata.cn
边栏推荐
- 【kali-信息收集】(1.5)系统指纹识别:Nmap、p0f
- What should I do if the Win11 campus network cannot be connected?Win11 can't connect to campus network solution
- Source code analysis of GZIPOutputStream class
- When installing the GBase 8c database, the error message "Resource: gbase8c already in use" is displayed. How to deal with this?
- LabVIEW 使用VISA Close真的关闭COM口了吗
- 智能硬件开发怎么做?机智云全套自助式开发工具助力高效开发
- Screenshot of Selenium in Remote
- Pytorch模型训练实用教程学习笔记:一、数据加载和transforms方法总结
- An implementation of an ordered doubly linked list.
- mysql解压版简洁式本地配置方式
猜你喜欢

MySQL你到底都加了什么锁?

Greenplum Database Source Code Analysis - Analysis of Standby Master Operation Tools

即时通讯开发移动端弱网络优化方法总结

MySQL开发技巧——并发控制

【kali-信息收集】(1.5)系统指纹识别:Nmap、p0f

如何记录分析你的炼丹流程—可视化神器Wandb使用笔记【1】

升哲科技携全域数字化方案亮相2022全球数字经济大会

我的驾照考试笔记(2)

Redis启动时提示Creating Server TCP listening socket *:6379: bind: No error

MLX90640 Infrared Thermal Imager Temperature Measurement Module Development Notes (Complete)
随机推荐
MySQL你到底都加了什么锁?
【蓝桥杯选拔赛真题47】Scratch潜艇游戏 少儿编程scratch蓝桥杯选拔赛真题讲解
DAO development tutorial [WEB3.0]
明日盛会|ApacheCon Asia 2022 Pulsar 技术议题一览
Screenshot of Selenium in Remote
力扣刷题之合并两个有序数组
57:第五章:开发admin管理服务:10:开发【从MongoDB的GridFS中,获取文件,接口】;(从GridFS中,获取文件的SOP)(不使用MongoDB的服务,可以排除其自动加载类)
kubernetes - deploy nfs storage class
deploy zabbix
17、负载均衡
When installing the GBase 8c database, the error message "Resource: gbase8c already in use" is displayed. How to deal with this?
An implementation of an ordered doubly linked list.
突破边界,华为存储的破壁之旅
大神经验:软件测试的自我发展规划
Library website construction source code sharing
What are the application advantages of SaaS management system?How to efficiently improve the digital and intelligent development level of food manufacturing industry?
开源视界 | StreamNative 盛宇帆:和浪漫的人一起做最浪漫的事
Ha ha!A print function, quite good at playing!
10 个 PHP 代码安全漏洞扫描程序
【Redis】缓存雪崩、缓存穿透、缓存预热、缓存更新、缓存击穿、缓存降级