|
@@ -272,6 +272,18 @@ class User extends Api
|
|
|
$this->success();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public function set_cid()
|
|
|
+ {
|
|
|
+ $cid = input('cid','');
|
|
|
+ if(!empty($cid)){
|
|
|
+ Db::name('user')->where('cid',$cid)->update(['cid'=>'']);
|
|
|
+ Db::name('user')->where('id',$this->auth->id)->update(['cid'=>$cid]);
|
|
|
+ }
|
|
|
+
|
|
|
+ $this->success();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public function userInfo(){
|
|
|
$info = $this->auth->getUserinfo();
|