|
@@ -1237,4 +1237,22 @@ class User extends Api
|
|
|
}
|
|
|
$this->success(__('success'),$info);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 微信解绑
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function clearopenid()
|
|
|
+ {
|
|
|
+ try {
|
|
|
+ $userId = $this->auth->id;
|
|
|
+ $where['id'] = $userId;
|
|
|
+ $data['openid'] = '';
|
|
|
+ $user = model('User')->update($data,$where);
|
|
|
+
|
|
|
+ $this->success('解绑成功');
|
|
|
+ } catch (Exception $e) {
|
|
|
+ $this->error($e->getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|