修改首页协程、修改闻着病例
This commit is contained in:
@@ -137,6 +137,9 @@ class IndexService extends BaseService
|
||||
// 获取banner
|
||||
$banner = [];
|
||||
co(function () use ($wg, &$banner) {
|
||||
defer(function() use ($wg) {
|
||||
$wg->done();
|
||||
});
|
||||
$params = array();
|
||||
$params["app_type"] = 1;
|
||||
$params["client_type"] = 1;
|
||||
@@ -148,45 +151,47 @@ class IndexService extends BaseService
|
||||
$item['banner_path'] = addAliyunOssWebsite($item['banner_path']);
|
||||
}
|
||||
}
|
||||
|
||||
// 计数器减一
|
||||
$wg->done();
|
||||
});
|
||||
|
||||
// 获取模块
|
||||
$module = [];
|
||||
co(function () use ($wg, &$module) {
|
||||
defer(function() use ($wg) {
|
||||
$wg->done();
|
||||
});
|
||||
|
||||
$params = array();
|
||||
$params["app_type"] = 1;
|
||||
$params["client_type"] = 1;
|
||||
$params["module_place"] = 1;
|
||||
$params["module_status"] = 1;
|
||||
$module = ModuleModel::getList($params);
|
||||
|
||||
// 计数器减一
|
||||
$wg->done();
|
||||
});
|
||||
|
||||
// 我的医生
|
||||
$my_doctor = [];
|
||||
co(function () use ($wg, &$my_doctor,$user_info) {
|
||||
defer(function() use ($wg) {
|
||||
$wg->done();
|
||||
});
|
||||
|
||||
$PatientDoctorService = new PatientDoctorService();
|
||||
|
||||
if (!empty($user_info)) {
|
||||
$my_doctor = $PatientDoctorService->getIndexPatientDoctorLimit($user_info['client_user_id']);
|
||||
}
|
||||
// 计数器减一
|
||||
$wg->done();
|
||||
});
|
||||
|
||||
// 推荐医生
|
||||
$recommend_doctor = [];
|
||||
co(function () use ($wg, &$recommend_doctor) {
|
||||
defer(function() use ($wg) {
|
||||
$wg->done();
|
||||
});
|
||||
|
||||
$PatientDoctorService = new PatientDoctorService();
|
||||
|
||||
$recommend_doctor = $PatientDoctorService->getIndexRecommendDoctorLimit();
|
||||
// 计数器减一
|
||||
$wg->done();
|
||||
});
|
||||
|
||||
$wg->wait();
|
||||
|
||||
Reference in New Issue
Block a user