Skip to content

Commit

Permalink
v8.0
Browse files Browse the repository at this point in the history
* 项目分类、项目列表数据
  • Loading branch information
PGzxc committed Jun 6, 2022
1 parent 7a966ad commit 9ddddb8
Show file tree
Hide file tree
Showing 21 changed files with 575 additions and 311 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
* 在BaseController中根据用户是否已经登陆请求数据接口,展示消息数据
* 将MessageControlLer中读取未读消息的数据,移动到未读消息控制器中,在数据请求到同时调用此接口

### v8.0
* 项目分类、项目列表数据


## 五 使用的指令
Expand Down
269 changes: 135 additions & 134 deletions lib/models/project_article_response.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter_wanandroid/models/home_article_response.dart';
import 'package:json_annotation/json_annotation.dart';

part 'project_article_response.g.dart';
Expand All @@ -8,7 +9,7 @@ part 'project_article_response.g.dart';
class ProjectArticleResponse extends Object {

@JsonKey(name: 'data')
Data data;
ProjectData data;

@JsonKey(name: 'errorCode')
int errorCode;
Expand All @@ -26,13 +27,13 @@ class ProjectArticleResponse extends Object {


@JsonSerializable()
class Data extends Object {
class ProjectData extends Object {

@JsonKey(name: 'curPage')
int curPage;

@JsonKey(name: 'datas')
List<Datas> datas;
List<Article> datas;

@JsonKey(name: 'offset')
int offset;
Expand All @@ -49,141 +50,141 @@ class Data extends Object {
@JsonKey(name: 'total')
int total;

Data(this.curPage,this.datas,this.offset,this.over,this.pageCount,this.size,this.total,);
ProjectData(this.curPage,this.datas,this.offset,this.over,this.pageCount,this.size,this.total,);

factory Data.fromJson(Map<String, dynamic> srcJson) => _$DataFromJson(srcJson);
factory ProjectData.fromJson(Map<String, dynamic> srcJson) => _$ProjectDataFromJson(srcJson);

Map<String, dynamic> toJson() => _$DataToJson(this);
Map<String, dynamic> toJson() => _$ProjectDataToJson(this);

}


@JsonSerializable()
class Datas extends Object {

@JsonKey(name: 'apkLink')
String apkLink;

@JsonKey(name: 'audit')
int audit;

@JsonKey(name: 'author')
String author;

@JsonKey(name: 'canEdit')
bool canEdit;

@JsonKey(name: 'chapterId')
int chapterId;

@JsonKey(name: 'chapterName')
String chapterName;

@JsonKey(name: 'collect')
bool collect;

@JsonKey(name: 'courseId')
int courseId;

@JsonKey(name: 'desc')
String desc;

@JsonKey(name: 'descMd')
String descMd;

@JsonKey(name: 'envelopePic')
String envelopePic;

@JsonKey(name: 'fresh')
bool fresh;

@JsonKey(name: 'host')
String host;

@JsonKey(name: 'id')
int id;

@JsonKey(name: 'link')
String link;

@JsonKey(name: 'niceDate')
String niceDate;

@JsonKey(name: 'niceShareDate')
String niceShareDate;

@JsonKey(name: 'origin')
String origin;

@JsonKey(name: 'prefix')
String prefix;

@JsonKey(name: 'projectLink')
String projectLink;

@JsonKey(name: 'publishTime')
int publishTime;

@JsonKey(name: 'realSuperChapterId')
int realSuperChapterId;

@JsonKey(name: 'selfVisible')
int selfVisible;

@JsonKey(name: 'shareDate')
int shareDate;

@JsonKey(name: 'shareUser')
String shareUser;

@JsonKey(name: 'superChapterId')
int superChapterId;

@JsonKey(name: 'superChapterName')
String superChapterName;

@JsonKey(name: 'tags')
List<Tags> tags;

@JsonKey(name: 'title')
String title;

@JsonKey(name: 'type')
int type;

@JsonKey(name: 'userId')
int userId;

@JsonKey(name: 'visible')
int visible;

@JsonKey(name: 'zan')
int zan;

Datas(this.apkLink,this.audit,this.author,this.canEdit,this.chapterId,this.chapterName,this.collect,this.courseId,this.desc,this.descMd,this.envelopePic,this.fresh,this.host,this.id,this.link,this.niceDate,this.niceShareDate,this.origin,this.prefix,this.projectLink,this.publishTime,this.realSuperChapterId,this.selfVisible,this.shareDate,this.shareUser,this.superChapterId,this.superChapterName,this.tags,this.title,this.type,this.userId,this.visible,this.zan,);

factory Datas.fromJson(Map<String, dynamic> srcJson) => _$DatasFromJson(srcJson);

Map<String, dynamic> toJson() => _$DatasToJson(this);

}


@JsonSerializable()
class Tags extends Object {

@JsonKey(name: 'name')
String name;

@JsonKey(name: 'url')
String url;

Tags(this.name,this.url,);

factory Tags.fromJson(Map<String, dynamic> srcJson) => _$TagsFromJson(srcJson);

Map<String, dynamic> toJson() => _$TagsToJson(this);

}
//
// @JsonSerializable()
// class Datas extends Object {
//
// @JsonKey(name: 'apkLink')
// String apkLink;
//
// @JsonKey(name: 'audit')
// int audit;
//
// @JsonKey(name: 'author')
// String author;
//
// @JsonKey(name: 'canEdit')
// bool canEdit;
//
// @JsonKey(name: 'chapterId')
// int chapterId;
//
// @JsonKey(name: 'chapterName')
// String chapterName;
//
// @JsonKey(name: 'collect')
// bool collect;
//
// @JsonKey(name: 'courseId')
// int courseId;
//
// @JsonKey(name: 'desc')
// String desc;
//
// @JsonKey(name: 'descMd')
// String descMd;
//
// @JsonKey(name: 'envelopePic')
// String envelopePic;
//
// @JsonKey(name: 'fresh')
// bool fresh;
//
// @JsonKey(name: 'host')
// String host;
//
// @JsonKey(name: 'id')
// int id;
//
// @JsonKey(name: 'link')
// String link;
//
// @JsonKey(name: 'niceDate')
// String niceDate;
//
// @JsonKey(name: 'niceShareDate')
// String niceShareDate;
//
// @JsonKey(name: 'origin')
// String origin;
//
// @JsonKey(name: 'prefix')
// String prefix;
//
// @JsonKey(name: 'projectLink')
// String projectLink;
//
// @JsonKey(name: 'publishTime')
// int publishTime;
//
// @JsonKey(name: 'realSuperChapterId')
// int realSuperChapterId;
//
// @JsonKey(name: 'selfVisible')
// int selfVisible;
//
// @JsonKey(name: 'shareDate')
// int shareDate;
//
// @JsonKey(name: 'shareUser')
// String shareUser;
//
// @JsonKey(name: 'superChapterId')
// int superChapterId;
//
// @JsonKey(name: 'superChapterName')
// String superChapterName;
//
// @JsonKey(name: 'tags')
// List<Tags> tags;
//
// @JsonKey(name: 'title')
// String title;
//
// @JsonKey(name: 'type')
// int type;
//
// @JsonKey(name: 'userId')
// int userId;
//
// @JsonKey(name: 'visible')
// int visible;
//
// @JsonKey(name: 'zan')
// int zan;
//
// Datas(this.apkLink,this.audit,this.author,this.canEdit,this.chapterId,this.chapterName,this.collect,this.courseId,this.desc,this.descMd,this.envelopePic,this.fresh,this.host,this.id,this.link,this.niceDate,this.niceShareDate,this.origin,this.prefix,this.projectLink,this.publishTime,this.realSuperChapterId,this.selfVisible,this.shareDate,this.shareUser,this.superChapterId,this.superChapterName,this.tags,this.title,this.type,this.userId,this.visible,this.zan,);
//
// factory Datas.fromJson(Map<String, dynamic> srcJson) => _$DatasFromJson(srcJson);
//
// Map<String, dynamic> toJson() => _$DatasToJson(this);
//
// }
//
//
// @JsonSerializable()
// class Tags extends Object {
//
// @JsonKey(name: 'name')
// String name;
//
// @JsonKey(name: 'url')
// String url;
//
// Tags(this.name,this.url,);
//
// factory Tags.fromJson(Map<String, dynamic> srcJson) => _$TagsFromJson(srcJson);
//
// Map<String, dynamic> toJson() => _$TagsToJson(this);
//
// }


Loading

0 comments on commit 9ddddb8

Please sign in to comment.