BoardController.php
1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
namespace app\ht\modules\home\controllers;
use yii\helpers\Url;
use app\ht\controllers\BaseController;
use common\exts\Invoice\baiwang\InvoiceApi;
use common\helpers\Distance;
use common\models\BindDeviceApply as BindDeviceApplyModel;
use common\models\Engineer as EngineerModel;
use common\models\EngineerSkills as EngineerSkillsModel;
use common\models\NoticeInfo as NoticeInfoModel;
use common\models\RepairOrder as RepairOrderModel;
use common\models\RepairOrderAppeal as RepairOrderAppealModel;
use domain\finance\models\Invoice as InvoiceModel;
use domain\engineer\EngineerStatus;
use domain\trade\RepairOrderStatus;
use domain\finance\EngineerWithdrawRepository;
use stdClass;
use function time;
use function strtotime;
use function date;
use function intval;
use function explode;
/**
* 管理->帐号管理
*/
class BoardController extends BaseController
{
/**
* 帐号管理显示页面
*/
public function actionIndex()
{
$params = array();
return $this->render("index", $params);
}
// 判断时间
protected function getTime($t, $curT)
{
$timeDistance = $curT - $t;
if ($timeDistance < 60) {
$str = '刚刚';
} elseif ($timeDistance >= 60 && $timeDistance < 3600) {
$str = intval($timeDistance / 60) . '分钟前';
} elseif ($timeDistance >= 3600 && $timeDistance < 3600 * 24) {
$str = intval($timeDistance /(60 * 60)) . '小时前';
} else {
$str = intval($timeDistance /(60 * 60 * 24)) . '天前';
}
return $str;
}
// 组装日期列表
private function genDate($start)
{
$dataArr = array();
$days = 7;
for ($i = 0; $i < $days; $i++) {
$dataArr[date('Y-m-d', $start)] = array();
$start = $start + (3600 * 24);
}
return $dataArr;
}
}