| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\modules\admin\controllers;
- use app\models\District;
- use app\modules\admin\models\CountrysideForm;
- /**
- * @file CountrysideController
- * @editor Created by vscode
- * @author WPing丶
- * @date 2023/06/25
- * @time 11:41:41
- *
- * 备注:村镇管理
- */
- class CountrysideController extends BaseController
- {
-
- /**
- * 模块名:actionGetCountryside
- * 代码描述:获取乡镇列表
- * 作者:WPing丶
- * 请求方式:GET
- * 创建时间:2023/06/25 11:45:34
- * @param int id
- * @param string str
- * @param bool bool
- */
- public function actionGetCountryside()
- {
- $param = get_params();
- $form = new CountrysideForm();
- $form->scenario = $form::SCENARIO_LIST;
- $form->attributes = $param;
- return $this->asJson($form->searchDistrict());
- }
- public function actionSaveCountryside()
- {
- $param = post_params();
- $form = new CountrysideForm();
- $form->attributes = $param;
- $res = $form->saveCountryside();
- return $this->asJson($res);
- }
- /**
- * 模块名:actionDelCountryside
- * 代码描述:删除村镇
- * 作者:WPing丶
- * 请求方式:GET
- * 创建时间:2023/06/25 19:59:22
- * @param int id
- * @param string str
- * @param bool bool
- */
- public function actionDelCountryside()
- {
- //主键id用key标识并进行获取
- $param = get_params('key');
- $form = new CountrysideForm();
- $form->scenario = $form::SCENARIO_DEL;
- $form->id = $param;
- $res = $form->delCountryside();
- return $this->asJson($res);
- }
- }
|