更新图书馆新接口检索与认证流程#157
Open
aqqkad wants to merge 3 commits into
Open
Conversation
BenderBlog
reviewed
Jul 11, 2026
| factory BorrowData.fromJson(Map<String, dynamic> json) => | ||
| _$BorrowDataFromJson(json); | ||
|
|
||
| factory BorrowData.fromOpacJson(Map<String, dynamic> json) { |
Owner
There was a problem hiding this comment.
不知道我理解的对不对,这里不应该通过写一个新的 factory 解决,而是彻底地修改数据结构,然后跑 https://pub.dev/packages/json_serializable 来解决。
BenderBlog
reviewed
Jul 11, 2026
| builder: (context) { | ||
| final state = controller.energyInfoStateSignal.value; | ||
| final displayInfo = controller.displayEnergyInfo.value; | ||
| final lowElectricityWarningEnabled = |
BenderBlog
reviewed
Jul 11, 2026
| late final Future<List<BookLocation>> _locationsFuture = | ||
| widget.toUse.items != null | ||
| ? Future.value(widget.toUse.items!) | ||
| : LibrarySession().bookLocations(widget.toUse.docNumber); |
Owner
There was a problem hiding this comment.
BenderBlog
reviewed
Jul 11, 2026
| @@ -7,69 +7,19 @@ import 'package:watermeter/page/public_widget/both_side_sheet.dart'; | |||
| import 'package:infinite_scroll_pagination/infinite_scroll_pagination.dart'; | |||
BenderBlog
reviewed
Jul 11, 2026
| required this.years, | ||
| }); | ||
|
|
||
| factory LibrarySearchFilterOptions.fallback() => LibrarySearchFilterOptions( |
BenderBlog
reviewed
Jul 11, 2026
| Options get _opacOptions => Options( | ||
| contentType: "application/json;charset=utf-8", | ||
| headers: { | ||
| HttpHeaders.cookieHeader: "jwt=$token; jwtHeader=$_opacJwtHeader", |
Owner
There was a problem hiding this comment.
Cookie 这块不用 CookieJar 吗?纯好奇
不懂但是能跑的话不要改
Owner
|
解决掉上面的问题就完了 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
说明
lib/repository/preference.dartdart analyze