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 d4f65b1e
authored
2025-12-15 10:40:58 +0800
by
tanghuan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
加在 H5 index.html的时候增加时间戳,防止可能被缓存;
测试iOS手势;
1 parent
d5d03777
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
lib/bloc/web_cubit.dart
lib/ui/pages/link_page.dart
lib/bloc/web_cubit.dart
View file @
d4f65b1
...
...
@@ -356,7 +356,8 @@ class WebCubit extends Cubit<WebState> {
'classCode=
${state.classCode}
&'
'userType=
${state.userType}
&'
'stuId=
${state.stuId}
&'
'debug=
$debug
'
;
'debug=
$debug
&'
't=
${DateTime.now().millisecondsSinceEpoch}
'
;
// final String serverUrl = '${Constant.localServerUrl}/test/test2.html';
_controller
.
loadRequest
(
Uri
.
parse
(
serverUrl
));
}
...
...
lib/ui/pages/link_page.dart
View file @
d4f65b1
import
'package:appframe/bloc/link_cubit.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:go_router/go_router.dart'
;
...
...
@@ -32,7 +34,18 @@ class LinkPage extends StatelessWidget {
body:
state
.
loaded
?
SizedBox
(
height:
MediaQuery
.
of
(
ctx
).
size
.
height
-
120
,
// 减去100像素留空
child:
WebViewWidget
(
controller:
ctx
.
read
<
LinkCubit
>().
controller
),
child:
WebViewWidget
(
controller:
ctx
.
read
<
LinkCubit
>().
controller
,
gestureRecognizers:
{
// 允许所有手势
Factory
<
VerticalDragGestureRecognizer
>(
()
=>
VerticalDragGestureRecognizer
(),
),
Factory
<
HorizontalDragGestureRecognizer
>(
()
=>
HorizontalDragGestureRecognizer
(),
),
},
),
)
:
const
Center
(
child:
CircularProgressIndicator
()),
),
...
...
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