|
|
@ -322,11 +322,65 @@ class User extends BaseController |
|
|
|
|
|
|
|
|
|
|
|
public function account() |
|
|
|
public function account() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
$user = $this->user; |
|
|
|
$user = $this->user; |
|
|
|
if (!$user->phone) return app('json')->fail('请绑定手机号'); |
|
|
|
if (!$user->phone) return app('json')->fail('请绑定手机号'); |
|
|
|
|
|
|
|
|
|
|
|
return app('json')->success($this->repository->selfUserList($user->phone)); |
|
|
|
return app('json')->success($this->repository->selfUserList($user->phone)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getCheck() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$user = $this->user; |
|
|
|
|
|
|
|
$data['card'] = $user->card ?? ''; |
|
|
|
|
|
|
|
$data['age'] = $user->age ?? ''; |
|
|
|
|
|
|
|
$data['spread_uid'] = $user->spread_uid ?? ''; |
|
|
|
|
|
|
|
$data['real_name'] = $user->real_name ?? ''; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$b = ''; |
|
|
|
|
|
|
|
if(!empty($data['spread_uid'])){ |
|
|
|
|
|
|
|
$a = userModel::getDB()->where('uid',$data['spread_uid'])->find(); |
|
|
|
|
|
|
|
$b = $a->phone; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$data['spread_phone'] = $b ?? ''; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return app('json')->success($data); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function update() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$age = $this->request->param('age') ?? ''; |
|
|
|
|
|
|
|
$card = $this->request->param('card') ?? ''; |
|
|
|
|
|
|
|
$spread_phone = $this->request->param('spread_phone') ?? ''; |
|
|
|
|
|
|
|
$real_name = $this->request->param('real_name') ?? ''; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$user = userModel::getDB()->where('uid',$this->user->uid)->find(); |
|
|
|
|
|
|
|
if(!empty($age)){ |
|
|
|
|
|
|
|
$user->age = $age; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!empty($card)){ |
|
|
|
|
|
|
|
$user->card = $card; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!empty($real_name)){ |
|
|
|
|
|
|
|
$user->real_name = $real_name; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!empty($spread_phone)){ |
|
|
|
|
|
|
|
$a = userModel::getDB()->where('phone',$spread_phone)->find(); |
|
|
|
|
|
|
|
if(!$a){ |
|
|
|
|
|
|
|
return app('json')->fail('查无此推荐人'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$user->spread_uid = $a->uid; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$user->save(); |
|
|
|
|
|
|
|
return app('json')->success('更新成功'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//wmc |
|
|
|
//wmc |
|
|
|
//分享视频/推文增加品宣积分 |
|
|
|
//分享视频/推文增加品宣积分 |
|
|
|
public function brand() |
|
|
|
public function brand() |
|
|
|