Cherry 2 years ago
parent
commit
b5acfd72cc

+ 0 - 3
addons/third/model/Third.php

@@ -3,21 +3,18 @@
 namespace addons\third\model;
 
 use think\Model;
-use traits\model\SoftDelete;
 
 /**
  * 第三方登录模型
  */
 class Third extends Model
 {
-    use SoftDelete;
 
     // 开启自动写入时间戳字段
     protected $autoWriteTimestamp = 'int';
     // 定义时间戳字段名
     protected $createTime = 'createtime';
     protected $updateTime = 'updatetime';
-    protected $deleteTime = 'deletetime';
 
     // 追加属性
     protected $append = [

+ 0 - 3
application/admin/model/Third.php

@@ -3,12 +3,10 @@
 namespace app\admin\model;
 
 use think\Model;
-use traits\model\SoftDelete;
 
 class Third extends Model
 {
 
-    use SoftDelete;
     // 表名
     protected $name = 'third';
 
@@ -18,7 +16,6 @@ class Third extends Model
     // 定义时间戳字段名
     protected $createTime = 'createtime';
     protected $updateTime = 'updatetime';
-    protected $deleteTime = 'deletetime';
 
     // 追加属性
     protected $append = [

+ 1 - 1
application/api/controller/Pondowner.php

@@ -189,7 +189,7 @@ class Pondowner extends Api
         Token::clear($user_id);
 
         // 解绑 第三方id
-        (new Third())->save(['deletetime' => time(),'openid'=>'','unionid'=>''], ['user_id' => $user_id]);
+        (new Third())->where(['user_id' => $user_id])->delete();
 
         $this->success('账号已注销成功');
     }