From 5205beca8b1ac111c595d98de89454f49c576725 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Wed, 13 Sep 2023 19:40:09 +0800 Subject: [PATCH] =?UTF-8?q?add:=E5=95=86=E6=88=B7=E5=90=88=E5=90=8C?= =?UTF-8?q?=E5=8F=91=E8=B5=B7=E7=AD=BE=E7=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/HetongController.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/api/controller/HetongController.php b/app/api/controller/HetongController.php index 074322b5a..e44cdef5f 100644 --- a/app/api/controller/HetongController.php +++ b/app/api/controller/HetongController.php @@ -27,10 +27,21 @@ class HetongController extends BaseApiController { $id = Request()->get('id'); $type = Request()->get('type'); + $params = Request()->param(); $msg='合同不存在'; if(empty($type)){ $msg='参数错误'; } + if (isset($params['t']) && $params['t'] == 1) { + $find = Db::name('shop_contract')->where('id', $id)->find(); + dd($find); + if ($find && $find['url']) { + $url = json_decode($find['url'], true); + if(isset($url[$type])){ + return redirect($url[$type]); + } + } + } if ($id && $type) { $find = Db::name('contract')->where('id', $id)->find(); if ($find && $find['url']) {