You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
811 B
PHP
29 lines
811 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API\H5;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
class QuestionController extends Controller
|
|
{
|
|
public function GetList()
|
|
{
|
|
$hospital_id = request('hospital_id');
|
|
$q_type = request('q_type');
|
|
if (!isset($hospital_id)) return \Yz::echoError1("医院id不能为空");
|
|
if (!isset($q_type)) return \Yz::echoError1("问卷类型不能为空");
|
|
$list = DB::table('questions')
|
|
->where(['hospital_id'=>$hospital_id,
|
|
'q_type'=>$q_type,
|
|
'status'=>1,
|
|
'is_del'=>0,
|
|
])->orderBy('order','asc')->get();
|
|
foreach ($list as $key=>$item){
|
|
$item->content=json_decode($item->content,true);
|
|
}
|
|
return \Yz::Return(true,"查询成功",['list'=>$list]);
|
|
}
|
|
}
|