mod: 本地缓存字段修改、登录状态
This commit is contained in:
@ -18,19 +18,25 @@ class _WebviewPageState extends State<WebviewPage> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
_webviewController.pageTitle,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
_webviewController.controller.reload();
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.refresh,
|
||||
size: 22,
|
||||
),
|
||||
child: const Text('刷新'),
|
||||
),
|
||||
Obx(
|
||||
() => _webviewController.type.value == 'login'
|
||||
? TextButton(
|
||||
onPressed: () => _webviewController.confirmLogin(null),
|
||||
child: const Text('刷新登录状态'),
|
||||
)
|
||||
: const SizedBox(),
|
||||
),
|
||||
const SizedBox(width: 10)
|
||||
],
|
||||
@ -48,6 +54,13 @@ class _WebviewPageState extends State<WebviewPage> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
color: Theme.of(context).colorScheme.onInverseSurface,
|
||||
padding:
|
||||
const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6),
|
||||
child: const Text('登录成功未自动跳转? 请点击右上角「刷新登录状态」'),
|
||||
),
|
||||
Expanded(
|
||||
child: WebViewWidget(controller: _webviewController.controller),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user