data($result); } /** * @notes 全局配置 * @return Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/9/21 19:41 */ public function config() { $result = IndexLogic::getConfigData(); return $this->data($result); } /** * @notes 政策协议 * @return Json * @author 段誉 * @date 2022/9/20 20:00 */ public function policy() { $type = $this->request->get('type/s', ''); $result = IndexLogic::getPolicyByType($type); return $this->data($result); } /** * @notes 装修信息 * @return Json * @author 段誉 * @date 2022/9/21 18:37 */ public function decorate() { $id = $this->request->get('id/d'); $result = IndexLogic::getDecorate($id); return $this->data($result); } public function notifyUrl(){ $a= Request()->get(); if($a){ $find=Db::name('contract')->where('id',$a['id'])->find(); if($find){ if($find['signing_timer']==0){ Db::name('contract')->where('id',$a['id'])->update(['signing_timer'=>1]); return true; }else if($find['signing_timer']==1){ Db::name('contract')->where('id',$a['id'])->update(['status'=>1,'signing_timer'=>2]); if($find['type']==1){ Db::name('company')->where('id',$find['party_a'])->update(['status'=>1,'is_contract'=>1]); Db::name('company')->where('id',$find['party_b'])->update(['status'=>1,'is_contract'=>1]); }else{ Db::name('company')->where('id',$find['party_a'])->update(['status'=>1,'is_contract'=>1]); Db::name('user')->where('id',$find['party_b'])->update(['is_contract'=>1]); } } curl_post('http://logistics.lihaink.cn/api/updateRentRecord',[],['contract_id'=>$a['id']]); } } return json(['success'=>true,'msg'=>'成功']); } }