Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
55e4b047
提交
55e4b047
authored
3月 14, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1、分类默认传值
2、打印请求参数提前
上级
0d614983
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
4 行增加
和
3 行删除
+4
-3
controller.dart
lib/pages/library/controller.dart
+3
-1
http.dart
lib/services/http.dart
+1
-1
constants.dart
lib/utils/constants.dart
+0
-1
没有找到文件。
lib/pages/library/controller.dart
浏览文件 @
55e4b047
...
...
@@ -202,10 +202,12 @@ class LibraryController extends GetxController with GetTickerProviderStateMixin{
categories
=
await
LibraryAPI
.
categories
();
tabController
.
dispose
();
tabController
=
TabController
(
length:
categories
.
length
,
vsync:
this
);
categories
.
first
.
selected
=
true
;
filterCategories
=
categories
.
map
((
model
)
{
return
FilterModel
(
id:
model
.
categoryId
.
toString
(),
name:
model
.
name
??
''
,
selected:
model
.
selected
);
}).
toList
();
selectedCategory
=
filterCategories
.
first
;
selectedCategory
.
selected
=
true
;
update
();
}
...
...
lib/services/http.dart
浏览文件 @
55e4b047
...
...
@@ -99,6 +99,7 @@ class HttpService extends GetxService {
try
{
final
requestOptions
=
options
??
Options
();
requestOptions
.
headers
=
_getHeaders
(
excludeToken:
excludeToken
,
params:
params
,
url:
url
);
Console
.
log
(
'----headers------
${requestOptions.headers}
\n
----params------
$params
-----'
);
// 如果启用缓存,将cacheEnabled参数添加到请求选项中
if
(
cacheEnabled
){
requestOptions
.
extra
??=
{};
...
...
@@ -111,7 +112,6 @@ class HttpService extends GetxService {
cancelToken:
cancelToken
,
);
if
(
showLoading
)
CustomToast
.
dismiss
();
Console
.
log
(
'----headers------
${requestOptions.headers}
\n
----params------
$params
-----'
);
Console
.
log
(
response
.
data
);
return
ResponseModel
.
fromJson
(
response
.
data
);
}
catch
(
error
){
...
...
lib/utils/constants.dart
浏览文件 @
55e4b047
part of
utils
;
// 服务器地址
// const String kServerUrl = 'https://app.vning.com';
// const String kServerUrl = 'http://192.168.11.88:81';
// const String kServerUrl = 'http://8.141.148.247:7421';
const
String
kServerUrl
=
'http://1507.superge.cn:81'
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论