Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loveisland
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘小敏
loveisland
Commits
efc59e39
Commit
efc59e39
authored
Jun 26, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(wechat): 使用正式版二维码并恢复页面参数
parent
49d33e7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Wechat.php
addons/shopro/controller/third/Wechat.php
+3
-3
No files found.
addons/shopro/controller/third/Wechat.php
View file @
efc59e39
...
@@ -175,11 +175,11 @@ class Wechat extends Common
...
@@ -175,11 +175,11 @@ class Wechat extends Common
list
(
$page
,
$scene
)
=
array_pad
(
explode
(
'?'
,
$path
,
2
),
2
,
''
);
list
(
$page
,
$scene
)
=
array_pad
(
explode
(
'?'
,
$path
,
2
),
2
,
''
);
// 根据域名或配置动态选择环境版本 develop/release/trial
// 根据域名或配置动态选择环境版本 develop/release/trial
$envVersion
=
'
trial
'
;
$envVersion
=
'
release
'
;
// 缓存键:使用 scene 参数作为唯一标识,支持缓存不同场景的二维码
// 缓存键:使用 scene 参数作为唯一标识,支持缓存不同场景的二维码
$cacheKey
=
'wxacode_'
.
md5
(
$scene
.
'_'
.
$envVersion
);
$cacheKey
=
'wxacode_'
.
md5
(
$scene
.
'_'
.
$envVersion
);
$cacheTtl
=
7
*
24
*
60
*
60
;
// 7
天
$cacheTtl
=
365
*
24
*
60
*
60
;
// 365
天
// 尝试从缓存获取
// 尝试从缓存获取
$cachedImage
=
cache
(
$cacheKey
);
$cachedImage
=
cache
(
$cacheKey
);
...
@@ -197,8 +197,8 @@ class Wechat extends Common
...
@@ -197,8 +197,8 @@ class Wechat extends Common
];
];
custom_log
(
json_encode
(
$inputParams
,
JSON_UNESCAPED_UNICODE
),
'wechat'
);
custom_log
(
json_encode
(
$inputParams
,
JSON_UNESCAPED_UNICODE
),
'wechat'
);
// 去掉 page 参数,使用小程序默认页
$content
=
$mp
->
app_code
->
getUnlimit
(
$scene
,
[
$content
=
$mp
->
app_code
->
getUnlimit
(
$scene
,
[
'page'
=>
$page
,
'is_hyaline'
=>
true
,
'is_hyaline'
=>
true
,
'env_version'
=>
$envVersion
'env_version'
=>
$envVersion
]);
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment