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

授权

... ... @@ -17,6 +17,8 @@ class IndexController extends WeChatBaseController
{
//判断用户是否微信浏览器打开
$this->isWechat();
//判断是否手机端
$this->isMobile();
//微信授权
parent::_initialize();
$this->checkWeChatUserLogin();
... ...
... ... @@ -229,6 +229,15 @@ class WeChatBaseController extends BaseController
}
}
/**
* 用户是否微信打开
*/
public function isMobile(){
$result = cmf_is_Mobile();
if(empty($result)){
$this->error('请在手机端打开!','');
}
}
/**
* 阻止拉黑用户
*/
public function ban(){
... ...