fix: 修改招生回答后去接口
This commit is contained in:
parent
67f27c1834
commit
73097ebc3e
62
app/api/controller/Enrol/Classes.php
Normal file
62
app/api/controller/Enrol/Classes.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\api\controller\Enrol;
|
||||||
|
|
||||||
|
use app\BaseController;
|
||||||
|
use app\common\model\Enrol\Classes as ModelClasses;
|
||||||
|
use app\Request;
|
||||||
|
use think\Validate;
|
||||||
|
use think\exception\ValidateException;
|
||||||
|
use think\facade\Filesystem;
|
||||||
|
use app\common\arw\adjfut\src\Excel;
|
||||||
|
use app\common\arw\adjfut\src\UploadFile;
|
||||||
|
use think\facade\Db;
|
||||||
|
use app\common\exception\Tool;
|
||||||
|
use think\facade\Env;
|
||||||
|
|
||||||
|
|
||||||
|
class Classes extends BaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 获取班型列表
|
||||||
|
*/
|
||||||
|
public function getClassesList(Request $request): array
|
||||||
|
{
|
||||||
|
$params = $request->param();
|
||||||
|
$con = [];
|
||||||
|
|
||||||
|
$query = ModelClasses::where($con)
|
||||||
|
->field([
|
||||||
|
'classes_id',
|
||||||
|
'classes_name',
|
||||||
|
'classes_desc',
|
||||||
|
'classes_sort'
|
||||||
|
])
|
||||||
|
->order('classes_sort', 'asc');
|
||||||
|
|
||||||
|
|
||||||
|
return msg("获取班型列表成功!", $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取班型详情
|
||||||
|
*/
|
||||||
|
public function getClassesInfo(Request $request): array
|
||||||
|
{
|
||||||
|
$params = $request->param();
|
||||||
|
|
||||||
|
$this->validate($params, ['classes_id' => 'require']);
|
||||||
|
|
||||||
|
$find = ModelClasses::field([
|
||||||
|
'classes_id',
|
||||||
|
'classes_name',
|
||||||
|
'classes_desc',
|
||||||
|
'classes_content',
|
||||||
|
'classes_sort'
|
||||||
|
])
|
||||||
|
->where('classes_id', $params['classes_id'])
|
||||||
|
->find();
|
||||||
|
|
||||||
|
return msg(0, '获取班型详情成功!', ['data' => $find]);
|
||||||
|
}
|
||||||
|
}
|
@ -25,25 +25,24 @@ class EnrolAq extends BaseController
|
|||||||
$params = $request->param();
|
$params = $request->param();
|
||||||
$con = [];
|
$con = [];
|
||||||
|
|
||||||
$con = Tool::getOptionalQuery(['enrol_aq_question', 'LIKE'], ['enrol_aq_status', '='], ['enrol_aq_answer_status', '='],);
|
$con = Tool::getOptionalQuery(['enrol_aq_question', 'LIKE']);
|
||||||
|
|
||||||
$query = ModelEnrolAq::where($con)
|
$query = ModelEnrolAq::where($con)
|
||||||
->field([
|
->field([
|
||||||
'enrol_aq_id',
|
'enrol_aq_id',
|
||||||
'enrol_aq_guid',
|
|
||||||
'enrol_aq_question',
|
'enrol_aq_question',
|
||||||
'enrol_aq_answer',
|
'enrol_aq_answer',
|
||||||
'enrol_aq_sort',
|
'enrol_aq_sort',
|
||||||
'enrol_aq_status',
|
|
||||||
'enrol_aq_answer_status'
|
|
||||||
])
|
])
|
||||||
->where('enrol_aq_status',2)
|
->where('enrol_aq_status', 2)
|
||||||
->where('enrol_aq_answer_status',2)
|
->where('enrol_aq_answer_status', 2)
|
||||||
->order('enrol_aq_sort', 'asc');
|
->order('enrol_aq_sort', 'asc')
|
||||||
|
->select();
|
||||||
|
|
||||||
|
return msg(0, "获取招生问答列表成功!", [
|
||||||
|
'data' => $query,
|
||||||
return msg("获取招生问答列表成功!", $query);
|
'count' => count($query)
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -68,5 +67,4 @@ class EnrolAq extends BaseController
|
|||||||
]);
|
]);
|
||||||
return msg('添加成功!');
|
return msg('添加成功!');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
59
app/api/controller/Enrol/EnrolIntro.php
Normal file
59
app/api/controller/Enrol/EnrolIntro.php
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\api\controller\Enrol;
|
||||||
|
|
||||||
|
use app\BaseController;
|
||||||
|
use app\common\model\Enrol\EnrolIntro as ModelEnrolIntro;
|
||||||
|
use app\Request;
|
||||||
|
use think\Validate;
|
||||||
|
use think\exception\ValidateException;
|
||||||
|
use think\facade\Filesystem;
|
||||||
|
use app\common\arw\adjfut\src\Excel;
|
||||||
|
use app\common\arw\adjfut\src\UploadFile;
|
||||||
|
use think\facade\Db;
|
||||||
|
use app\common\exception\Tool;
|
||||||
|
use think\facade\Env;
|
||||||
|
|
||||||
|
|
||||||
|
class EnrolIntro extends BaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 获取招生简介列表
|
||||||
|
*/
|
||||||
|
public function getEnrolIntroList(Request $request): array
|
||||||
|
{
|
||||||
|
$params = $request->param();
|
||||||
|
$con = [];
|
||||||
|
|
||||||
|
$query = ModelEnrolIntro::where($con)
|
||||||
|
->field([
|
||||||
|
'enrol_intro_id',
|
||||||
|
'enrol_intro_title',
|
||||||
|
'enrol_intro_sort',
|
||||||
|
])
|
||||||
|
->order('enrol_intro_sort', 'asc');
|
||||||
|
|
||||||
|
return msg("获取招生简介列表成功!", $query);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取招生简介详情
|
||||||
|
*/
|
||||||
|
public function getEnrolIntroInfo(Request $request): array
|
||||||
|
{
|
||||||
|
$params = $request->param();
|
||||||
|
|
||||||
|
$this->validate($params, ['enrol_intro_id' => 'require']);
|
||||||
|
|
||||||
|
$find = ModelEnrolIntro::field([
|
||||||
|
'enrol_intro_id',
|
||||||
|
'enrol_intro_title',
|
||||||
|
'enrol_intro_content',
|
||||||
|
'enrol_intro_sort',
|
||||||
|
])
|
||||||
|
->where('enrol_intro_id', $params['enrol_intro_id'])
|
||||||
|
->find();
|
||||||
|
|
||||||
|
return msg(0, '获取招生简介详情成功!', ['data' => $find]);
|
||||||
|
}
|
||||||
|
}
|
46
app/api/controller/Enrol/EnterSchoolProcess.php
Normal file
46
app/api/controller/Enrol/EnterSchoolProcess.php
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\api\controller\Enrol;
|
||||||
|
|
||||||
|
use app\BaseController;
|
||||||
|
use app\common\model\Enrol\EnterSchoolProcess as ModelEnterSchoolProcess;
|
||||||
|
use app\Request;
|
||||||
|
use think\Validate;
|
||||||
|
use think\exception\ValidateException;
|
||||||
|
use think\facade\Filesystem;
|
||||||
|
use app\common\arw\adjfut\src\Excel;
|
||||||
|
use app\common\arw\adjfut\src\UploadFile;
|
||||||
|
use think\facade\Db;
|
||||||
|
use app\common\exception\Tool;
|
||||||
|
use think\facade\Env;
|
||||||
|
|
||||||
|
|
||||||
|
class EnterSchoolProcess extends BaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 获取入学流程列表
|
||||||
|
*/
|
||||||
|
public function getEnterSchoolProcessList(Request $request): array
|
||||||
|
{
|
||||||
|
$params = $request->param();
|
||||||
|
$con = [];
|
||||||
|
|
||||||
|
$query = ModelEnterSchoolProcess::where($con)
|
||||||
|
->field([
|
||||||
|
'enter_school_process_id',
|
||||||
|
'enter_school_process_title',
|
||||||
|
'enter_school_process_intro',
|
||||||
|
'enter_school_process_sort'
|
||||||
|
])
|
||||||
|
->order('enter_school_process_sort', 'desc')
|
||||||
|
->select();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return msg(0, "获取入学流程列表成功!", [
|
||||||
|
'data' => $query,
|
||||||
|
'count' => count($query)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
47
app/api/controller/Enrol/SignUpProcess.php
Normal file
47
app/api/controller/Enrol/SignUpProcess.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\api\controller\Enrol;
|
||||||
|
|
||||||
|
use app\BaseController;
|
||||||
|
use app\common\model\Enrol\SignUpProcess as ModelSignUpProcess;
|
||||||
|
use app\Request;
|
||||||
|
use think\Validate;
|
||||||
|
use think\exception\ValidateException;
|
||||||
|
use think\facade\Filesystem;
|
||||||
|
use app\common\arw\adjfut\src\Excel;
|
||||||
|
use app\common\arw\adjfut\src\UploadFile;
|
||||||
|
use think\facade\Db;
|
||||||
|
use app\common\exception\Tool;
|
||||||
|
use think\facade\Env;
|
||||||
|
|
||||||
|
|
||||||
|
class SignUpProcess extends BaseController
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 获取报名流程列表
|
||||||
|
*/
|
||||||
|
public function getSignUpProcessList(Request $request): array
|
||||||
|
{
|
||||||
|
$params = $request->param();
|
||||||
|
$con = [];
|
||||||
|
|
||||||
|
$query = ModelSignUpProcess::where($con)
|
||||||
|
->field([
|
||||||
|
'sign_up_process_id',
|
||||||
|
'sign_up_process_title',
|
||||||
|
'sign_up_process_icon',
|
||||||
|
'sign_up_process_intro',
|
||||||
|
'sign_up_process_sort'
|
||||||
|
])
|
||||||
|
->order('sign_up_process_sort', 'desc')
|
||||||
|
->select();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return msg(0, "获取报名流程列表成功!", [
|
||||||
|
'data' => $query,
|
||||||
|
'count' => count($query)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -113,13 +113,14 @@ class Flow extends BaseModel
|
|||||||
// $res_url = explode('/',$url)[1];
|
// $res_url = explode('/',$url)[1];
|
||||||
$match_res_pool = [
|
$match_res_pool = [
|
||||||
'index'=>'首页',
|
'index'=>'首页',
|
||||||
'product'=>'产品页',
|
'about-intro'=>'关于我们-厚德简介',
|
||||||
'product-details-id'=>'产品详情页',
|
'about-env'=>'关于我们-教学环境',
|
||||||
'news'=>'新闻页',
|
'about-history'=>'关于我们-发展历程',
|
||||||
'news-details-id'=>'新闻详情页',
|
'teachers'=>'师资力量',
|
||||||
'serviceSupport'=>'服务支持页',
|
'teachers-details-id'=>'师资力量-详情页',
|
||||||
'contactUs'=>'联系我们页',
|
'achievement-school_achievement'=>'荣誉成绩-录取院校',
|
||||||
'aboutUs'=>'关于我们页'
|
'achievement-joint_achievement-page'=>'荣誉成绩-联考成绩',
|
||||||
|
'achievement-joint_achievement-details-id'=>'荣誉成绩-联考成绩-详情页',
|
||||||
];
|
];
|
||||||
if(!isset($match_res_pool[$url])){
|
if(!isset($match_res_pool[$url])){
|
||||||
return '未知页面';
|
return '未知页面';
|
||||||
|
@ -29,11 +29,15 @@ class {$className} extends BaseController
|
|||||||
|
|
||||||
$query = Model{$className}::where($con)
|
$query = Model{$className}::where($con)
|
||||||
->field({$queryFields})
|
->field({$queryFields})
|
||||||
->order({$orderField}, {$orderMode});
|
->order({$orderField}, {$orderMode})
|
||||||
|
->select();
|
||||||
|
|
||||||
{$imgUrlPrefixPadding}
|
{$imgUrlPrefixPadding}
|
||||||
|
|
||||||
return msg("获取{$functionName}列表成功!",$query);
|
return msg(0, "获取{$functionName}列表成功!", [
|
||||||
|
'data' => $query,
|
||||||
|
'count' => count($query)
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user