where($dis)->find(); if(empty($data)){ $dis['my_photo_cover'] = !empty($dis['my_photo_cover'])?$dis['my_photo_cover']:''; $dis['share_text'] = !empty($dis['share_text'])?$dis['share_text']:''; $this->insert($dis); } return $this->where($dis)->field($field)->find()->toArray(); } /** * @author chenniang * @DataTime: 2020-03-18 12:24 * @功能说明:配置编辑 */ public function settingUpdate($dis,$data){ $res = $this->where($dis)->update($data); return $res; } }