Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
92b99ad2
Commit
92b99ad2
authored
Jun 07, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加分页查询卡组列表的请求参数
parent
e2b1df9d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
...va/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
+4
-0
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareFragment.java
...a/cn/garymb/ygomobile/deck_square/DeckSquareFragment.java
+8
-6
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareListAdapter.java
...n/garymb/ygomobile/deck_square/DeckSquareListAdapter.java
+3
-3
mobile/src/main/java/cn/garymb/ygomobile/deck_square/api_response/GetSquareDeckCondition.java
...bile/deck_square/api_response/GetSquareDeckCondition.java
+5
-1
No files found.
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
View file @
92b99ad2
...
...
@@ -75,6 +75,10 @@ public class DeckSquareApiUtil {
paramMap
.
put
(
"page"
,
condition
.
getPage
());
paramMap
.
put
(
"size"
,
condition
.
getSize
());
paramMap
.
put
(
"keyWord"
,
condition
.
getKeyWord
());
paramMap
.
put
(
"sortLike"
,
condition
.
getSortLike
());
paramMap
.
put
(
"sortRank"
,
condition
.
getSortRank
());
paramMap
.
put
(
"contributer"
,
condition
.
getContributer
());
Response
response
=
OkhttpUtil
.
synchronousGet
(
url
,
paramMap
,
headers
);
String
responseBodyString
=
response
.
body
().
string
();
...
...
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareFragment.java
View file @
92b99ad2
...
...
@@ -23,6 +23,10 @@ public class DeckSquareFragment extends Fragment {
private
DeckSquareListAdapter
deckSquareListAdapter
;
private
YGODeckDialogUtil
.
OnDeckMenuListener
onDeckMenuListener
;
//通知外部调用方,(如调用本fragment的activity)
private
YGODeckDialogUtil
.
OnDeckDialogListener
mDialogListener
;
private
String
keyWord
;
private
Boolean
sortLike
;
private
Boolean
sortRank
;
private
String
contributer
;
public
DeckSquareFragment
(
YGODeckDialogUtil
.
OnDeckMenuListener
onDeckMenuListener
,
YGODeckDialogUtil
.
OnDeckDialogListener
mDialogListener
)
{
this
.
onDeckMenuListener
=
onDeckMenuListener
;
...
...
@@ -53,9 +57,8 @@ public class DeckSquareFragment extends Fragment {
}
binding
.
etGoToPage
.
setText
(
Integer
.
toString
(
targetPage
));
deckSquareListAdapter
.
loadData
(
targetPage
,
30
);
deckSquareListAdapter
.
loadData
(
targetPage
,
30
,
""
,
false
,
false
,
""
);
binding
.
listDeckInfo
.
scrollToPosition
(
0
);
return
true
;
}
...
...
@@ -71,8 +74,7 @@ public class DeckSquareFragment extends Fragment {
}
int
newPage
=
targetPage
+
1
;
deckSquareListAdapter
.
loadData
(
newPage
,
30
);
deckSquareListAdapter
.
loadData
(
newPage
,
30
,
""
,
false
,
false
,
""
);
binding
.
etGoToPage
.
setText
(
Integer
.
toString
(
newPage
));
binding
.
listDeckInfo
.
scrollToPosition
(
0
);
...
...
@@ -91,7 +93,7 @@ public class DeckSquareFragment extends Fragment {
if
(
newPage
<
1
)
{
newPage
=
1
;
}
deckSquareListAdapter
.
loadData
(
newPage
,
30
);
deckSquareListAdapter
.
loadData
(
newPage
,
30
,
""
,
false
,
false
,
""
);
binding
.
etGoToPage
.
setText
(
Integer
.
toString
(
newPage
));
binding
.
listDeckInfo
.
scrollToPosition
(
0
);
...
...
@@ -106,7 +108,7 @@ public class DeckSquareFragment extends Fragment {
}
catch
(
NumberFormatException
e
)
{
}
deckSquareListAdapter
.
loadData
(
targetPage
,
30
);
deckSquareListAdapter
.
loadData
(
targetPage
,
30
,
""
,
false
,
false
,
""
);
}
});
deckSquareListAdapter
.
setOnItemLongClickListener
((
adapter
,
view
,
position
)
->
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareListAdapter.java
View file @
92b99ad2
...
...
@@ -30,13 +30,13 @@ public class DeckSquareListAdapter extends BaseQuickAdapter<OnlineDeckDetail, Ba
}
public
void
loadData
()
{
loadData
(
1
,
30
);
loadData
(
1
,
30
,
""
,
false
,
false
,
""
);
}
public
void
loadData
(
int
page
,
int
size
)
{
public
void
loadData
(
Integer
page
,
Integer
size
,
String
keyWord
,
Boolean
sortLike
,
Boolean
sortRank
,
String
contributer
)
{
final
DialogPlus
dialog_read_ex
=
DialogPlus
.
show
(
getContext
(),
null
,
getContext
().
getString
(
R
.
string
.
fetch_online_deck
));
VUiKit
.
defer
().
when
(()
->
{
SquareDeckResponse
result
=
DeckSquareApiUtil
.
getSquareDecks
(
new
GetSquareDeckCondition
(
page
,
size
));
SquareDeckResponse
result
=
DeckSquareApiUtil
.
getSquareDecks
(
new
GetSquareDeckCondition
(
page
,
size
,
keyWord
,
sortLike
,
sortRank
,
contributer
));
if
(
result
==
null
)
{
return
null
;
}
else
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/deck_square/api_response/GetSquareDeckCondition.java
View file @
92b99ad2
...
...
@@ -11,9 +11,13 @@ public class GetSquareDeckCondition {
public
GetSquareDeckCondition
()
{
}
public
GetSquareDeckCondition
(
Integer
page
,
Integer
size
)
{
public
GetSquareDeckCondition
(
Integer
page
,
Integer
size
,
String
keyWord
,
Boolean
sortLike
,
Boolean
sortRank
,
String
contributer
)
{
this
.
page
=
page
;
this
.
size
=
size
;
this
.
keyWord
=
keyWord
;
this
.
sortLike
=
sortLike
;
this
.
sortRank
=
sortRank
;
this
.
contributer
=
contributer
;
}
public
Integer
getPage
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment