function getoneuser() { $openid = trim(IReq::get('openid')); $wx_s = new wx_s(); if ($wx_s->showuserinfo($openid)) { $this->success($wx_s->getone()); } else { $info = $wx_s->err(); $this->message($info); } }
public function getoneuser() { $this->checkshoplogin(); $shopid = ICookie::get('adminshopid'); if ($shopid <= 0) { $this->message('获取失败'); } $openid = trim(IReq::get('openid')); $wechat = $this->mysql->select_one("select * from " . Mysite::$app->config['tablepre'] . "shop_wechat where shopid={$shopid}"); if (empty($wechat)) { $this->message('未设置微信基本信息'); } $wx_s = new wx_s($wechat['token'], $wechat['appid'], $wechat['secret'], $shopid); if ($wx_s->showuserinfo($openid)) { $this->success($wx_s->getone()); } else { $info = $wx_s->err(); $this->message($info); } }