Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
9dc5cafd
提交
9dc5cafd
authored
1月 20, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
关于界面获取版本
上级
fc80bfa6
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
106 行增加
和
14 行删除
+106
-14
mine.dart
lib/apis/mine.dart
+37
-1
controller.dart
lib/pages/change_phone/controller.dart
+11
-4
view.dart
lib/pages/change_phone/view.dart
+9
-3
controller.dart
lib/pages/change_pwd/controller.dart
+5
-0
view.dart
lib/pages/change_pwd/view.dart
+8
-1
index.dart
lib/pages/user_about/index.dart
+1
-0
view.dart
lib/pages/user_about/view.dart
+33
-5
pubspec.lock
pubspec.lock
+0
-0
pubspec.yaml
pubspec.yaml
+2
-0
没有找到文件。
lib/apis/mine.dart
浏览文件 @
9dc5cafd
...
@@ -227,7 +227,7 @@ abstract class MineAPI {
...
@@ -227,7 +227,7 @@ abstract class MineAPI {
});
});
}
}
/// 1
2
、笔记详情列表
/// 1
3
、笔记详情列表
///
///
static
Future
<
List
<
DiscussModel
>>
discussList
({
static
Future
<
List
<
DiscussModel
>>
discussList
({
int
page
=
1
,
int
page
=
1
,
...
@@ -250,8 +250,43 @@ abstract class MineAPI {
...
@@ -250,8 +250,43 @@ abstract class MineAPI {
});
});
}
}
/// 14、修改密码
///
static
Future
<
bool
>
changePwd
({
required
String
password
,
required
String
rePassword
})
async
{
final
result
=
await
HttpService
.
to
.
post
(
'/v1/members/Information/changePasswd'
,
params:
{
'password'
:
password
,
'repassword'
:
rePassword
},
);
if
(
result
.
data
is
Map
&&
result
.
data
[
'is_success'
]
==
1
){
return
true
;
}
return
false
;
}
/// 15、修改手机号
static
Future
<
bool
>
changePhone
({
required
String
phone
,
required
String
code
})
async
{
final
result
=
await
HttpService
.
to
.
post
(
'/v1/members/Information/editPhone'
,
params:
{
'phone'
:
phone
,
'code'
:
code
},
);
if
(
result
.
data
is
Map
&&
result
.
data
[
'is_success'
]
==
1
){
return
true
;
}
return
false
;
}
}
}
\ No newline at end of file
lib/pages/change_phone/controller.dart
浏览文件 @
9dc5cafd
...
@@ -58,10 +58,10 @@ class ChangePhoneController extends GetxController {
...
@@ -58,10 +58,10 @@ class ChangePhoneController extends GetxController {
// 定时器回调
// 定时器回调
});
});
/// 测试账号
/// 测试账号
if
(
kDebugMode
)
{
//
if (kDebugMode) {
phoneInput
.
text
=
'13521054068'
;
//
phoneInput.text = '13521054068';
codeInput
.
text
=
'123456'
;
//
codeInput.text = '123456';
}
//
}
super
.
onInit
();
super
.
onInit
();
}
}
...
@@ -84,6 +84,12 @@ class ChangePhoneController extends GetxController {
...
@@ -84,6 +84,12 @@ class ChangePhoneController extends GetxController {
else
{
else
{
Toast
.
show
(
'发送失败'
);
Toast
.
show
(
'发送失败'
);
}
}
}
Future
<
bool
>
changePhone
()
async
{
final
result
=
await
MineAPI
.
changePhone
(
phone:
phoneInput
.
text
,
code:
codeInput
.
text
,);
return
result
;
}
}
}
}
\ No newline at end of file
lib/pages/change_phone/view.dart
浏览文件 @
9dc5cafd
...
@@ -116,10 +116,16 @@ class _ChangePhonePageState extends State<ChangePhonePage> {
...
@@ -116,10 +116,16 @@ class _ChangePhonePageState extends State<ChangePhonePage> {
),
),
Gaps
.
vGaps40
,
Gaps
.
vGaps40
,
CustomGradientButton
(
CustomGradientButton
(
text:
'
下一步
'
,
text:
'
确认修改
'
,
isEnabled:
controller
.
enable
,
isEnabled:
controller
.
enable
,
onPressed:
()
{
onPressed:
()
async
{
context
.
pushNamed
(
Routes
.
resetPwd
,
queryParameters:
{
'phone'
:
controller
.
phoneInput
.
text
,
'code'
:
controller
.
codeInput
.
text
});
Tools
.
unfocus
();
final
result
=
await
controller
.
changePhone
();
if
(
result
){
Toast
.
show
(
'修改成功'
);
context
.
pop
();
}
},
},
)
)
],
],
...
...
lib/pages/change_pwd/controller.dart
浏览文件 @
9dc5cafd
...
@@ -39,6 +39,11 @@ class ChangePwdController extends GetxController {
...
@@ -39,6 +39,11 @@ class ChangePwdController extends GetxController {
super
.
onClose
();
super
.
onClose
();
}
}
Future
<
bool
>
changePwd
()
async
{
final
result
=
await
MineAPI
.
changePwd
(
password:
EncryptUtil
.
encodeMd5
(
EncryptUtil
.
encodeMd5
(
pwdInput
.
text
)),
rePassword:
EncryptUtil
.
encodeMd5
(
EncryptUtil
.
encodeMd5
(
pwd2Input
.
text
)));
return
result
;
}
// void resetPassword(BuildContext context) async {
// void resetPassword(BuildContext context) async {
// final result = await AccountAPI.resetPassword(
// final result = await AccountAPI.resetPassword(
// phone: phone,
// phone: phone,
...
...
lib/pages/change_pwd/view.dart
浏览文件 @
9dc5cafd
...
@@ -15,6 +15,7 @@ class ChangePwdPage extends StatefulWidget {
...
@@ -15,6 +15,7 @@ class ChangePwdPage extends StatefulWidget {
class
_ChangePwdPageState
extends
State
<
ChangePwdPage
>
{
class
_ChangePwdPageState
extends
State
<
ChangePwdPage
>
{
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
final
currentContext
=
context
;
return
GetBuilder
<
ChangePwdController
>(
return
GetBuilder
<
ChangePwdController
>(
init:
ChangePwdController
(),
init:
ChangePwdController
(),
builder:
(
controller
)
=>
Scaffold
(
builder:
(
controller
)
=>
Scaffold
(
...
@@ -118,7 +119,13 @@ class _ChangePwdPageState extends State<ChangePwdPage> {
...
@@ -118,7 +119,13 @@ class _ChangePwdPageState extends State<ChangePwdPage> {
CustomGradientButton
(
CustomGradientButton
(
text:
widget
.
type
==
'1'
?
'确认'
:
'确认修改'
,
text:
widget
.
type
==
'1'
?
'确认'
:
'确认修改'
,
isEnabled:
controller
.
enable
,
isEnabled:
controller
.
enable
,
onPressed:
()
{
onPressed:
()
async
{
Tools
.
unfocus
();
final
result
=
await
controller
.
changePwd
();
if
(
result
){
Toast
.
show
(
'修改成功'
);
context
.
pop
();
}
// context.goNamed(Routes.login);
// context.goNamed(Routes.login);
},
},
)
)
...
...
lib/pages/user_about/index.dart
浏览文件 @
9dc5cafd
...
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
...
@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import
'package:flutter_book/utils/index.dart'
;
import
'package:flutter_book/utils/index.dart'
;
import
'package:flutter_book/widgets/index.dart'
;
import
'package:flutter_book/widgets/index.dart'
;
import
'package:go_router/go_router.dart'
;
import
'package:go_router/go_router.dart'
;
import
'package:package_info_plus/package_info_plus.dart'
;
import
'../../routes/index.dart'
;
import
'../../routes/index.dart'
;
...
...
lib/pages/user_about/view.dart
浏览文件 @
9dc5cafd
part of
about
;
part of
about
;
class
AboutPage
extends
State
less
Widget
{
class
AboutPage
extends
State
ful
Widget
{
const
AboutPage
({
Key
?
key
})
:
super
(
key:
key
);
const
AboutPage
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
AboutPage
>
createState
()
=>
_AboutPageState
();
}
class
_AboutPageState
extends
State
<
AboutPage
>
{
PackageInfo
packageInfo
=
PackageInfo
(
appName:
'Unknown'
,
packageName:
'Unknown'
,
version:
'Unknown'
,
buildNumber:
'Unknown'
,
buildSignature:
'Unknown'
,
installerStore:
'Unknown'
,
);
@override
void
initState
()
{
_getVersion
();
super
.
initState
();
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
...
@@ -23,9 +43,10 @@ class AboutPage extends StatelessWidget {
...
@@ -23,9 +43,10 @@ class AboutPage extends StatelessWidget {
color:
Colors
.
cyan
,
color:
Colors
.
cyan
,
child:
const
CustomImage
.
asset
(
url:
'assets/images/banner.png'
),
child:
const
CustomImage
.
asset
(
url:
'assets/images/banner.png'
),
),
),
Gaps
.
h
Gaps15
,
Gaps
.
v
Gaps15
,
const
Text
(
'紫荆数智学堂'
,
style:
TextStyle
(
fontSize:
17
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c3
),),
const
Text
(
'紫荆数智学堂'
,
style:
TextStyle
(
fontSize:
17
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c3
),),
const
Text
(
'V1.0.0'
,
style:
TextStyle
(
fontSize:
13
,
color:
Colours
.
c9
)),
Gaps
.
vGaps5
,
Text
(
'V
${packageInfo.version??''}
'
,
style:
const
TextStyle
(
fontSize:
13
,
color:
Colours
.
c9
)),
],
],
),
),
SafeArea
(
SafeArea
(
...
@@ -52,8 +73,8 @@ class AboutPage extends StatelessWidget {
...
@@ -52,8 +73,8 @@ class AboutPage extends StatelessWidget {
],
],
),
),
Gaps
.
hGaps10
,
Gaps
.
hGaps10
,
const
Text
(
'Copyright © 20
17 Zijing Education. All rights reserved.
\n
清控紫荆(北京)教育科技股份有限公司京
\n
ICP证150431号'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
9
),
textAlign:
TextAlign
.
center
,)
const
Text
(
'Copyright © 20
24 Zijing Education. All rights reserved.
\n
清控紫荆(北京)教育科技股份有限公司京
\n
ICP证150431号'
,
style:
TextStyle
(
color:
Colours
.
c9
,
fontSize:
9
),
textAlign:
TextAlign
.
center
,),
Gaps
.
vGaps25
,
],
],
),
),
)
)
...
@@ -62,4 +83,11 @@ class AboutPage extends StatelessWidget {
...
@@ -62,4 +83,11 @@ class AboutPage extends StatelessWidget {
),
),
);
);
}
}
void
_getVersion
()
async
{
final
info
=
await
PackageInfo
.
fromPlatform
();
setState
(()
{
packageInfo
=
info
;
});
}
}
}
pubspec.lock
浏览文件 @
9dc5cafd
差异被折叠。
点击展开。
pubspec.yaml
浏览文件 @
9dc5cafd
...
@@ -93,6 +93,8 @@ dependencies:
...
@@ -93,6 +93,8 @@ dependencies:
fluwx
:
^4.4.9
fluwx
:
^4.4.9
#
#
image_picker
:
0.8.7+5
image_picker
:
0.8.7+5
#
package_info_plus
:
^4.2.0
dev_dependencies
:
dev_dependencies
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论