diff --git a/Laravel/app/Http/Controllers/API/H5/HomeController.php b/Laravel/app/Http/Controllers/API/H5/HomeController.php
index 67fcdf4..5783f84 100644
--- a/Laravel/app/Http/Controllers/API/H5/HomeController.php
+++ b/Laravel/app/Http/Controllers/API/H5/HomeController.php
@@ -12,8 +12,8 @@ class HomeController extends Controller
// 获取配置更新时间
public function config_version()
{
- $version= DB::table('configs')->where(['label'=>'H5配置版本'])->first();
- $version = $version->value;
+ $version = DB::table('configs')->where(['label' => 'H5配置版本'])->first();
+ $version = $version->value;
return \Yz::Return(true, '获取成功', [
'version' => $version
]);
@@ -22,23 +22,22 @@ class HomeController extends Controller
// 获取配置更新时间
public function config()
{
- $hospitals=DB::table('hospitals')
- ->select("id","name","latitude","longitude","logo")
- ->where(['status'=>1,'is_del'=>0])->get();
- if(count($hospitals)<1) return \Yz::echoError1('暂无可用医院信息');
- $db_config=DB::table('configs')->whereIn('label',['首页欢迎词','首页banner'])->get();
+ $hospitals = DB::table('hospitals')
+ ->select("id", "name", "latitude", "longitude", "logo")
+ ->where(['status' => 1, 'is_del' => 0])->get();
+ if (count($hospitals) < 1) return \Yz::echoError1('暂无可用医院信息');
+ $db_config = DB::table('configs')->whereIn('label', ['首页欢迎词', '首页banner'])->get();
$config = [
- 'hospital' => $hospitals
+ 'hospital' => $hospitals,
// [[
// 'id' => 1,
// 'name' => '秀英院区',
// 'latitude' => '39.867671',
// 'longitude' => '119.514223',
// ]]
- ,
- 'tip' => $this->getValueByLabel($db_config,'首页欢迎词'),
+ 'tip' => $this->getValueByLabel($db_config, '首页欢迎词'),
'logo' => $hospitals[0]->logo,
- 'banner' => $this->getValueByLabel($db_config,'首页banner'),
+ 'banner' => $this->getValueByLabel($db_config, '首页banner'),
'order' => [[
'message' => '',
'name' => '个人体检预约',
@@ -50,29 +49,16 @@ class HomeController extends Controller
'jump' => '/pages/main/combo/combo',
'icon' => '/assets/h5/tuanjianyuyue.png'
]],
- 'check' => [[
+ 'button' => [[[
'message' => '暂未开放',
- 'name' => '报告查询',
- 'desc' => '查体检报告',
- 'jump' => '/pages/main/check/check',
- 'icon' => '/assets/h5/baogao.png'
+ 'name' => '健康问卷',
+ 'jump' => '/pages/main/cjwt/cjwt',
+ 'icon' => '/assets/h5/changjianwenti.png'
], [
'message' => '暂未开放',
- 'name' => '体检中心简介',
- 'desc' => '健康体检中心',
- 'jump' => '/pages/main/desc/desc',
- 'icon' => '/assets/h5/jianjie.png'
- ]],
- 'ad' => [
- 'title' => '6大体检套餐 5折',
- 'combo' => ['123', '234'],
- 'button' => '点击购买'
- ],
- 'more' => [[
- 'message' => '暂未开放',
- 'name' => '满意度调查',
- 'jump' => '/pages/main/myddc/myddc',
- 'icon' => '/assets/h5/manyidudiaocha.png'
+ 'name' => '预检咨询',
+ 'jump' => '/pages/main/cjwt/cjwt',
+ 'icon' => '/assets/h5/changjianwenti.png'
], [
'message' => '暂未开放',
'name' => '体检注意事项',
@@ -80,27 +66,27 @@ class HomeController extends Controller
'icon' => '/assets/h5/zhuyishixiang.png'
], [
'message' => '暂未开放',
- 'name' => '健康问卷',
+ 'name' => '体检引导',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
- ], [
+ ]], [[
'message' => '暂未开放',
- 'name' => '预检咨询',
+ 'name' => '解读报告',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
], [
'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'
- ], [
+ 'name' => '满意度调查',
+ 'jump' => '/pages/main/myddc/myddc',
+ 'icon' => '/assets/h5/manyidudiaocha.png'
+ ]], [[
'message' => '暂未开放',
- 'name' => '健康指导',
+ 'name' => '报告查询',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
], [
@@ -113,40 +99,43 @@ class HomeController extends Controller
'name' => '我的订单',
'jump' => '/pages/main/cjwt/cjwt',
'icon' => '/assets/h5/changjianwenti.png'
- ]],
+ ]]
+ ],
'color' => true,
];
return \Yz::Return(true, '获取成功', [
'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]);
+ $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) {
if ($item->label === $label) {
return $item->value;
diff --git a/h5/pages/main/index/index.vue b/h5/pages/main/index/index.vue
index 109fda7..3d2abfb 100644
--- a/h5/pages/main/index/index.vue
+++ b/h5/pages/main/index/index.vue
@@ -219,30 +219,13 @@
-
-
-
-
-
-
- {{ i.name }}
-
-
- {{ i.desc }}
-
-
-
-
- {{ $store.config.ad.title }}
- {{ $store.config.ad.button }}
-
-
-
+
+
-
+
- {{ i.name }}
+ {{ ii.name }}
@@ -484,8 +467,6 @@
.more_item_wrapper {
width: 170rpx;
height: 157rpx;
- background: #FFFFFF;
- border-radius: 9rpx;
}
.more_wrapper {
@@ -493,7 +474,9 @@
margin: 15rpx auto 0;
display: flex;
align-items: center;
- justify-content: space-around;
+ justify-content: space-around;
+ background: #FFFFFF;
+ border-radius: 9rpx;
}
.ad_wrapper {