ADD:添加后台文章、通知等管理端接口;

FIX:修正若干已知错误;
This commit is contained in:
2025-07-13 19:40:10 +08:00
parent 270b881437
commit 7244023619
15 changed files with 1616 additions and 503 deletions
@@ -44,7 +44,7 @@ class IndexController extends Common
public function actionAdsSplash()
{
$ads = [
// "http://public.hiluker.com/ctms/client/app-kp/kp01.jpg",
"http://public.hiluker.com/ctms/client/app-kp/kp01.jpg",
"http://public.hiluker.com/ctms/client/app-kp/kp03.jpg",
];
$this->result('开屏广告!', $ads, 200);
@@ -55,7 +55,7 @@ class IndexController extends Common
$ads = [
'0'=>[
"image"=>'http://public.hiluker.com/ctms/client/app-banner/banner01.jpg',
"link"=>'/pages/uni-starter/ucenter/ucenter'
"link"=>'/pages/ctms/news/list/list'
],
'1'=>[
"image"=>'http://public.hiluker.com/ctms/client/app-banner/banner03.jpg',
@@ -96,18 +96,18 @@ class IndexController extends Common
$_where[]=['=','is_turnover',0]; //排除交车单
$_where[] = ['between','sign_date',$start,$end];
$data = $model->find()->where($_where);
$order_today_count = $data->count();
$order_today_count = (int)$data->count();
//今日交车
$_where = $where;
$_where[]=['=','is_turnover',1]; //交车单
$_where[] = ['between','sign_date',$start,$end];
$data = $model->find()->where($_where);
$jiaoche_today_count = $data->count();
$jiaoche_today_count = (int)$data->count();
//今日录单
$_where = $where;
$_where[] = ['between','create_at',$start,$end];
$data = $model->find()->where($_where);
$order_today_create = $data->count();
$order_today_create = (int)$data->count();
//昨日
$_end = $start;
@@ -118,18 +118,18 @@ class IndexController extends Common
$_where[]=['=','is_turnover',0]; //排除交车单
$_where[] = ['between','sign_date',$_start,$_end];
$data = $model->find()->where($_where);
$order_yesterday_count = $data->count();
$order_yesterday_count = (int)$data->count();
//昨日交车
$_where = $where;
$_where[]=['=','is_turnover',1]; //交车单
$_where[] = ['between','sign_date',$_start,$_end];
$data = $model->find()->where($_where);
$jiaoche_yesterday_count = $data->count();
$jiaoche_yesterday_count = (int)$data->count();
//昨日录单
$_where = $where;
$_where[] = ['between','create_at',$_start,$_end];
$data = $model->find()->where($_where);
$order_yesterday_create = $data->count();
$order_yesterday_create = (int)$data->count();
//本月起始时间点
$_start = date('Y-m-01 00:00:00');
@@ -142,38 +142,40 @@ class IndexController extends Common
$_where[]=['=','is_turnover',0]; //排除交车单
$_where[] = ['between','sign_date',$_start,$_end];
$data = $model->find()->where($_where);
$order_month_count = $data->count();
$order_month_count = (int)$data->count();
//本月交车
$_where = $where;
$_where[]=['=','is_turnover',1];
$_where[] = ['between','sign_date',$_start,$_end];
$data = $model->find()->where($_where);
$jiaoche_month_count = $data->count();
$jiaoche_month_count = (int)$data->count();
//累计运单
$_where = $where;
$_where[]=['=','is_turnover',0]; //排除交车单
$data = $model->find()->where($_where);
$order_all_count = $data->count();
$order_all_count = (int)$data->count();
//累计交车
$_where = $where;
$_where[]=['=','is_turnover',1];
$data = $model->find()->where($_where);
$jiaoche_all_count = $data->count();
$jiaoche_all_count = (int)$data->count();
$return = [];
$return['code'] = 200;
$return['msg'] = '首页数据下载!';
$return['data']= [
'orderToday'=>$order_today_count,
'orderYesterday'=>$order_yesterday_count,
'orderMonth'=>$order_month_count,
'orderTotal'=>$order_all_count,
'jiaocheToday'=>$jiaoche_today_count,
'jiaocheYesterday'=>$jiaoche_yesterday_count,
'jiaocheMonth'=>$jiaoche_month_count,
'jiaocheTotal'=>$jiaoche_all_count,
'notice'=>0
'orderToday'=>$order_today_count,
'orderTodayCreate'=>$order_today_create,
'orderYesterday'=>$order_yesterday_count,
'orderYesterdayCreate'=>$order_yesterday_create,
'orderMonth'=>$order_month_count,
'orderTotal'=>$order_all_count,
'jiaocheToday'=>$jiaoche_today_count,
'jiaocheYesterday'=>$jiaoche_yesterday_count,
'jiaocheMonth'=>$jiaoche_month_count,
'jiaocheTotal'=>$jiaoche_all_count,
'notice'=>0
];
exit(json_encode($return, JSON_UNESCAPED_UNICODE | JSON_FORCE_OBJECT));
}