1
This commit is contained in:
parent
a4ecac7c8e
commit
5e9b69dc0f
@ -171,10 +171,21 @@ class User extends Controller
|
||||
return $this->renderSuccess($data, '成功');
|
||||
}
|
||||
|
||||
|
||||
public function is_write()
|
||||
{
|
||||
$get = $this->request->get();
|
||||
$user = Db::name('user_wx')->where(['wx_openid' => $get['openid']])->value('is_role');
|
||||
$write_status = empty($user) || $user == 0 ? 0 : 1;
|
||||
return $this->renderSuccess($write_status, '成功');
|
||||
}
|
||||
|
||||
|
||||
public function wxCode()
|
||||
{
|
||||
$coupon_id = $this->request->get('id');
|
||||
$appid = 'wx89c12dd426a55a2e';
|
||||
$redirect_uri = 'https://app.cxhxy.dev.1nww.com/#/pages/details/detail';
|
||||
$redirect_uri = 'https://app.cxhxy.dev.1nww.com/#/pages/details/detail?coupon=' . $coupon_id;
|
||||
$url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=$appid&redirect_uri={$redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
|
||||
return $this->renderSuccess($url, '成功');
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user