Sfoglia il codice sorgente

调整第三方解绑方法

sunxbiao 1 anno fa
parent
commit
bdf4a3c1cb
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      app/controller/api/user/User.php

+ 6 - 0
app/controller/api/user/User.php

@@ -2655,6 +2655,12 @@ class User extends BaseController
2655 2655
                 $check = Db::name('user_extract_openid')->where('uid',$uid)->value('openid');
2656 2656
                 if (!empty($check) && $check != $openid){
2657 2657
                     throw new \Exception("您已绑定其他微信号");
2658
+                } else {
2659
+                    Db::name("user_extract_openid")->insert([
2660
+                        'uid' => $uid,
2661
+                        'openid' => $openid,
2662
+                        'type' => $type
2663
+                    ]);
2658 2664
                 }
2659 2665
             } else {
2660 2666
                 $alinfo = json_decode($alinfo, true);