From 4ffc59fe8ae585031e9bc39b548ff91cbce3eff6 Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Mon, 26 Feb 2024 13:03:33 +0800 Subject: [PATCH 1/6] 1 --- app/common/model/wxapp/Setting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common/model/wxapp/Setting.php b/app/common/model/wxapp/Setting.php index 068324fb..573d3569 100644 --- a/app/common/model/wxapp/Setting.php +++ b/app/common/model/wxapp/Setting.php @@ -12,9 +12,9 @@ declare (strict_types=1); namespace app\common\model\wxapp; +use app\common\library\helper; use cores\BaseModel; use think\facade\Cache; -use app\common\library\helper; /** * 微信小程序设置模型 @@ -88,7 +88,7 @@ class Setting extends BaseModel { $model = new static; is_null($storeId) && $storeId = static::$storeId; - if (!$data = Cache::get("wxapp_setting_{$storeId}")) { + if ($data = Cache::get("wxapp_setting_{$storeId}")) { // 获取全部设置 $data = $model->getList($storeId); // 写入缓存中 From b3bd0e3d0879edcc326fe3159ee424b37673f38e Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Mon, 26 Feb 2024 13:13:18 +0800 Subject: [PATCH 2/6] 1 --- app/common/model/wxapp/Setting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/model/wxapp/Setting.php b/app/common/model/wxapp/Setting.php index 573d3569..f1ff8261 100644 --- a/app/common/model/wxapp/Setting.php +++ b/app/common/model/wxapp/Setting.php @@ -88,7 +88,7 @@ class Setting extends BaseModel { $model = new static; is_null($storeId) && $storeId = static::$storeId; - if ($data = Cache::get("wxapp_setting_{$storeId}")) { + if (!$data = Cache::get("wxapp_setting_{$storeId}")) { // 获取全部设置 $data = $model->getList($storeId); // 写入缓存中 From 6e3cf5d79cce43aa028716223a3560e65dfe8efb Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Mon, 26 Feb 2024 13:13:57 +0800 Subject: [PATCH 3/6] 1 --- app/common/service/qrcode/InviteUser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/service/qrcode/InviteUser.php b/app/common/service/qrcode/InviteUser.php index d59b78d3..eea4cd86 100644 --- a/app/common/service/qrcode/InviteUser.php +++ b/app/common/service/qrcode/InviteUser.php @@ -57,7 +57,7 @@ class InviteUser extends BaseQRcode $scene = "refereeId:" . ($this->userInfo['user_id'] ?: ''); // 下载小程序码 $page = 'pages/login/index'; - $qrcode = $this->getQrcode($storeId, $scene, null, $this->channel); + $qrcode = $this->getQrcode($storeId, $scene, $page, $this->channel); // 拼接海报图 return $this->savePoster($backdrop, $qrcode); } From 6eddbf732c0e482bc56b88714f99d1dd3b1cbd63 Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Mon, 26 Feb 2024 13:17:35 +0800 Subject: [PATCH 4/6] 1 --- app/common/library/wechat/Qrcode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/library/wechat/Qrcode.php b/app/common/library/wechat/Qrcode.php index 8f760926..e0495b21 100644 --- a/app/common/library/wechat/Qrcode.php +++ b/app/common/library/wechat/Qrcode.php @@ -38,7 +38,7 @@ class Qrcode extends WxBase $url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={$accessToken}"; // 构建请求 $data = compact('scene', 'width'); -// $data['env_version'] = 'trial'; + $data['env_version'] = 'trial'; // $data['check_path'] = false; !is_null($page) && $data['page'] = $page; // 返回结果 From 5dd2fdc3a8b9267fcb7aa6eb69601c26668b3492 Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Mon, 26 Feb 2024 13:21:13 +0800 Subject: [PATCH 5/6] 1 --- app/common/library/wechat/Qrcode.php | 2 +- app/common/service/qrcode/InviteUser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/common/library/wechat/Qrcode.php b/app/common/library/wechat/Qrcode.php index e0495b21..cfee46a0 100644 --- a/app/common/library/wechat/Qrcode.php +++ b/app/common/library/wechat/Qrcode.php @@ -39,7 +39,7 @@ class Qrcode extends WxBase // 构建请求 $data = compact('scene', 'width'); $data['env_version'] = 'trial'; -// $data['check_path'] = false; + //$data['check_path'] = false; !is_null($page) && $data['page'] = $page; // 返回结果 $result = $this->post($url, helper::jsonEncode($data)); diff --git a/app/common/service/qrcode/InviteUser.php b/app/common/service/qrcode/InviteUser.php index eea4cd86..41530540 100644 --- a/app/common/service/qrcode/InviteUser.php +++ b/app/common/service/qrcode/InviteUser.php @@ -56,7 +56,7 @@ class InviteUser extends BaseQRcode // 小程序码参数 $scene = "refereeId:" . ($this->userInfo['user_id'] ?: ''); // 下载小程序码 - $page = 'pages/login/index'; + $page = 'pages/index/index'; $qrcode = $this->getQrcode($storeId, $scene, $page, $this->channel); // 拼接海报图 return $this->savePoster($backdrop, $qrcode); From 786be2e8b38c58b8fe6504f29c30ccf4736b6cac Mon Sep 17 00:00:00 2001 From: wanghousheng Date: Mon, 26 Feb 2024 13:24:59 +0800 Subject: [PATCH 6/6] 1 --- app/common/library/wechat/Qrcode.php | 4 ++-- app/common/service/qrcode/InviteUser.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/common/library/wechat/Qrcode.php b/app/common/library/wechat/Qrcode.php index cfee46a0..00fc1d7d 100644 --- a/app/common/library/wechat/Qrcode.php +++ b/app/common/library/wechat/Qrcode.php @@ -38,8 +38,8 @@ class Qrcode extends WxBase $url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token={$accessToken}"; // 构建请求 $data = compact('scene', 'width'); - $data['env_version'] = 'trial'; - //$data['check_path'] = false; + //$data['env_version'] = 'trial'; + $data['check_path'] = false; !is_null($page) && $data['page'] = $page; // 返回结果 $result = $this->post($url, helper::jsonEncode($data)); diff --git a/app/common/service/qrcode/InviteUser.php b/app/common/service/qrcode/InviteUser.php index 41530540..eea4cd86 100644 --- a/app/common/service/qrcode/InviteUser.php +++ b/app/common/service/qrcode/InviteUser.php @@ -56,7 +56,7 @@ class InviteUser extends BaseQRcode // 小程序码参数 $scene = "refereeId:" . ($this->userInfo['user_id'] ?: ''); // 下载小程序码 - $page = 'pages/index/index'; + $page = 'pages/login/index'; $qrcode = $this->getQrcode($storeId, $scene, $page, $this->channel); // 拼接海报图 return $this->savePoster($backdrop, $qrcode);