...
|
...
|
@@ -80,13 +80,12 @@ class UserSize extends Model |
|
|
// 该地址设为默认,其他地址就设为非默认
|
|
|
if($data['isdefault'] == '1'){
|
|
|
$this->where('user_id',$this['user_id'])->update(['isdefault'=>'0']);
|
|
|
$data['isdefault'] = 1;
|
|
|
}
|
|
|
// 对象转json字符串
|
|
|
if(!empty($data['body_info']) && is_array($data['body_info'])){
|
|
|
$data['body_info'] = json_encode($data['body_info']);
|
|
|
}
|
|
|
return $this->allowField(true)->save($data);
|
|
|
return $this->allowField(true)->isUpdate(true)->save($data);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|