...
|
...
|
@@ -88,6 +88,7 @@ class UserAddress extends Model |
|
|
// 该地址设为默认,其他地址就设为非默认
|
|
|
if($data['isdefault'] == '1'){
|
|
|
self::where('user_id',$this['user_id'])->update(['isdefault'=>'0']);
|
|
|
$data['isdefault'] = 1;
|
|
|
}
|
|
|
return $this->allowField(true)
|
|
|
->save(array_merge(compact('province_id', 'city_id', 'district_id'), $data));
|
...
|
...
|
|