Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
appframe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit d0ea9762
authored
2025-12-15 16:50:21 +0800
by
tanghuan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
打开小程序的接口,path参数不用必传
1 parent
705b7049
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
lib/data/repositories/message/open_weapp_handler.dart
lib/data/repositories/message/open_weapp_handler.dart
View file @
d0ea976
...
...
@@ -19,10 +19,10 @@ class OpenWeappHandler extends MessageHandler {
}
final
appid
=
params
[
'appid'
]
as
String
;
final
path
=
params
[
'path'
]
as
String
;
final
path
=
params
[
'path'
]
as
String
?
;
final
envVersion
=
params
[
'envVersion'
]
as
String
?;
if
(
appid
.
isEmpty
||
path
.
isEmpty
)
{
if
(
appid
.
isEmpty
)
{
throw
Exception
(
'参数错误'
);
}
...
...
@@ -31,6 +31,7 @@ class OpenWeappHandler extends MessageHandler {
}
try
{
if
(
path
!=
null
)
{
return
await
_fluwx
.
open
(
target:
MiniProgram
(
username:
appid
,
...
...
@@ -38,6 +39,14 @@ class OpenWeappHandler extends MessageHandler {
miniProgramType:
_getWXMiniProgramType
(
envVersion
),
),
);
}
else
{
return
await
_fluwx
.
open
(
target:
MiniProgram
(
username:
appid
,
miniProgramType:
_getWXMiniProgramType
(
envVersion
),
),
);
}
}
catch
(
e
)
{
print
(
e
);
return
false
;
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment