|
@@ -58,7 +58,13 @@ class Good extends Base
|
|
|
if(request()->isPost()){
|
|
|
$data = input('post.');
|
|
|
if(empty($data['tags_id'])){//解决复选框值为空的时候
|
|
|
- return 3;
|
|
|
+ $data['tags_id']='';//将rules字段的值设置为空
|
|
|
+ $data['create_time'] = time();
|
|
|
+ if($user->where('id',$id)->update($data)){
|
|
|
+ return 1;
|
|
|
+ }else{
|
|
|
+ return 2;
|
|
|
+ }
|
|
|
}
|
|
|
$data['tags_id']=implode(',',$data['tags_id']);
|
|
|
if($user->where('id',$id)->update($data)){
|