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

授权

... ... @@ -24,7 +24,8 @@ class IndexController extends WeChatBaseController
$this->ban();
}
public function index(){
$this->success('咳咳','');
$result = cmf_is_mobile();
$this->success($result,'');
}
}
\ No newline at end of file
... ...
... ... @@ -241,5 +241,20 @@ class WeChatBaseController extends BaseController
$this->error('兄嘚,你被拉黑啦!','');
}
}
/**
* 判断是否注册手机号
*/
public function isRegister(){
$user_id = cmf_get_current_user_id();
if (empty($user_id)) {
$this->error("用户尚未登录", url("index/index/index"));
}
$user = Db::name('user')->where('id',$user_id)->find();
if(empty($user['mobile'])){
$arr['code'] = 40000;
$arr['msg'] = "用户尚未注册手机号!";
return $arr;
}
}
}
\ No newline at end of file
... ...