-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
686 additions
and
101 deletions.
There are no files selected for viewing
This file contains 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
meta { | ||
name: 获取公众号文章 | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
get { | ||
url: {{baseUrl}}/wxarticle/list/409/1/json | ||
body: none | ||
auth: none | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
meta { | ||
name: 获取公众号章节 | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
get { | ||
url: {{baseUrl}}/wxarticle/chapters/json | ||
body: none | ||
auth: none | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vars { | ||
baseUrl: https://www.wanandroid.com | ||
} |
4 changes: 2 additions & 2 deletions
4
bruno/wan_flutter/article.bru → bruno/wan_flutter/home/首页文章.bru
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
meta { | ||
name: article | ||
name: 首页文章 | ||
type: http | ||
seq: 4 | ||
seq: 2 | ||
} | ||
|
||
get { | ||
|
4 changes: 2 additions & 2 deletions
4
bruno/wan_flutter/banner.bru → bruno/wan_flutter/home/首页轮播图.bru
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
meta { | ||
name: banner | ||
name: 首页轮播图 | ||
type: http | ||
seq: 3 | ||
seq: 1 | ||
} | ||
|
||
get { | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
meta { | ||
name: login | ||
name: 登录 | ||
type: http | ||
seq: 2 | ||
seq: 1 | ||
} | ||
|
||
post { | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import 'package:wan_flutter/common/models/app/wan_response.dart'; | ||
import 'package:wan_flutter/common/models/wx_article/wx_article_chapter.dart'; | ||
import 'package:wan_flutter/common/utils/http_util.dart'; | ||
import 'package:wan_flutter/common/models/app/article_list.dart'; | ||
|
||
class WxArticleApi { | ||
static Future<List<WxArticleChapter>> getWxArticleChapters() async { | ||
var response = await WanHttpUtil().get('/wxarticle/chapters/json'); | ||
|
||
var chapters = ListResponse<WxArticleChapter>.fromJson(response.data,(json)=>WxArticleChapter.fromJson(json)); | ||
|
||
return chapters.data ?? []; | ||
} | ||
|
||
static Future<ArticleListData> getWxArticleList(int chapterId,int currentPage) async { | ||
var response = await WanHttpUtil().get('/wxarticle/list/$chapterId/$currentPage/json'); | ||
|
||
var article = ObjectResponse<ArticleListData>.fromJson(response.data,(json)=>ArticleListData.fromJson(json)); | ||
|
||
return article.data!; | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
|
||
part 'wx_article_chapter.g.dart'; | ||
|
||
@JsonSerializable() | ||
class WxArticleChapter { | ||
WxArticleChapter({ | ||
required this.articleList, | ||
required this.author, | ||
required this.children, | ||
required this.courseId, | ||
required this.cover, | ||
required this.desc, | ||
required this.id, | ||
required this.lisense, | ||
required this.lisenseLink, | ||
required this.name, | ||
required this.order, | ||
required this.parentChapterId, | ||
required this.type, | ||
required this.userControlSetTop, | ||
required this.visible, | ||
}); | ||
|
||
final List<dynamic>? articleList; | ||
final String author; | ||
final List<dynamic>? children; | ||
final int courseId; | ||
final String cover; | ||
final String desc; | ||
final int id; | ||
final String lisense; | ||
final String lisenseLink; | ||
final String name; | ||
final int order; | ||
final int parentChapterId; | ||
final int type; | ||
final bool userControlSetTop; | ||
final int visible; | ||
|
||
factory WxArticleChapter.fromJson(Map<String, dynamic> json) => _$WxArticleChapterFromJson(json); | ||
|
||
Map<String, dynamic> toJson() => _$WxArticleChapterToJson(this); | ||
|
||
} | ||
|
||
/* | ||
[ | ||
{ | ||
"articleList": [], | ||
"author": "", | ||
"children": [], | ||
"courseId": 13, | ||
"cover": "", | ||
"desc": "", | ||
"id": 408, | ||
"lisense": "", | ||
"lisenseLink": "", | ||
"name": "鸿洋", | ||
"order": 190000, | ||
"parentChapterId": 407, | ||
"type": 0, | ||
"userControlSetTop": false, | ||
"visible": 1 | ||
} | ||
]*/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
Oops, something went wrong.