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']) {