调整按钮接口

wenjuan
yanzai 1 year ago
parent 391ec9cc4c
commit fc73f4d96a

@ -29,6 +29,10 @@ class ApiMapController extends Controller
'ConfigConfig' => $base_url . '/api/H5/Config/config', 'ConfigConfig' => $base_url . '/api/H5/Config/config',
'DemoPay' => $base_url . '/api/Demo/pay', 'DemoPay' => $base_url . '/api/Demo/pay',
'ApiMapTest' => $base_url . '/api/ApiMap/test', 'ApiMapTest' => $base_url . '/api/ApiMap/test',
'CheckUpTypeGetList' => $base_url . '/api/H5/CheckUpTypeGetList',
'GetPersonList' => $base_url . '/api/H5/GetPersonList',
'SetDefaultPerson' => $base_url . '/api/H5/SetDefaultPerson',
'GetGeJianButtonList' => $base_url . '/api/H5/GetGeJianButtonList',
]; ];
} }

@ -80,7 +80,37 @@ class HomeController extends Controller
'icon' => '/assets/h5/zhuyishixiang.png' 'icon' => '/assets/h5/zhuyishixiang.png'
], [ ], [
'message' => '暂未开放', 'message' => '暂未开放',
'name' => '常见问题', 'name' => '健康问卷',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
], [
'message' => '暂未开放',
'name' => '预检咨询',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
], [
'message' => '暂未开放',
'name' => '体检引导',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
], [
'message' => '暂未开放',
'name' => '报告解读',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
], [
'message' => '暂未开放',
'name' => '健康指导',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
], [
'message' => '暂未开放',
'name' => '检后复查',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
], [
'message' => '暂未开放',
'name' => '我的订单',
'jump' => '/pages/main/cjwt/cjwt', 'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png' 'icon' => '/assets/h5/changjianwenti.png'
]], ]],
@ -90,6 +120,31 @@ class HomeController extends Controller
'config' => $config 'config' => $config
]); ]);
} }
//点击个检获取页面按钮
public function GetGeJianButtonList()
{
$list=[
[
'message' => '暂未开放',
'name' => '检前健康评估',
'jump' => '/pages/main/order/order',
'icon' => '/assets/h5/zhuyishixiang.png'
],
[
'message' => '暂未开放',
'name' => '套餐预约',
'jump' => '/pages/main/order/order',
'icon' => '/assets/h5/zhuyishixiang.png'
],
[
'message' => '暂未开放',
'name' => '项目自选',
'jump' => '/pages/main/order/order',
'icon' => '/assets/h5/zhuyishixiang.png'
]
];
return \Yz::Return(true,"查询完成",['button_list'=>$list]);
}
function getValueByLabel($items, $label) { function getValueByLabel($items, $label) {
foreach ($items as $item) { foreach ($items as $item) {

@ -2,6 +2,7 @@
namespace App\Http\Controllers\API\H5; namespace App\Http\Controllers\API\H5;
use App\Http\Controllers\API\XCXApiController;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Services\ConfigService; use App\Services\ConfigService;
use Illuminate\Http\Request; use Illuminate\Http\Request;
@ -78,6 +79,9 @@ class UserController extends Controller
//更新用户列表,调用远程小程序接口 //更新用户列表,调用远程小程序接口
public function UpdatePersonList() public function UpdatePersonList()
{ {
$XCX=new XCXApiController();
$list=$XCX::Post('就诊人列表',['a'=>1]);
dd($list);
$openid = "234243"; $openid = "234243";
$ApiPersonList = [ $ApiPersonList = [
[ [

@ -0,0 +1,31 @@
<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
class XCXApiController extends Controller
{
public static function Api($url_code)
{
$url = 'https://dqgatjzx-wx.sixinyun.com';
$api['就诊人列表'] = "{$url}/PEISCommon/QueryCombos/460107000001";
$api['自选项目查询'] = "{$url}/PEISCommon/QueryGroups";
$api['套餐查询'] = "{$url}/PEISCommon/QueryCombos";
return $api["{$url_code}"] ?? $url_code;
}
public static function Post($url_code, $data)
{
$url = self::Api($url_code);
$response = Http::post($url,$data);
if ($response->successful()) {
// 处理成功的响应
dd($response);
} else {
// 处理失败的响应
dd($response);
}
}
}

@ -50,6 +50,8 @@ Route::group(['prefix' => 'H5'], function () {
Route::post('/GetPersonInfo', 'App\Http\Controllers\API\H5\UserController@GetPersonInfo');//获取体检人基本信息 Route::post('/GetPersonInfo', 'App\Http\Controllers\API\H5\UserController@GetPersonInfo');//获取体检人基本信息
Route::post('/UpdatePersonList', 'App\Http\Controllers\API\H5\UserController@UpdatePersonList');//远程获取小程序端用户列表 Route::post('/UpdatePersonList', 'App\Http\Controllers\API\H5\UserController@UpdatePersonList');//远程获取小程序端用户列表
Route::post('/Login', 'App\Http\Controllers\API\H5\LoginController@Login');//登录 Route::post('/Login', 'App\Http\Controllers\API\H5\LoginController@Login');//登录
Route::post('/GetGeJianButtonList', 'App\Http\Controllers\API\H5\HomeController@GetGeJianButtonList');//点击个检获取页面按钮
}); });

Loading…
Cancel
Save