js支付
This commit is contained in:
@@ -17,7 +17,7 @@ class Wechat extends Controller
|
|||||||
* @param string $code 微信回调带来的code
|
* @param string $code 微信回调带来的code
|
||||||
* @return string|bool 成功返回openid,失败返回false
|
* @return string|bool 成功返回openid,失败返回false
|
||||||
*/
|
*/
|
||||||
private function exchangeCodeForOpenId()
|
private function exchangeOpenId()
|
||||||
{
|
{
|
||||||
$code = input('code', 0);
|
$code = input('code', 0);
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ class Wechat extends Controller
|
|||||||
{
|
{
|
||||||
$user_code = input('user_code', 0);
|
$user_code = input('user_code', 0);
|
||||||
$user_info = db::name('user')
|
$user_info = db::name('user')
|
||||||
->field('id user_id,nickname,avatar,mobile')
|
->field('id user_id,nickname,avatar,mobile,user_code')
|
||||||
->where(['user_code' => $user_code,'status' => ['<>',0]])->find();
|
->where(['user_code' => $user_code,'status' => ['<>',0]])->find();
|
||||||
if(!$user_info){
|
if(!$user_info){
|
||||||
return ['code' => 0, 'msg' => '用户不存在或已注销', 'data' => null];
|
return ['code' => 0, 'msg' => '用户不存在或已注销', 'data' => null];
|
||||||
|
|||||||
Reference in New Issue
Block a user