From 4ff12d600e754d0210fc5c9e6f23d648730b9de9 Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Wed, 19 Jul 2023 13:37:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=9A=E7=82=B9=E6=9C=AA?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/TestController.php | 19 ++++++++----------- app/Services/DoctorAuthService.php | 2 +- extend/Wechat/Wechat.php | 12 ++++++------ 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/app/Controller/TestController.php b/app/Controller/TestController.php index 098f35c..5618ad6 100644 --- a/app/Controller/TestController.php +++ b/app/Controller/TestController.php @@ -377,26 +377,23 @@ class TestController extends AbstractController } $options = [ - "jump_wxa" => [ - "path" => "pages/expertDetail/expertDetail", + 'json' => [ + "path" => "pages/index/index", "query" => "doctor_id=539452507563012096", + "expire_type" => 1, + "expire_interval" => 1, "env_version" => $env_version, - ], - - "expire_type" => 1, - "expire_interval" => 1, - + ] ]; - $Wechat = new Wechat(1); - $result = $Wechat->createUrlScheme($options); + $result = $Wechat->createUrlLink($options); dump($result); $options = [ - "scheme" => $result['openlink'] + "url_link" => $result['url_link'] ]; - $result = $Wechat->getUrlScheme($options); + $result = $Wechat->getUrlLink($options); dump($result); } } \ No newline at end of file diff --git a/app/Services/DoctorAuthService.php b/app/Services/DoctorAuthService.php index 3104839..990ab29 100644 --- a/app/Services/DoctorAuthService.php +++ b/app/Services/DoctorAuthService.php @@ -722,7 +722,7 @@ class DoctorAuthService extends BaseService } if (empty($doctor_info_data)) { - return success(); + return fail(HttpEnumCode::HTTP_ERROR,"请您修改后再提交"); } Db::beginTransaction(); diff --git a/extend/Wechat/Wechat.php b/extend/Wechat/Wechat.php index d995513..1ee160e 100644 --- a/extend/Wechat/Wechat.php +++ b/extend/Wechat/Wechat.php @@ -344,7 +344,7 @@ class Wechat } /** - * 生成UrlScheme + * 生成UrlLink * @throws NotFoundExceptionInterface * @throws RedirectionExceptionInterface * @throws ContainerExceptionInterface @@ -353,14 +353,14 @@ class Wechat * @throws TransportExceptionInterface * @throws ServerExceptionInterface */ - public function createUrlScheme(array $options): array|string + public function createUrlLink(array $options): array|string { try { $this->createApp($this->config['app_id'], $this->config['secret']); $client = $this->createClient($this->config['app_id'], $this->config['secret']); - $response = $client->postJson('wxa/generatescheme', $options); + $response = $client->postJson('wxa/generate_urllink', $options); if ($response->isFailed()) { // 出错了,处理异常 @@ -382,7 +382,7 @@ class Wechat } /** - * 获取UrlScheme + * 获取UrlLink * @throws NotFoundExceptionInterface * @throws RedirectionExceptionInterface * @throws ContainerExceptionInterface @@ -391,14 +391,14 @@ class Wechat * @throws TransportExceptionInterface * @throws ServerExceptionInterface */ - public function getUrlScheme(array $options): array|string + public function getUrlLink(array $options): array|string { try { $this->createApp($this->config['app_id'], $this->config['secret']); $client = $this->createClient($this->config['app_id'], $this->config['secret']); - $response = $client->postJson('/wxa/queryscheme', $options); + $response = $client->postJson('wxa/query_urllink', $options); if ($response->isFailed()) { // 出错了,处理异常