Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
ff01c6ce
提交
ff01c6ce
authored
3月 08, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
发送验证码 添加 uuid
上级
c427ef10
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
57 行增加
和
2 行删除
+57
-2
account.dart
lib/apis/account.dart
+16
-1
index.dart
lib/apis/index.dart
+5
-1
pubspec.lock
pubspec.lock
+32
-0
pubspec.yaml
pubspec.yaml
+4
-0
没有找到文件。
lib/apis/account.dart
浏览文件 @
ff01c6ce
...
...
@@ -9,6 +9,7 @@ abstract class AccountAPI {
required
String
type
,
String
?
password
,
String
?
code
,
String
?
uuid
,
})
async
{
// assert((password != null && code == null) ||
// (password == null && code != null),
...
...
@@ -26,6 +27,7 @@ abstract class AccountAPI {
// 验证码登录
if
(
type
==
'2'
){
params
[
'code'
]
=
code
;
params
[
'uuid'
]
=
uuid
;
}
final
result
=
await
HttpService
.
to
.
post
(
'/v1/members/login/login'
,
...
...
@@ -70,11 +72,24 @@ abstract class AccountAPI {
required
String
phone
,
required
String
type
,
})
async
{
String
uuid
=
''
;
final
DeviceInfoPlugin
device
=
DeviceInfoPlugin
();
if
(
Platform
.
isIOS
){
final
IosDeviceInfo
iosInfo
=
await
device
.
iosInfo
;
uuid
=
iosInfo
.
identifierForVendor
??
''
;
}
else
if
(
Platform
.
isAndroid
){
const
androidIdPlugin
=
AndroidId
();
uuid
=
await
androidIdPlugin
.
getId
()??
''
;
}
final
result
=
await
HttpService
.
to
.
post
(
'/v1/members/login/sendCode'
,
params:
{
'phone'
:
phone
,
'types'
:
type
'types'
:
type
,
'uuid'
:
uuid
},
excludeToken:
true
,
showLoading:
true
,
...
...
lib/apis/index.dart
浏览文件 @
ff01c6ce
library
apis
;
import
'dart:io'
;
import
'package:android_id/android_id.dart'
;
import
'package:device_info_plus/device_info_plus.dart'
;
import
'../models/index.dart'
;
import
'../services/index.dart'
;
part
'account.dart'
;
part
'mine.dart'
;
part
'course.dart'
;
...
...
pubspec.lock
浏览文件 @
ff01c6ce
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
android_id:
dependency: "direct main"
description:
name: android_id
sha256: "5c2d3a259afcd173dbe367ba452817bd530c4df75d251d652c69b8d3c8ac0d36"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.6"
archive:
dependency: "direct main"
description:
...
...
@@ -161,6 +169,22 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.3.3"
device_info_plus:
dependency: "direct main"
description:
name: device_info_plus
sha256: "77f757b789ff68e4eaf9c56d1752309bd9f7ad557cb105b938a7f8eb89e59110"
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.1.2"
device_info_plus_platform_interface:
dependency: transitive
description:
name: device_info_plus_platform_interface
sha256: d3b01d5868b50ae571cd1dc6e502fc94d956b665756180f7b16ead09e836fd64
url: "https://pub.flutter-io.cn"
source: hosted
version: "7.0.0"
dio:
dependency: "direct main"
description:
...
...
@@ -1018,6 +1042,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.0.9"
win32_registry:
dependency: transitive
description:
name: win32_registry
sha256: e4506d60b7244251bc59df15656a3093501c37fb5af02105a944d73eb95be4c9
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.1"
xdg_directories:
dependency: transitive
description:
...
...
pubspec.yaml
浏览文件 @
ff01c6ce
...
...
@@ -115,6 +115,10 @@ dependencies:
connectivity_plus
:
^5.0.2
# 数据库
sqflite
:
^2.3.2
# 设备信息
device_info_plus
:
^9.1.2
# 安卓
android_id
:
^0.3.6
dev_dependencies
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论