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 e257b297
authored
2025-12-01 14:18:46 +0800
by
tanghuan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加版本信息和版权信息
1 parent
97ac92bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
56 deletions
lib/ui/pages/web_page.dart
lib/ui/pages/web_page.dart
View file @
e257b29
import
'package:appframe/bloc/web_cubit.dart'
;
import
'package:appframe/bloc/web_cubit.dart'
;
import
'package:appframe/config/constant.dart'
;
import
'package:appframe/config/locator.dart'
;
import
'package:appframe/config/locator.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
...
@@ -71,65 +70,91 @@ class WebPage extends StatelessWidget {
...
@@ -71,65 +70,91 @@ class WebPage extends StatelessWidget {
),
),
endDrawer:
Drawer
(
endDrawer:
Drawer
(
width:
MediaQuery
.
of
(
ctx
).
size
.
width
*
0.8
,
width:
MediaQuery
.
of
(
ctx
).
size
.
width
*
0.8
,
child:
ListView
(
padding:
EdgeInsets
.
zero
,
children:
[
child:
Column
(
children:
[
DrawerHeader
(
DrawerHeader
(
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFF7691FA
),
color:
Color
(
0xFF7691FA
),
),
),
child:
Text
(
'设置'
,
child:
Align
(
style:
TextStyle
(
alignment:
Alignment
.
centerLeft
,
// color: Theme.of(ctx).colorScheme.onPrimary,
child:
Text
(
'设置'
,
fontSize:
24
,
style:
TextStyle
(
color:
Colors
.
white
,
// color: Theme.of(ctx).colorScheme.onPrimary,
))),
fontSize:
24
,
ListTile
(
color:
Colors
.
white
,
leading:
const
Icon
(
Icons
.
chat_bubble_outline
),
))),
title:
const
Text
(
'消息测试'
),
onTap:
()
{
Navigator
.
pop
(
ctx
);
ctx
.
read
<
WebCubit
>().
goIm
();
},
),
ListTile
(
leading:
const
Icon
(
Icons
.
accessibility_new
),
title:
const
Text
(
'身份认证'
),
onTap:
()
{
Navigator
.
pop
(
ctx
);
ctx
.
read
<
WebCubit
>().
goAuth
();
},
),
ListTile
(
leading:
const
Icon
(
Icons
.
app_blocking_sharp
),
title:
const
Text
(
'打开小程序'
),
onTap:
()
{
Navigator
.
pop
(
ctx
);
ctx
.
read
<
WebCubit
>().
goMiniProgram
();
},
),
),
ListTile
(
Expanded
(
leading:
const
Icon
(
Icons
.
refresh
),
child:
SingleChildScrollView
(
title:
const
Text
(
'刷新'
),
child:
Column
(
onTap:
()
{
crossAxisAlignment:
CrossAxisAlignment
.
stretch
,
Navigator
.
pop
(
ctx
);
children:
[
// ctx.read<WebCubit>().refresh();
ListTile
(
ctx
.
read
<
WebCubit
>().
handleRefreshPage
();
leading:
const
Icon
(
Icons
.
chat_bubble_outline
),
},
title:
const
Text
(
'消息测试'
),
),
onTap:
()
{
ListTile
(
Navigator
.
pop
(
ctx
);
leading:
const
Icon
(
Icons
.
cleaning_services
),
ctx
.
read
<
WebCubit
>().
goIm
();
title:
const
Text
(
'清理缓存'
),
},
onTap:
()
{
),
Navigator
.
pop
(
ctx
);
ListTile
(
ctx
.
read
<
WebCubit
>().
clearStorage
();
leading:
const
Icon
(
Icons
.
accessibility_new
),
},
title:
const
Text
(
'身份认证'
),
onTap:
()
{
Navigator
.
pop
(
ctx
);
ctx
.
read
<
WebCubit
>().
goAuth
();
},
),
ListTile
(
leading:
const
Icon
(
Icons
.
app_blocking_sharp
),
title:
const
Text
(
'打开小程序'
),
onTap:
()
{
Navigator
.
pop
(
ctx
);
ctx
.
read
<
WebCubit
>().
goMiniProgram
();
},
),
ListTile
(
leading:
const
Icon
(
Icons
.
refresh
),
title:
const
Text
(
'刷新'
),
onTap:
()
{
Navigator
.
pop
(
ctx
);
// ctx.read<WebCubit>().refresh();
ctx
.
read
<
WebCubit
>().
handleRefreshPage
();
},
),
ListTile
(
leading:
const
Icon
(
Icons
.
cleaning_services
),
title:
const
Text
(
'清理缓存'
),
onTap:
()
{
Navigator
.
pop
(
ctx
);
ctx
.
read
<
WebCubit
>().
clearStorage
();
},
),
ListTile
(
leading:
const
Icon
(
Icons
.
logout
),
title:
const
Text
(
'退出登录'
),
onTap:
()
{
Navigator
.
pop
(
ctx
);
ctx
.
read
<
WebCubit
>().
logout
();
},
),
],
),
),
),
),
ListTile
(
const
Divider
(),
leading:
const
Icon
(
Icons
.
logout
),
Container
(
title:
const
Text
(
'退出登录'
),
width:
double
.
infinity
,
onTap:
()
{
padding:
const
EdgeInsets
.
all
(
16.0
),
Navigator
.
pop
(
ctx
);
child:
Center
(
ctx
.
read
<
WebCubit
>().
logout
();
child:
Text
(
},
'版权所有 © 2025'
,
style:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
12
,
),
),
),
),
),
])),
])),
body:
Stack
(
body:
Stack
(
...
@@ -201,7 +226,7 @@ class WebPage extends StatelessWidget {
...
@@ -201,7 +226,7 @@ class WebPage extends StatelessWidget {
);
);
},
},
listener:
(
context
,
state
)
{
listener:
(
context
,
state
)
{
if
(
state
.
suggestUpgrade
)
{
if
(
state
.
suggestUpgrade
)
{
context
.
read
<
WebCubit
>().
suggestUpgrade
(
context
);
context
.
read
<
WebCubit
>().
suggestUpgrade
(
context
);
}
else
if
(
state
.
orientationCmdFlag
)
{
}
else
if
(
state
.
orientationCmdFlag
)
{
context
.
read
<
WebCubit
>().
getOrientation
(
context
);
context
.
read
<
WebCubit
>().
getOrientation
(
context
);
...
@@ -216,4 +241,4 @@ class WebPage extends StatelessWidget {
...
@@ -216,4 +241,4 @@ class WebPage extends StatelessWidget {
),
),
);
);
}
}
}
}
\ No newline at end of file
\ No newline at end of file
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