作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

我的托管

... ... @@ -31,9 +31,9 @@ class FormController extends WeChatBaseController
function _initialize()
{
//判断用户是否微信浏览器打开
//$this->isWechat();
$this->isWechat();
//判断是否手机端
//$this->isMobile();
$this->isMobile();
//微信授权
parent::_initialize();
$this->checkWeChatUserLogin();
... ...
... ... @@ -25,14 +25,14 @@ class MeTrusteeshipController extends WeChatBaseController
function _initialize()
{
//判断用户是否微信浏览器打开
//$this->isWechat();
$this->isWechat();
//判断是否手机端
//$this->isMobile();
$this->isMobile();
//微信授权
parent::_initialize();
$this->checkWeChatUserLogin();
//阻止拉黑用户
//$this->ban();
$this->ban();
}
//进入我的托管页面
public function index(){
... ...
... ... @@ -203,8 +203,8 @@ class WeChatBaseController extends BaseController
*/
public function checkWeChatUserLogin()
{
$user=Db::name('user')->where('id',2)->find();
cmf_update_current_user($user);
// $user=Db::name('user')->where('id',2)->find();
// cmf_update_current_user($user);
$userId = cmf_get_current_user_id();
if (empty($userId)) {
$config = [
... ...