74 lines
2.1 KiB
PHP
74 lines
2.1 KiB
PHP
<?php
|
||
// +------------------------------------------------+
|
||
// |http://www.cjango.com |
|
||
// +------------------------------------------------+
|
||
// | 修复BUG不是一朝一夕的事情,等我喝醉了再说吧! |
|
||
// +------------------------------------------------+
|
||
// | Author: 小陈叔叔 <Jason.Chen> |
|
||
// +------------------------------------------------+
|
||
namespace app\mobile\controller;
|
||
|
||
use app\common\model\Member as MemberModel;
|
||
|
||
class Center extends _Init
|
||
{
|
||
|
||
public function _initialize()
|
||
{
|
||
parent::_initialize();
|
||
$this->user = MemberModel::find(UID);
|
||
$this->nav = 5;
|
||
}
|
||
|
||
public function index()
|
||
{
|
||
return $this->fetch();
|
||
}
|
||
|
||
/**
|
||
* 操作成功跳转的快捷方法
|
||
* @access protected
|
||
* @param mixed $msg 提示信息
|
||
* @param string $url 跳转的URL地址
|
||
* @param mixed $data 返回的数据
|
||
* @param integer $wait 跳转等待时间
|
||
* @param array $header 发送的Header信息
|
||
* @return void
|
||
*/
|
||
protected function success($msg = '', $url = null, $data = '', $wait = 3, array $header = [])
|
||
{
|
||
$msg = $msg ?: '操作成功';
|
||
return parent::success($msg, $url, $data, $wait, $header);
|
||
}
|
||
|
||
/**
|
||
* 操作错误跳转的快捷方法
|
||
* @access protected
|
||
* @param mixed $msg 提示信息
|
||
* @param string $url 跳转的URL地址
|
||
* @param mixed $data 返回的数据
|
||
* @param integer $wait 跳转等待时间
|
||
* @param array $header 发送的Header信息
|
||
* @return void
|
||
*/
|
||
protected function error($msg = '', $url = null, $data = '', $wait = 3, array $header = [])
|
||
{
|
||
$msg = $msg ?: '未知错误';
|
||
return parent::error($msg, $url, $data, $wait, $header);
|
||
}
|
||
|
||
protected function back($result)
|
||
{
|
||
if ($result === true) {
|
||
return $this->success();
|
||
} else {
|
||
return $this->error($result);
|
||
}
|
||
}
|
||
|
||
public function tishi()
|
||
{
|
||
return $this->fetch('');
|
||
}
|
||
}
|