作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

1

... ... @@ -515,8 +515,8 @@ class User extends Api
public function sizeEdit()
{
$post = $this->request->post();
$this->success(json_encode($post));
$model = UserSize::detail($this->user['id'], $post['user_size_id']);
$this->success(json_encode($model->edit($post)));
if(empty($model)){
$this->error(__('尺寸信息不存在'));
}
... ...
... ... @@ -89,6 +89,7 @@ class UserSize extends Model
if(!$this->get(['user_id'=>$this['user_id'],'isdefault'=>'1'])){
$data['isdefault'] = '1';
}
return $data;
return $this->allowField(true)->save($data);
}
... ...