作者 郭鑫
1 个管道 的构建 通过 耗费 1 秒

位置

... ... @@ -22,15 +22,15 @@ class CommentController extends HomeBaseController
public function _initialize()
{
parent::_initialize(); // TODO: Change the autogenerated stub
Session::set('uid','3');
// $wx = new WxloginController();
// $where_member['id'] = Session::get('uid');
// $member = Db::name('Member')->where($where_member)->find();
// if($member['status'] == 8){
// $this->apiResponse('0','您已被拉黑');
// }else if(empty($member['name'])){
// $this->apiResponse('0','请先实名认证',url('Index/index'));
// }
$wx = new WxloginController();
$where_member['id'] = Session::get('uid');
$member = Db::name('Member')->where($where_member)->find();
if($member['status'] == 8){
$this->apiResponse('0','您已被拉黑');
}else if(empty($member['name'])){
$this->apiResponse('0','请先实名认证',url('Index/index'));
}
}
... ...
... ... @@ -25,6 +25,12 @@ class IndexController extends CommentController
public function index()
{
// 判断是否是首次进入
$acctoken = $this->getAccessToken();
$url = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=".$acctoken."&next_openid=";
$isFollowContent = file_get_contents($url);
$json = json_decode($isFollowContent);
$where_member['id'] = Session::get('uid');
$member = Db::name('Member')->where($where_member)->field('name,tel,card_num')->find();
if(empty($member['name']) || empty($member['tel']) || empty($member['card_num'])){
... ...