qxhans(); $this->assign('allpower',$allpower); if (!request()->isPost()) { $incData = IncInfoModel::get(1); $this->assign('IncData', $incData); $this->setAdminCurItem('index'); return $this->fetch(); } else { $update_array = array(); $update_array['inc_name'] = $_POST['inc_name']; $update_array['inc_phone'] = $_POST['inc_phone']; $update_array['inc_email'] = $_POST['inc_email']; $update_array['inc_weixin'] = $_POST['inc_weixin']; $update_array['inc_qq'] = $_POST['inc_qq']; $update_array['inc_address'] = $_POST['inc_address']; //获取地址经纬度 $map = Map::getLngLat($_POST['inc_address']); $update_array['inc_location'] = json_encode($map['location']); $imgurl = USER_SITE_ROOT . '/images/'; $file = request()->file('inc_logo'); if($file){ $imgname = "logo";//官网logo $file = $file->setSaveName($imgname);//设置保存文件名 $imgo = $file->move($imgurl, $savename = false, $replace = true); if($imgo){ $update_array['inc_logo'] = $imgname.'.png'; } } $result = IncInfoModel::updateIncInfo($update_array); if ($result === true) { $this->log(lang('ds_edit') . lang('dis_dump'), 1); $this->success('修改成功', 'Information/index'); } else { $this->log(lang('ds_edit') . lang('dis_dump'), 0); $this->error(lang('修改失败')); } } } }