|
@@ -42,23 +42,35 @@ class UserTempForms extends Form implements LazyRenderable
|
|
]);
|
|
]);
|
|
|
|
|
|
if($status == 1){
|
|
if($status == 1){
|
|
|
|
+ $data = WxUserTemp::where('id',$id)->first();
|
|
|
|
|
|
if(!empty($data['buchong'])){
|
|
if(!empty($data['buchong'])){
|
|
$condition = Conditions::where('user_id',$data['user_id'])->update([
|
|
$condition = Conditions::where('user_id',$data['user_id'])->update([
|
|
'content'=>$data['buchong']
|
|
'content'=>$data['buchong']
|
|
]);
|
|
]);
|
|
- }else{
|
|
|
|
- $data = WxUserTemp::where('id',$id)->first();
|
|
|
|
- $user = (new WxUser())->find($data['user_id']);
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $user = (new WxUser())->find($data['user_id']);
|
|
|
|
+ if(!empty($data['user_avatar'])){
|
|
$user->user_avatar = $data['user_avatar'];
|
|
$user->user_avatar = $data['user_avatar'];
|
|
|
|
+ }
|
|
|
|
+ if(!empty($data['user_name'])){
|
|
$user->user_name = $data['user_name'];
|
|
$user->user_name = $data['user_name'];
|
|
- $user->user_introduce = $data['user_introduce'] ? $data['user_introduce']:'';
|
|
|
|
|
|
+ }
|
|
|
|
+ if(!empty($data['user_introduce'])){
|
|
|
|
+ $user->user_introduce = $data['user_introduce'];
|
|
|
|
+ }
|
|
|
|
+ if(!empty($data['user_birthday'])){
|
|
$user->user_birthday = $data['user_birthday'];
|
|
$user->user_birthday = $data['user_birthday'];
|
|
|
|
+ }
|
|
|
|
+ if(!empty($data['user_background_maps'])){
|
|
$user->user_background_maps = $data['user_background_maps'];
|
|
$user->user_background_maps = $data['user_background_maps'];
|
|
- $user->save();
|
|
|
|
-
|
|
|
|
- Cache::forget('get:cached:user:'.$user->id);
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ $user->save();
|
|
|
|
+
|
|
|
|
+ Cache::forget('get:cached:user:'.$user->id);
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|