Commit 9622ed85 authored by 冯超鹏's avatar 冯超鹏

创建

parent 477af4dc
Pipeline #126 canceled with stages
......@@ -20,17 +20,17 @@ use Validator;
class UinappHomeController extends Controller
{
public function devicedatainfo(){
// $data = DB::table('device as d')
// ->join('device_type as t','d.dtype','=','t.tid')
// ->join('gas as g','d.status','=','g.id')
// ->join('danwei as w','d.devicemonad','=','w.id')
// ->join('status as s','d.devicepolice','=','s.id')
// ->join('users as u','d.uid','=','u.id')
// ->where('d.id','=',$id)
// ->select('d.*','t.tname','g.gas','w.danwei','s.status_name','u.username','u.isadmin')
// ->first();
// return $this->jsonSuccessData($data);
public function devicedatainfo($id){
$data = DB::table('device as d')
->join('device_type as t','d.dtype','=','t.tid')
->join('gas as g','d.status','=','g.id')
->join('danwei as w','d.devicemonad','=','w.id')
->join('status as s','d.devicepolice','=','s.id')
->join('users as u','d.uid','=','u.id')
->where('d.id','=',$id)
->select('d.*','t.tname','g.gas','w.danwei','s.status_name','u.username','u.isadmin')
->first();
return $this->jsonSuccessData($data);
return $this->jsonSuccessData('2313');
}
......
......@@ -122,7 +122,7 @@ Route::group(['middleware'=>'auth:api'],function (){
//uinapp 接口
Route::group(['middleware'=>'auth:api'],function (){
Route::get('huinapphome/devicedatainfo','UinappHomeController@devicedatainfo');//设备详情
Route::get('huinapphome/devicedatainfo/{id}','UinappHomeController@devicedatainfo');//设备详情
});
// Fake APIs
Route::get('/table/list', function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment