Initial commit,修正
This commit is contained in:
+39
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
# @Author: 嗨噜客(三亚) <fm453>
|
||||
# @Date: 2022-05-22T07:30:47+08:00
|
||||
# @Email: fm453@lukegzs.com
|
||||
# @Last modified by: fm453
|
||||
# @Last modified time: 2022-05-22T07:30:47+08:00
|
||||
# @Copyright: www.hiluker.cn
|
||||
|
||||
namespace backend\controllers;
|
||||
|
||||
use Yii;
|
||||
use yii\data\Pagination;
|
||||
use yii\helpers\Url;
|
||||
|
||||
// use backend\models\Citys;
|
||||
|
||||
class CityController extends Common
|
||||
{
|
||||
//主界面
|
||||
public function actionIndex()
|
||||
{
|
||||
return $this->render('../layouts/dev', []);
|
||||
}
|
||||
|
||||
public function actionSelect()
|
||||
{
|
||||
$citys = Yii::$app->params['citys'];
|
||||
$pager = new Pagination(['totalCount' =>count($citys), 'pageSize' => '100']);
|
||||
$callback = isset($_GET['callback']) ? $_GET['callback'] : 'city';
|
||||
$search=[];
|
||||
return $this->render('select', [
|
||||
'citys'=>$citys,
|
||||
'pager' => $pager,
|
||||
'search'=>$search,
|
||||
'callback'=>$callback
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user