diff --git a/app/api/logic/LocalStoreLogic.php b/app/api/logic/LocalStoreLogic.php index ebc31ce1..4e0b09c8 100644 --- a/app/api/logic/LocalStoreLogic.php +++ b/app/api/logic/LocalStoreLogic.php @@ -557,5 +557,19 @@ class LocalStoreLogic extends Logic public static function unbindUser($post) { + if ($post['id'] <=0 ) { + throw new \Exception('缺少ID'); + } + + $result = LocalStoreBind::where('id', $post['id'])->update([ + 'is_unbind' => 1, + 'unbind_time' => time() + ]); + + if ($result) { + return true; + } + + throw new \Exception('解绑失败'); } } \ No newline at end of file