正在显示
2 个修改的文件
包含
2 行增加
和
11 行删除
@@ -89,14 +89,7 @@ class UserAddress extends Model | @@ -89,14 +89,7 @@ class UserAddress extends Model | ||
89 | if($data['isdefault'] == '1'){ | 89 | if($data['isdefault'] == '1'){ |
90 | self::where('user_id',$this['user_id'])->update(['isdefault'=>'0']); | 90 | self::where('user_id',$this['user_id'])->update(['isdefault'=>'0']); |
91 | } | 91 | } |
92 | - $isdefault = $data['isdefault']; | ||
93 | - return $this->allowField(true) | ||
94 | - ->save(array_merge(compact( | ||
95 | - 'province_id', | ||
96 | - 'city_id', | ||
97 | - 'district_id', | ||
98 | - 'isdefault' | ||
99 | - ), $data)); | 92 | + return $this->save(array_merge(compact('province_id', 'city_id', 'district_id'), $data)); |
100 | } | 93 | } |
101 | 94 | ||
102 | /** | 95 | /** |
@@ -85,9 +85,7 @@ class UserSize extends Model | @@ -85,9 +85,7 @@ class UserSize extends Model | ||
85 | if(!empty($data['body_info']) && is_array($data['body_info'])){ | 85 | if(!empty($data['body_info']) && is_array($data['body_info'])){ |
86 | $data['body_info'] = json_encode($data['body_info']); | 86 | $data['body_info'] = json_encode($data['body_info']); |
87 | } | 87 | } |
88 | - return $this->allowField(true)->save(array_merge([ | ||
89 | - 'isdefault' => $data['isdefault'] | ||
90 | - ],$data)); | 88 | + return $this->save($data); |
91 | } | 89 | } |
92 | 90 | ||
93 | /** | 91 | /** |
-
请 注册 或 登录 后发表评论