fixed
This commit is contained in:
@@ -88,6 +88,16 @@ dump($requestUrl);
|
||||
// 运行事件循环
|
||||
$loop->run();
|
||||
}
|
||||
//function stringToColor($string) {
|
||||
// // 使用crc32函数计算字符串的哈希值
|
||||
// $hash = crc32($string);
|
||||
//
|
||||
// // 将整数哈希值转换为16进制,并填充0以确保6位长度
|
||||
// $color = sprintf("%06X", $hash & 0xFFFFFF);
|
||||
//
|
||||
// // 返回颜色码
|
||||
// return '#' . $color;
|
||||
//}
|
||||
function stringToColor($string) {
|
||||
// 使用crc32函数计算字符串的哈希值
|
||||
$hash = crc32($string);
|
||||
@@ -95,12 +105,86 @@ dump($requestUrl);
|
||||
// 将整数哈希值转换为16进制,并填充0以确保6位长度
|
||||
$color = sprintf("%06X", $hash & 0xFFFFFF);
|
||||
|
||||
// 分解颜色码为RGB三个部分
|
||||
$r = hexdec(substr($color, 0, 2));
|
||||
$g = hexdec(substr($color, 2, 2));
|
||||
$b = hexdec(substr($color, 4, 2));
|
||||
|
||||
// 计算亮度调整
|
||||
$brightnessFactor = 30; // 减少亮度因子以使颜色更浅
|
||||
$contrastThreshold = 80; // 进一步降低对比度阈值以允许更浅的颜色
|
||||
$maxBrightness = 100; // 降低最大亮度限制,防止生成过于接近白色的颜色
|
||||
|
||||
// 调整RGB值以确保颜色足够亮且与黑色有足够的对比度
|
||||
$r = min($maxBrightness, max($r + $brightnessFactor, $contrastThreshold));
|
||||
$g = min($maxBrightness, max($g + $brightnessFactor, $contrastThreshold));
|
||||
$b = min($maxBrightness, max($b + $brightnessFactor, $contrastThreshold));
|
||||
|
||||
// 将调整后的RGB值转换回16进制颜色码
|
||||
$adjustedColor = sprintf("#%02X%02X%02X", $r, $g, $b);
|
||||
|
||||
// 返回颜色码
|
||||
return '#' . $color;
|
||||
return $adjustedColor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function test()
|
||||
{
|
||||
$api_cache_arr['aaa'][] = ['api_name'=>111,'doc_txt'=>222];
|
||||
$api_cache_arr['bb'][] = ['api_name'=>777,'doc_txt'=>777];
|
||||
$api_cache_arr['aaa'][] = ['api_name'=>666,'doc_txt'=>666];
|
||||
$api_cache_arr['ccc'][] = ['api_name'=>111,'doc_txt'=>222];
|
||||
$api_cache_arr['aaa'][] = ['api_name'=>555,'doc_txt'=>555];
|
||||
$api_cache_arr['ccc'][] = ['api_name'=>333,'doc_txt'=>333];
|
||||
|
||||
dump($api_cache_arr);die;
|
||||
// 使用示例
|
||||
$color = $this->stringToColor("example string");
|
||||
//echo $color; // 输出颜色码
|
||||
echo '<div style="background-color:#f0f8ff">test</div>';
|
||||
echo '<div style="background-color:#f0ffff">test</div>';
|
||||
echo '<div style="background-color:#f5f5dc">test</div>';
|
||||
echo '<div style="background-color:#ffe4c4">test</div>';
|
||||
echo '<div style="background-color:#f5f5f5">test</div>';
|
||||
echo '<div style="background-color:#f5fffa">test</div>';
|
||||
echo '<div style="background-color:#fff5ee">test</div>';
|
||||
echo '<div style="background-color:#f8f8ff">test</div>';
|
||||
echo '<div style="background-color:#fffaf0">test</div>';
|
||||
echo '<div style="background-color:#fffff0">test</div>';
|
||||
echo '<div style="background-color:#fafad2">test</div>';
|
||||
echo '<div style="background-color:#f0fff0">test</div>';
|
||||
echo '<div style="background-color:#fff0f5">test</div>';
|
||||
echo '<div style="background-color:#ffe4e1">test</div>';
|
||||
echo '<div style="background-color:#f0ffff">test</div>';
|
||||
echo '<div style="background-color:#f0f8ff">test</div>';
|
||||
echo '<div style="background-color:#f8f8ff">test</div>';
|
||||
echo '<div style="background-color:#faebd7">test</div>';
|
||||
echo '<div style="background-color:#fff0f5">test</div>';
|
||||
echo '<div style="background-color:#ffe4e1">test</div>';
|
||||
echo '<div style="background-color:#ffe4b5">test</div>';
|
||||
echo '<div style="background-color:#ffdead">test</div>';
|
||||
echo '<div style="background-color:#dcdcdc">test</div>';
|
||||
echo '<div style="background-color:#dda0dd">test</div>';
|
||||
echo '<div style="background-color:#fffaf0">test</div>';
|
||||
echo '<div style="background-color:#eee8aa">test</div>';
|
||||
echo '<div style="background-color:#fffafa">test</div>';
|
||||
echo '<div style="background-color:#f0fff0">test</div>';
|
||||
echo '<div style="background-color:#f0fff0">test</div>';
|
||||
echo '<div style="background-color:#f0f8ff">test</div>';
|
||||
echo '<div style="background-color:#f0ffff">test</div>';
|
||||
echo '<div style="background-color:#f5f5dc">test</div>';
|
||||
echo '<div style="background-color:#ffe4c4">test</div>';
|
||||
echo '<div style="background-color:#f5f5f5">test</div>';
|
||||
echo '<div style="background-color:#f5fffa">test</div>';
|
||||
echo '<div style="background-color:#fff5ee">test</div>';
|
||||
echo '<div style="background-color:#f8f8ff">test</div>';
|
||||
echo '<div style="background-color:#fffaf0">test</div>';
|
||||
die;
|
||||
|
||||
die;
|
||||
$color_code = substr(md5('asdfasdf'),0,6);
|
||||
echo '<div style="background-color:'.$color_code.'">test</div>';die;
|
||||
|
||||
// 使用示例
|
||||
$color = $this->stringToColor("example string");
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div id="api_hdradmin_adminLogin">
|
||||
<div id="api_hdradmin_adminLogin" style="background-color: #f8f8ff;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="api_hdradmin_adminLogin_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrdepartment_getHdrdepartmentList">
|
||||
</div><div id="api_hdrdepartment_getHdrdepartmentList" style="background-color: #fff0f5;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
<div class="api_hdrdepartment_getHdrdepartmentList_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrdoctorusers_addHdrdoctorusers">
|
||||
</div><div id="api_hdrdoctorusers_addHdrdoctorusers" style="background-color: #ffe4e1;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
<div class="api_hdrdoctorusers_addHdrdoctorusers_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrdoctorusers_updateHdrdoctorusers">
|
||||
</div><div id="api_hdrdoctorusers_updateHdrdoctorusers" style="background-color: #ffe4e1;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -106,7 +106,7 @@
|
||||
</div>
|
||||
<div class="api_hdrdoctorusers_updateHdrdoctorusers_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrdoctorusers_getHdrdoctorusersList">
|
||||
</div><div id="api_hdrdoctorusers_getHdrdoctorusersList" style="background-color: #ffe4e1;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -154,7 +154,7 @@
|
||||
</div>
|
||||
<div class="api_hdrdoctorusers_getHdrdoctorusersList_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrfollowup_addHdrfollowup">
|
||||
</div><div id="api_hdrfollowup_addHdrfollowup" style="background-color: #fafad2;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -180,7 +180,7 @@
|
||||
</div>
|
||||
<div class="api_hdrfollowup_addHdrfollowup_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrfollowup_getHdrfollowupList">
|
||||
</div><div id="api_hdrfollowup_getHdrfollowupList" style="background-color: #fafad2;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -220,7 +220,7 @@
|
||||
</div>
|
||||
<div class="api_hdrfollowup_getHdrfollowupList_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrfollowup_updateHdrfollowup">
|
||||
</div><div id="api_hdrfollowup_updateHdrfollowup" style="background-color: #fafad2;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -244,7 +244,27 @@
|
||||
</div>
|
||||
<div class="api_hdrfollowup_updateHdrfollowup_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrquestionnaireanswer_getHdrquestionnaireanswerList">
|
||||
</div><div id="api_hdrfollowup_del" style="background-color: #fafad2;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
/**
|
||||
* 删除随访
|
||||
* 参数:
|
||||
* id ID
|
||||
* api/Hdrfollowup/del
|
||||
* api/hdrfollowup/del
|
||||
*/
|
||||
```
|
||||
</div>
|
||||
<div>
|
||||
按需填写其它接口参数:
|
||||
<textarea name="" id="api_hdrfollowup_del_textarea" cols="100" rows="3">/api/hdrfollowup/del</textarea>
|
||||
<a href='JavaScript:;' onclick="DocObject.api_hdrfollowup_del()">测试</a>
|
||||
</div>
|
||||
<div class="api_hdrfollowup_del_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrquestionnaireanswer_getHdrquestionnaireanswerList" style="background-color: #ffdead;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -280,7 +300,7 @@
|
||||
</div>
|
||||
<div class="api_hdrquestionnaireanswer_getHdrquestionnaireanswerList_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrquestionnaireanswer_addHdrquestionnaireanswer">
|
||||
</div><div id="api_hdrquestionnaireanswer_addHdrquestionnaireanswer" style="background-color: #ffdead;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -302,7 +322,7 @@
|
||||
</div>
|
||||
<div class="api_hdrquestionnaireanswer_addHdrquestionnaireanswer_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrquestionnaireanswer_updateHdrquestionnaireanswer">
|
||||
</div><div id="api_hdrquestionnaireanswer_updateHdrquestionnaireanswer" style="background-color: #ffdead;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -324,7 +344,7 @@
|
||||
</div>
|
||||
<div class="api_hdrquestionnaireanswer_updateHdrquestionnaireanswer_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrquestionnaireanswer_del">
|
||||
</div><div id="api_hdrquestionnaireanswer_del" style="background-color: #ffdead;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -346,7 +366,7 @@
|
||||
</div>
|
||||
<div class="api_hdrquestionnaireanswer_del_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrquestionnairequestion_addHdrquestionnairequestion">
|
||||
</div><div id="api_hdrquestionnairequestion_addHdrquestionnairequestion" style="background-color: #dda0dd;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -372,7 +392,7 @@
|
||||
</div>
|
||||
<div class="api_hdrquestionnairequestion_addHdrquestionnairequestion_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrquestionnairequestion_updateHdrquestionnairequestion">
|
||||
</div><div id="api_hdrquestionnairequestion_updateHdrquestionnairequestion" style="background-color: #dda0dd;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -398,7 +418,7 @@
|
||||
</div>
|
||||
<div class="api_hdrquestionnairequestion_updateHdrquestionnairequestion_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrquestionnairequestion_del">
|
||||
</div><div id="api_hdrquestionnairequestion_del" style="background-color: #dda0dd;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -421,7 +441,7 @@
|
||||
</div>
|
||||
<div class="api_hdrquestionnairequestion_del_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrquestionnairequestion_getHdrquestionnairequestionList">
|
||||
</div><div id="api_hdrquestionnairequestion_getHdrquestionnairequestionList" style="background-color: #dda0dd;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -434,9 +454,7 @@
|
||||
* 带分页
|
||||
* current_page 当前页码
|
||||
* list_rows 每页显示条数 默认15
|
||||
* id ID
|
||||
* hdrdepartment_id 所属科室
|
||||
* question 问卷问题
|
||||
|
||||
*
|
||||
* 所有字段说明<span style="color: gray">(可能有部分额外字段未在此体现)</span>:
|
||||
* id ID
|
||||
@@ -461,7 +479,7 @@
|
||||
</div>
|
||||
<div class="api_hdrquestionnairequestion_getHdrquestionnairequestionList_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrregister_addHdrregister">
|
||||
</div><div id="api_hdrregister_addHdrregister" style="background-color: #fafad2;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -489,7 +507,7 @@
|
||||
</div>
|
||||
<div class="api_hdrregister_addHdrregister_response_result"></div>
|
||||
|
||||
</div><div id="api_hdrregister_getHdrregisterList">
|
||||
</div><div id="api_hdrregister_getHdrregisterList" style="background-color: #fafad2;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -534,7 +552,7 @@
|
||||
</div>
|
||||
<div class="api_hdrregister_getHdrregisterList_response_result"></div>
|
||||
|
||||
</div><div id="api_hdruserbaseinfo_getHdruserbaseinfoList">
|
||||
</div><div id="api_hdruserbaseinfo_getHdruserbaseinfoList" style="background-color: #f0ffff;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -593,7 +611,7 @@
|
||||
</div>
|
||||
<div class="api_hdruserbaseinfo_getHdruserbaseinfoList_response_result"></div>
|
||||
|
||||
</div><div id="api_hdruserbaseinfo_getHdruserbaseinfoDetailById">
|
||||
</div><div id="api_hdruserbaseinfo_getHdruserbaseinfoDetailById" style="background-color: #f0ffff;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -643,7 +661,7 @@
|
||||
</div>
|
||||
<div class="api_hdruserbaseinfo_getHdruserbaseinfoDetailById_response_result"></div>
|
||||
|
||||
</div><div id="api_reporttt_createReport">
|
||||
</div><div id="api_reporttt_createReport" style="background-color: #f8f8ff;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -689,7 +707,7 @@
|
||||
</div>
|
||||
<div class="api_reporttt_createReport_response_result"></div>
|
||||
|
||||
</div><div id="api_reporttt_getReportById">
|
||||
</div><div id="api_reporttt_getReportById" style="background-color: #f8f8ff;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -711,7 +729,7 @@
|
||||
</div>
|
||||
<div class="api_reporttt_getReportById_response_result"></div>
|
||||
|
||||
</div><div id="api_reporttt_getReportList">
|
||||
</div><div id="api_reporttt_getReportList" style="background-color: #f8f8ff;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -734,7 +752,7 @@
|
||||
</div>
|
||||
<div class="api_reporttt_getReportList_response_result"></div>
|
||||
|
||||
</div><div id="api_reporttt_editReport">
|
||||
</div><div id="api_reporttt_editReport" style="background-color: #f8f8ff;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -765,7 +783,7 @@
|
||||
</div>
|
||||
<div class="api_reporttt_editReport_response_result"></div>
|
||||
|
||||
</div><div id="api_reportty_createReport">
|
||||
</div><div id="api_reportty_createReport" style="background-color: #f8f8ff;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -789,7 +807,7 @@
|
||||
</div>
|
||||
<div class="api_reportty_createReport_response_result"></div>
|
||||
|
||||
</div><div id="api_reportty_getReportById">
|
||||
</div><div id="api_reportty_getReportById" style="background-color: #f8f8ff;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -811,7 +829,7 @@
|
||||
</div>
|
||||
<div class="api_reportty_getReportById_response_result"></div>
|
||||
|
||||
</div><div id="api_reportty_getReportList">
|
||||
</div><div id="api_reportty_getReportList" style="background-color: #f8f8ff;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -834,7 +852,7 @@
|
||||
</div>
|
||||
<div class="api_reportty_getReportList_response_result"></div>
|
||||
|
||||
</div><div id="api_reportty_editReport">
|
||||
</div><div id="api_reportty_editReport" style="background-color: #f8f8ff;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -867,7 +885,7 @@
|
||||
</div>
|
||||
<div class="api_reportty_editReport_response_result"></div>
|
||||
|
||||
</div><div id="api_ttchathistory_getTtchathistoryList">
|
||||
</div><div id="api_ttchathistory_getTtchathistoryList" style="background-color: #fff0f5;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -904,7 +922,7 @@
|
||||
</div>
|
||||
<div class="api_ttchathistory_getTtchathistoryList_response_result"></div>
|
||||
|
||||
</div><div id="api_ttmedicalreport_getTtmedicalreportDetail">
|
||||
</div><div id="api_ttmedicalreport_getTtmedicalreportDetail" style="background-color: #f0ffff;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -941,7 +959,7 @@
|
||||
</div>
|
||||
<div class="api_ttmedicalreport_getTtmedicalreportDetail_response_result"></div>
|
||||
|
||||
</div><div id="api_ttuserbaseinfo_getTtuserbaseinfoDetail">
|
||||
</div><div id="api_ttuserbaseinfo_getTtuserbaseinfoDetail" style="background-color: #ffe4e1;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -991,7 +1009,7 @@
|
||||
</div>
|
||||
<div class="api_ttuserbaseinfo_getTtuserbaseinfoDetail_response_result"></div>
|
||||
|
||||
</div><div id="api_tychathistory_getTychathistoryList">
|
||||
</div><div id="api_tychathistory_getTychathistoryList" style="background-color: #fff0f5;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1027,7 +1045,7 @@
|
||||
</div>
|
||||
<div class="api_tychathistory_getTychathistoryList_response_result"></div>
|
||||
|
||||
</div><div id="api_tyfollowup_getTyfollowupDetail">
|
||||
</div><div id="api_tyfollowup_getTyfollowupDetail" style="background-color: #fffff0;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1059,7 +1077,7 @@
|
||||
</div>
|
||||
<div class="api_tyfollowup_getTyfollowupDetail_response_result"></div>
|
||||
|
||||
</div><div id="api_tymedicalreport_getTymedicalreportDetail">
|
||||
</div><div id="api_tymedicalreport_getTymedicalreportDetail" style="background-color: #f0ffff;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1097,7 +1115,7 @@
|
||||
</div>
|
||||
<div class="api_tymedicalreport_getTymedicalreportDetail_response_result"></div>
|
||||
|
||||
</div><div id="api_userstt_getSayTicket">
|
||||
</div><div id="api_userstt_getSayTicket" style="background-color: #fff5ee;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1120,7 +1138,7 @@
|
||||
</div>
|
||||
<div class="api_userstt_getSayTicket_response_result"></div>
|
||||
|
||||
</div><div id="api_userstt_getUserById">
|
||||
</div><div id="api_userstt_getUserById" style="background-color: #fff5ee;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1141,7 +1159,7 @@
|
||||
</div>
|
||||
<div class="api_userstt_getUserById_response_result"></div>
|
||||
|
||||
</div><div id="api_userstt_login">
|
||||
</div><div id="api_userstt_login" style="background-color: #fff5ee;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1166,7 +1184,7 @@
|
||||
</div>
|
||||
<div class="api_userstt_login_response_result"></div>
|
||||
|
||||
</div><div id="api_userstt_saveChatHistory">
|
||||
</div><div id="api_userstt_saveChatHistory" style="background-color: #fff5ee;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1187,7 +1205,7 @@
|
||||
</div>
|
||||
<div class="api_userstt_saveChatHistory_response_result"></div>
|
||||
|
||||
</div><div id="api_userstt_editBaseinfo">
|
||||
</div><div id="api_userstt_editBaseinfo" style="background-color: #fff5ee;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1222,7 +1240,7 @@
|
||||
</div>
|
||||
<div class="api_userstt_editBaseinfo_response_result"></div>
|
||||
|
||||
</div><div id="api_userstt_subFreeQuestionAnswerRecord">
|
||||
</div><div id="api_userstt_subFreeQuestionAnswerRecord" style="background-color: #fff5ee;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1253,7 +1271,7 @@
|
||||
</div>
|
||||
<div class="api_userstt_subFreeQuestionAnswerRecord_response_result"></div>
|
||||
|
||||
</div><div id="api_usersty_login">
|
||||
</div><div id="api_usersty_login" style="background-color: #fff5ee;margin-top: 50px;">
|
||||
<div class="markdown_content">
|
||||
***
|
||||
```
|
||||
@@ -1344,6 +1362,12 @@
|
||||
$('.api_hdrfollowup_updateHdrfollowup_response_result').html(JSON.stringify(res, null, "\t"));
|
||||
$('.api_hdrfollowup_updateHdrfollowup_response_result').attr('style','color:green');
|
||||
},'json');
|
||||
}, api_hdrfollowup_del(){
|
||||
let url = $('#api_hdrfollowup_del_textarea').val();
|
||||
$.post(url,{},function(res) {
|
||||
$('.api_hdrfollowup_del_response_result').html(JSON.stringify(res, null, "\t"));
|
||||
$('.api_hdrfollowup_del_response_result').attr('style','color:green');
|
||||
},'json');
|
||||
}, api_hdrquestionnaireanswer_getHdrquestionnaireanswerList(){
|
||||
let url = $('#api_hdrquestionnaireanswer_getHdrquestionnaireanswerList_textarea').val();
|
||||
$.post(url,{},function(res) {
|
||||
|
||||
@@ -170,6 +170,17 @@
|
||||
*/
|
||||
```
|
||||
|
||||
***
|
||||
```
|
||||
/**
|
||||
* 删除随访
|
||||
* 参数:
|
||||
* id ID
|
||||
* api/Hdrfollowup/del
|
||||
* api/hdrfollowup/del
|
||||
*/
|
||||
```
|
||||
|
||||
***
|
||||
```
|
||||
/**
|
||||
@@ -295,9 +306,7 @@
|
||||
* 带分页
|
||||
* current_page 当前页码
|
||||
* list_rows 每页显示条数 默认15
|
||||
* id ID
|
||||
* hdrdepartment_id 所属科室
|
||||
* question 问卷问题
|
||||
|
||||
*
|
||||
* 所有字段说明<span style="color: gray">(可能有部分额外字段未在此体现)</span>:
|
||||
* id ID
|
||||
|
||||
@@ -178,7 +178,7 @@ EOF;
|
||||
```
|
||||
EOF;
|
||||
$doc_txt= $str.$comments_str.$doc_txt." \r\n";
|
||||
$this->api_cache_arr[] = ['api_name'=>$api_name,'doc_txt'=>$doc_txt];
|
||||
$this->api_cache_arr[$className][] = ['api_name'=>$api_name,'doc_txt'=>$doc_txt,'class_name'=>$className];
|
||||
file_put_contents($savepath,$doc_txt, FILE_APPEND);
|
||||
}
|
||||
|
||||
@@ -194,16 +194,32 @@ EOF;
|
||||
}
|
||||
|
||||
function buildApiDocHtml(){
|
||||
//给定一组浅色背景色码
|
||||
$color_code_arr = [
|
||||
'#f0f8ff', '#f0ffff', '#f5f5dc', '#ffe4c4', '#f5f5f5', '#f5fffa', '#fff5ee', '#f8f8ff', '#fffaf0', '#fffff0', '#fafad2', '#f0fff0', '#fff0f5', '#ffe4e1', '#f0ffff', '#f0f8ff', '#f8f8ff', '#faebd7', '#fff0f5', '#ffe4e1', '#ffe4b5', '#ffdead', '#dcdcdc', '#dda0dd', '#fffaf0', '#eee8aa', '#fffafa', '#f0fff0', '#f0fff0', '#f0f8ff', '#f0ffff', '#f5f5dc', '#ffe4c4', '#f5f5f5', '#f5fffa', '#fff5ee', '#f8f8ff', '#fffaf0', '#f0fff0', '#fff0f5', '#ffe4e1', '#f0ffff', '#f0f8ff', '#f8f8ff', '#faebd7', '#fff0f5', '#ffe4e1', '#ffe4b5', '#ffdead', '#dcdcdc', '#dda0dd', '#fffaf0', '#eee8aa', '#fffafa', '#f0fff0', '#f0fff0', '#f0f8ff', '#f0ffff', '#f5f5dc', '#ffe4c4', '#f5f5f5', '#f5fffa', '#fff5ee', '#f8f8ff', '#fffaf0',
|
||||
];
|
||||
|
||||
$api_doc_cache_arr = cache('api_doc_cache_arr');
|
||||
|
||||
$htm_str = "";
|
||||
$script_str = "";
|
||||
foreach ($api_doc_cache_arr as $item){
|
||||
foreach ($api_doc_cache_arr as $class_name_key=>$func_arr){
|
||||
$color_code = $color_code_arr[strlen($class_name_key)-1];
|
||||
//是否显示上边距
|
||||
$is_show_margin_top = 'margin-top: 50px;';
|
||||
foreach ($func_arr as $k => $item){
|
||||
$api_name = $item['api_name'];
|
||||
$doc_txt = $item['doc_txt'];
|
||||
|
||||
if($k > 0){
|
||||
|
||||
$is_show_margin_top = '';
|
||||
}
|
||||
|
||||
|
||||
$function_name = str_replace('/','_',$api_name);
|
||||
$htm_str .= <<<EOF
|
||||
<div id="{$function_name}">
|
||||
<div id="{$function_name}" style="background-color: {$color_code};{$is_show_margin_top}">
|
||||
<div class="markdown_content">{$doc_txt}</div>
|
||||
<div>
|
||||
按需填写其它接口参数:
|
||||
@@ -224,7 +240,7 @@ EOF;
|
||||
},
|
||||
EOF;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
$html = <<<EOF
|
||||
<!DOCTYPE html>
|
||||
|
||||
Reference in New Issue
Block a user