|
|
@@ -60,8 +60,9 @@ class IndexController extends webApp
|
|
|
public function data()
|
|
|
{
|
|
|
try {
|
|
|
- $type = request()->post('type',1);
|
|
|
- $position = request()->post('position',1);
|
|
|
+ $params = request()->all();
|
|
|
+ $type = isset($params['type']) && $params['type']?$params['type'] : 1;
|
|
|
+ $position = isset($params['position']) && $params['position']?$params['position'] : 1;
|
|
|
$data = [
|
|
|
// 轮播
|
|
|
'banners' => AdService::make()->getListByPosition($position),
|
|
|
@@ -69,7 +70,7 @@ class IndexController extends webApp
|
|
|
|
|
|
if($type==2){
|
|
|
$data['socials'] = SocialCircleService::make()->getIndexList();
|
|
|
- }else{
|
|
|
+ }else{
|
|
|
$data['notices'] = NoticeService::make()->getRecommandList();
|
|
|
}
|
|
|
|