34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
||
// +------------------------------------------------+
|
||
// |http://www.cjango.com |
|
||
// +------------------------------------------------+
|
||
// | 修复BUG不是一朝一夕的事情,等我喝醉了再说吧! |
|
||
// +------------------------------------------------+
|
||
// | Author: 小陈叔叔 <Jason.Chen> |
|
||
// +------------------------------------------------+
|
||
namespace app\mobile\controller;
|
||
|
||
use app\common\model\Article as ArticleModel;
|
||
use app\common\service\Wechat as WechatService;
|
||
use tools\Initialize;
|
||
|
||
class Test extends Initialize
|
||
{
|
||
|
||
public function index()
|
||
{
|
||
$contents = ArticleModel::where(['create_time' => ['lt', 1525104000]])->select();
|
||
foreach ($contents as $key => $content) {
|
||
$create_time = 1525104000 + strtotime(date('d H:i:s', strtotime($content['create_time'])));
|
||
$content->save(['create_time' => $create_time, 'update_time' => $create_time]);
|
||
}
|
||
return $this->fetch();
|
||
}
|
||
|
||
public function test()
|
||
{
|
||
dump(WechatService::instance());
|
||
|
||
}
|
||
}
|