| xqd
@@ -2,6 +2,9 @@
|
|
|
|
|
|
namespace App\Http\Controllers\Api\V1;
|
|
|
|
|
|
+use App\Models\BaseSettingsModel;
|
|
|
+use App\Models\DreamInfoModel;
|
|
|
+use App\Models\UserInfoModel;
|
|
|
use Illuminate\Http\Request;
|
|
|
use App\Services\Base\ErrorCode;
|
|
|
class HomeController extends Controller
|
| xqd
@@ -30,10 +33,22 @@ class HomeController extends Controller
|
|
|
* 1000 CLIENT_WRONG_PARAMS 传入参数不正确
|
|
|
*/
|
|
|
|
|
|
- public function index()
|
|
|
+ public function index(Request $request)
|
|
|
{
|
|
|
+// $tel = $request->session()->get('tel');
|
|
|
+ $a = 1234235434534;
|
|
|
+ return $a;
|
|
|
+ $user = UserInfoModel::where('tel',$tel)->frist();
|
|
|
//获取轮播图
|
|
|
-
|
|
|
+ $banner = BaseSettingsModel::where([['category' => 'banner'],['status' => '1']])
|
|
|
+ ->orderBy('sort')->limit('3')->get()->toArray();
|
|
|
+// 关注的用户
|
|
|
+ $other_user = $user->UserCareUser;
|
|
|
+ return $other_user;
|
|
|
+ dd($other_user);
|
|
|
+// 获取其他用户信息 及梦想
|
|
|
+ $user_info = UserInfoModel::orderBy('id')->get()->toArray();
|
|
|
+ $dream = DreamInfoModel::orderBy('created_at')->get()->toArray();
|
|
|
return $this->error(ErrorCode::SERVICE_CODE_FAILED);
|
|
|
}
|
|
|
}
|