first commit
1
moehu/moehu_fontend/lib/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
b6edff28-8ab8-4e51-869a-0e6da7720681
|
||||
37
moehu/moehu_fontend/lib/Configure.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
import 'package:event_bus/event_bus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
import 'config/_.dart';
|
||||
import 'package:device_info/device_info.dart';
|
||||
|
||||
/*
|
||||
* 各种工具和配置的初始化
|
||||
*/
|
||||
class Configure {
|
||||
static Future init() async {
|
||||
// 运行初始
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
// SharedPreferences 初始化
|
||||
await SPreferences.init();
|
||||
|
||||
// 是否第一次打开的判断
|
||||
Config.isFirstOpen = !SPreferences().getBool("isFirstOpen");
|
||||
|
||||
// 是否第一次打开的判断
|
||||
Config.isLogin = !SPreferences().getIsLogin();
|
||||
|
||||
// 初始化事件控制中心
|
||||
Config.eventBus = EventBus();
|
||||
|
||||
// 读取保存设备信息
|
||||
DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
|
||||
Config.isAndroid
|
||||
? Config.androidDeviceInfo = await deviceInfoPlugin.androidInfo
|
||||
: Config.iosDeviceInfo = await deviceInfoPlugin.iosInfo;
|
||||
|
||||
// 保存App软件包信息
|
||||
Config.packageInfo = await PackageInfo.fromPlatform();
|
||||
}
|
||||
}
|
||||
53
moehu/moehu_fontend/lib/R.dart
Normal file
@@ -0,0 +1,53 @@
|
||||
class R {
|
||||
/// 静态资源配置,程序自动生成,请勿手动修改
|
||||
/// 
|
||||
static final String libStaticImgUpdateIcClosePng =
|
||||
'lib/static/img/update_ic_close.png';
|
||||
|
||||
/// 
|
||||
static final String libStaticImgTaxiPng = 'lib/static/img/taxi.png';
|
||||
|
||||
/// 
|
||||
static final String libStaticImgDsStore = 'lib/static/img/.DS_Store';
|
||||
|
||||
/// 
|
||||
static final String libStaticImgWelcome3Png = 'lib/static/img/welcome3.png';
|
||||
|
||||
/// 
|
||||
static final String libStaticImgWelcome2Png = 'lib/static/img/welcome2.png';
|
||||
|
||||
/// 
|
||||
static final String libStaticImgUpdateBgAppTopPng =
|
||||
'lib/static/img/update_bg_app_top.png';
|
||||
|
||||
/// 
|
||||
static final String libStaticImgLogoPng = 'lib/static/img/logo.png';
|
||||
|
||||
/// 
|
||||
static final String libStaticImgViplogoPng = 'lib/static/img/vipLogo.png';
|
||||
|
||||
/// 
|
||||
static final String libStaticImgBackPng = 'lib/static/img/back.png';
|
||||
|
||||
/// 
|
||||
static final String libStaticSignupBackground =
|
||||
'lib/static/img/SignupBackground.png';
|
||||
|
||||
/// 
|
||||
static const String ASSET_ADD_PNG = "lib/static/img/add.png";
|
||||
|
||||
/// 
|
||||
static const String ASSET_EMOJI_PNG = "lib/static/img/emoji.png";
|
||||
|
||||
/// 
|
||||
static const String ASSET_KEYBOARD_PNG = "lib/static/img/keyboard.png";
|
||||
|
||||
/// 
|
||||
static const String ASSET_VOICE_PNG = "lib/static/img/voice.png";
|
||||
|
||||
/// 
|
||||
static const String libStaticAddTo = "lib/static/img/addTo.png";
|
||||
|
||||
/// 
|
||||
static const String libStaticAndroidTemplate = "lib/static/img/android-template.png";
|
||||
}
|
||||
1
moehu/moehu_fontend/lib/config/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
81345919-9c5e-4882-af8d-580d39746f99
|
||||
28
moehu/moehu_fontend/lib/config/Colors.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ColorConfig {
|
||||
// 主题色
|
||||
static const Color ThemeColor = Color(0XFF17d2d8);
|
||||
// static const Color ThemeColor = Color(0XFFffd101);
|
||||
// 比主题稍微淡一点的主题色
|
||||
static const Color ThemeOtherColor = Color(0XFF9df1f3);
|
||||
// cell 左侧图标的颜色
|
||||
static const Color IconColor = Color(0XFFc3c0c0);
|
||||
// 某些标题的黑色
|
||||
static const Color TitleColor = Color(0XFF333333);
|
||||
// 某些稍微灰色一点的字体颜色
|
||||
static const Color TextColor = Color(0XFF7e7979);
|
||||
// 未激活时候的字体颜色
|
||||
static const Color NoActiveColor = Color(0XFFd3d2d2);
|
||||
static const Color LineColor = Color(0XFFefefef);
|
||||
// 背景置灰使用和未激活不同
|
||||
static const Color AshPlacement = Color(0XFFf4f4f4);
|
||||
// 可点击的文字颜色
|
||||
static const Color Jump = Color(0XFF00c0cc);
|
||||
// 黑色
|
||||
static const Color BlackBackColor = Color(0XFF000000);
|
||||
// 白色背景
|
||||
static const Color WhiteBackColor = Colors.white;
|
||||
//
|
||||
static const Color TransparentBackground = Color(0X8c000000);
|
||||
}
|
||||
177
moehu/moehu_fontend/lib/config/Index.dart
Normal file
@@ -0,0 +1,177 @@
|
||||
import 'dart:io';
|
||||
import 'package:event_bus/event_bus.dart';
|
||||
import 'package:intro_views_flutter/intro_views_flutter.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
import 'package:device_info/device_info.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'dart:ui';
|
||||
import 'package:peach/R.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
|
||||
import 'Colors.dart';
|
||||
|
||||
class Config {
|
||||
static double top = MediaQueryData.fromWindow(window).padding.top;
|
||||
|
||||
/// 第一次打开,本地无值,返回false取反为true所以显示welcome
|
||||
/// 第二次打开,本地有值,返回true取反false,所以显示app页面
|
||||
static bool isFirstOpen = false;
|
||||
|
||||
/// 第一次打开,未登录,本地无值,返回false,取反为true,访问登录页面
|
||||
/// 第二次打开,已登录,本地有值,返回true,取反为返回false,访问app页面
|
||||
static bool isLogin = true;
|
||||
|
||||
/// App 的名字
|
||||
static String appName = "萌弧";
|
||||
|
||||
/// 保存 App安装包信息
|
||||
static PackageInfo packageInfo;
|
||||
|
||||
/// 是否为 android
|
||||
static bool isAndroid = Platform.isAndroid;
|
||||
|
||||
/// 保存 android 设备信息
|
||||
static AndroidDeviceInfo androidDeviceInfo;
|
||||
|
||||
/// 是否为 ios
|
||||
static bool isIos = Platform.isIOS;
|
||||
|
||||
/// 保存 ios 设备信息
|
||||
static IosDeviceInfo iosDeviceInfo;
|
||||
|
||||
// app的上下文
|
||||
static BuildContext context;
|
||||
|
||||
/// IOS app 下载地址
|
||||
// static String iosDownApkUrl = "https://apps.apple.com/cn/app/qq/id444934666";
|
||||
static String iosDownApkUrl =
|
||||
"itms-apps://itunes.apple.com/cn/app/id444934666";
|
||||
|
||||
/// 首页 /home.html
|
||||
static String h5IpUrl = "http://47.114.153.249/page/";
|
||||
static String shareIpUrl = "http://47.114.153.249/share/";
|
||||
static String h5DomainUrl = "http://www.geekhelp.cn/page/";
|
||||
|
||||
/// 首页底部Tab的控制器
|
||||
static PageController tabController;
|
||||
|
||||
/// 事件控制中心
|
||||
static EventBus eventBus;
|
||||
|
||||
/// 接口地址
|
||||
static final Map<String, dynamic> ApiUrl = {
|
||||
// 接口基地址
|
||||
'PhotoBaseUrl': 'https://moehu.net/app',
|
||||
// 'PhotoBaseUrl': 'http://192.168.31.100:8090/app',
|
||||
|
||||
// 接口地址
|
||||
'ApiList': {
|
||||
'login': '/user/Login',
|
||||
'reg': '/user/Reg',
|
||||
'opusRecommend': '/opus/Recommend',
|
||||
'opusOpusInfo': '/opus/OpusInfo',
|
||||
'commentAdd': '/comment/add',
|
||||
'commentList': '/comment/list',
|
||||
'checkUserIsFollow': '/opus/CheckUserIsFollow',
|
||||
'opusFollowUser': '/opus/FollowUser',
|
||||
'opusCollectionOpus': '/opus/CollectionOpus',
|
||||
'opusCheckOpusIsUpvote': '/opus/CheckIsUpvote',
|
||||
'opusUpvoteOpus': '/opus/UpvoteOpus',
|
||||
'toolUploadFile': '/tool/UploadFile',
|
||||
'opusPushOpus': '/opus/PushOpus',
|
||||
'opusCheckOpusIsCollection': '/opus/CheckOpusIsCollection',
|
||||
'dynamicPersonalDynamic': '/dynamic/PersonalDynamic',
|
||||
'dynamicPush': '/dynamic/Push',
|
||||
'dynamicTabsDynamic': '/dynamic/TabsDynamic',
|
||||
'dynamicDynamicHistory': '/dynamic/DynamicHistory',
|
||||
'tagRecommendTag': '/tag/RecommendTag',
|
||||
'opusRanking': '/opus/Ranking',
|
||||
'opusOpusSearch': '/opus/OpusSearch',
|
||||
'dynamicInfo': '/dynamic/Info',
|
||||
'OpusTag': '/tag/OpusTag',
|
||||
'OpusInfoCreatedTags': '/tag/OpusInfoCreatedTags',
|
||||
'UpdateTagsEditStatus': '/tag/UpdateTagsEditStatus',
|
||||
'DeleteTag': '/tag/DeleteTag',
|
||||
'UserInfo': '/user/UserInfo',
|
||||
'CollectionOpusList': '/opus/CollectionOpusList',
|
||||
'Follow': '/opus/Follow',
|
||||
'getOpusList': '/opus/OpusList',
|
||||
'Update': '/tool/Update',
|
||||
'FansUserList': '/user/FansUserList',
|
||||
'FollowUserList': '/user/FollowUserList'
|
||||
}
|
||||
};
|
||||
|
||||
static final List<PageViewModel> pages = [
|
||||
PageViewModel(
|
||||
pageColor: ColorConfig.ThemeColor,
|
||||
body: Text(
|
||||
'一款专业的插画交流平台',
|
||||
style: TextStyle(fontSize: Screen.setFontSize(17.0)),
|
||||
),
|
||||
title: Text(
|
||||
Config.appName,
|
||||
style: TextStyle(fontSize: Screen.setFontSize(30.0)),
|
||||
),
|
||||
textStyle: TextStyle(color: Colors.white),
|
||||
mainImage: Image.asset(
|
||||
R.libStaticAndroidTemplate,
|
||||
height: Screen.setHeight(225.0),
|
||||
width: Screen.setWidth(225.0),
|
||||
alignment: Alignment.center,
|
||||
)),
|
||||
PageViewModel(
|
||||
pageColor: const Color(0xFF03A9F4),
|
||||
body: Text(
|
||||
'在这里您可以和更多志趣相投的人进行沟通学习',
|
||||
style: TextStyle(fontSize: Screen.setFontSize(17.0)),
|
||||
),
|
||||
title: Text(
|
||||
'遇见.朋友',
|
||||
style: TextStyle(fontSize: Screen.setFontSize(30.0)),
|
||||
),
|
||||
textStyle: TextStyle(color: Colors.white),
|
||||
mainImage: Image.asset(
|
||||
R.libStaticImgWelcome2Png,
|
||||
height: Screen.setHeight(255.0),
|
||||
width: Screen.setWidth(255.0),
|
||||
alignment: Alignment.center,
|
||||
)),
|
||||
PageViewModel(
|
||||
pageColor: const Color(0xFF8BC34A),
|
||||
body: Text(
|
||||
'你的热爱在这都必将得到回应',
|
||||
style: TextStyle(fontSize: Screen.setFontSize(17.0)),
|
||||
),
|
||||
title: Text(
|
||||
'付出.得到',
|
||||
style: TextStyle(fontSize: Screen.setFontSize(30.0)),
|
||||
),
|
||||
mainImage: Image.asset(
|
||||
R.libStaticImgWelcome3Png,
|
||||
height: Screen.setHeight(255.0),
|
||||
width: Screen.setWidth(255.0),
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
textStyle: TextStyle(color: Colors.white),
|
||||
),
|
||||
PageViewModel(
|
||||
pageColor: const Color(0xFF607D8B),
|
||||
body: Text(
|
||||
'点击【进入】开始使用!',
|
||||
style: TextStyle(fontSize: Screen.setFontSize(17.0)),
|
||||
),
|
||||
title: Text(
|
||||
'开始使用',
|
||||
style: TextStyle(fontSize: Screen.setFontSize(30.0)),
|
||||
),
|
||||
mainImage: Image.asset(
|
||||
R.libStaticImgTaxiPng,
|
||||
height: Screen.setHeight(255.0),
|
||||
width: Screen.setWidth(255.0),
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
textStyle: TextStyle(color: Colors.white),
|
||||
),
|
||||
];
|
||||
}
|
||||
4
moehu/moehu_fontend/lib/config/_.dart
Normal file
@@ -0,0 +1,4 @@
|
||||
library config;
|
||||
|
||||
export 'Colors.dart';
|
||||
export 'Index.dart';
|
||||
1
moehu/moehu_fontend/lib/entity/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
b881cb83-9761-4b50-991e-5da6ea4c2a58
|
||||
32
moehu/moehu_fontend/lib/entity/CheckUserIsFollowEntity.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class CheckUserIsFollowEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
bool _data;
|
||||
|
||||
CheckUserIsFollowEntityList({int code, String message, bool data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
bool get data => _data;
|
||||
set data(bool data) => _data = data;
|
||||
|
||||
CheckUserIsFollowEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
data['data'] = this._data;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
208
moehu/moehu_fontend/lib/entity/CollectionOpusListEntity.dart
Normal file
@@ -0,0 +1,208 @@
|
||||
class CollectionOpusListEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
CollectionOpusListEntityData _data;
|
||||
|
||||
CollectionOpusListEntityList(
|
||||
{int code, Null message, CollectionOpusListEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
Null get message => _message;
|
||||
set message(Null message) => _message = message;
|
||||
CollectionOpusListEntityData get data => _data;
|
||||
set data(CollectionOpusListEntityData data) => _data = data;
|
||||
|
||||
CollectionOpusListEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new CollectionOpusListEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class CollectionOpusListEntityData {
|
||||
int _nextPage;
|
||||
List<CollectionOpusListEntityResult> _result;
|
||||
int _totalPage;
|
||||
int _currentPage;
|
||||
|
||||
CollectionOpusListEntityData(
|
||||
{int nextPage,
|
||||
List<CollectionOpusListEntityResult> result,
|
||||
int totalPage,
|
||||
int currentPage}) {
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
this._currentPage = currentPage;
|
||||
}
|
||||
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<CollectionOpusListEntityResult> get result => _result;
|
||||
set result(List<CollectionOpusListEntityResult> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
|
||||
CollectionOpusListEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<CollectionOpusListEntityResult>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new CollectionOpusListEntityResult.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
_currentPage = json['current_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
data['current_page'] = this._currentPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class CollectionOpusListEntityResult {
|
||||
int _opusId;
|
||||
int _userId;
|
||||
String _opusTitle;
|
||||
String _opusIntroduce;
|
||||
String _opusTime;
|
||||
int _opusSatisfied;
|
||||
int _opusSee;
|
||||
int _opusFollow;
|
||||
int _opusCollection;
|
||||
String _opusImg;
|
||||
int _opusStatus;
|
||||
int _opusType;
|
||||
int _opusOriginal;
|
||||
int _opusJurisdiction;
|
||||
int _opusIsEdit;
|
||||
|
||||
CollectionOpusListEntityResult(
|
||||
{int opusId,
|
||||
int userId,
|
||||
String opusTitle,
|
||||
String opusIntroduce,
|
||||
String opusTime,
|
||||
int opusSatisfied,
|
||||
int opusSee,
|
||||
int opusFollow,
|
||||
int opusCollection,
|
||||
String opusImg,
|
||||
int opusStatus,
|
||||
int opusType,
|
||||
int opusOriginal,
|
||||
int opusJurisdiction,
|
||||
int opusIsEdit}) {
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._opusTitle = opusTitle;
|
||||
this._opusIntroduce = opusIntroduce;
|
||||
this._opusTime = opusTime;
|
||||
this._opusSatisfied = opusSatisfied;
|
||||
this._opusSee = opusSee;
|
||||
this._opusFollow = opusFollow;
|
||||
this._opusCollection = opusCollection;
|
||||
this._opusImg = opusImg;
|
||||
this._opusStatus = opusStatus;
|
||||
this._opusType = opusType;
|
||||
this._opusOriginal = opusOriginal;
|
||||
this._opusJurisdiction = opusJurisdiction;
|
||||
this._opusIsEdit = opusIsEdit;
|
||||
}
|
||||
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get opusTitle => _opusTitle;
|
||||
set opusTitle(String opusTitle) => _opusTitle = opusTitle;
|
||||
String get opusIntroduce => _opusIntroduce;
|
||||
set opusIntroduce(String opusIntroduce) => _opusIntroduce = opusIntroduce;
|
||||
String get opusTime => _opusTime;
|
||||
set opusTime(String opusTime) => _opusTime = opusTime;
|
||||
int get opusSatisfied => _opusSatisfied;
|
||||
set opusSatisfied(int opusSatisfied) => _opusSatisfied = opusSatisfied;
|
||||
int get opusSee => _opusSee;
|
||||
set opusSee(int opusSee) => _opusSee = opusSee;
|
||||
int get opusFollow => _opusFollow;
|
||||
set opusFollow(int opusFollow) => _opusFollow = opusFollow;
|
||||
int get opusCollection => _opusCollection;
|
||||
set opusCollection(int opusCollection) => _opusCollection = opusCollection;
|
||||
String get opusImg => _opusImg;
|
||||
set opusImg(String opusImg) => _opusImg = opusImg;
|
||||
int get opusStatus => _opusStatus;
|
||||
set opusStatus(int opusStatus) => _opusStatus = opusStatus;
|
||||
int get opusType => _opusType;
|
||||
set opusType(int opusType) => _opusType = opusType;
|
||||
int get opusOriginal => _opusOriginal;
|
||||
set opusOriginal(int opusOriginal) => _opusOriginal = opusOriginal;
|
||||
int get opusJurisdiction => _opusJurisdiction;
|
||||
set opusJurisdiction(int opusJurisdiction) =>
|
||||
_opusJurisdiction = opusJurisdiction;
|
||||
int get opusIsEdit => _opusIsEdit;
|
||||
set opusIsEdit(int opusIsEdit) => _opusIsEdit = opusIsEdit;
|
||||
|
||||
CollectionOpusListEntityResult.fromJson(Map<String, dynamic> json) {
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_opusTitle = json['opus_title'];
|
||||
_opusIntroduce = json['opus_introduce'];
|
||||
_opusTime = json['opus_time'];
|
||||
_opusSatisfied = json['opus_satisfied'];
|
||||
_opusSee = json['opus_see'];
|
||||
_opusFollow = json['opus_follow'];
|
||||
_opusCollection = json['opus_collection'];
|
||||
_opusImg = json['opus_img'];
|
||||
_opusStatus = json['opus_status'];
|
||||
_opusType = json['opus_type'];
|
||||
_opusOriginal = json['opus_original'];
|
||||
_opusJurisdiction = json['opus_jurisdiction'];
|
||||
_opusIsEdit = json['opus_is_edit'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
data['opus_title'] = this._opusTitle;
|
||||
data['opus_introduce'] = this._opusIntroduce;
|
||||
data['opus_time'] = this._opusTime;
|
||||
data['opus_satisfied'] = this._opusSatisfied;
|
||||
data['opus_see'] = this._opusSee;
|
||||
data['opus_follow'] = this._opusFollow;
|
||||
data['opus_collection'] = this._opusCollection;
|
||||
data['opus_img'] = this._opusImg;
|
||||
data['opus_status'] = this._opusStatus;
|
||||
data['opus_type'] = this._opusType;
|
||||
data['opus_original'] = this._opusOriginal;
|
||||
data['opus_jurisdiction'] = this._opusJurisdiction;
|
||||
data['opus_is_edit'] = this._opusIsEdit;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
286
moehu/moehu_fontend/lib/entity/CommenListEntity.dart
Normal file
@@ -0,0 +1,286 @@
|
||||
class CommenListEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
CommenListEntityData _data;
|
||||
|
||||
CommenListEntityList({int code, Null message, CommenListEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
Null get message => _message;
|
||||
set message(Null message) => _message = message;
|
||||
CommenListEntityData get data => _data;
|
||||
set data(CommenListEntityData data) => _data = data;
|
||||
|
||||
CommenListEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new CommenListEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class CommenListEntityData {
|
||||
int _nextPage;
|
||||
List<CommenListEntity> _result;
|
||||
int _totalPage;
|
||||
int _currentPage;
|
||||
|
||||
CommenListEntityData(
|
||||
{int nextPage,
|
||||
List<CommenListEntity> result,
|
||||
int totalPage,
|
||||
int currentPage}) {
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
this._currentPage = currentPage;
|
||||
}
|
||||
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<CommenListEntity> get result => _result;
|
||||
set result(List<CommenListEntity> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
|
||||
CommenListEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<CommenListEntity>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new CommenListEntity.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
_currentPage = json['current_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
data['current_page'] = this._currentPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class CommenListEntity {
|
||||
int _commentId;
|
||||
int _opusId;
|
||||
int _dynamicId;
|
||||
int _userId;
|
||||
String _commentContent;
|
||||
String _commentTime;
|
||||
int _commentReplyId;
|
||||
String _commentToUsername;
|
||||
String _userNickname;
|
||||
String _userHeadImg;
|
||||
int _commentType;
|
||||
List<Child> _child;
|
||||
|
||||
CommenListEntity(
|
||||
{int commentId,
|
||||
int opusId,
|
||||
int dynamicId,
|
||||
int userId,
|
||||
String commentContent,
|
||||
String commentTime,
|
||||
int commentReplyId,
|
||||
String commentToUsername,
|
||||
String userNickname,
|
||||
String userHeadImg,
|
||||
int commentType,
|
||||
List<Child> child}) {
|
||||
this._commentId = commentId;
|
||||
this._opusId = opusId;
|
||||
this._dynamicId = dynamicId;
|
||||
this._userId = userId;
|
||||
this._commentContent = commentContent;
|
||||
this._commentTime = commentTime;
|
||||
this._commentReplyId = commentReplyId;
|
||||
this._commentToUsername = commentToUsername;
|
||||
this._userNickname = userNickname;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._commentType = commentType;
|
||||
this._child = child;
|
||||
}
|
||||
|
||||
int get commentId => _commentId;
|
||||
set commentId(int commentId) => _commentId = commentId;
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get dynamicId => _dynamicId;
|
||||
set dynamicId(int dynamicId) => _dynamicId = dynamicId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get commentContent => _commentContent;
|
||||
set commentContent(String commentContent) => _commentContent = commentContent;
|
||||
String get commentTime => _commentTime;
|
||||
set commentTime(String commentTime) => _commentTime = commentTime;
|
||||
int get commentReplyId => _commentReplyId;
|
||||
set commentReplyId(int commentReplyId) => _commentReplyId = commentReplyId;
|
||||
String get commentToUsername => _commentToUsername;
|
||||
set commentToUsername(String commentToUsername) =>
|
||||
_commentToUsername = commentToUsername;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
int get commentType => _commentType;
|
||||
set commentType(int commentType) => _commentType = commentType;
|
||||
List<Child> get child => _child;
|
||||
set child(List<Child> child) => _child = child;
|
||||
|
||||
CommenListEntity.fromJson(Map<String, dynamic> json) {
|
||||
_commentId = json['comment_id'];
|
||||
_opusId = json['opus_id'];
|
||||
_dynamicId = json['dynamic_id'];
|
||||
_userId = json['user_id'];
|
||||
_commentContent = json['comment_content'];
|
||||
_commentTime = json['comment_time'];
|
||||
_commentReplyId = json['comment_reply_id'];
|
||||
_commentToUsername = json['comment_to_username'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_commentType = json['comment_type'];
|
||||
if (json['child'] != null) {
|
||||
_child = new List<Child>();
|
||||
json['child'].forEach((v) {
|
||||
_child.add(new Child.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['comment_id'] = this._commentId;
|
||||
data['opus_id'] = this._opusId;
|
||||
data['dynamic_id'] = this._dynamicId;
|
||||
data['user_id'] = this._userId;
|
||||
data['comment_content'] = this._commentContent;
|
||||
data['comment_time'] = this._commentTime;
|
||||
data['comment_reply_id'] = this._commentReplyId;
|
||||
data['comment_to_username'] = this._commentToUsername;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['comment_type'] = this._commentType;
|
||||
if (this._child != null) {
|
||||
data['child'] = this._child.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Child {
|
||||
int _commentId;
|
||||
int _opusId;
|
||||
int _dynamicId;
|
||||
int _userId;
|
||||
String _commentContent;
|
||||
String _commentTime;
|
||||
int _commentReplyId;
|
||||
String _commentToUsername;
|
||||
String _userNickname;
|
||||
String _userHeadImg;
|
||||
int _commentType;
|
||||
|
||||
Child(
|
||||
{int commentId,
|
||||
int opusId,
|
||||
int dynamicId,
|
||||
int userId,
|
||||
String commentContent,
|
||||
String commentTime,
|
||||
int commentReplyId,
|
||||
String commentToUsername,
|
||||
String userNickname,
|
||||
String userHeadImg,
|
||||
int commentType}) {
|
||||
this._commentId = commentId;
|
||||
this._opusId = opusId;
|
||||
this._dynamicId = dynamicId;
|
||||
this._userId = userId;
|
||||
this._commentContent = commentContent;
|
||||
this._commentTime = commentTime;
|
||||
this._commentReplyId = commentReplyId;
|
||||
this._commentToUsername = commentToUsername;
|
||||
this._userNickname = userNickname;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._commentType = commentType;
|
||||
}
|
||||
|
||||
int get commentId => _commentId;
|
||||
set commentId(int commentId) => _commentId = commentId;
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get dynamicId => _dynamicId;
|
||||
set dynamicId(int dynamicId) => _dynamicId = dynamicId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get commentContent => _commentContent;
|
||||
set commentContent(String commentContent) => _commentContent = commentContent;
|
||||
String get commentTime => _commentTime;
|
||||
set commentTime(String commentTime) => _commentTime = commentTime;
|
||||
int get commentReplyId => _commentReplyId;
|
||||
set commentReplyId(int commentReplyId) => _commentReplyId = commentReplyId;
|
||||
String get commentToUsername => _commentToUsername;
|
||||
set commentToUsername(String commentToUsername) =>
|
||||
_commentToUsername = commentToUsername;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
int get commentType => _commentType;
|
||||
set commentType(int commentType) => _commentType = commentType;
|
||||
|
||||
Child.fromJson(Map<String, dynamic> json) {
|
||||
_commentId = json['comment_id'];
|
||||
_opusId = json['opus_id'];
|
||||
_dynamicId = json['dynamic_id'];
|
||||
_userId = json['user_id'];
|
||||
_commentContent = json['comment_content'];
|
||||
_commentTime = json['comment_time'];
|
||||
_commentReplyId = json['comment_reply_id'];
|
||||
_commentToUsername = json['comment_to_username'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_commentType = json['comment_type'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['comment_id'] = this._commentId;
|
||||
data['opus_id'] = this._opusId;
|
||||
data['dynamic_id'] = this._dynamicId;
|
||||
data['user_id'] = this._userId;
|
||||
data['comment_content'] = this._commentContent;
|
||||
data['comment_time'] = this._commentTime;
|
||||
data['comment_reply_id'] = this._commentReplyId;
|
||||
data['comment_to_username'] = this._commentToUsername;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['comment_type'] = this._commentType;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
121
moehu/moehu_fontend/lib/entity/DynamicDynamicHistoryEntity.dart
Normal file
@@ -0,0 +1,121 @@
|
||||
class DynamicDynamicHistoryEntityList {
|
||||
int _code;
|
||||
DynamicDynamicHistoryEntityData _data;
|
||||
String _message;
|
||||
|
||||
DynamicDynamicHistoryEntityList(
|
||||
{int code, DynamicDynamicHistoryEntityData data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
DynamicDynamicHistoryEntityData get data => _data;
|
||||
set data(DynamicDynamicHistoryEntityData data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
DynamicDynamicHistoryEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_data = json['data'] != null
|
||||
? new DynamicDynamicHistoryEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicDynamicHistoryEntityData {
|
||||
int _currentPage;
|
||||
int _nextPage;
|
||||
List<DynamicDynamicHistoryEntity> _result;
|
||||
int _totalPage;
|
||||
|
||||
DynamicDynamicHistoryEntityData(
|
||||
{int currentPage,
|
||||
int nextPage,
|
||||
List<DynamicDynamicHistoryEntity> result,
|
||||
int totalPage}) {
|
||||
this._currentPage = currentPage;
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
}
|
||||
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<DynamicDynamicHistoryEntity> get result => _result;
|
||||
set result(List<DynamicDynamicHistoryEntity> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
|
||||
DynamicDynamicHistoryEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_currentPage = json['current_page'];
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<DynamicDynamicHistoryEntity>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new DynamicDynamicHistoryEntity.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['current_page'] = this._currentPage;
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicDynamicHistoryEntity {
|
||||
String _userHeadImg;
|
||||
int _userId;
|
||||
String _userNickname;
|
||||
|
||||
DynamicDynamicHistoryEntity(
|
||||
{String userHeadImg, int userId, String userNickname}) {
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userId = userId;
|
||||
this._userNickname = userNickname;
|
||||
}
|
||||
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
|
||||
DynamicDynamicHistoryEntity.fromJson(Map<String, dynamic> json) {
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userId = json['user_id'];
|
||||
_userNickname = json['user_nickname'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_id'] = this._userId;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
245
moehu/moehu_fontend/lib/entity/DynamicInfoEntity.dart
Normal file
@@ -0,0 +1,245 @@
|
||||
class DynamicInfoEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
DynamicInfoEntityData _data;
|
||||
|
||||
DynamicInfoEntityList(
|
||||
{int code, String message, DynamicInfoEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
DynamicInfoEntityData get data => _data;
|
||||
set data(DynamicInfoEntityData data) => _data = data;
|
||||
|
||||
DynamicInfoEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new DynamicInfoEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicInfoEntityData {
|
||||
int _dynamicId;
|
||||
int _opusId;
|
||||
int _userId;
|
||||
String _dynamicIntroduce;
|
||||
int _dynamicTop;
|
||||
String _dynamicTime;
|
||||
int _dynamicShareCount;
|
||||
int _dynamicCommentCount;
|
||||
int _dynamicSatisfiedCount;
|
||||
String _dynamicText;
|
||||
int _dynamicType;
|
||||
Null _dynamicImg;
|
||||
DynamicInfoEntityUserInfo _userInfo;
|
||||
List<DynamicImgs> _dynamicImgs;
|
||||
|
||||
DynamicInfoEntityData(
|
||||
{int dynamicId,
|
||||
int opusId,
|
||||
int userId,
|
||||
String dynamicIntroduce,
|
||||
int dynamicTop,
|
||||
String dynamicTime,
|
||||
int dynamicShareCount,
|
||||
int dynamicCommentCount,
|
||||
int dynamicSatisfiedCount,
|
||||
String dynamicText,
|
||||
int dynamicType,
|
||||
Null dynamicImg,
|
||||
DynamicInfoEntityUserInfo userInfo,
|
||||
List<DynamicImgs> dynamicImgs}) {
|
||||
this._dynamicId = dynamicId;
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._dynamicIntroduce = dynamicIntroduce;
|
||||
this._dynamicTop = dynamicTop;
|
||||
this._dynamicTime = dynamicTime;
|
||||
this._dynamicShareCount = dynamicShareCount;
|
||||
this._dynamicCommentCount = dynamicCommentCount;
|
||||
this._dynamicSatisfiedCount = dynamicSatisfiedCount;
|
||||
this._dynamicText = dynamicText;
|
||||
this._dynamicType = dynamicType;
|
||||
this._dynamicImg = dynamicImg;
|
||||
this._userInfo = userInfo;
|
||||
this._dynamicImgs = dynamicImgs;
|
||||
}
|
||||
|
||||
int get dynamicId => _dynamicId;
|
||||
set dynamicId(int dynamicId) => _dynamicId = dynamicId;
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get dynamicIntroduce => _dynamicIntroduce;
|
||||
set dynamicIntroduce(String dynamicIntroduce) =>
|
||||
_dynamicIntroduce = dynamicIntroduce;
|
||||
int get dynamicTop => _dynamicTop;
|
||||
set dynamicTop(int dynamicTop) => _dynamicTop = dynamicTop;
|
||||
String get dynamicTime => _dynamicTime;
|
||||
set dynamicTime(String dynamicTime) => _dynamicTime = dynamicTime;
|
||||
int get dynamicShareCount => _dynamicShareCount;
|
||||
set dynamicShareCount(int dynamicShareCount) =>
|
||||
_dynamicShareCount = dynamicShareCount;
|
||||
int get dynamicCommentCount => _dynamicCommentCount;
|
||||
set dynamicCommentCount(int dynamicCommentCount) =>
|
||||
_dynamicCommentCount = dynamicCommentCount;
|
||||
int get dynamicSatisfiedCount => _dynamicSatisfiedCount;
|
||||
set dynamicSatisfiedCount(int dynamicSatisfiedCount) =>
|
||||
_dynamicSatisfiedCount = dynamicSatisfiedCount;
|
||||
String get dynamicText => _dynamicText;
|
||||
set dynamicText(String dynamicText) => _dynamicText = dynamicText;
|
||||
int get dynamicType => _dynamicType;
|
||||
set dynamicType(int dynamicType) => _dynamicType = dynamicType;
|
||||
Null get dynamicImg => _dynamicImg;
|
||||
set dynamicImg(Null dynamicImg) => _dynamicImg = dynamicImg;
|
||||
DynamicInfoEntityUserInfo get userInfo => _userInfo;
|
||||
set userInfo(DynamicInfoEntityUserInfo userInfo) => _userInfo = userInfo;
|
||||
List<DynamicImgs> get dynamicImgs => _dynamicImgs;
|
||||
set dynamicImgs(List<DynamicImgs> dynamicImgs) => _dynamicImgs = dynamicImgs;
|
||||
|
||||
DynamicInfoEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_dynamicId = json['dynamic_id'];
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_dynamicIntroduce = json['dynamic_introduce'];
|
||||
_dynamicTop = json['dynamic_top'];
|
||||
_dynamicTime = json['dynamic_time'];
|
||||
_dynamicShareCount = json['dynamic_share_count'];
|
||||
_dynamicCommentCount = json['dynamic_comment_count'];
|
||||
_dynamicSatisfiedCount = json['dynamic_satisfied_count'];
|
||||
_dynamicText = json['dynamic_text'];
|
||||
_dynamicType = json['dynamic_type'];
|
||||
_dynamicImg = json['dynamic_img'];
|
||||
_userInfo = json['user_info'] != null
|
||||
? new DynamicInfoEntityUserInfo.fromJson(json['user_info'])
|
||||
: null;
|
||||
if (json['dynamic_imgs'] != null) {
|
||||
_dynamicImgs = new List<DynamicImgs>();
|
||||
json['dynamic_imgs'].forEach((v) {
|
||||
_dynamicImgs.add(new DynamicImgs.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['dynamic_id'] = this._dynamicId;
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
data['dynamic_introduce'] = this._dynamicIntroduce;
|
||||
data['dynamic_top'] = this._dynamicTop;
|
||||
data['dynamic_time'] = this._dynamicTime;
|
||||
data['dynamic_share_count'] = this._dynamicShareCount;
|
||||
data['dynamic_comment_count'] = this._dynamicCommentCount;
|
||||
data['dynamic_satisfied_count'] = this._dynamicSatisfiedCount;
|
||||
data['dynamic_text'] = this._dynamicText;
|
||||
data['dynamic_type'] = this._dynamicType;
|
||||
data['dynamic_img'] = this._dynamicImg;
|
||||
if (this._userInfo != null) {
|
||||
data['user_info'] = this._userInfo.toJson();
|
||||
}
|
||||
if (this._dynamicImgs != null) {
|
||||
data['dynamic_imgs'] = this._dynamicImgs.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicInfoEntityUserInfo {
|
||||
int _userId;
|
||||
String _userHeadImg;
|
||||
String _userNickname;
|
||||
|
||||
DynamicInfoEntityUserInfo(
|
||||
{int userId, String userHeadImg, String userNickname}) {
|
||||
this._userId = userId;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userNickname = userNickname;
|
||||
}
|
||||
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
|
||||
DynamicInfoEntityUserInfo.fromJson(Map<String, dynamic> json) {
|
||||
_userId = json['user_id'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userNickname = json['user_nickname'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_id'] = this._userId;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicImgs {
|
||||
int _imgId;
|
||||
String _imgUrl;
|
||||
int _opusId;
|
||||
int _userId;
|
||||
int _dynamicId;
|
||||
|
||||
DynamicImgs(
|
||||
{int imgId, String imgUrl, int opusId, int userId, int dynamicId}) {
|
||||
this._imgId = imgId;
|
||||
this._imgUrl = imgUrl;
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._dynamicId = dynamicId;
|
||||
}
|
||||
|
||||
int get imgId => _imgId;
|
||||
set imgId(int imgId) => _imgId = imgId;
|
||||
String get imgUrl => _imgUrl;
|
||||
set imgUrl(String imgUrl) => _imgUrl = imgUrl;
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
int get dynamicId => _dynamicId;
|
||||
set dynamicId(int dynamicId) => _dynamicId = dynamicId;
|
||||
|
||||
DynamicImgs.fromJson(Map<String, dynamic> json) {
|
||||
_imgId = json['img_id'];
|
||||
_imgUrl = json['img_url'];
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_dynamicId = json['dynamic_id'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['img_id'] = this._imgId;
|
||||
data['img_url'] = this._imgUrl;
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
data['dynamic_id'] = this._dynamicId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
236
moehu/moehu_fontend/lib/entity/DynamicPersonalDynamicEntity.dart
Normal file
@@ -0,0 +1,236 @@
|
||||
class DynamicPersonalDynamicEntityList {
|
||||
int _code;
|
||||
DynamicPersonalDynamicEntityData _data;
|
||||
String _message;
|
||||
|
||||
DynamicPersonalDynamicEntityList(
|
||||
{int code, DynamicPersonalDynamicEntityData data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
DynamicPersonalDynamicEntityData get data => _data;
|
||||
set data(DynamicPersonalDynamicEntityData data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
DynamicPersonalDynamicEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_data = json['data'] != null
|
||||
? new DynamicPersonalDynamicEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicPersonalDynamicEntityData {
|
||||
int _currentPage;
|
||||
int _nextPage;
|
||||
List<DynamicPersonalDynamicEntity> _result;
|
||||
int _totalPage;
|
||||
|
||||
DynamicPersonalDynamicEntityData(
|
||||
{int currentPage,
|
||||
int nextPage,
|
||||
List<DynamicPersonalDynamicEntity> result,
|
||||
int totalPage}) {
|
||||
this._currentPage = currentPage;
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
}
|
||||
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<DynamicPersonalDynamicEntity> get result => _result;
|
||||
set result(List<DynamicPersonalDynamicEntity> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
|
||||
DynamicPersonalDynamicEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_currentPage = json['current_page'];
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<DynamicPersonalDynamicEntity>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new DynamicPersonalDynamicEntity.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['current_page'] = this._currentPage;
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicPersonalDynamicEntity {
|
||||
int _dynamicCommentCount;
|
||||
int _dynamicId;
|
||||
String _dynamicImg;
|
||||
String _dynamicIntroduce;
|
||||
int _dynamicSatisfiedCount;
|
||||
int _dynamicShareCount;
|
||||
String _dynamicText;
|
||||
String _dynamicTime;
|
||||
int _dynamicTop;
|
||||
int _dynamicType;
|
||||
int _opusId;
|
||||
int _userId;
|
||||
DynamicPersonalDynamicEntityUserInfo _userInfo;
|
||||
|
||||
DynamicPersonalDynamicEntity(
|
||||
{int dynamicCommentCount,
|
||||
int dynamicId,
|
||||
String dynamicImg,
|
||||
String dynamicIntroduce,
|
||||
int dynamicSatisfiedCount,
|
||||
int dynamicShareCount,
|
||||
String dynamicText,
|
||||
String dynamicTime,
|
||||
int dynamicTop,
|
||||
int dynamicType,
|
||||
int opusId,
|
||||
int userId,
|
||||
DynamicPersonalDynamicEntityUserInfo userInfo}) {
|
||||
this._dynamicCommentCount = dynamicCommentCount;
|
||||
this._dynamicId = dynamicId;
|
||||
this._dynamicImg = dynamicImg;
|
||||
this._dynamicIntroduce = dynamicIntroduce;
|
||||
this._dynamicSatisfiedCount = dynamicSatisfiedCount;
|
||||
this._dynamicShareCount = dynamicShareCount;
|
||||
this._dynamicText = dynamicText;
|
||||
this._dynamicTime = dynamicTime;
|
||||
this._dynamicTop = dynamicTop;
|
||||
this._dynamicType = dynamicType;
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._userInfo = userInfo;
|
||||
}
|
||||
|
||||
int get dynamicCommentCount => _dynamicCommentCount;
|
||||
set dynamicCommentCount(int dynamicCommentCount) =>
|
||||
_dynamicCommentCount = dynamicCommentCount;
|
||||
int get dynamicId => _dynamicId;
|
||||
set dynamicId(int dynamicId) => _dynamicId = dynamicId;
|
||||
String get dynamicImg => _dynamicImg;
|
||||
set dynamicImg(String dynamicImg) => _dynamicImg = dynamicImg;
|
||||
String get dynamicIntroduce => _dynamicIntroduce;
|
||||
set dynamicIntroduce(String dynamicIntroduce) =>
|
||||
_dynamicIntroduce = dynamicIntroduce;
|
||||
int get dynamicSatisfiedCount => _dynamicSatisfiedCount;
|
||||
set dynamicSatisfiedCount(int dynamicSatisfiedCount) =>
|
||||
_dynamicSatisfiedCount = dynamicSatisfiedCount;
|
||||
int get dynamicShareCount => _dynamicShareCount;
|
||||
set dynamicShareCount(int dynamicShareCount) =>
|
||||
_dynamicShareCount = dynamicShareCount;
|
||||
String get dynamicText => _dynamicText;
|
||||
set dynamicText(String dynamicText) => _dynamicText = dynamicText;
|
||||
String get dynamicTime => _dynamicTime;
|
||||
set dynamicTime(String dynamicTime) => _dynamicTime = dynamicTime;
|
||||
int get dynamicTop => _dynamicTop;
|
||||
set dynamicTop(int dynamicTop) => _dynamicTop = dynamicTop;
|
||||
int get dynamicType => _dynamicType;
|
||||
set dynamicType(int dynamicType) => _dynamicType = dynamicType;
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
DynamicPersonalDynamicEntityUserInfo get userInfo => _userInfo;
|
||||
set userInfo(DynamicPersonalDynamicEntityUserInfo userInfo) =>
|
||||
_userInfo = userInfo;
|
||||
|
||||
DynamicPersonalDynamicEntity.fromJson(Map<String, dynamic> json) {
|
||||
_dynamicCommentCount = json['dynamic_comment_count'];
|
||||
_dynamicId = json['dynamic_id'];
|
||||
_dynamicImg = json['dynamic_img'];
|
||||
_dynamicIntroduce = json['dynamic_introduce'];
|
||||
_dynamicSatisfiedCount = json['dynamic_satisfied_count'];
|
||||
_dynamicShareCount = json['dynamic_share_count'];
|
||||
_dynamicText = json['dynamic_text'];
|
||||
_dynamicTime = json['dynamic_time'];
|
||||
_dynamicTop = json['dynamic_top'];
|
||||
_dynamicType = json['dynamic_type'];
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_userInfo = json['user_info'] != null
|
||||
? new DynamicPersonalDynamicEntityUserInfo.fromJson(json['user_info'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['dynamic_comment_count'] = this._dynamicCommentCount;
|
||||
data['dynamic_id'] = this._dynamicId;
|
||||
data['dynamic_img'] = this._dynamicImg;
|
||||
data['dynamic_introduce'] = this._dynamicIntroduce;
|
||||
data['dynamic_satisfied_count'] = this._dynamicSatisfiedCount;
|
||||
data['dynamic_share_count'] = this._dynamicShareCount;
|
||||
data['dynamic_text'] = this._dynamicText;
|
||||
data['dynamic_time'] = this._dynamicTime;
|
||||
data['dynamic_top'] = this._dynamicTop;
|
||||
data['dynamic_type'] = this._dynamicType;
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
if (this._userInfo != null) {
|
||||
data['user_info'] = this._userInfo.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicPersonalDynamicEntityUserInfo {
|
||||
String _userHeadImg;
|
||||
int _userId;
|
||||
String _userNickname;
|
||||
|
||||
DynamicPersonalDynamicEntityUserInfo(
|
||||
{String userHeadImg, int userId, String userNickname}) {
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userId = userId;
|
||||
this._userNickname = userNickname;
|
||||
}
|
||||
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
|
||||
DynamicPersonalDynamicEntityUserInfo.fromJson(Map<String, dynamic> json) {
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userId = json['user_id'];
|
||||
_userNickname = json['user_nickname'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_id'] = this._userId;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
234
moehu/moehu_fontend/lib/entity/DynamicTabsDynamicEntity.dart
Normal file
@@ -0,0 +1,234 @@
|
||||
class DynamicTabsDynamicEntityList {
|
||||
int _code;
|
||||
DynamicTabsDynamicEntityData _data;
|
||||
String _message;
|
||||
|
||||
DynamicTabsDynamicEntityList(
|
||||
{int code, DynamicTabsDynamicEntityData data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
DynamicTabsDynamicEntityData get data => _data;
|
||||
set data(DynamicTabsDynamicEntityData data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
DynamicTabsDynamicEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_data = json['data'] != null
|
||||
? new DynamicTabsDynamicEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicTabsDynamicEntityData {
|
||||
int _currentPage;
|
||||
int _nextPage;
|
||||
List<DynamicTabsDynamicEntity> _result;
|
||||
int _totalPage;
|
||||
|
||||
DynamicTabsDynamicEntityData(
|
||||
{int currentPage,
|
||||
int nextPage,
|
||||
List<DynamicTabsDynamicEntity> result,
|
||||
int totalPage}) {
|
||||
this._currentPage = currentPage;
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
}
|
||||
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<DynamicTabsDynamicEntity> get result => _result;
|
||||
set result(List<DynamicTabsDynamicEntity> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
|
||||
DynamicTabsDynamicEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_currentPage = json['current_page'];
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<DynamicTabsDynamicEntity>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new DynamicTabsDynamicEntity.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['current_page'] = this._currentPage;
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicTabsDynamicEntity {
|
||||
int _dynamicCommentCount;
|
||||
int _dynamicId;
|
||||
String _dynamicImg;
|
||||
String _dynamicIntroduce;
|
||||
int _dynamicSatisfiedCount;
|
||||
int _dynamicShareCount;
|
||||
String _dynamicText;
|
||||
String _dynamicTime;
|
||||
int _dynamicTop;
|
||||
int _dynamicType;
|
||||
int _opusId;
|
||||
int _userId;
|
||||
DynamicUserInfo _userInfo;
|
||||
|
||||
DynamicTabsDynamicEntity(
|
||||
{int dynamicCommentCount,
|
||||
int dynamicId,
|
||||
String dynamicImg,
|
||||
String dynamicIntroduce,
|
||||
int dynamicSatisfiedCount,
|
||||
int dynamicShareCount,
|
||||
String dynamicText,
|
||||
String dynamicTime,
|
||||
int dynamicTop,
|
||||
int dynamicType,
|
||||
int opusId,
|
||||
int userId,
|
||||
DynamicUserInfo userInfo}) {
|
||||
this._dynamicCommentCount = dynamicCommentCount;
|
||||
this._dynamicId = dynamicId;
|
||||
this._dynamicImg = dynamicImg;
|
||||
this._dynamicIntroduce = dynamicIntroduce;
|
||||
this._dynamicSatisfiedCount = dynamicSatisfiedCount;
|
||||
this._dynamicShareCount = dynamicShareCount;
|
||||
this._dynamicText = dynamicText;
|
||||
this._dynamicTime = dynamicTime;
|
||||
this._dynamicTop = dynamicTop;
|
||||
this._dynamicType = dynamicType;
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._userInfo = userInfo;
|
||||
}
|
||||
|
||||
int get dynamicCommentCount => _dynamicCommentCount;
|
||||
set dynamicCommentCount(int dynamicCommentCount) =>
|
||||
_dynamicCommentCount = dynamicCommentCount;
|
||||
int get dynamicId => _dynamicId;
|
||||
set dynamicId(int dynamicId) => _dynamicId = dynamicId;
|
||||
String get dynamicImg => _dynamicImg;
|
||||
set dynamicImg(String dynamicImg) => _dynamicImg = dynamicImg;
|
||||
String get dynamicIntroduce => _dynamicIntroduce;
|
||||
set dynamicIntroduce(String dynamicIntroduce) =>
|
||||
_dynamicIntroduce = dynamicIntroduce;
|
||||
int get dynamicSatisfiedCount => _dynamicSatisfiedCount;
|
||||
set dynamicSatisfiedCount(int dynamicSatisfiedCount) =>
|
||||
_dynamicSatisfiedCount = dynamicSatisfiedCount;
|
||||
int get dynamicShareCount => _dynamicShareCount;
|
||||
set dynamicShareCount(int dynamicShareCount) =>
|
||||
_dynamicShareCount = dynamicShareCount;
|
||||
String get dynamicText => _dynamicText;
|
||||
set dynamicText(String dynamicText) => _dynamicText = dynamicText;
|
||||
String get dynamicTime => _dynamicTime;
|
||||
set dynamicTime(String dynamicTime) => _dynamicTime = dynamicTime;
|
||||
int get dynamicTop => _dynamicTop;
|
||||
set dynamicTop(int dynamicTop) => _dynamicTop = dynamicTop;
|
||||
int get dynamicType => _dynamicType;
|
||||
set dynamicType(int dynamicType) => _dynamicType = dynamicType;
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
DynamicUserInfo get userInfo => _userInfo;
|
||||
set userInfo(DynamicUserInfo userInfo) => _userInfo = userInfo;
|
||||
|
||||
DynamicTabsDynamicEntity.fromJson(Map<String, dynamic> json) {
|
||||
_dynamicCommentCount = json['dynamic_comment_count'];
|
||||
_dynamicId = json['dynamic_id'];
|
||||
_dynamicImg = json['dynamic_img'];
|
||||
_dynamicIntroduce = json['dynamic_introduce'];
|
||||
_dynamicSatisfiedCount = json['dynamic_satisfied_count'];
|
||||
_dynamicShareCount = json['dynamic_share_count'];
|
||||
_dynamicText = json['dynamic_text'];
|
||||
_dynamicTime = json['dynamic_time'];
|
||||
_dynamicTop = json['dynamic_top'];
|
||||
_dynamicType = json['dynamic_type'];
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_userInfo = json['user_info'] != null
|
||||
? new DynamicUserInfo.fromJson(json['user_info'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['dynamic_comment_count'] = this._dynamicCommentCount;
|
||||
data['dynamic_id'] = this._dynamicId;
|
||||
data['dynamic_img'] = this._dynamicImg;
|
||||
data['dynamic_introduce'] = this._dynamicIntroduce;
|
||||
data['dynamic_satisfied_count'] = this._dynamicSatisfiedCount;
|
||||
data['dynamic_share_count'] = this._dynamicShareCount;
|
||||
data['dynamic_text'] = this._dynamicText;
|
||||
data['dynamic_time'] = this._dynamicTime;
|
||||
data['dynamic_top'] = this._dynamicTop;
|
||||
data['dynamic_type'] = this._dynamicType;
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
if (this._userInfo != null) {
|
||||
data['user_info'] = this._userInfo.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class DynamicUserInfo {
|
||||
String _userHeadImg;
|
||||
int _userId;
|
||||
String _userNickname;
|
||||
|
||||
DynamicUserInfo({String userHeadImg, int userId, String userNickname}) {
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userId = userId;
|
||||
this._userNickname = userNickname;
|
||||
}
|
||||
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
|
||||
DynamicUserInfo.fromJson(Map<String, dynamic> json) {
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userId = json['user_id'];
|
||||
_userNickname = json['user_nickname'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_id'] = this._userId;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
32
moehu/moehu_fontend/lib/entity/EmptyEntity.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
class EmptyEntityList {
|
||||
int _code;
|
||||
Null _data;
|
||||
String _message;
|
||||
|
||||
EmptyEntityList({int code, Null data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
Null get data => _data;
|
||||
set data(Null data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
EmptyEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_data = json['data'];
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['data'] = this._data;
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
215
moehu/moehu_fontend/lib/entity/FansUserListEntity.dart
Normal file
@@ -0,0 +1,215 @@
|
||||
class FansUserListEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
FansUserListEntityData _data;
|
||||
|
||||
FansUserListEntityList(
|
||||
{int code, String message, FansUserListEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
FansUserListEntityData get data => _data;
|
||||
set data(FansUserListEntityData data) => _data = data;
|
||||
|
||||
FansUserListEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new FansUserListEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class FansUserListEntityData {
|
||||
int _nextPage;
|
||||
List<FansUserListEntityResult> _result;
|
||||
int _totalPage;
|
||||
int _currentPage;
|
||||
|
||||
FansUserListEntityData(
|
||||
{int nextPage,
|
||||
List<FansUserListEntityResult> result,
|
||||
int totalPage,
|
||||
int currentPage}) {
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
this._currentPage = currentPage;
|
||||
}
|
||||
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<FansUserListEntityResult> get result => _result;
|
||||
set result(List<FansUserListEntityResult> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
|
||||
FansUserListEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<FansUserListEntityResult>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new FansUserListEntityResult.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
_currentPage = json['current_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
data['current_page'] = this._currentPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class FansUserListEntityResult {
|
||||
int _userId;
|
||||
String _userPhone;
|
||||
String _userRealName;
|
||||
String _userIdCard;
|
||||
String _userEmail;
|
||||
String _userBankCard;
|
||||
String _userSex;
|
||||
String _userWork;
|
||||
String _userHeadImg;
|
||||
String _userNickname;
|
||||
String _userUid;
|
||||
String _userRegTime;
|
||||
String _userBirthday;
|
||||
String _userConstellation;
|
||||
String _userAutograph;
|
||||
bool _haveFollow;
|
||||
|
||||
FansUserListEntityResult(
|
||||
{int userId,
|
||||
String userPhone,
|
||||
String userRealName,
|
||||
String userIdCard,
|
||||
String userEmail,
|
||||
String userBankCard,
|
||||
String userSex,
|
||||
String userWork,
|
||||
String userHeadImg,
|
||||
String userNickname,
|
||||
String userUid,
|
||||
String userRegTime,
|
||||
String userBirthday,
|
||||
String userConstellation,
|
||||
String userAutograph,
|
||||
bool haveFollow}) {
|
||||
this._userId = userId;
|
||||
this._userPhone = userPhone;
|
||||
this._userRealName = userRealName;
|
||||
this._userIdCard = userIdCard;
|
||||
this._userEmail = userEmail;
|
||||
this._userBankCard = userBankCard;
|
||||
this._userSex = userSex;
|
||||
this._userWork = userWork;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userNickname = userNickname;
|
||||
this._userUid = userUid;
|
||||
this._userRegTime = userRegTime;
|
||||
this._userBirthday = userBirthday;
|
||||
this._userConstellation = userConstellation;
|
||||
this._userAutograph = userAutograph;
|
||||
this._haveFollow = haveFollow;
|
||||
}
|
||||
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userPhone => _userPhone;
|
||||
set userPhone(String userPhone) => _userPhone = userPhone;
|
||||
String get userRealName => _userRealName;
|
||||
set userRealName(String userRealName) => _userRealName = userRealName;
|
||||
String get userIdCard => _userIdCard;
|
||||
set userIdCard(String userIdCard) => _userIdCard = userIdCard;
|
||||
String get userEmail => _userEmail;
|
||||
set userEmail(String userEmail) => _userEmail = userEmail;
|
||||
String get userBankCard => _userBankCard;
|
||||
set userBankCard(String userBankCard) => _userBankCard = userBankCard;
|
||||
String get userSex => _userSex;
|
||||
set userSex(String userSex) => _userSex = userSex;
|
||||
String get userWork => _userWork;
|
||||
set userWork(String userWork) => _userWork = userWork;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
String get userUid => _userUid;
|
||||
set userUid(String userUid) => _userUid = userUid;
|
||||
String get userRegTime => _userRegTime;
|
||||
set userRegTime(String userRegTime) => _userRegTime = userRegTime;
|
||||
String get userBirthday => _userBirthday;
|
||||
set userBirthday(String userBirthday) => _userBirthday = userBirthday;
|
||||
String get userConstellation => _userConstellation;
|
||||
set userConstellation(String userConstellation) =>
|
||||
_userConstellation = userConstellation;
|
||||
String get userAutograph => _userAutograph;
|
||||
set userAutograph(String userAutograph) => _userAutograph = userAutograph;
|
||||
bool get haveFollow => _haveFollow;
|
||||
set haveFollow(bool haveFollow) => _haveFollow = haveFollow;
|
||||
|
||||
FansUserListEntityResult.fromJson(Map<String, dynamic> json) {
|
||||
_userId = json['user_id'];
|
||||
_userPhone = json['user_phone'];
|
||||
_userRealName = json['user_real_name'];
|
||||
_userIdCard = json['user_id_card'];
|
||||
_userEmail = json['user_email'];
|
||||
_userBankCard = json['user_bank_card'];
|
||||
_userSex = json['user_sex'];
|
||||
_userWork = json['user_work'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_userUid = json['user_uid'];
|
||||
_userRegTime = json['user_reg_time'];
|
||||
_userBirthday = json['user_birthday'];
|
||||
_userConstellation = json['user_constellation'];
|
||||
_userAutograph = json['user_autograph'];
|
||||
_haveFollow = json['have_follow'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_id'] = this._userId;
|
||||
data['user_phone'] = this._userPhone;
|
||||
data['user_real_name'] = this._userRealName;
|
||||
data['user_id_card'] = this._userIdCard;
|
||||
data['user_email'] = this._userEmail;
|
||||
data['user_bank_card'] = this._userBankCard;
|
||||
data['user_sex'] = this._userSex;
|
||||
data['user_work'] = this._userWork;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['user_uid'] = this._userUid;
|
||||
data['user_reg_time'] = this._userRegTime;
|
||||
data['user_birthday'] = this._userBirthday;
|
||||
data['user_constellation'] = this._userConstellation;
|
||||
data['user_autograph'] = this._userAutograph;
|
||||
data['have_follow'] = this._haveFollow;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
205
moehu/moehu_fontend/lib/entity/FollowEntity.dart
Normal file
@@ -0,0 +1,205 @@
|
||||
class FollowList {
|
||||
int _code;
|
||||
FollowData _data;
|
||||
String _message;
|
||||
|
||||
FollowList({int code, FollowData data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
FollowData get data => _data;
|
||||
set data(FollowData data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
FollowList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_data = json['data'] != null ? new FollowData.fromJson(json['data']) : null;
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class FollowData {
|
||||
int _currentPage;
|
||||
int _nextPage;
|
||||
List<FollowResult> _result;
|
||||
int _totalPage;
|
||||
|
||||
FollowData(
|
||||
{int currentPage,
|
||||
int nextPage,
|
||||
List<FollowResult> result,
|
||||
int totalPage}) {
|
||||
this._currentPage = currentPage;
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
}
|
||||
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<FollowResult> get result => _result;
|
||||
set result(List<FollowResult> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
|
||||
FollowData.fromJson(Map<String, dynamic> json) {
|
||||
_currentPage = json['current_page'];
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<FollowResult>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new FollowResult.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['current_page'] = this._currentPage;
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class FollowResult {
|
||||
int _opusCollection;
|
||||
int _opusFollow;
|
||||
int _opusId;
|
||||
String _opusImg;
|
||||
String _opusIntroduce;
|
||||
int _opusIsEdit;
|
||||
int _opusJurisdiction;
|
||||
int _opusOriginal;
|
||||
int _opusSatisfied;
|
||||
int _opusSee;
|
||||
int _opusStatus;
|
||||
String _opusTime;
|
||||
String _opusTitle;
|
||||
int _opusType;
|
||||
int _userId;
|
||||
|
||||
FollowResult(
|
||||
{int opusCollection,
|
||||
int opusFollow,
|
||||
int opusId,
|
||||
String opusImg,
|
||||
String opusIntroduce,
|
||||
int opusIsEdit,
|
||||
int opusJurisdiction,
|
||||
int opusOriginal,
|
||||
int opusSatisfied,
|
||||
int opusSee,
|
||||
int opusStatus,
|
||||
String opusTime,
|
||||
String opusTitle,
|
||||
int opusType,
|
||||
int userId}) {
|
||||
this._opusCollection = opusCollection;
|
||||
this._opusFollow = opusFollow;
|
||||
this._opusId = opusId;
|
||||
this._opusImg = opusImg;
|
||||
this._opusIntroduce = opusIntroduce;
|
||||
this._opusIsEdit = opusIsEdit;
|
||||
this._opusJurisdiction = opusJurisdiction;
|
||||
this._opusOriginal = opusOriginal;
|
||||
this._opusSatisfied = opusSatisfied;
|
||||
this._opusSee = opusSee;
|
||||
this._opusStatus = opusStatus;
|
||||
this._opusTime = opusTime;
|
||||
this._opusTitle = opusTitle;
|
||||
this._opusType = opusType;
|
||||
this._userId = userId;
|
||||
}
|
||||
|
||||
int get opusCollection => _opusCollection;
|
||||
set opusCollection(int opusCollection) => _opusCollection = opusCollection;
|
||||
int get opusFollow => _opusFollow;
|
||||
set opusFollow(int opusFollow) => _opusFollow = opusFollow;
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
String get opusImg => _opusImg;
|
||||
set opusImg(String opusImg) => _opusImg = opusImg;
|
||||
String get opusIntroduce => _opusIntroduce;
|
||||
set opusIntroduce(String opusIntroduce) => _opusIntroduce = opusIntroduce;
|
||||
int get opusIsEdit => _opusIsEdit;
|
||||
set opusIsEdit(int opusIsEdit) => _opusIsEdit = opusIsEdit;
|
||||
int get opusJurisdiction => _opusJurisdiction;
|
||||
set opusJurisdiction(int opusJurisdiction) =>
|
||||
_opusJurisdiction = opusJurisdiction;
|
||||
int get opusOriginal => _opusOriginal;
|
||||
set opusOriginal(int opusOriginal) => _opusOriginal = opusOriginal;
|
||||
int get opusSatisfied => _opusSatisfied;
|
||||
set opusSatisfied(int opusSatisfied) => _opusSatisfied = opusSatisfied;
|
||||
int get opusSee => _opusSee;
|
||||
set opusSee(int opusSee) => _opusSee = opusSee;
|
||||
int get opusStatus => _opusStatus;
|
||||
set opusStatus(int opusStatus) => _opusStatus = opusStatus;
|
||||
String get opusTime => _opusTime;
|
||||
set opusTime(String opusTime) => _opusTime = opusTime;
|
||||
String get opusTitle => _opusTitle;
|
||||
set opusTitle(String opusTitle) => _opusTitle = opusTitle;
|
||||
int get opusType => _opusType;
|
||||
set opusType(int opusType) => _opusType = opusType;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
|
||||
FollowResult.fromJson(Map<String, dynamic> json) {
|
||||
_opusCollection = json['opus_collection'];
|
||||
_opusFollow = json['opus_follow'];
|
||||
_opusId = json['opus_id'];
|
||||
_opusImg = json['opus_img'];
|
||||
_opusIntroduce = json['opus_introduce'];
|
||||
_opusIsEdit = json['opus_is_edit'];
|
||||
_opusJurisdiction = json['opus_jurisdiction'];
|
||||
_opusOriginal = json['opus_original'];
|
||||
_opusSatisfied = json['opus_satisfied'];
|
||||
_opusSee = json['opus_see'];
|
||||
_opusStatus = json['opus_status'];
|
||||
_opusTime = json['opus_time'];
|
||||
_opusTitle = json['opus_title'];
|
||||
_opusType = json['opus_type'];
|
||||
_userId = json['user_id'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_collection'] = this._opusCollection;
|
||||
data['opus_follow'] = this._opusFollow;
|
||||
data['opus_id'] = this._opusId;
|
||||
data['opus_img'] = this._opusImg;
|
||||
data['opus_introduce'] = this._opusIntroduce;
|
||||
data['opus_is_edit'] = this._opusIsEdit;
|
||||
data['opus_jurisdiction'] = this._opusJurisdiction;
|
||||
data['opus_original'] = this._opusOriginal;
|
||||
data['opus_satisfied'] = this._opusSatisfied;
|
||||
data['opus_see'] = this._opusSee;
|
||||
data['opus_status'] = this._opusStatus;
|
||||
data['opus_time'] = this._opusTime;
|
||||
data['opus_title'] = this._opusTitle;
|
||||
data['opus_type'] = this._opusType;
|
||||
data['user_id'] = this._userId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
215
moehu/moehu_fontend/lib/entity/FollowUserListEntity.dart
Normal file
@@ -0,0 +1,215 @@
|
||||
class FollowUserListEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
FollowUserListEntityData _data;
|
||||
|
||||
FollowUserListEntityList(
|
||||
{int code, String message, FollowUserListEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
FollowUserListEntityData get data => _data;
|
||||
set data(FollowUserListEntityData data) => _data = data;
|
||||
|
||||
FollowUserListEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new FollowUserListEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class FollowUserListEntityData {
|
||||
int _nextPage;
|
||||
List<FollowUserListEntityResult> _result;
|
||||
int _totalPage;
|
||||
int _currentPage;
|
||||
|
||||
FollowUserListEntityData(
|
||||
{int nextPage,
|
||||
List<FollowUserListEntityResult> result,
|
||||
int totalPage,
|
||||
int currentPage}) {
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
this._currentPage = currentPage;
|
||||
}
|
||||
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<FollowUserListEntityResult> get result => _result;
|
||||
set result(List<FollowUserListEntityResult> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
|
||||
FollowUserListEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<FollowUserListEntityResult>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new FollowUserListEntityResult.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
_currentPage = json['current_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
data['current_page'] = this._currentPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class FollowUserListEntityResult {
|
||||
int _userId;
|
||||
String _userPhone;
|
||||
String _userRealName;
|
||||
String _userIdCard;
|
||||
String _userEmail;
|
||||
String _userBankCard;
|
||||
String _userSex;
|
||||
String _userWork;
|
||||
String _userHeadImg;
|
||||
String _userNickname;
|
||||
String _userUid;
|
||||
String _userRegTime;
|
||||
String _userBirthday;
|
||||
String _userConstellation;
|
||||
String _userAutograph;
|
||||
bool _haveFollow;
|
||||
|
||||
FollowUserListEntityResult(
|
||||
{int userId,
|
||||
String userPhone,
|
||||
String userRealName,
|
||||
String userIdCard,
|
||||
String userEmail,
|
||||
String userBankCard,
|
||||
String userSex,
|
||||
String userWork,
|
||||
String userHeadImg,
|
||||
String userNickname,
|
||||
String userUid,
|
||||
String userRegTime,
|
||||
String userBirthday,
|
||||
String userConstellation,
|
||||
String userAutograph,
|
||||
bool haveFollow}) {
|
||||
this._userId = userId;
|
||||
this._userPhone = userPhone;
|
||||
this._userRealName = userRealName;
|
||||
this._userIdCard = userIdCard;
|
||||
this._userEmail = userEmail;
|
||||
this._userBankCard = userBankCard;
|
||||
this._userSex = userSex;
|
||||
this._userWork = userWork;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userNickname = userNickname;
|
||||
this._userUid = userUid;
|
||||
this._userRegTime = userRegTime;
|
||||
this._userBirthday = userBirthday;
|
||||
this._userConstellation = userConstellation;
|
||||
this._userAutograph = userAutograph;
|
||||
this._haveFollow = haveFollow;
|
||||
}
|
||||
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userPhone => _userPhone;
|
||||
set userPhone(String userPhone) => _userPhone = userPhone;
|
||||
String get userRealName => _userRealName;
|
||||
set userRealName(String userRealName) => _userRealName = userRealName;
|
||||
String get userIdCard => _userIdCard;
|
||||
set userIdCard(String userIdCard) => _userIdCard = userIdCard;
|
||||
String get userEmail => _userEmail;
|
||||
set userEmail(String userEmail) => _userEmail = userEmail;
|
||||
String get userBankCard => _userBankCard;
|
||||
set userBankCard(String userBankCard) => _userBankCard = userBankCard;
|
||||
String get userSex => _userSex;
|
||||
set userSex(String userSex) => _userSex = userSex;
|
||||
String get userWork => _userWork;
|
||||
set userWork(String userWork) => _userWork = userWork;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
String get userUid => _userUid;
|
||||
set userUid(String userUid) => _userUid = userUid;
|
||||
String get userRegTime => _userRegTime;
|
||||
set userRegTime(String userRegTime) => _userRegTime = userRegTime;
|
||||
String get userBirthday => _userBirthday;
|
||||
set userBirthday(String userBirthday) => _userBirthday = userBirthday;
|
||||
String get userConstellation => _userConstellation;
|
||||
set userConstellation(String userConstellation) =>
|
||||
_userConstellation = userConstellation;
|
||||
String get userAutograph => _userAutograph;
|
||||
set userAutograph(String userAutograph) => _userAutograph = userAutograph;
|
||||
bool get haveFollow => _haveFollow;
|
||||
set haveFollow(bool haveFollow) => _haveFollow = haveFollow;
|
||||
|
||||
FollowUserListEntityResult.fromJson(Map<String, dynamic> json) {
|
||||
_userId = json['user_id'];
|
||||
_userPhone = json['user_phone'];
|
||||
_userRealName = json['user_real_name'];
|
||||
_userIdCard = json['user_id_card'];
|
||||
_userEmail = json['user_email'];
|
||||
_userBankCard = json['user_bank_card'];
|
||||
_userSex = json['user_sex'];
|
||||
_userWork = json['user_work'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_userUid = json['user_uid'];
|
||||
_userRegTime = json['user_reg_time'];
|
||||
_userBirthday = json['user_birthday'];
|
||||
_userConstellation = json['user_constellation'];
|
||||
_userAutograph = json['user_autograph'];
|
||||
_haveFollow = json['have_follow'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_id'] = this._userId;
|
||||
data['user_phone'] = this._userPhone;
|
||||
data['user_real_name'] = this._userRealName;
|
||||
data['user_id_card'] = this._userIdCard;
|
||||
data['user_email'] = this._userEmail;
|
||||
data['user_bank_card'] = this._userBankCard;
|
||||
data['user_sex'] = this._userSex;
|
||||
data['user_work'] = this._userWork;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['user_uid'] = this._userUid;
|
||||
data['user_reg_time'] = this._userRegTime;
|
||||
data['user_birthday'] = this._userBirthday;
|
||||
data['user_constellation'] = this._userConstellation;
|
||||
data['user_autograph'] = this._userAutograph;
|
||||
data['have_follow'] = this._haveFollow;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
26
moehu/moehu_fontend/lib/entity/ImagePickerEntity.dart
Normal file
@@ -0,0 +1,26 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
|
||||
/*
|
||||
选择后的图片实体
|
||||
*/
|
||||
class ImagePickerEntity {
|
||||
// 图片地址
|
||||
File path;
|
||||
// 图片文件
|
||||
PickedFile pickedFile;
|
||||
|
||||
String netWorkPath;
|
||||
|
||||
ImagePickerEntity({this.path, this.pickedFile, this.netWorkPath});
|
||||
|
||||
File get getPath => path;
|
||||
set setPath(File path) => path = path;
|
||||
|
||||
PickedFile get getPickedFile => pickedFile;
|
||||
set setPickedFile(PickedFile pickedFile) => pickedFile = pickedFile;
|
||||
|
||||
String get getNetWorkPath => netWorkPath;
|
||||
set setNetWorkPath(File netWorkPath) => netWorkPath = netWorkPath;
|
||||
}
|
||||
207
moehu/moehu_fontend/lib/entity/OpusListEntity.dart
Normal file
@@ -0,0 +1,207 @@
|
||||
class OpusListEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
OpusListEntityData _data;
|
||||
|
||||
OpusListEntityList({int code, String message, OpusListEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
OpusListEntityData get data => _data;
|
||||
set data(OpusListEntityData data) => _data = data;
|
||||
|
||||
OpusListEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new OpusListEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusListEntityData {
|
||||
int _nextPage;
|
||||
List<OpusListEntityResult> _result;
|
||||
int _totalPage;
|
||||
int _currentPage;
|
||||
|
||||
OpusListEntityData(
|
||||
{int nextPage,
|
||||
List<OpusListEntityResult> result,
|
||||
int totalPage,
|
||||
int currentPage}) {
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
this._currentPage = currentPage;
|
||||
}
|
||||
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<OpusListEntityResult> get result => _result;
|
||||
set result(List<OpusListEntityResult> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
|
||||
OpusListEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<OpusListEntityResult>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new OpusListEntityResult.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
_currentPage = json['current_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
data['current_page'] = this._currentPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusListEntityResult {
|
||||
int _opusId;
|
||||
int _userId;
|
||||
String _opusTitle;
|
||||
String _opusIntroduce;
|
||||
String _opusTime;
|
||||
int _opusSatisfied;
|
||||
int _opusSee;
|
||||
int _opusFollow;
|
||||
int _opusCollection;
|
||||
String _opusImg;
|
||||
int _opusStatus;
|
||||
int _opusType;
|
||||
int _opusOriginal;
|
||||
int _opusJurisdiction;
|
||||
int _opusIsEdit;
|
||||
|
||||
OpusListEntityResult(
|
||||
{int opusId,
|
||||
int userId,
|
||||
String opusTitle,
|
||||
String opusIntroduce,
|
||||
String opusTime,
|
||||
int opusSatisfied,
|
||||
int opusSee,
|
||||
int opusFollow,
|
||||
int opusCollection,
|
||||
String opusImg,
|
||||
int opusStatus,
|
||||
int opusType,
|
||||
int opusOriginal,
|
||||
int opusJurisdiction,
|
||||
int opusIsEdit}) {
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._opusTitle = opusTitle;
|
||||
this._opusIntroduce = opusIntroduce;
|
||||
this._opusTime = opusTime;
|
||||
this._opusSatisfied = opusSatisfied;
|
||||
this._opusSee = opusSee;
|
||||
this._opusFollow = opusFollow;
|
||||
this._opusCollection = opusCollection;
|
||||
this._opusImg = opusImg;
|
||||
this._opusStatus = opusStatus;
|
||||
this._opusType = opusType;
|
||||
this._opusOriginal = opusOriginal;
|
||||
this._opusJurisdiction = opusJurisdiction;
|
||||
this._opusIsEdit = opusIsEdit;
|
||||
}
|
||||
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get opusTitle => _opusTitle;
|
||||
set opusTitle(String opusTitle) => _opusTitle = opusTitle;
|
||||
String get opusIntroduce => _opusIntroduce;
|
||||
set opusIntroduce(String opusIntroduce) => _opusIntroduce = opusIntroduce;
|
||||
String get opusTime => _opusTime;
|
||||
set opusTime(String opusTime) => _opusTime = opusTime;
|
||||
int get opusSatisfied => _opusSatisfied;
|
||||
set opusSatisfied(int opusSatisfied) => _opusSatisfied = opusSatisfied;
|
||||
int get opusSee => _opusSee;
|
||||
set opusSee(int opusSee) => _opusSee = opusSee;
|
||||
int get opusFollow => _opusFollow;
|
||||
set opusFollow(int opusFollow) => _opusFollow = opusFollow;
|
||||
int get opusCollection => _opusCollection;
|
||||
set opusCollection(int opusCollection) => _opusCollection = opusCollection;
|
||||
String get opusImg => _opusImg;
|
||||
set opusImg(String opusImg) => _opusImg = opusImg;
|
||||
int get opusStatus => _opusStatus;
|
||||
set opusStatus(int opusStatus) => _opusStatus = opusStatus;
|
||||
int get opusType => _opusType;
|
||||
set opusType(int opusType) => _opusType = opusType;
|
||||
int get opusOriginal => _opusOriginal;
|
||||
set opusOriginal(int opusOriginal) => _opusOriginal = opusOriginal;
|
||||
int get opusJurisdiction => _opusJurisdiction;
|
||||
set opusJurisdiction(int opusJurisdiction) =>
|
||||
_opusJurisdiction = opusJurisdiction;
|
||||
int get opusIsEdit => _opusIsEdit;
|
||||
set opusIsEdit(int opusIsEdit) => _opusIsEdit = opusIsEdit;
|
||||
|
||||
OpusListEntityResult.fromJson(Map<String, dynamic> json) {
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_opusTitle = json['opus_title'];
|
||||
_opusIntroduce = json['opus_introduce'];
|
||||
_opusTime = json['opus_time'];
|
||||
_opusSatisfied = json['opus_satisfied'];
|
||||
_opusSee = json['opus_see'];
|
||||
_opusFollow = json['opus_follow'];
|
||||
_opusCollection = json['opus_collection'];
|
||||
_opusImg = json['opus_img'];
|
||||
_opusStatus = json['opus_status'];
|
||||
_opusType = json['opus_type'];
|
||||
_opusOriginal = json['opus_original'];
|
||||
_opusJurisdiction = json['opus_jurisdiction'];
|
||||
_opusIsEdit = json['opus_is_edit'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
data['opus_title'] = this._opusTitle;
|
||||
data['opus_introduce'] = this._opusIntroduce;
|
||||
data['opus_time'] = this._opusTime;
|
||||
data['opus_satisfied'] = this._opusSatisfied;
|
||||
data['opus_see'] = this._opusSee;
|
||||
data['opus_follow'] = this._opusFollow;
|
||||
data['opus_collection'] = this._opusCollection;
|
||||
data['opus_img'] = this._opusImg;
|
||||
data['opus_status'] = this._opusStatus;
|
||||
data['opus_type'] = this._opusType;
|
||||
data['opus_original'] = this._opusOriginal;
|
||||
data['opus_jurisdiction'] = this._opusJurisdiction;
|
||||
data['opus_is_edit'] = this._opusIsEdit;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
558
moehu/moehu_fontend/lib/entity/OpusOpusInfoEntity.dart
Normal file
@@ -0,0 +1,558 @@
|
||||
class OpusOpusInfoEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
OpusOpusInfoEntityData _data;
|
||||
|
||||
OpusOpusInfoEntityList(
|
||||
{int code, String message, OpusOpusInfoEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
OpusOpusInfoEntityData get data => _data;
|
||||
set data(OpusOpusInfoEntityData data) => _data = data;
|
||||
|
||||
OpusOpusInfoEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new OpusOpusInfoEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusOpusInfoEntityData {
|
||||
int _opusId;
|
||||
int _userId;
|
||||
String _opusTitle;
|
||||
String _opusIntroduce;
|
||||
String _opusTime;
|
||||
int _opusSatisfied;
|
||||
int _opusSee;
|
||||
int _opusFollow;
|
||||
int _opusCollection;
|
||||
String _opusImg;
|
||||
int _opusStatus;
|
||||
int _opusType;
|
||||
int _opusOriginal;
|
||||
int _opusJurisdiction;
|
||||
int _opusIsEdit;
|
||||
List<NewsOpus> _newsOpus;
|
||||
OpusOpusInfoEntityUserInfo _userInfo;
|
||||
List<OpusImgs> _opusImgs;
|
||||
List<Tags> _tags;
|
||||
|
||||
OpusOpusInfoEntityData(
|
||||
{int opusId,
|
||||
int userId,
|
||||
String opusTitle,
|
||||
String opusIntroduce,
|
||||
String opusTime,
|
||||
int opusSatisfied,
|
||||
int opusSee,
|
||||
int opusFollow,
|
||||
int opusCollection,
|
||||
String opusImg,
|
||||
int opusStatus,
|
||||
int opusType,
|
||||
int opusOriginal,
|
||||
int opusJurisdiction,
|
||||
int opusIsEdit,
|
||||
List<NewsOpus> newsOpus,
|
||||
OpusOpusInfoEntityUserInfo userInfo,
|
||||
List<OpusImgs> opusImgs,
|
||||
List<Tags> tags}) {
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._opusTitle = opusTitle;
|
||||
this._opusIntroduce = opusIntroduce;
|
||||
this._opusTime = opusTime;
|
||||
this._opusSatisfied = opusSatisfied;
|
||||
this._opusSee = opusSee;
|
||||
this._opusFollow = opusFollow;
|
||||
this._opusCollection = opusCollection;
|
||||
this._opusImg = opusImg;
|
||||
this._opusStatus = opusStatus;
|
||||
this._opusType = opusType;
|
||||
this._opusOriginal = opusOriginal;
|
||||
this._opusJurisdiction = opusJurisdiction;
|
||||
this._opusIsEdit = opusIsEdit;
|
||||
this._newsOpus = newsOpus;
|
||||
this._userInfo = userInfo;
|
||||
this._opusImgs = opusImgs;
|
||||
this._tags = tags;
|
||||
}
|
||||
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get opusTitle => _opusTitle;
|
||||
set opusTitle(String opusTitle) => _opusTitle = opusTitle;
|
||||
String get opusIntroduce => _opusIntroduce;
|
||||
set opusIntroduce(String opusIntroduce) => _opusIntroduce = opusIntroduce;
|
||||
String get opusTime => _opusTime;
|
||||
set opusTime(String opusTime) => _opusTime = opusTime;
|
||||
int get opusSatisfied => _opusSatisfied;
|
||||
set opusSatisfied(int opusSatisfied) => _opusSatisfied = opusSatisfied;
|
||||
int get opusSee => _opusSee;
|
||||
set opusSee(int opusSee) => _opusSee = opusSee;
|
||||
int get opusFollow => _opusFollow;
|
||||
set opusFollow(int opusFollow) => _opusFollow = opusFollow;
|
||||
int get opusCollection => _opusCollection;
|
||||
set opusCollection(int opusCollection) => _opusCollection = opusCollection;
|
||||
String get opusImg => _opusImg;
|
||||
set opusImg(String opusImg) => _opusImg = opusImg;
|
||||
int get opusStatus => _opusStatus;
|
||||
set opusStatus(int opusStatus) => _opusStatus = opusStatus;
|
||||
int get opusType => _opusType;
|
||||
set opusType(int opusType) => _opusType = opusType;
|
||||
int get opusOriginal => _opusOriginal;
|
||||
set opusOriginal(int opusOriginal) => _opusOriginal = opusOriginal;
|
||||
int get opusJurisdiction => _opusJurisdiction;
|
||||
set opusJurisdiction(int opusJurisdiction) =>
|
||||
_opusJurisdiction = opusJurisdiction;
|
||||
int get opusIsEdit => _opusIsEdit;
|
||||
set opusIsEdit(int opusIsEdit) => _opusIsEdit = opusIsEdit;
|
||||
List<NewsOpus> get newsOpus => _newsOpus;
|
||||
set newsOpus(List<NewsOpus> newsOpus) => _newsOpus = newsOpus;
|
||||
OpusOpusInfoEntityUserInfo get userInfo => _userInfo;
|
||||
set userInfo(OpusOpusInfoEntityUserInfo userInfo) => _userInfo = userInfo;
|
||||
List<OpusImgs> get opusImgs => _opusImgs;
|
||||
set opusImgs(List<OpusImgs> opusImgs) => _opusImgs = opusImgs;
|
||||
List<Tags> get tags => _tags;
|
||||
set tags(List<Tags> tags) => _tags = tags;
|
||||
|
||||
OpusOpusInfoEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_opusTitle = json['opus_title'];
|
||||
_opusIntroduce = json['opus_introduce'];
|
||||
_opusTime = json['opus_time'];
|
||||
_opusSatisfied = json['opus_satisfied'];
|
||||
_opusSee = json['opus_see'];
|
||||
_opusFollow = json['opus_follow'];
|
||||
_opusCollection = json['opus_collection'];
|
||||
_opusImg = json['opus_img'];
|
||||
_opusStatus = json['opus_status'];
|
||||
_opusType = json['opus_type'];
|
||||
_opusOriginal = json['opus_original'];
|
||||
_opusJurisdiction = json['opus_jurisdiction'];
|
||||
_opusIsEdit = json['opus_is_edit'];
|
||||
if (json['news_opus'] != null) {
|
||||
_newsOpus = new List<NewsOpus>();
|
||||
json['news_opus'].forEach((v) {
|
||||
_newsOpus.add(new NewsOpus.fromJson(v));
|
||||
});
|
||||
}
|
||||
_userInfo = json['user_info'] != null
|
||||
? new OpusOpusInfoEntityUserInfo.fromJson(json['user_info'])
|
||||
: null;
|
||||
if (json['opus_imgs'] != null) {
|
||||
_opusImgs = new List<OpusImgs>();
|
||||
json['opus_imgs'].forEach((v) {
|
||||
_opusImgs.add(new OpusImgs.fromJson(v));
|
||||
});
|
||||
}
|
||||
if (json['tags'] != null) {
|
||||
_tags = new List<Tags>();
|
||||
json['tags'].forEach((v) {
|
||||
_tags.add(new Tags.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
data['opus_title'] = this._opusTitle;
|
||||
data['opus_introduce'] = this._opusIntroduce;
|
||||
data['opus_time'] = this._opusTime;
|
||||
data['opus_satisfied'] = this._opusSatisfied;
|
||||
data['opus_see'] = this._opusSee;
|
||||
data['opus_follow'] = this._opusFollow;
|
||||
data['opus_collection'] = this._opusCollection;
|
||||
data['opus_img'] = this._opusImg;
|
||||
data['opus_status'] = this._opusStatus;
|
||||
data['opus_type'] = this._opusType;
|
||||
data['opus_original'] = this._opusOriginal;
|
||||
data['opus_jurisdiction'] = this._opusJurisdiction;
|
||||
data['opus_is_edit'] = this._opusIsEdit;
|
||||
if (this._newsOpus != null) {
|
||||
data['news_opus'] = this._newsOpus.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this._userInfo != null) {
|
||||
data['user_info'] = this._userInfo.toJson();
|
||||
}
|
||||
if (this._opusImgs != null) {
|
||||
data['opus_imgs'] = this._opusImgs.map((v) => v.toJson()).toList();
|
||||
}
|
||||
if (this._tags != null) {
|
||||
data['tags'] = this._tags.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class NewsOpus {
|
||||
int _opusId;
|
||||
int _userId;
|
||||
String _opusTitle;
|
||||
String _opusIntroduce;
|
||||
String _opusTime;
|
||||
int _opusSatisfied;
|
||||
int _opusSee;
|
||||
int _opusFollow;
|
||||
int _opusCollection;
|
||||
String _opusImg;
|
||||
int _opusStatus;
|
||||
int _opusType;
|
||||
int _opusOriginal;
|
||||
int _opusJurisdiction;
|
||||
int _opusIsEdit;
|
||||
|
||||
NewsOpus(
|
||||
{int opusId,
|
||||
int userId,
|
||||
String opusTitle,
|
||||
String opusIntroduce,
|
||||
String opusTime,
|
||||
int opusSatisfied,
|
||||
int opusSee,
|
||||
int opusFollow,
|
||||
int opusCollection,
|
||||
String opusImg,
|
||||
int opusStatus,
|
||||
int opusType,
|
||||
int opusOriginal,
|
||||
int opusJurisdiction,
|
||||
int opusIsEdit}) {
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._opusTitle = opusTitle;
|
||||
this._opusIntroduce = opusIntroduce;
|
||||
this._opusTime = opusTime;
|
||||
this._opusSatisfied = opusSatisfied;
|
||||
this._opusSee = opusSee;
|
||||
this._opusFollow = opusFollow;
|
||||
this._opusCollection = opusCollection;
|
||||
this._opusImg = opusImg;
|
||||
this._opusStatus = opusStatus;
|
||||
this._opusType = opusType;
|
||||
this._opusOriginal = opusOriginal;
|
||||
this._opusJurisdiction = opusJurisdiction;
|
||||
this._opusIsEdit = opusIsEdit;
|
||||
}
|
||||
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get opusTitle => _opusTitle;
|
||||
set opusTitle(String opusTitle) => _opusTitle = opusTitle;
|
||||
String get opusIntroduce => _opusIntroduce;
|
||||
set opusIntroduce(String opusIntroduce) => _opusIntroduce = opusIntroduce;
|
||||
String get opusTime => _opusTime;
|
||||
set opusTime(String opusTime) => _opusTime = opusTime;
|
||||
int get opusSatisfied => _opusSatisfied;
|
||||
set opusSatisfied(int opusSatisfied) => _opusSatisfied = opusSatisfied;
|
||||
int get opusSee => _opusSee;
|
||||
set opusSee(int opusSee) => _opusSee = opusSee;
|
||||
int get opusFollow => _opusFollow;
|
||||
set opusFollow(int opusFollow) => _opusFollow = opusFollow;
|
||||
int get opusCollection => _opusCollection;
|
||||
set opusCollection(int opusCollection) => _opusCollection = opusCollection;
|
||||
String get opusImg => _opusImg;
|
||||
set opusImg(String opusImg) => _opusImg = opusImg;
|
||||
int get opusStatus => _opusStatus;
|
||||
set opusStatus(int opusStatus) => _opusStatus = opusStatus;
|
||||
int get opusType => _opusType;
|
||||
set opusType(int opusType) => _opusType = opusType;
|
||||
int get opusOriginal => _opusOriginal;
|
||||
set opusOriginal(int opusOriginal) => _opusOriginal = opusOriginal;
|
||||
int get opusJurisdiction => _opusJurisdiction;
|
||||
set opusJurisdiction(int opusJurisdiction) =>
|
||||
_opusJurisdiction = opusJurisdiction;
|
||||
int get opusIsEdit => _opusIsEdit;
|
||||
set opusIsEdit(int opusIsEdit) => _opusIsEdit = opusIsEdit;
|
||||
|
||||
NewsOpus.fromJson(Map<String, dynamic> json) {
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_opusTitle = json['opus_title'];
|
||||
_opusIntroduce = json['opus_introduce'];
|
||||
_opusTime = json['opus_time'];
|
||||
_opusSatisfied = json['opus_satisfied'];
|
||||
_opusSee = json['opus_see'];
|
||||
_opusFollow = json['opus_follow'];
|
||||
_opusCollection = json['opus_collection'];
|
||||
_opusImg = json['opus_img'];
|
||||
_opusStatus = json['opus_status'];
|
||||
_opusType = json['opus_type'];
|
||||
_opusOriginal = json['opus_original'];
|
||||
_opusJurisdiction = json['opus_jurisdiction'];
|
||||
_opusIsEdit = json['opus_is_edit'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
data['opus_title'] = this._opusTitle;
|
||||
data['opus_introduce'] = this._opusIntroduce;
|
||||
data['opus_time'] = this._opusTime;
|
||||
data['opus_satisfied'] = this._opusSatisfied;
|
||||
data['opus_see'] = this._opusSee;
|
||||
data['opus_follow'] = this._opusFollow;
|
||||
data['opus_collection'] = this._opusCollection;
|
||||
data['opus_img'] = this._opusImg;
|
||||
data['opus_status'] = this._opusStatus;
|
||||
data['opus_type'] = this._opusType;
|
||||
data['opus_original'] = this._opusOriginal;
|
||||
data['opus_jurisdiction'] = this._opusJurisdiction;
|
||||
data['opus_is_edit'] = this._opusIsEdit;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusOpusInfoEntityUserInfo {
|
||||
int _userId;
|
||||
String _userPhone;
|
||||
String _userRealName;
|
||||
String _userIdCard;
|
||||
String _userEmail;
|
||||
String _userBankCard;
|
||||
String _userSex;
|
||||
String _userWork;
|
||||
String _userHeadImg;
|
||||
String _userNickname;
|
||||
String _userUid;
|
||||
String _userRegTime;
|
||||
String _userBirthday;
|
||||
String _userConstellation;
|
||||
String _userAutograph;
|
||||
|
||||
OpusOpusInfoEntityUserInfo(
|
||||
{int userId,
|
||||
String userPhone,
|
||||
String userRealName,
|
||||
String userIdCard,
|
||||
String userEmail,
|
||||
String userBankCard,
|
||||
String userSex,
|
||||
String userWork,
|
||||
String userHeadImg,
|
||||
String userNickname,
|
||||
String userUid,
|
||||
String userRegTime,
|
||||
Null userBirthday,
|
||||
Null userConstellation,
|
||||
String userAutograph}) {
|
||||
this._userId = userId;
|
||||
this._userPhone = userPhone;
|
||||
this._userRealName = userRealName;
|
||||
this._userIdCard = userIdCard;
|
||||
this._userEmail = userEmail;
|
||||
this._userBankCard = userBankCard;
|
||||
this._userSex = userSex;
|
||||
this._userWork = userWork;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userNickname = userNickname;
|
||||
this._userUid = userUid;
|
||||
this._userRegTime = userRegTime;
|
||||
this._userBirthday = userBirthday;
|
||||
this._userConstellation = userConstellation;
|
||||
this._userAutograph = userAutograph;
|
||||
}
|
||||
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userPhone => _userPhone;
|
||||
set userPhone(String userPhone) => _userPhone = userPhone;
|
||||
String get userRealName => _userRealName;
|
||||
set userRealName(String userRealName) => _userRealName = userRealName;
|
||||
String get userIdCard => _userIdCard;
|
||||
set userIdCard(String userIdCard) => _userIdCard = userIdCard;
|
||||
String get userEmail => _userEmail;
|
||||
set userEmail(String userEmail) => _userEmail = userEmail;
|
||||
String get userBankCard => _userBankCard;
|
||||
set userBankCard(String userBankCard) => _userBankCard = userBankCard;
|
||||
String get userSex => _userSex;
|
||||
set userSex(String userSex) => _userSex = userSex;
|
||||
String get userWork => _userWork;
|
||||
set userWork(String userWork) => _userWork = userWork;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
String get userUid => _userUid;
|
||||
set userUid(String userUid) => _userUid = userUid;
|
||||
String get userRegTime => _userRegTime;
|
||||
set userRegTime(String userRegTime) => _userRegTime = userRegTime;
|
||||
Null get userBirthday => _userBirthday;
|
||||
set userBirthday(Null userBirthday) => _userBirthday = userBirthday;
|
||||
Null get userConstellation => _userConstellation;
|
||||
set userConstellation(Null userConstellation) =>
|
||||
_userConstellation = userConstellation;
|
||||
String get userAutograph => _userAutograph;
|
||||
set userAutograph(String userAutograph) => _userAutograph = userAutograph;
|
||||
|
||||
OpusOpusInfoEntityUserInfo.fromJson(Map<String, dynamic> json) {
|
||||
_userId = json['user_id'];
|
||||
_userPhone = json['user_phone'];
|
||||
_userRealName = json['user_real_name'];
|
||||
_userIdCard = json['user_id_card'];
|
||||
_userEmail = json['user_email'];
|
||||
_userBankCard = json['user_bank_card'];
|
||||
_userSex = json['user_sex'];
|
||||
_userWork = json['user_work'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_userUid = json['user_uid'];
|
||||
_userRegTime = json['user_reg_time'];
|
||||
_userBirthday = json['user_birthday'];
|
||||
_userConstellation = json['user_constellation'];
|
||||
_userAutograph = json['user_autograph'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_id'] = this._userId;
|
||||
data['user_phone'] = this._userPhone;
|
||||
data['user_real_name'] = this._userRealName;
|
||||
data['user_id_card'] = this._userIdCard;
|
||||
data['user_email'] = this._userEmail;
|
||||
data['user_bank_card'] = this._userBankCard;
|
||||
data['user_sex'] = this._userSex;
|
||||
data['user_work'] = this._userWork;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['user_uid'] = this._userUid;
|
||||
data['user_reg_time'] = this._userRegTime;
|
||||
data['user_birthday'] = this._userBirthday;
|
||||
data['user_constellation'] = this._userConstellation;
|
||||
data['user_autograph'] = this._userAutograph;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusImgs {
|
||||
int _opusId;
|
||||
String _imgUrl;
|
||||
int _userId;
|
||||
int _imgId;
|
||||
int _imgWidth;
|
||||
int _imgHeight;
|
||||
|
||||
OpusImgs(
|
||||
{int opusId,
|
||||
String imgUrl,
|
||||
int userId,
|
||||
int imgId,
|
||||
int imgWidth,
|
||||
int imgHeight}) {
|
||||
this._opusId = opusId;
|
||||
this._imgUrl = imgUrl;
|
||||
this._userId = userId;
|
||||
this._imgId = imgId;
|
||||
this._imgWidth = _imgWidth;
|
||||
this._imgHeight = _imgHeight;
|
||||
}
|
||||
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
String get imgUrl => _imgUrl;
|
||||
set imgUrl(String imgUrl) => _imgUrl = imgUrl;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
int get imgId => _imgId;
|
||||
set imgId(int imgId) => _imgId = imgId;
|
||||
int get imgWidth => _imgWidth;
|
||||
set imgWidth(int imgWidth) => _imgWidth = imgWidth;
|
||||
int get imgHeight => _imgHeight;
|
||||
set imgHeight(int imgHeight) => _imgHeight = imgHeight;
|
||||
|
||||
OpusImgs.fromJson(Map<String, dynamic> json) {
|
||||
_opusId = json['opus_id'];
|
||||
_imgUrl = json['img_url'];
|
||||
_userId = json['user_id'];
|
||||
_imgId = json['img_id'];
|
||||
_imgWidth = json['img_width'];
|
||||
_imgHeight = json['img_height'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_id'] = this._opusId;
|
||||
data['img_url'] = this._imgUrl;
|
||||
data['user_id'] = this._userId;
|
||||
data['img_id'] = this._imgId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Tags {
|
||||
int _tagsId;
|
||||
int _opusId;
|
||||
String _tagsTitle;
|
||||
int _tagsRecommend;
|
||||
int _userId;
|
||||
|
||||
Tags(
|
||||
{int tagsId,
|
||||
int opusId,
|
||||
String tagsTitle,
|
||||
int tagsRecommend,
|
||||
int userId}) {
|
||||
this._tagsId = tagsId;
|
||||
this._opusId = opusId;
|
||||
this._tagsTitle = tagsTitle;
|
||||
this._tagsRecommend = tagsRecommend;
|
||||
this._userId = userId;
|
||||
}
|
||||
|
||||
int get tagsId => _tagsId;
|
||||
set tagsId(int tagsId) => _tagsId = tagsId;
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
String get tagsTitle => _tagsTitle;
|
||||
set tagsTitle(String tagsTitle) => _tagsTitle = tagsTitle;
|
||||
int get tagsRecommend => _tagsRecommend;
|
||||
set tagsRecommend(int tagsRecommend) => _tagsRecommend = tagsRecommend;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
|
||||
Tags.fromJson(Map<String, dynamic> json) {
|
||||
_tagsId = json['tags_id'];
|
||||
_opusId = json['opus_id'];
|
||||
_tagsTitle = json['tags_title'];
|
||||
_tagsRecommend = json['tags_recommend'];
|
||||
_userId = json['user_id'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['tags_id'] = this._tagsId;
|
||||
data['opus_id'] = this._opusId;
|
||||
data['tags_title'] = this._tagsTitle;
|
||||
data['tags_recommend'] = this._tagsRecommend;
|
||||
data['user_id'] = this._userId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
228
moehu/moehu_fontend/lib/entity/OpusRankingEntity.dart
Normal file
@@ -0,0 +1,228 @@
|
||||
class OpusRankingEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
OpusRankingEntityData _data;
|
||||
|
||||
OpusRankingEntityList({int code, Null message, OpusRankingEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
Null get message => _message;
|
||||
set message(Null message) => _message = message;
|
||||
OpusRankingEntityData get data => _data;
|
||||
set data(OpusRankingEntityData data) => _data = data;
|
||||
|
||||
OpusRankingEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new OpusRankingEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusRankingEntityData {
|
||||
int _nextPage;
|
||||
List<OpusRankingEntity> _result;
|
||||
int _totalPage;
|
||||
int _currentPage;
|
||||
|
||||
OpusRankingEntityData(
|
||||
{int nextPage,
|
||||
List<OpusRankingEntity> result,
|
||||
int totalPage,
|
||||
int currentPage}) {
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
this._currentPage = currentPage;
|
||||
}
|
||||
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<OpusRankingEntity> get result => _result;
|
||||
set result(List<OpusRankingEntity> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
|
||||
OpusRankingEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<OpusRankingEntity>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new OpusRankingEntity.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
_currentPage = json['current_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
data['current_page'] = this._currentPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusRankingEntity {
|
||||
int _opusId;
|
||||
int _userId;
|
||||
String _opusTitle;
|
||||
String _opusIntroduce;
|
||||
String _opusTime;
|
||||
int _opusSatisfied;
|
||||
int _opusSee;
|
||||
int _opusFollow;
|
||||
int _opusCollection;
|
||||
String _opusImg;
|
||||
int _opusStatus;
|
||||
int _opusType;
|
||||
int _opusOriginal;
|
||||
int _opusJurisdiction;
|
||||
int _opusIsEdit;
|
||||
String _userHeadImg;
|
||||
String _userNickname;
|
||||
String _userAutograph;
|
||||
|
||||
OpusRankingEntity(
|
||||
{int opusId,
|
||||
int userId,
|
||||
String opusTitle,
|
||||
String opusIntroduce,
|
||||
String opusTime,
|
||||
int opusSatisfied,
|
||||
int opusSee,
|
||||
int opusFollow,
|
||||
int opusCollection,
|
||||
String opusImg,
|
||||
int opusStatus,
|
||||
int opusType,
|
||||
int opusOriginal,
|
||||
int opusJurisdiction,
|
||||
int opusIsEdit,
|
||||
String userHeadImg,
|
||||
String userNickname,
|
||||
String userAutograph}) {
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._opusTitle = opusTitle;
|
||||
this._opusIntroduce = opusIntroduce;
|
||||
this._opusTime = opusTime;
|
||||
this._opusSatisfied = opusSatisfied;
|
||||
this._opusSee = opusSee;
|
||||
this._opusFollow = opusFollow;
|
||||
this._opusCollection = opusCollection;
|
||||
this._opusImg = opusImg;
|
||||
this._opusStatus = opusStatus;
|
||||
this._opusType = opusType;
|
||||
this._opusOriginal = opusOriginal;
|
||||
this._opusJurisdiction = opusJurisdiction;
|
||||
this._opusIsEdit = opusIsEdit;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userNickname = userNickname;
|
||||
this._userAutograph = userAutograph;
|
||||
}
|
||||
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get opusTitle => _opusTitle;
|
||||
set opusTitle(String opusTitle) => _opusTitle = opusTitle;
|
||||
String get opusIntroduce => _opusIntroduce;
|
||||
set opusIntroduce(String opusIntroduce) => _opusIntroduce = opusIntroduce;
|
||||
String get opusTime => _opusTime;
|
||||
set opusTime(String opusTime) => _opusTime = opusTime;
|
||||
int get opusSatisfied => _opusSatisfied;
|
||||
set opusSatisfied(int opusSatisfied) => _opusSatisfied = opusSatisfied;
|
||||
int get opusSee => _opusSee;
|
||||
set opusSee(int opusSee) => _opusSee = opusSee;
|
||||
int get opusFollow => _opusFollow;
|
||||
set opusFollow(int opusFollow) => _opusFollow = opusFollow;
|
||||
int get opusCollection => _opusCollection;
|
||||
set opusCollection(int opusCollection) => _opusCollection = opusCollection;
|
||||
String get opusImg => _opusImg;
|
||||
set opusImg(String opusImg) => _opusImg = opusImg;
|
||||
int get opusStatus => _opusStatus;
|
||||
set opusStatus(int opusStatus) => _opusStatus = opusStatus;
|
||||
int get opusType => _opusType;
|
||||
set opusType(int opusType) => _opusType = opusType;
|
||||
int get opusOriginal => _opusOriginal;
|
||||
set opusOriginal(int opusOriginal) => _opusOriginal = opusOriginal;
|
||||
int get opusJurisdiction => _opusJurisdiction;
|
||||
set opusJurisdiction(int opusJurisdiction) =>
|
||||
_opusJurisdiction = opusJurisdiction;
|
||||
int get opusIsEdit => _opusIsEdit;
|
||||
set opusIsEdit(int opusIsEdit) => _opusIsEdit = opusIsEdit;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
String get userAutograph => _userAutograph;
|
||||
set userAutograph(String userAutograph) => _userAutograph = userAutograph;
|
||||
|
||||
OpusRankingEntity.fromJson(Map<String, dynamic> json) {
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_opusTitle = json['opus_title'];
|
||||
_opusIntroduce = json['opus_introduce'];
|
||||
_opusTime = json['opus_time'];
|
||||
_opusSatisfied = json['opus_satisfied'];
|
||||
_opusSee = json['opus_see'];
|
||||
_opusFollow = json['opus_follow'];
|
||||
_opusCollection = json['opus_collection'];
|
||||
_opusImg = json['opus_img'];
|
||||
_opusStatus = json['opus_status'];
|
||||
_opusType = json['opus_type'];
|
||||
_opusOriginal = json['opus_original'];
|
||||
_opusJurisdiction = json['opus_jurisdiction'];
|
||||
_opusIsEdit = json['opus_is_edit'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_userAutograph = json['user_autograph'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
data['opus_title'] = this._opusTitle;
|
||||
data['opus_introduce'] = this._opusIntroduce;
|
||||
data['opus_time'] = this._opusTime;
|
||||
data['opus_satisfied'] = this._opusSatisfied;
|
||||
data['opus_see'] = this._opusSee;
|
||||
data['opus_follow'] = this._opusFollow;
|
||||
data['opus_collection'] = this._opusCollection;
|
||||
data['opus_img'] = this._opusImg;
|
||||
data['opus_status'] = this._opusStatus;
|
||||
data['opus_type'] = this._opusType;
|
||||
data['opus_original'] = this._opusOriginal;
|
||||
data['opus_jurisdiction'] = this._opusJurisdiction;
|
||||
data['opus_is_edit'] = this._opusIsEdit;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['user_autograph'] = this._userAutograph;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
178
moehu/moehu_fontend/lib/entity/OpusRecommend.dart
Normal file
@@ -0,0 +1,178 @@
|
||||
class OpusRecommendList {
|
||||
int _code;
|
||||
OpusRecommendData _data;
|
||||
String _message;
|
||||
|
||||
OpusRecommendList({int code, OpusRecommendData data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
OpusRecommendData get data => _data;
|
||||
set data(OpusRecommendData data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
OpusRecommendList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_data = json['data'] != null
|
||||
? new OpusRecommendData.fromJson(json['data'])
|
||||
: null;
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusRecommendData {
|
||||
int _currentPage;
|
||||
int _nextPage;
|
||||
List<OpusRecommendResult> _result;
|
||||
int _totalPage;
|
||||
|
||||
OpusRecommendData(
|
||||
{int currentPage,
|
||||
int nextPage,
|
||||
List<OpusRecommendResult> result,
|
||||
int totalPage}) {
|
||||
this._currentPage = currentPage;
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._totalPage = totalPage;
|
||||
}
|
||||
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<OpusRecommendResult> get result => _result;
|
||||
set result(List<OpusRecommendResult> result) => _result = result;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
|
||||
OpusRecommendData.fromJson(Map<String, dynamic> json) {
|
||||
_currentPage = json['current_page'];
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<OpusRecommendResult>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new OpusRecommendResult.fromJson(v));
|
||||
});
|
||||
}
|
||||
_totalPage = json['total_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['current_page'] = this._currentPage;
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['total_page'] = this._totalPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusRecommendResult {
|
||||
int _opusFollow;
|
||||
int _opusId;
|
||||
String _opusImg;
|
||||
String _opusIntroduce;
|
||||
int _opusSatisfied;
|
||||
int _opusSee;
|
||||
int _opusStatus;
|
||||
String _opusTime;
|
||||
String _opusTitle;
|
||||
int _opusType;
|
||||
int _userId;
|
||||
|
||||
OpusRecommendResult(
|
||||
{int opusFollow,
|
||||
int opusId,
|
||||
String opusImg,
|
||||
String opusIntroduce,
|
||||
int opusSatisfied,
|
||||
int opusSee,
|
||||
int opusStatus,
|
||||
String opusTime,
|
||||
String opusTitle,
|
||||
int opusType,
|
||||
int userId}) {
|
||||
this._opusFollow = opusFollow;
|
||||
this._opusId = opusId;
|
||||
this._opusImg = opusImg;
|
||||
this._opusIntroduce = opusIntroduce;
|
||||
this._opusSatisfied = opusSatisfied;
|
||||
this._opusSee = opusSee;
|
||||
this._opusStatus = opusStatus;
|
||||
this._opusTime = opusTime;
|
||||
this._opusTitle = opusTitle;
|
||||
this._opusType = opusType;
|
||||
this._userId = userId;
|
||||
}
|
||||
|
||||
int get opusFollow => _opusFollow;
|
||||
set opusFollow(int opusFollow) => _opusFollow = opusFollow;
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
String get opusImg => _opusImg;
|
||||
set opusImg(String opusImg) => _opusImg = opusImg;
|
||||
String get opusIntroduce => _opusIntroduce;
|
||||
set opusIntroduce(String opusIntroduce) => _opusIntroduce = opusIntroduce;
|
||||
int get opusSatisfied => _opusSatisfied;
|
||||
set opusSatisfied(int opusSatisfied) => _opusSatisfied = opusSatisfied;
|
||||
int get opusSee => _opusSee;
|
||||
set opusSee(int opusSee) => _opusSee = opusSee;
|
||||
int get opusStatus => _opusStatus;
|
||||
set opusStatus(int opusStatus) => _opusStatus = opusStatus;
|
||||
String get opusTime => _opusTime;
|
||||
set opusTime(String opusTime) => _opusTime = opusTime;
|
||||
String get opusTitle => _opusTitle;
|
||||
set opusTitle(String opusTitle) => _opusTitle = opusTitle;
|
||||
int get opusType => _opusType;
|
||||
set opusType(int opusType) => _opusType = opusType;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
|
||||
OpusRecommendResult.fromJson(Map<String, dynamic> json) {
|
||||
_opusFollow = json['opus_follow'];
|
||||
_opusId = json['opus_id'];
|
||||
_opusImg = json['opus_img'];
|
||||
_opusIntroduce = json['opus_introduce'];
|
||||
_opusSatisfied = json['opus_satisfied'];
|
||||
_opusSee = json['opus_see'];
|
||||
_opusStatus = json['opus_status'];
|
||||
_opusTime = json['opus_time'];
|
||||
_opusTitle = json['opus_title'];
|
||||
_opusType = json['opus_type'];
|
||||
_userId = json['user_id'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_follow'] = this._opusFollow;
|
||||
data['opus_id'] = this._opusId;
|
||||
data['opus_img'] = this._opusImg;
|
||||
data['opus_introduce'] = this._opusIntroduce;
|
||||
data['opus_satisfied'] = this._opusSatisfied;
|
||||
data['opus_see'] = this._opusSee;
|
||||
data['opus_status'] = this._opusStatus;
|
||||
data['opus_time'] = this._opusTime;
|
||||
data['opus_title'] = this._opusTitle;
|
||||
data['opus_type'] = this._opusType;
|
||||
data['user_id'] = this._userId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
208
moehu/moehu_fontend/lib/entity/OpusSearchTagEntity.dart
Normal file
@@ -0,0 +1,208 @@
|
||||
class OpusSearchTagEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
OpusSearchTagEntityData _data;
|
||||
|
||||
OpusSearchTagEntityList(
|
||||
{int code, Null message, OpusSearchTagEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
Null get message => _message;
|
||||
set message(Null message) => _message = message;
|
||||
OpusSearchTagEntityData get data => _data;
|
||||
set data(OpusSearchTagEntityData data) => _data = data;
|
||||
|
||||
OpusSearchTagEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new OpusSearchTagEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusSearchTagEntityData {
|
||||
int _nextPage;
|
||||
List<OpusSearchTagEntityResult> _result;
|
||||
List<String> _keywords;
|
||||
int _totalPage;
|
||||
int _currentPage;
|
||||
|
||||
OpusSearchTagEntityData(
|
||||
{int nextPage,
|
||||
List<OpusSearchTagEntityResult> result,
|
||||
List<String> keywords,
|
||||
int totalPage,
|
||||
int currentPage}) {
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._keywords = keywords;
|
||||
this._totalPage = totalPage;
|
||||
this._currentPage = currentPage;
|
||||
}
|
||||
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<OpusSearchTagEntityResult> get result => _result;
|
||||
set result(List<OpusSearchTagEntityResult> result) => _result = result;
|
||||
List<String> get keywords => _keywords;
|
||||
set keywords(List<String> keywords) => _keywords = keywords;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
|
||||
OpusSearchTagEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<OpusSearchTagEntityResult>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new OpusSearchTagEntityResult.fromJson(v));
|
||||
});
|
||||
}
|
||||
_keywords = json['keywords'].cast<String>();
|
||||
_totalPage = json['total_page'];
|
||||
_currentPage = json['current_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['keywords'] = this._keywords;
|
||||
data['total_page'] = this._totalPage;
|
||||
data['current_page'] = this._currentPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusSearchTagEntityResult {
|
||||
int _opusId;
|
||||
int _userId;
|
||||
String _opusTitle;
|
||||
String _opusIntroduce;
|
||||
String _opusTime;
|
||||
int _opusSatisfied;
|
||||
int _opusSee;
|
||||
int _opusFollow;
|
||||
int _opusCollection;
|
||||
String _opusImg;
|
||||
int _opusStatus;
|
||||
int _opusType;
|
||||
int _opusOriginal;
|
||||
int _opusJurisdiction;
|
||||
|
||||
OpusSearchTagEntityResult(
|
||||
{int opusId,
|
||||
int userId,
|
||||
String opusTitle,
|
||||
String opusIntroduce,
|
||||
String opusTime,
|
||||
int opusSatisfied,
|
||||
int opusSee,
|
||||
int opusFollow,
|
||||
int opusCollection,
|
||||
String opusImg,
|
||||
int opusStatus,
|
||||
int opusType,
|
||||
int opusOriginal,
|
||||
int opusJurisdiction}) {
|
||||
this._opusId = opusId;
|
||||
this._userId = userId;
|
||||
this._opusTitle = opusTitle;
|
||||
this._opusIntroduce = opusIntroduce;
|
||||
this._opusTime = opusTime;
|
||||
this._opusSatisfied = opusSatisfied;
|
||||
this._opusSee = opusSee;
|
||||
this._opusFollow = opusFollow;
|
||||
this._opusCollection = opusCollection;
|
||||
this._opusImg = opusImg;
|
||||
this._opusStatus = opusStatus;
|
||||
this._opusType = opusType;
|
||||
this._opusOriginal = opusOriginal;
|
||||
this._opusJurisdiction = opusJurisdiction;
|
||||
}
|
||||
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get opusTitle => _opusTitle;
|
||||
set opusTitle(String opusTitle) => _opusTitle = opusTitle;
|
||||
String get opusIntroduce => _opusIntroduce;
|
||||
set opusIntroduce(String opusIntroduce) => _opusIntroduce = opusIntroduce;
|
||||
String get opusTime => _opusTime;
|
||||
set opusTime(String opusTime) => _opusTime = opusTime;
|
||||
int get opusSatisfied => _opusSatisfied;
|
||||
set opusSatisfied(int opusSatisfied) => _opusSatisfied = opusSatisfied;
|
||||
int get opusSee => _opusSee;
|
||||
set opusSee(int opusSee) => _opusSee = opusSee;
|
||||
int get opusFollow => _opusFollow;
|
||||
set opusFollow(int opusFollow) => _opusFollow = opusFollow;
|
||||
int get opusCollection => _opusCollection;
|
||||
set opusCollection(int opusCollection) => _opusCollection = opusCollection;
|
||||
String get opusImg => _opusImg;
|
||||
set opusImg(String opusImg) => _opusImg = opusImg;
|
||||
int get opusStatus => _opusStatus;
|
||||
set opusStatus(int opusStatus) => _opusStatus = opusStatus;
|
||||
int get opusType => _opusType;
|
||||
set opusType(int opusType) => _opusType = opusType;
|
||||
int get opusOriginal => _opusOriginal;
|
||||
set opusOriginal(int opusOriginal) => _opusOriginal = opusOriginal;
|
||||
int get opusJurisdiction => _opusJurisdiction;
|
||||
set opusJurisdiction(int opusJurisdiction) =>
|
||||
_opusJurisdiction = opusJurisdiction;
|
||||
|
||||
OpusSearchTagEntityResult.fromJson(Map<String, dynamic> json) {
|
||||
_opusId = json['opus_id'];
|
||||
_userId = json['user_id'];
|
||||
_opusTitle = json['opus_title'];
|
||||
_opusIntroduce = json['opus_introduce'];
|
||||
_opusTime = json['opus_time'];
|
||||
_opusSatisfied = json['opus_satisfied'];
|
||||
_opusSee = json['opus_see'];
|
||||
_opusFollow = json['opus_follow'];
|
||||
_opusCollection = json['opus_collection'];
|
||||
_opusImg = json['opus_img'];
|
||||
_opusStatus = json['opus_status'];
|
||||
_opusType = json['opus_type'];
|
||||
_opusOriginal = json['opus_original'];
|
||||
_opusJurisdiction = json['opus_jurisdiction'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_id'] = this._opusId;
|
||||
data['user_id'] = this._userId;
|
||||
data['opus_title'] = this._opusTitle;
|
||||
data['opus_introduce'] = this._opusIntroduce;
|
||||
data['opus_time'] = this._opusTime;
|
||||
data['opus_satisfied'] = this._opusSatisfied;
|
||||
data['opus_see'] = this._opusSee;
|
||||
data['opus_follow'] = this._opusFollow;
|
||||
data['opus_collection'] = this._opusCollection;
|
||||
data['opus_img'] = this._opusImg;
|
||||
data['opus_status'] = this._opusStatus;
|
||||
data['opus_type'] = this._opusType;
|
||||
data['opus_original'] = this._opusOriginal;
|
||||
data['opus_jurisdiction'] = this._opusJurisdiction;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
215
moehu/moehu_fontend/lib/entity/OpusSearchUserEntity.dart
Normal file
@@ -0,0 +1,215 @@
|
||||
class OpusSearchUserEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
OpusSearchUserEntityData _data;
|
||||
|
||||
OpusSearchUserEntityList(
|
||||
{int code, Null message, OpusSearchUserEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
Null get message => _message;
|
||||
set message(Null message) => _message = message;
|
||||
OpusSearchUserEntityData get data => _data;
|
||||
set data(OpusSearchUserEntityData data) => _data = data;
|
||||
|
||||
OpusSearchUserEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new OpusSearchUserEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusSearchUserEntityData {
|
||||
int _nextPage;
|
||||
List<OpusSearchUserEntityResult> _result;
|
||||
List<String> _keywords;
|
||||
int _totalPage;
|
||||
int _currentPage;
|
||||
|
||||
OpusSearchUserEntityData(
|
||||
{int nextPage,
|
||||
List<OpusSearchUserEntityResult> result,
|
||||
List<String> keywords,
|
||||
int totalPage,
|
||||
int currentPage}) {
|
||||
this._nextPage = nextPage;
|
||||
this._result = result;
|
||||
this._keywords = keywords;
|
||||
this._totalPage = totalPage;
|
||||
this._currentPage = currentPage;
|
||||
}
|
||||
|
||||
int get nextPage => _nextPage;
|
||||
set nextPage(int nextPage) => _nextPage = nextPage;
|
||||
List<OpusSearchUserEntityResult> get result => _result;
|
||||
set result(List<OpusSearchUserEntityResult> result) => _result = result;
|
||||
List<String> get keywords => _keywords;
|
||||
set keywords(List<String> keywords) => _keywords = keywords;
|
||||
int get totalPage => _totalPage;
|
||||
set totalPage(int totalPage) => _totalPage = totalPage;
|
||||
int get currentPage => _currentPage;
|
||||
set currentPage(int currentPage) => _currentPage = currentPage;
|
||||
|
||||
OpusSearchUserEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_nextPage = json['next_page'];
|
||||
if (json['result'] != null) {
|
||||
_result = new List<OpusSearchUserEntityResult>();
|
||||
json['result'].forEach((v) {
|
||||
_result.add(new OpusSearchUserEntityResult.fromJson(v));
|
||||
});
|
||||
}
|
||||
_keywords = json['keywords'].cast<String>();
|
||||
_totalPage = json['total_page'];
|
||||
_currentPage = json['current_page'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['next_page'] = this._nextPage;
|
||||
if (this._result != null) {
|
||||
data['result'] = this._result.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['keywords'] = this._keywords;
|
||||
data['total_page'] = this._totalPage;
|
||||
data['current_page'] = this._currentPage;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusSearchUserEntityResult {
|
||||
int _userId;
|
||||
String _userPhone;
|
||||
String _userRealName;
|
||||
String _userIdCard;
|
||||
String _userEmail;
|
||||
String _userBankCard;
|
||||
String _userSex;
|
||||
String _userWork;
|
||||
String _userHeadImg;
|
||||
String _userNickname;
|
||||
String _userUid;
|
||||
String _userRegTime;
|
||||
String _userBirthday;
|
||||
String _userConstellation;
|
||||
String _userAutograph;
|
||||
|
||||
OpusSearchUserEntityResult(
|
||||
{int userId,
|
||||
String userPhone,
|
||||
String userRealName,
|
||||
String userIdCard,
|
||||
String userEmail,
|
||||
String userBankCard,
|
||||
String userSex,
|
||||
String userWork,
|
||||
String userHeadImg,
|
||||
String userNickname,
|
||||
String userUid,
|
||||
String userRegTime,
|
||||
String userBirthday,
|
||||
String userConstellation,
|
||||
String userAutograph}) {
|
||||
this._userId = userId;
|
||||
this._userPhone = userPhone;
|
||||
this._userRealName = userRealName;
|
||||
this._userIdCard = userIdCard;
|
||||
this._userEmail = userEmail;
|
||||
this._userBankCard = userBankCard;
|
||||
this._userSex = userSex;
|
||||
this._userWork = userWork;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userNickname = userNickname;
|
||||
this._userUid = userUid;
|
||||
this._userRegTime = userRegTime;
|
||||
this._userBirthday = userBirthday;
|
||||
this._userConstellation = userConstellation;
|
||||
this._userAutograph = userAutograph;
|
||||
}
|
||||
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userPhone => _userPhone;
|
||||
set userPhone(String userPhone) => _userPhone = userPhone;
|
||||
String get userRealName => _userRealName;
|
||||
set userRealName(String userRealName) => _userRealName = userRealName;
|
||||
String get userIdCard => _userIdCard;
|
||||
set userIdCard(String userIdCard) => _userIdCard = userIdCard;
|
||||
String get userEmail => _userEmail;
|
||||
set userEmail(String userEmail) => _userEmail = userEmail;
|
||||
String get userBankCard => _userBankCard;
|
||||
set userBankCard(String userBankCard) => _userBankCard = userBankCard;
|
||||
String get userSex => _userSex;
|
||||
set userSex(String userSex) => _userSex = userSex;
|
||||
String get userWork => _userWork;
|
||||
set userWork(String userWork) => _userWork = userWork;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
String get userUid => _userUid;
|
||||
set userUid(String userUid) => _userUid = userUid;
|
||||
String get userRegTime => _userRegTime;
|
||||
set userRegTime(String userRegTime) => _userRegTime = userRegTime;
|
||||
String get userBirthday => _userBirthday;
|
||||
set userBirthday(String userBirthday) => _userBirthday = userBirthday;
|
||||
String get userConstellation => _userConstellation;
|
||||
set userConstellation(String userConstellation) =>
|
||||
_userConstellation = userConstellation;
|
||||
String get userAutograph => _userAutograph;
|
||||
set userAutograph(String userAutograph) => _userAutograph = userAutograph;
|
||||
|
||||
OpusSearchUserEntityResult.fromJson(Map<String, dynamic> json) {
|
||||
_userId = json['user_id'];
|
||||
_userPhone = json['user_phone'];
|
||||
_userRealName = json['user_real_name'];
|
||||
_userIdCard = json['user_id_card'];
|
||||
_userEmail = json['user_email'];
|
||||
_userBankCard = json['user_bank_card'];
|
||||
_userSex = json['user_sex'];
|
||||
_userWork = json['user_work'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_userUid = json['user_uid'];
|
||||
_userRegTime = json['user_reg_time'];
|
||||
_userBirthday = json['user_birthday'];
|
||||
_userConstellation = json['user_constellation'];
|
||||
_userAutograph = json['user_autograph'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_id'] = this._userId;
|
||||
data['user_phone'] = this._userPhone;
|
||||
data['user_real_name'] = this._userRealName;
|
||||
data['user_id_card'] = this._userIdCard;
|
||||
data['user_email'] = this._userEmail;
|
||||
data['user_bank_card'] = this._userBankCard;
|
||||
data['user_sex'] = this._userSex;
|
||||
data['user_work'] = this._userWork;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['user_uid'] = this._userUid;
|
||||
data['user_reg_time'] = this._userRegTime;
|
||||
data['user_birthday'] = this._userBirthday;
|
||||
data['user_constellation'] = this._userConstellation;
|
||||
data['user_autograph'] = this._userAutograph;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
89
moehu/moehu_fontend/lib/entity/OpusTagEntity.dart
Normal file
@@ -0,0 +1,89 @@
|
||||
class OpusTagEntityList {
|
||||
int _code;
|
||||
List<OpusTagEntityData> _data;
|
||||
String _message;
|
||||
|
||||
OpusTagEntityList({int code, List<OpusTagEntityData> data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
List<OpusTagEntityData> get data => _data;
|
||||
set data(List<OpusTagEntityData> data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
OpusTagEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
if (json['data'] != null) {
|
||||
_data = new List<OpusTagEntityData>();
|
||||
json['data'].forEach((v) {
|
||||
_data.add(new OpusTagEntityData.fromJson(v));
|
||||
});
|
||||
}
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class OpusTagEntityData {
|
||||
int _opusId;
|
||||
int _tagsId;
|
||||
int _tagsRecommend;
|
||||
String _tagsTitle;
|
||||
int _userId;
|
||||
|
||||
OpusTagEntityData(
|
||||
{int opusId,
|
||||
int tagsId,
|
||||
int tagsRecommend,
|
||||
String tagsTitle,
|
||||
int userId}) {
|
||||
this._opusId = opusId;
|
||||
this._tagsId = tagsId;
|
||||
this._tagsRecommend = tagsRecommend;
|
||||
this._tagsTitle = tagsTitle;
|
||||
this._userId = userId;
|
||||
}
|
||||
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get tagsId => _tagsId;
|
||||
set tagsId(int tagsId) => _tagsId = tagsId;
|
||||
int get tagsRecommend => _tagsRecommend;
|
||||
set tagsRecommend(int tagsRecommend) => _tagsRecommend = tagsRecommend;
|
||||
String get tagsTitle => _tagsTitle;
|
||||
set tagsTitle(String tagsTitle) => _tagsTitle = tagsTitle;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
|
||||
OpusTagEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_opusId = json['opus_id'];
|
||||
_tagsId = json['tags_id'];
|
||||
_tagsRecommend = json['tags_recommend'];
|
||||
_tagsTitle = json['tags_title'];
|
||||
_userId = json['user_id'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_id'] = this._opusId;
|
||||
data['tags_id'] = this._tagsId;
|
||||
data['tags_recommend'] = this._tagsRecommend;
|
||||
data['tags_title'] = this._tagsTitle;
|
||||
data['user_id'] = this._userId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
20
moehu/moehu_fontend/lib/entity/PageEntity.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class PageEntity {
|
||||
int _page = 1;
|
||||
int _count = 15;
|
||||
bool _isLoad = false;
|
||||
|
||||
set page(int page) => _page = page;
|
||||
int get page => _page;
|
||||
set count(int count) => _count = count;
|
||||
int get count => _count;
|
||||
set isLoad(bool isLoad) => _isLoad = isLoad;
|
||||
bool get isLoad => _isLoad;
|
||||
|
||||
// PageEntity({int page = 0, int count = 15, bool isLoad}) {
|
||||
// this._page = page;
|
||||
// this._count = count;
|
||||
// this._isLoad = isLoad;
|
||||
// }
|
||||
}
|
||||
13
moehu/moehu_fontend/lib/entity/PubilcEntity.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
class WorksInfoProps {
|
||||
int _id;
|
||||
int get getId => _id;
|
||||
set setId(int id) => _id = id;
|
||||
WorksInfoProps(this._id);
|
||||
}
|
||||
|
||||
class KeywordProps {
|
||||
String _keyword;
|
||||
String get getkeyword => _keyword;
|
||||
set setKeyword(String keyword) => _keyword = keyword;
|
||||
KeywordProps(this._keyword);
|
||||
}
|
||||
186
moehu/moehu_fontend/lib/entity/RegEntity.dart
Normal file
@@ -0,0 +1,186 @@
|
||||
class RegList {
|
||||
int _code;
|
||||
RegData _data;
|
||||
String _message;
|
||||
|
||||
RegList({int code, RegData data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
RegData get data => _data;
|
||||
set data(RegData data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
RegList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_data = json['data'] != null ? new RegData.fromJson(json['data']) : null;
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class RegData {
|
||||
RegEntity _userInfo;
|
||||
String _userToken;
|
||||
|
||||
RegData({RegEntity userInfo, String userToken}) {
|
||||
this._userInfo = userInfo;
|
||||
this._userToken = userToken;
|
||||
}
|
||||
|
||||
RegEntity get userInfo => _userInfo;
|
||||
set userInfo(RegEntity userInfo) => _userInfo = userInfo;
|
||||
String get userToken => _userToken;
|
||||
set userToken(String userToken) => _userToken = userToken;
|
||||
|
||||
RegData.fromJson(Map<String, dynamic> json) {
|
||||
_userInfo = json['user_info'] != null
|
||||
? new RegEntity.fromJson(json['user_info'])
|
||||
: null;
|
||||
_userToken = json['user_token'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this._userInfo != null) {
|
||||
data['user_info'] = this._userInfo.toJson();
|
||||
}
|
||||
data['user_token'] = this._userToken;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class RegEntity {
|
||||
String _userAutograph;
|
||||
String _userBankCard;
|
||||
String _userBirthday;
|
||||
String _userConstellation;
|
||||
String _userEmail;
|
||||
String _userHeadImg;
|
||||
int _userId;
|
||||
String _userIdCard;
|
||||
String _userNickname;
|
||||
String _userPhone;
|
||||
String _userRealName;
|
||||
String _userRegTime;
|
||||
String _userSex;
|
||||
String _userUid;
|
||||
String _userWork;
|
||||
|
||||
RegEntity(
|
||||
{String userAutograph,
|
||||
String userBankCard,
|
||||
String userBirthday,
|
||||
String userConstellation,
|
||||
String userEmail,
|
||||
String userHeadImg,
|
||||
int userId,
|
||||
String userIdCard,
|
||||
String userNickname,
|
||||
String userPhone,
|
||||
String userRealName,
|
||||
String userRegTime,
|
||||
String userSex,
|
||||
String userUid,
|
||||
String userWork}) {
|
||||
this._userAutograph = userAutograph;
|
||||
this._userBankCard = userBankCard;
|
||||
this._userBirthday = userBirthday;
|
||||
this._userConstellation = userConstellation;
|
||||
this._userEmail = userEmail;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userId = userId;
|
||||
this._userIdCard = userIdCard;
|
||||
this._userNickname = userNickname;
|
||||
this._userPhone = userPhone;
|
||||
this._userRealName = userRealName;
|
||||
this._userRegTime = userRegTime;
|
||||
this._userSex = userSex;
|
||||
this._userUid = userUid;
|
||||
this._userWork = userWork;
|
||||
}
|
||||
|
||||
String get userAutograph => _userAutograph;
|
||||
set userAutograph(String userAutograph) => _userAutograph = userAutograph;
|
||||
String get userBankCard => _userBankCard;
|
||||
set userBankCard(String userBankCard) => _userBankCard = userBankCard;
|
||||
String get userBirthday => _userBirthday;
|
||||
set userBirthday(String userBirthday) => _userBirthday = userBirthday;
|
||||
String get userConstellation => _userConstellation;
|
||||
set userConstellation(String userConstellation) =>
|
||||
_userConstellation = userConstellation;
|
||||
String get userEmail => _userEmail;
|
||||
set userEmail(String userEmail) => _userEmail = userEmail;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userIdCard => _userIdCard;
|
||||
set userIdCard(String userIdCard) => _userIdCard = userIdCard;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
String get userPhone => _userPhone;
|
||||
set userPhone(String userPhone) => _userPhone = userPhone;
|
||||
String get userRealName => _userRealName;
|
||||
set userRealName(String userRealName) => _userRealName = userRealName;
|
||||
String get userRegTime => _userRegTime;
|
||||
set userRegTime(String userRegTime) => _userRegTime = userRegTime;
|
||||
String get userSex => _userSex;
|
||||
set userSex(String userSex) => _userSex = userSex;
|
||||
String get userUid => _userUid;
|
||||
set userUid(String userUid) => _userUid = userUid;
|
||||
String get userWork => _userWork;
|
||||
set userWork(String userWork) => _userWork = userWork;
|
||||
|
||||
RegEntity.fromJson(Map<String, dynamic> json) {
|
||||
_userAutograph = json['user_autograph'];
|
||||
_userBankCard = json['user_bank_card'];
|
||||
_userBirthday = json['user_birthday'];
|
||||
_userConstellation = json['user_constellation'];
|
||||
_userEmail = json['user_email'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userId = json['user_id'];
|
||||
_userIdCard = json['user_id_card'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_userPhone = json['user_phone'];
|
||||
_userRealName = json['user_real_name'];
|
||||
_userRegTime = json['user_reg_time'];
|
||||
_userSex = json['user_sex'];
|
||||
_userUid = json['user_uid'];
|
||||
_userWork = json['user_work'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_autograph'] = this._userAutograph;
|
||||
data['user_bank_card'] = this._userBankCard;
|
||||
data['user_birthday'] = this._userBirthday;
|
||||
data['user_constellation'] = this._userConstellation;
|
||||
data['user_email'] = this._userEmail;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_id'] = this._userId;
|
||||
data['user_id_card'] = this._userIdCard;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['user_phone'] = this._userPhone;
|
||||
data['user_real_name'] = this._userRealName;
|
||||
data['user_reg_time'] = this._userRegTime;
|
||||
data['user_sex'] = this._userSex;
|
||||
data['user_uid'] = this._userUid;
|
||||
data['user_work'] = this._userWork;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
90
moehu/moehu_fontend/lib/entity/TagRecommendTagEntity.dart
Normal file
@@ -0,0 +1,90 @@
|
||||
class TagRecommendTagEntityList {
|
||||
int _code;
|
||||
List<TagRecommendTagEntityData> _data;
|
||||
String _message;
|
||||
|
||||
TagRecommendTagEntityList(
|
||||
{int code, List<TagRecommendTagEntityData> data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
List<TagRecommendTagEntityData> get data => _data;
|
||||
set data(List<TagRecommendTagEntityData> data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
TagRecommendTagEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
if (json['data'] != null) {
|
||||
_data = new List<TagRecommendTagEntityData>();
|
||||
json['data'].forEach((v) {
|
||||
_data.add(new TagRecommendTagEntityData.fromJson(v));
|
||||
});
|
||||
}
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class TagRecommendTagEntityData {
|
||||
int _opusId;
|
||||
int _tagsId;
|
||||
int _tagsRecommend;
|
||||
String _tagsTitle;
|
||||
int _userId;
|
||||
|
||||
TagRecommendTagEntityData(
|
||||
{int opusId,
|
||||
int tagsId,
|
||||
int tagsRecommend,
|
||||
String tagsTitle,
|
||||
int userId}) {
|
||||
this._opusId = opusId;
|
||||
this._tagsId = tagsId;
|
||||
this._tagsRecommend = tagsRecommend;
|
||||
this._tagsTitle = tagsTitle;
|
||||
this._userId = userId;
|
||||
}
|
||||
|
||||
int get opusId => _opusId;
|
||||
set opusId(int opusId) => _opusId = opusId;
|
||||
int get tagsId => _tagsId;
|
||||
set tagsId(int tagsId) => _tagsId = tagsId;
|
||||
int get tagsRecommend => _tagsRecommend;
|
||||
set tagsRecommend(int tagsRecommend) => _tagsRecommend = tagsRecommend;
|
||||
String get tagsTitle => _tagsTitle;
|
||||
set tagsTitle(String tagsTitle) => _tagsTitle = tagsTitle;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
|
||||
TagRecommendTagEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_opusId = json['opus_id'];
|
||||
_tagsId = json['tags_id'];
|
||||
_tagsRecommend = json['tags_recommend'];
|
||||
_tagsTitle = json['tags_title'];
|
||||
_userId = json['user_id'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['opus_id'] = this._opusId;
|
||||
data['tags_id'] = this._tagsId;
|
||||
data['tags_recommend'] = this._tagsRecommend;
|
||||
data['tags_title'] = this._tagsTitle;
|
||||
data['user_id'] = this._userId;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
58
moehu/moehu_fontend/lib/entity/ToolUploadFileEntity.dart
Normal file
@@ -0,0 +1,58 @@
|
||||
class ToolUploadFileEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
ToolUploadFileEntityData _data;
|
||||
|
||||
ToolUploadFileEntityList(
|
||||
{int code, String message, ToolUploadFileEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
ToolUploadFileEntityData get data => _data;
|
||||
set data(ToolUploadFileEntityData data) => _data = data;
|
||||
|
||||
ToolUploadFileEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new ToolUploadFileEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ToolUploadFileEntityData {
|
||||
String _imgUrl;
|
||||
|
||||
ToolUploadFileEntityData({String imgUrl}) {
|
||||
this._imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
String get imgUrl => _imgUrl;
|
||||
set imgUrl(String imgUrl) => _imgUrl = imgUrl;
|
||||
|
||||
ToolUploadFileEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_imgUrl = json['img_url'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['img_url'] = this._imgUrl;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
114
moehu/moehu_fontend/lib/entity/UpdateVersionEntity.dart
Normal file
@@ -0,0 +1,114 @@
|
||||
class UpdateVersionEntity {
|
||||
int _code;
|
||||
Null _message;
|
||||
Data _data;
|
||||
|
||||
UpdateVersionEntity({int code, Null message, Data data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
Null get message => _message;
|
||||
set message(Null message) => _message = message;
|
||||
Data get data => _data;
|
||||
set data(Data data) => _data = data;
|
||||
|
||||
UpdateVersionEntity.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int _updateId;
|
||||
String _updateVersion;
|
||||
int _updateVersionCode;
|
||||
String _updateDownUrl;
|
||||
String _updateContent;
|
||||
int _updateForce;
|
||||
int _updateDownCount;
|
||||
int _updateSize;
|
||||
String _updateTime;
|
||||
|
||||
Data(
|
||||
{int updateId,
|
||||
String updateVersion,
|
||||
int updateVersionCode,
|
||||
String updateDownUrl,
|
||||
String updateContent,
|
||||
int updateForce,
|
||||
int updateDownCount,
|
||||
int updateSize,
|
||||
String updateTime}) {
|
||||
this._updateId = updateId;
|
||||
this._updateVersion = updateVersion;
|
||||
this._updateVersionCode = updateVersionCode;
|
||||
this._updateDownUrl = updateDownUrl;
|
||||
this._updateContent = updateContent;
|
||||
this._updateForce = updateForce;
|
||||
this._updateDownCount = updateDownCount;
|
||||
this._updateSize = updateSize;
|
||||
this._updateTime = updateTime;
|
||||
}
|
||||
|
||||
int get updateId => _updateId;
|
||||
set updateId(int updateId) => _updateId = updateId;
|
||||
String get updateVersion => _updateVersion;
|
||||
set updateVersion(String updateVersion) => _updateVersion = updateVersion;
|
||||
int get updateVersionCode => _updateVersionCode;
|
||||
set updateVersionCode(int updateVersionCode) =>
|
||||
_updateVersionCode = updateVersionCode;
|
||||
String get updateDownUrl => _updateDownUrl;
|
||||
set updateDownUrl(String updateDownUrl) => _updateDownUrl = updateDownUrl;
|
||||
String get updateContent => _updateContent;
|
||||
set updateContent(String updateContent) => _updateContent = updateContent;
|
||||
int get updateForce => _updateForce;
|
||||
set updateForce(int updateForce) => _updateForce = updateForce;
|
||||
int get updateDownCount => _updateDownCount;
|
||||
set updateDownCount(int updateDownCount) =>
|
||||
_updateDownCount = updateDownCount;
|
||||
int get updateSize => _updateSize;
|
||||
set updateSize(int updateSize) => _updateSize = updateSize;
|
||||
String get updateTime => _updateTime;
|
||||
set updateTime(String updateTime) => _updateTime = updateTime;
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
_updateId = json['update_id'];
|
||||
_updateVersion = json['update_version'];
|
||||
_updateVersionCode = json['update_version_code'];
|
||||
_updateDownUrl = json['update_down_url'];
|
||||
_updateContent = json['update_content'];
|
||||
_updateForce = json['update_force'];
|
||||
_updateDownCount = json['update_down_count'];
|
||||
_updateSize = json['update_size'];
|
||||
_updateTime = json['update_time'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['update_id'] = this._updateId;
|
||||
data['update_version'] = this._updateVersion;
|
||||
data['update_version_code'] = this._updateVersionCode;
|
||||
data['update_down_url'] = this._updateDownUrl;
|
||||
data['update_content'] = this._updateContent;
|
||||
data['update_force'] = this._updateForce;
|
||||
data['update_down_count'] = this._updateDownCount;
|
||||
data['update_size'] = this._updateSize;
|
||||
data['update_time'] = this._updateTime;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
186
moehu/moehu_fontend/lib/entity/UserEntity.dart
Normal file
@@ -0,0 +1,186 @@
|
||||
class LoginList {
|
||||
int _code;
|
||||
LoginData _data;
|
||||
String _message;
|
||||
|
||||
LoginList({int code, LoginData data, String message}) {
|
||||
this._code = code;
|
||||
this._data = data;
|
||||
this._message = message;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
LoginData get data => _data;
|
||||
set data(LoginData data) => _data = data;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
|
||||
LoginList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_data = json['data'] != null ? new LoginData.fromJson(json['data']) : null;
|
||||
_message = json['message'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
data['message'] = this._message;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class LoginData {
|
||||
UserInfo _userInfo;
|
||||
String _userToken;
|
||||
|
||||
LoginData({UserInfo userInfo, String userToken}) {
|
||||
this._userInfo = userInfo;
|
||||
this._userToken = userToken;
|
||||
}
|
||||
|
||||
UserInfo get userInfo => _userInfo;
|
||||
set userInfo(UserInfo userInfo) => _userInfo = userInfo;
|
||||
String get userToken => _userToken;
|
||||
set userToken(String userToken) => _userToken = userToken;
|
||||
|
||||
LoginData.fromJson(Map<String, dynamic> json) {
|
||||
_userInfo = json['user_info'] != null
|
||||
? new UserInfo.fromJson(json['user_info'])
|
||||
: null;
|
||||
_userToken = json['user_token'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this._userInfo != null) {
|
||||
data['user_info'] = this._userInfo.toJson();
|
||||
}
|
||||
data['user_token'] = this._userToken;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class UserInfo {
|
||||
String _userAutograph;
|
||||
String _userBankCard;
|
||||
String _userBirthday;
|
||||
String _userConstellation;
|
||||
String _userEmail;
|
||||
String _userHeadImg;
|
||||
int _userId;
|
||||
String _userIdCard;
|
||||
String _userNickname;
|
||||
String _userPhone;
|
||||
String _userRealName;
|
||||
String _userRegTime;
|
||||
String _userSex;
|
||||
String _userUid;
|
||||
String _userWork;
|
||||
|
||||
UserInfo(
|
||||
{String userAutograph,
|
||||
String userBankCard,
|
||||
String userBirthday,
|
||||
String userConstellation,
|
||||
String userEmail,
|
||||
String userHeadImg,
|
||||
int userId,
|
||||
String userIdCard,
|
||||
String userNickname,
|
||||
String userPhone,
|
||||
String userRealName,
|
||||
String userRegTime,
|
||||
String userSex,
|
||||
String userUid,
|
||||
String userWork}) {
|
||||
this._userAutograph = userAutograph;
|
||||
this._userBankCard = userBankCard;
|
||||
this._userBirthday = userBirthday;
|
||||
this._userConstellation = userConstellation;
|
||||
this._userEmail = userEmail;
|
||||
this._userHeadImg = userHeadImg;
|
||||
this._userId = userId;
|
||||
this._userIdCard = userIdCard;
|
||||
this._userNickname = userNickname;
|
||||
this._userPhone = userPhone;
|
||||
this._userRealName = userRealName;
|
||||
this._userRegTime = userRegTime;
|
||||
this._userSex = userSex;
|
||||
this._userUid = userUid;
|
||||
this._userWork = userWork;
|
||||
}
|
||||
|
||||
String get userAutograph => _userAutograph;
|
||||
set userAutograph(String userAutograph) => _userAutograph = userAutograph;
|
||||
String get userBankCard => _userBankCard;
|
||||
set userBankCard(String userBankCard) => _userBankCard = userBankCard;
|
||||
String get userBirthday => _userBirthday;
|
||||
set userBirthday(String userBirthday) => _userBirthday = userBirthday;
|
||||
String get userConstellation => _userConstellation;
|
||||
set userConstellation(String userConstellation) =>
|
||||
_userConstellation = userConstellation;
|
||||
String get userEmail => _userEmail;
|
||||
set userEmail(String userEmail) => _userEmail = userEmail;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userIdCard => _userIdCard;
|
||||
set userIdCard(String userIdCard) => _userIdCard = userIdCard;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
String get userPhone => _userPhone;
|
||||
set userPhone(String userPhone) => _userPhone = userPhone;
|
||||
String get userRealName => _userRealName;
|
||||
set userRealName(String userRealName) => _userRealName = userRealName;
|
||||
String get userRegTime => _userRegTime;
|
||||
set userRegTime(String userRegTime) => _userRegTime = userRegTime;
|
||||
String get userSex => _userSex;
|
||||
set userSex(String userSex) => _userSex = userSex;
|
||||
String get userUid => _userUid;
|
||||
set userUid(String userUid) => _userUid = userUid;
|
||||
String get userWork => _userWork;
|
||||
set userWork(String userWork) => _userWork = userWork;
|
||||
|
||||
UserInfo.fromJson(Map<String, dynamic> json) {
|
||||
_userAutograph = json['user_autograph'];
|
||||
_userBankCard = json['user_bank_card'];
|
||||
_userBirthday = json['user_birthday'];
|
||||
_userConstellation = json['user_constellation'];
|
||||
_userEmail = json['user_email'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
_userId = json['user_id'];
|
||||
_userIdCard = json['user_id_card'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_userPhone = json['user_phone'];
|
||||
_userRealName = json['user_real_name'];
|
||||
_userRegTime = json['user_reg_time'];
|
||||
_userSex = json['user_sex'];
|
||||
_userUid = json['user_uid'];
|
||||
_userWork = json['user_work'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['user_autograph'] = this._userAutograph;
|
||||
data['user_bank_card'] = this._userBankCard;
|
||||
data['user_birthday'] = this._userBirthday;
|
||||
data['user_constellation'] = this._userConstellation;
|
||||
data['user_email'] = this._userEmail;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
data['user_id'] = this._userId;
|
||||
data['user_id_card'] = this._userIdCard;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['user_phone'] = this._userPhone;
|
||||
data['user_real_name'] = this._userRealName;
|
||||
data['user_reg_time'] = this._userRegTime;
|
||||
data['user_sex'] = this._userSex;
|
||||
data['user_uid'] = this._userUid;
|
||||
data['user_work'] = this._userWork;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
101
moehu/moehu_fontend/lib/entity/UserInfoPersonalEntity.dart
Normal file
@@ -0,0 +1,101 @@
|
||||
class UserInfoPersonalEntityList {
|
||||
int _code;
|
||||
String _message;
|
||||
UserInfoPersonalEntityData _data;
|
||||
|
||||
UserInfoPersonalEntityList(
|
||||
{int code, String message, UserInfoPersonalEntityData data}) {
|
||||
this._code = code;
|
||||
this._message = message;
|
||||
this._data = data;
|
||||
}
|
||||
|
||||
int get code => _code;
|
||||
set code(int code) => _code = code;
|
||||
String get message => _message;
|
||||
set message(String message) => _message = message;
|
||||
UserInfoPersonalEntityData get data => _data;
|
||||
set data(UserInfoPersonalEntityData data) => _data = data;
|
||||
|
||||
UserInfoPersonalEntityList.fromJson(Map<String, dynamic> json) {
|
||||
_code = json['code'];
|
||||
_message = json['message'];
|
||||
_data = json['data'] != null
|
||||
? new UserInfoPersonalEntityData.fromJson(json['data'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this._code;
|
||||
data['message'] = this._message;
|
||||
if (this._data != null) {
|
||||
data['data'] = this._data.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class UserInfoPersonalEntityData {
|
||||
int _fansNums;
|
||||
int _satisfiedNums;
|
||||
int _userId;
|
||||
String _userAutograph;
|
||||
String _userNickname;
|
||||
int _followNums;
|
||||
String _userHeadImg;
|
||||
|
||||
UserInfoPersonalEntityData(
|
||||
{int fansNums,
|
||||
int satisfiedNums,
|
||||
int userId,
|
||||
String userAutograph,
|
||||
String userNickname,
|
||||
int followNums,
|
||||
String userHeadImg}) {
|
||||
this._fansNums = fansNums;
|
||||
this._satisfiedNums = satisfiedNums;
|
||||
this._userId = userId;
|
||||
this._userAutograph = userAutograph;
|
||||
this._userNickname = userNickname;
|
||||
this._followNums = followNums;
|
||||
this._userHeadImg = userHeadImg;
|
||||
}
|
||||
|
||||
int get fansNums => _fansNums;
|
||||
set fansNums(int fansNums) => _fansNums = fansNums;
|
||||
int get satisfiedNums => _satisfiedNums;
|
||||
set satisfiedNums(int satisfiedNums) => _satisfiedNums = satisfiedNums;
|
||||
int get userId => _userId;
|
||||
set userId(int userId) => _userId = userId;
|
||||
String get userAutograph => _userAutograph;
|
||||
set userAutograph(String userAutograph) => _userAutograph = userAutograph;
|
||||
String get userNickname => _userNickname;
|
||||
set userNickname(String userNickname) => _userNickname = userNickname;
|
||||
int get followNums => _followNums;
|
||||
set followNums(int followNums) => _followNums = followNums;
|
||||
String get userHeadImg => _userHeadImg;
|
||||
set userHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
|
||||
|
||||
UserInfoPersonalEntityData.fromJson(Map<String, dynamic> json) {
|
||||
_fansNums = json['fans_nums'];
|
||||
_satisfiedNums = json['satisfied_nums'];
|
||||
_userId = json['user_id'];
|
||||
_userAutograph = json['user_autograph'];
|
||||
_userNickname = json['user_nickname'];
|
||||
_followNums = json['follow_nums'];
|
||||
_userHeadImg = json['user_head_img'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['fans_nums'] = this._fansNums;
|
||||
data['satisfied_nums'] = this._satisfiedNums;
|
||||
data['user_id'] = this._userId;
|
||||
data['user_autograph'] = this._userAutograph;
|
||||
data['user_nickname'] = this._userNickname;
|
||||
data['follow_nums'] = this._followNums;
|
||||
data['user_head_img'] = this._userHeadImg;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
29
moehu/moehu_fontend/lib/entity/_.dart
Normal file
@@ -0,0 +1,29 @@
|
||||
library entity;
|
||||
|
||||
export 'UserEntity.dart';
|
||||
export 'RegEntity.dart';
|
||||
export 'OpusRecommend.dart';
|
||||
export 'PageEntity.dart';
|
||||
export 'OpusOpusInfoEntity.dart';
|
||||
export 'PubilcEntity.dart';
|
||||
export 'ImagePickerEntity.dart';
|
||||
export 'CheckUserIsFollowEntity.dart';
|
||||
export 'EmptyEntity.dart';
|
||||
export 'ToolUploadFileEntity.dart';
|
||||
export 'CommenListEntity.dart';
|
||||
export 'DynamicPersonalDynamicEntity.dart';
|
||||
export 'DynamicTabsDynamicEntity.dart';
|
||||
export 'DynamicDynamicHistoryEntity.dart';
|
||||
export 'TagRecommendTagEntity.dart';
|
||||
export 'OpusRankingEntity.dart';
|
||||
export 'OpusSearchTagEntity.dart';
|
||||
export 'OpusSearchUserEntity.dart';
|
||||
export 'DynamicInfoEntity.dart';
|
||||
export 'OpusTagEntity.dart';
|
||||
export 'UserInfoPersonalEntity.dart';
|
||||
export 'CollectionOpusListEntity.dart';
|
||||
export 'FollowEntity.dart';
|
||||
export 'OpusListEntity.dart';
|
||||
export 'UpdateVersionEntity.dart';
|
||||
export 'FansUserListEntity.dart';
|
||||
export 'FollowUserListEntity.dart';
|
||||
1
moehu/moehu_fontend/lib/event/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
681b5a13-ab9e-45ce-aba5-b5910fa0e630
|
||||
4
moehu/moehu_fontend/lib/event/ClassEditEvent.dart
Normal file
@@ -0,0 +1,4 @@
|
||||
class ClassEditEvent {
|
||||
bool update;
|
||||
ClassEditEvent(this.update);
|
||||
}
|
||||
4
moehu/moehu_fontend/lib/event/ClassInputEditEvent.dart
Normal file
@@ -0,0 +1,4 @@
|
||||
class ClassInputEditEvent {
|
||||
bool update;
|
||||
ClassInputEditEvent(this.update);
|
||||
}
|
||||
4
moehu/moehu_fontend/lib/event/ClasshHntTextEvent.dart
Normal file
@@ -0,0 +1,4 @@
|
||||
class ClasshHntTextEvent {
|
||||
String text;
|
||||
ClasshHntTextEvent(this.text);
|
||||
}
|
||||
5
moehu/moehu_fontend/lib/event/_.dart
Normal file
@@ -0,0 +1,5 @@
|
||||
library event;
|
||||
|
||||
export 'ClassEditEvent.dart';
|
||||
export 'ClasshHntTextEvent.dart';
|
||||
export 'ClassInputEditEvent.dart';
|
||||
1
moehu/moehu_fontend/lib/http/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
309b08e0-77ec-4285-a1e6-d600bdbbe007
|
||||
85
moehu/moehu_fontend/lib/http/Dio.dart
Normal file
@@ -0,0 +1,85 @@
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
import 'package:toast/toast.dart';
|
||||
|
||||
class ResponseData {
|
||||
String code;
|
||||
String message;
|
||||
dynamic data;
|
||||
}
|
||||
|
||||
/// 单例模式封装 dio
|
||||
class HttpApi {
|
||||
Dio _Dio;
|
||||
static HttpApi _instance = HttpApi.instance();
|
||||
factory HttpApi() => _instance;
|
||||
|
||||
HttpApi.instance() {
|
||||
SPreferences.init();
|
||||
if (null == _Dio) {
|
||||
BaseOptions options = new BaseOptions(
|
||||
baseUrl: Config.ApiUrl['PhotoBaseUrl'],
|
||||
connectTimeout: 30000,
|
||||
contentType: 'application/json; charset=utf-8',
|
||||
responseType: ResponseType.json,
|
||||
);
|
||||
|
||||
_Dio = new Dio(options);
|
||||
_Dio.interceptors.add(InterceptorsWrapper(onRequest: (RequestOptions options) {
|
||||
// print(SPreferences().getString("token"));
|
||||
// options.headers
|
||||
options.headers.putIfAbsent("token", () => SPreferences().getString("token"));
|
||||
// 请求拦截器
|
||||
return options;
|
||||
}, onResponse: (Response response) {
|
||||
|
||||
// 因为 downloadFile 下载apk方法被响应拦截器拦截了,所以这里需要对下载的
|
||||
// 响应头进行判断,如果是阿里云,则不进行状态码的判断
|
||||
if (response.headers.value("server") == "AliyunOSS") {
|
||||
return response;
|
||||
} else {
|
||||
switch (response.data["code"]) {
|
||||
case 404:
|
||||
// BotToast.showText(text: response.data["message"]);
|
||||
return response;
|
||||
case 100:
|
||||
return response;
|
||||
case 500:
|
||||
BotToast.showText(text: response.data["message"]);
|
||||
throw response.data["message"];
|
||||
default:
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}, onError: (DioError e) {
|
||||
print("网络请求出现错误 ====== ${e.message}");
|
||||
// 错误拦截器
|
||||
return e;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
/// GET 请求
|
||||
Future get({@required String url, Options options, dynamic params}) async {
|
||||
Response res =
|
||||
await _Dio.get(url, queryParameters: params, options: options);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
/// POST 请求
|
||||
Future post({@required String url, Options options, dynamic params}) async {
|
||||
Response res = await _Dio.post(url, data: params, options: options);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
/// 下载文件
|
||||
Future downloadFile(String urlPath, String savePath, {ProgressCallback onReceiveProgress}) async {
|
||||
Response response = await _Dio.download(urlPath, savePath,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
options: Options(sendTimeout: 25000, receiveTimeout: 25000));
|
||||
return response;
|
||||
}
|
||||
}
|
||||
12
moehu/moehu_fontend/lib/main.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:peach/router/AppRouter.dart';
|
||||
import 'package:peach/Configure.dart';
|
||||
|
||||
/*
|
||||
* 程序的核心入口
|
||||
*/
|
||||
void main() async {
|
||||
await Configure.init();
|
||||
runApp(ModularApp(module: AppRouter()));
|
||||
}
|
||||
1
moehu/moehu_fontend/lib/router/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
41f0b12a-7fba-45f5-8979-b6dd227baf49
|
||||
25
moehu/moehu_fontend/lib/router/AppNode.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
/*
|
||||
* 根组件
|
||||
*/
|
||||
class AppNode extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScreenUtilInit(
|
||||
designSize: Size(375, 667),
|
||||
// allowFontScaling: false,
|
||||
builder: () => MaterialApp(
|
||||
initialRoute: "/",
|
||||
navigatorKey: Modular.navigatorKey,
|
||||
onGenerateRoute: Modular.generateRoute,
|
||||
debugShowCheckedModeBanner: false,
|
||||
builder: BotToastInit(), //1. call BotToastInit
|
||||
navigatorObservers: [BotToastNavigatorObserver()],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
115
moehu/moehu_fontend/lib/router/AppRouter.dart
Normal file
@@ -0,0 +1,115 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:peach/config/Index.dart';
|
||||
import 'package:peach/router/AppNode.dart';
|
||||
import 'package:peach/views/App.dart';
|
||||
import 'package:peach/views/Dynamic/DynamicInfo.dart';
|
||||
import 'package:peach/views/EditMaterials/EditMaterials.dart';
|
||||
import 'package:peach/views/Fans/Fans.dart';
|
||||
import 'package:peach/views/Follow/Follow.dart';
|
||||
import 'package:peach/views/Index/IndexResultsList.dart';
|
||||
import 'package:peach/views/Index/IndexSearch.dart';
|
||||
import 'package:peach/views/Personal/Personal.dart';
|
||||
import 'package:peach/views/Personal/Setting.dart';
|
||||
import 'package:peach/views/PublishingWorks/PublishingWorks.dart';
|
||||
import 'package:peach/views/ReleaseNews/ReleaseNews.dart';
|
||||
import 'package:peach/views/SignUp/SignUp.dart';
|
||||
import 'package:peach/views/Welcome.dart';
|
||||
import 'package:peach/views/WorksInfo/WorksInfo.dart';
|
||||
|
||||
/*
|
||||
* 路由配置
|
||||
*/
|
||||
class AppRouter extends MainModule {
|
||||
@override
|
||||
List<Bind> get binds => [];
|
||||
|
||||
@override
|
||||
List<ModularRouter> get routers => [
|
||||
ModularRouter(
|
||||
'/',
|
||||
child: (_, __) =>
|
||||
Config.isFirstOpen
|
||||
? Welcome()
|
||||
: Config.isLogin
|
||||
? SignUp()
|
||||
: App(),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/signUp',
|
||||
child: (_, __) => SignUp(),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/index',
|
||||
child: (_, __) => App(),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/setting',
|
||||
child: (_, __) => Setting(),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/worksInfo/:opusId',
|
||||
child: (_, __age) =>
|
||||
WorksInfo(opusId: int.parse(__age.params['opusId'])),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/publishingWorks',
|
||||
child: (_, __) => PublishingWorks(),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/editMaterials',
|
||||
child: (_, __) => EditMaterials(),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/indexSearch',
|
||||
child: (_, __) => IndexSearch(),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/releaseNews',
|
||||
child: (_, __) => ReleaseNews(),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/dynamicInfo/:dynamicId',
|
||||
child: (_, __age) =>
|
||||
DynamicInfo(dynamicId: __age.params['dynamicId']),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/indexResultsList/:affKeyword/:afferentType',
|
||||
child: (_, __age) => IndexResultsList(
|
||||
affKeyword: __age.params["affKeyword"],
|
||||
afferentType: int.parse(__age.params["afferentType"]),
|
||||
),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/personal/:userId',
|
||||
child: (_, __age) =>
|
||||
Personal(userId: int.parse(__age.params["userId"])),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/fans/:userId',
|
||||
child: (_, __age) => Fans(userId: int.parse(__age.params["userId"])),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
ModularRouter(
|
||||
'/follow/:userId',
|
||||
child: (_, __age) =>
|
||||
Follow(userId: int.parse(__age.params["userId"])),
|
||||
transition: TransitionType.fadeIn,
|
||||
),
|
||||
];
|
||||
|
||||
@override
|
||||
Widget get bootstrap => AppNode();
|
||||
}
|
||||
1
moehu/moehu_fontend/lib/service/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
a7babd43-d3bc-49f7-b9a7-38a5d05e261e
|
||||
22
moehu/moehu_fontend/lib/service/CommentService.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/entity/CommenListEntity.dart';
|
||||
import 'package:peach/entity/EmptyEntity.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
import 'package:peach/http/Dio.dart';
|
||||
|
||||
class CommentService {
|
||||
// 发评论
|
||||
static Future<Null> commentAdd(Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['commentAdd'], params: params);
|
||||
return EmptyEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 评论列表
|
||||
static Future<CommenListEntityData> getCommentList(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['commentList'], params: params);
|
||||
return CommenListEntityList.fromJson(res).data;
|
||||
}
|
||||
}
|
||||
54
moehu/moehu_fontend/lib/service/DynamicService.dart
Normal file
@@ -0,0 +1,54 @@
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/entity/EmptyEntity.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
import 'package:peach/http/Dio.dart';
|
||||
|
||||
class DynamicService {
|
||||
// 动态列表
|
||||
static Future<DynamicPersonalDynamicEntityData> dynamicPersonalDynamic(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['dynamicPersonalDynamic'],
|
||||
params: params);
|
||||
return DynamicPersonalDynamicEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
/*
|
||||
* 发布动态
|
||||
*/
|
||||
static Future<Null> dynamicPush(Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['dynamicPush'], params: params);
|
||||
return EmptyEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
/*
|
||||
* 底部tabbar的动态列表
|
||||
*/
|
||||
static Future<DynamicTabsDynamicEntityData> dynamicTabsDynamic(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['dynamicTabsDynamic'], params: params);
|
||||
return DynamicTabsDynamicEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
/*
|
||||
* 【需要Token】获取【最常访问】用户列表
|
||||
*/
|
||||
static Future<DynamicDynamicHistoryEntityData> dynamicDynamicHistory(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['dynamicDynamicHistory'], params: params);
|
||||
return DynamicDynamicHistoryEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
/*
|
||||
* 动态详情
|
||||
*/
|
||||
static Future<DynamicInfoEntityData> dynamicInfo(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['dynamicInfo'], params: params);
|
||||
return DynamicInfoEntityList.fromJson(res).data;
|
||||
}
|
||||
}
|
||||
108
moehu/moehu_fontend/lib/service/OpusService.dart
Normal file
@@ -0,0 +1,108 @@
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/http/Dio.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
|
||||
class OpusService {
|
||||
// 获取首页推荐列表
|
||||
static Future<OpusRecommendData> getOpusRecommend(
|
||||
Map<String, int> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['opusRecommend'], params: params);
|
||||
return OpusRecommendList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 获取作品详情
|
||||
static Future<OpusOpusInfoEntityData> getOpusOpusInfo(
|
||||
Map<String, int> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['opusOpusInfo'], params: params);
|
||||
return OpusOpusInfoEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 判断当前用户是否被关注
|
||||
static Future<bool> isCheckUserIsFollow(Map<String, int> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['checkUserIsFollow'], params: params);
|
||||
return CheckUserIsFollowEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 关注和取消关注
|
||||
static Future<bool> opusFollowUser(Map<String, int> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['opusFollowUser'], params: params);
|
||||
return EmptyEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 检查作品是否被点赞
|
||||
static Future<bool> opusCheckOpusIsUpvote(Map<String, int> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['opusCheckOpusIsUpvote'], params: params);
|
||||
return CheckUserIsFollowEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 点赞和取消点赞
|
||||
static Future<bool> opusUpvoteOpus(Map<String, int> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['opusUpvoteOpus'], params: params);
|
||||
return EmptyEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 发布作品
|
||||
static Future<Null> opusPushOpus(Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['opusPushOpus'], params: params);
|
||||
return EmptyEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 检查作品是否被收藏
|
||||
static Future<bool> opusCheckOpusIsCollection(Map<String, int> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['opusCheckOpusIsCollection'],
|
||||
params: params);
|
||||
return CheckUserIsFollowEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 作品收藏和取消收藏
|
||||
static Future<bool> opusCollectionOpus(Map<String, int> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['opusCollectionOpus'], params: params);
|
||||
return EmptyEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 排行列表
|
||||
static Future<OpusRankingEntityData> opusRanking(
|
||||
Map<String, int> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['opusRanking'], params: params);
|
||||
return OpusRankingEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 搜索接口
|
||||
static Future<dynamic> opusSearch(Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['opusOpusSearch'], params: params);
|
||||
return res;
|
||||
}
|
||||
|
||||
// 收藏列表
|
||||
static Future<CollectionOpusListEntityData> collectionOpusList(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['CollectionOpusList'], params: params);
|
||||
return CollectionOpusListEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 获取关注用户的作品
|
||||
static Future<FollowData> getFollow(Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['Follow'], params: params);
|
||||
return FollowList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 获取个人空间的投稿列表,用的首页推荐的实体
|
||||
static Future<OpusListEntityData> getOpusList(Map<String, int> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['getOpusList'], params: params);
|
||||
return OpusListEntityList.fromJson(res).data;
|
||||
}
|
||||
}
|
||||
23
moehu/moehu_fontend/lib/service/PublicService.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/http/Dio.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
|
||||
class PublicService {
|
||||
// 上传文件
|
||||
static Future<ToolUploadFileEntityData> toolUploadFile(
|
||||
FormData params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['toolUploadFile'], params: params);
|
||||
return ToolUploadFileEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
/// App更新接口
|
||||
static Future<Data> update({ Map<String, dynamic> params }) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['Update'],
|
||||
params: params
|
||||
);
|
||||
return UpdateVersionEntity.fromJson(res).data;
|
||||
}
|
||||
}
|
||||
45
moehu/moehu_fontend/lib/service/TagService.dart
Normal file
@@ -0,0 +1,45 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/http/Dio.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
|
||||
class TagService {
|
||||
// 推荐话题
|
||||
static Future<List<TagRecommendTagEntityData>> tagRecommendTag(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['tagRecommendTag'], params: params);
|
||||
return TagRecommendTagEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 作品标签
|
||||
static Future<List<OpusTagEntityData>> tagOpusTag(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['OpusTag'], params: params);
|
||||
return OpusTagEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 新增标签
|
||||
static Future<Null> tagOpusInfoCreatedTags(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['OpusInfoCreatedTags'], params: params);
|
||||
return EmptyEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 修改当前标签编辑状态
|
||||
static Future<Null> tagUpdateTagsEditStatus(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi().post(
|
||||
url: Config.ApiUrl['ApiList']['UpdateTagsEditStatus'], params: params);
|
||||
return EmptyEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 删除标签
|
||||
static Future<Null> tagDeleteTag(Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['DeleteTag'], params: params);
|
||||
return EmptyEntityList.fromJson(res).data;
|
||||
}
|
||||
}
|
||||
43
moehu/moehu_fontend/lib/service/UserService.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/http/Dio.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
|
||||
class UserService {
|
||||
// 登录接口
|
||||
static Future<LoginData> Login(Map<String, String> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['login'], params: params);
|
||||
return LoginList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 注册接口
|
||||
static Future<RegData> Reg(Map<String, String> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['reg'], params: params);
|
||||
return RegList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 获取个人信息
|
||||
static Future<UserInfoPersonalEntityData> UserInfo(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['UserInfo'], params: params);
|
||||
return UserInfoPersonalEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 获取粉丝列表
|
||||
static Future<FansUserListEntityData> getFansUserList(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['FansUserList'], params: params);
|
||||
return FansUserListEntityList.fromJson(res).data;
|
||||
}
|
||||
|
||||
// 获取关注列表
|
||||
static Future<FollowUserListEntityData> getFollowUserList(
|
||||
Map<String, dynamic> params) async {
|
||||
var res = await HttpApi()
|
||||
.post(url: Config.ApiUrl['ApiList']['FollowUserList'], params: params);
|
||||
return FollowUserListEntityList.fromJson(res).data;
|
||||
}
|
||||
}
|
||||
8
moehu/moehu_fontend/lib/service/_.dart
Normal file
@@ -0,0 +1,8 @@
|
||||
library Service;
|
||||
|
||||
export 'UserService.dart';
|
||||
export 'OpusService.dart';
|
||||
export 'CommentService.dart';
|
||||
export 'DynamicService.dart';
|
||||
export 'TagService.dart';
|
||||
export 'PublicService.dart';
|
||||
1
moehu/moehu_fontend/lib/static/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
27465487-b171-490a-ad2e-3c1c5f204c08
|
||||
1
moehu/moehu_fontend/lib/static/fonts/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
4781ffa7-db7f-4f7a-ad1c-c83178b66c2a
|
||||
BIN
moehu/moehu_fontend/lib/static/fonts/iconfont.ttf
Normal file
1
moehu/moehu_fontend/lib/static/img/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
30f5a850-6a05-4b80-bd87-1c18efb6a0de
|
||||
BIN
moehu/moehu_fontend/lib/static/img/SignupBackground.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
moehu/moehu_fontend/lib/static/img/add.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
moehu/moehu_fontend/lib/static/img/addTo.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
moehu/moehu_fontend/lib/static/img/android-template.png
Executable file
|
After Width: | Height: | Size: 330 KiB |
BIN
moehu/moehu_fontend/lib/static/img/back.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
moehu/moehu_fontend/lib/static/img/emoji.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
moehu/moehu_fontend/lib/static/img/keyboard.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
moehu/moehu_fontend/lib/static/img/logo.png
Normal file
|
After Width: | Height: | Size: 45 KiB |
BIN
moehu/moehu_fontend/lib/static/img/taxi.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
moehu/moehu_fontend/lib/static/img/update_bg_app_top.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
moehu/moehu_fontend/lib/static/img/update_ic_close.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
moehu/moehu_fontend/lib/static/img/vipLogo.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
moehu/moehu_fontend/lib/static/img/voice.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
moehu/moehu_fontend/lib/static/img/welcome2.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
moehu/moehu_fontend/lib/static/img/welcome3.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
1
moehu/moehu_fontend/lib/utils/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
c443c883-414a-4e80-b0c1-168bc79f4c8b
|
||||
87
moehu/moehu_fontend/lib/utils/AuthorityApplication.dart
Normal file
@@ -0,0 +1,87 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
|
||||
/*
|
||||
* 动态申请App的权限
|
||||
*/
|
||||
class AuthorityApplication {
|
||||
/// App需要动态申请的权限
|
||||
static List<Permission> permissionList = [
|
||||
Permission.storage,
|
||||
Permission.photos
|
||||
];
|
||||
|
||||
static Future<bool> init(BuildContext context) async {
|
||||
if (Config.isAndroid) {
|
||||
Map<Permission, PermissionStatus> status = await permissionList.request();
|
||||
if (status[Permission.storage].isGranted) {
|
||||
print("用户同意了权限");
|
||||
return true;
|
||||
} else if (status[Permission.storage].isDenied) {
|
||||
print("用户拒绝了权限");
|
||||
AuthorityApplication.ShowTips(
|
||||
context: context,
|
||||
content: "请允许App获取权限,否则App功能不能正常使用!",
|
||||
isShowcancel: false,
|
||||
confirmCall: () async {
|
||||
AuthorityApplication.init(context);
|
||||
},
|
||||
);
|
||||
return false;
|
||||
} else if (status[Permission.storage].isPermanentlyDenied) {
|
||||
print("用户永久拒绝了权限");
|
||||
AuthorityApplication.ShowTips(
|
||||
context: context,
|
||||
content: "您禁用了应用的必要权限,请到设置里开启!",
|
||||
isShowcancel: false,
|
||||
confirmText: '打开设置',
|
||||
confirmCall: () async {
|
||||
await openAppSettings();
|
||||
},
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Future ShowTips(
|
||||
{BuildContext context,
|
||||
String content,
|
||||
bool isShowcancel: true,
|
||||
Function confirmCall,
|
||||
confirmText = "重新请求",
|
||||
title = '提示'}) async {
|
||||
await showDialog(
|
||||
context: context,
|
||||
barrierDismissible: false,
|
||||
builder: (context) => WillPopScope(
|
||||
onWillPop: () async => false,
|
||||
child: AlertDialog(
|
||||
title: Text(title),
|
||||
content: Text(content),
|
||||
actions: <Widget>[
|
||||
isShowcancel
|
||||
? FlatButton(
|
||||
child: Text(
|
||||
'取消',
|
||||
style: TextStyle(color: ColorConfig.NoActiveColor),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
})
|
||||
: Text(''),
|
||||
FlatButton(
|
||||
child: Text(
|
||||
confirmText,
|
||||
style: TextStyle(color: ColorConfig.ThemeColor),
|
||||
),
|
||||
onPressed: () async {
|
||||
confirmCall();
|
||||
Navigator.of(context).pop();
|
||||
}),
|
||||
],
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
94
moehu/moehu_fontend/lib/utils/CLearCache.dart
Normal file
@@ -0,0 +1,94 @@
|
||||
import 'dart:io';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
/*
|
||||
* 计算清除缓存
|
||||
*/
|
||||
class ClearCache {
|
||||
|
||||
///加载缓存
|
||||
static Future<String> loadCache() async {
|
||||
try {
|
||||
Directory tempDir = await getTemporaryDirectory();
|
||||
double value = await ClearCache._getTotalSizeOfFilesInDir(tempDir);
|
||||
// tempDir.list(followLinks: false,recursive: true).listen((file){
|
||||
// //打印每个缓存文件的路径
|
||||
// print(file.path);
|
||||
// });
|
||||
return ClearCache._renderSize(value);
|
||||
} catch (err) {
|
||||
print(err);
|
||||
}
|
||||
}
|
||||
|
||||
// 清理缓存
|
||||
static Future<bool> clearCache() async {
|
||||
//此处展示加载loading
|
||||
try {
|
||||
Directory tempDir = await getTemporaryDirectory();
|
||||
//删除缓存目录
|
||||
await ClearCache.delDir(tempDir);
|
||||
await ClearCache.loadCache();
|
||||
return true;
|
||||
} catch (e) {
|
||||
print(e);
|
||||
return false;
|
||||
} finally {
|
||||
//此处隐藏加载loading
|
||||
}
|
||||
}
|
||||
|
||||
/// 递归方式 计算文件的大小
|
||||
static Future<double> _getTotalSizeOfFilesInDir(final FileSystemEntity file) async {
|
||||
try {
|
||||
if (file is File) {
|
||||
int length = await file.length();
|
||||
return double.parse(length.toString());
|
||||
}
|
||||
if (file is Directory) {
|
||||
final List<FileSystemEntity> children = file.listSync();
|
||||
double total = 0;
|
||||
if (children != null)
|
||||
for (final FileSystemEntity child in children)
|
||||
total += await ClearCache._getTotalSizeOfFilesInDir(child);
|
||||
return total;
|
||||
}
|
||||
return 0;
|
||||
} catch (e) {
|
||||
print(e);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
///递归方式删除目录
|
||||
static Future<Null> delDir(FileSystemEntity file) async {
|
||||
try {
|
||||
if (file is Directory) {
|
||||
final List<FileSystemEntity> children = file.listSync();
|
||||
for (final FileSystemEntity child in children) {
|
||||
await delDir(child);
|
||||
}
|
||||
}
|
||||
await file.delete();
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
}
|
||||
|
||||
/// 格式化文件大小
|
||||
static String _renderSize(double value) {
|
||||
if (null == value) {
|
||||
return '0';
|
||||
}
|
||||
List<String> unitArr = List()..add('B')..add('K')..add('M')..add('G');
|
||||
int index = 0;
|
||||
while (value > 1024) {
|
||||
index++;
|
||||
value = value / 1024;
|
||||
// value = value / 8024;
|
||||
}
|
||||
String size = value.toStringAsFixed(2);
|
||||
return size + unitArr[index];
|
||||
}
|
||||
|
||||
}
|
||||
128
moehu/moehu_fontend/lib/utils/CheckUpdate.dart
Normal file
@@ -0,0 +1,128 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_update_dialog/update_dialog.dart';
|
||||
import 'package:install_plugin/install_plugin.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:peach/R.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
import 'package:peach/http/Dio.dart';
|
||||
import 'package:peach/service/_.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
|
||||
/*
|
||||
* 检测新版本
|
||||
*/
|
||||
class CheckUpdate {
|
||||
// 保存升级弹窗
|
||||
UpdateDialog _dialog;
|
||||
double _progress = 0.0;
|
||||
bool force; // false 不强制升级 true 强制升级
|
||||
File _apkFile;
|
||||
|
||||
Future<bool> check(BuildContext context) async {
|
||||
// 检查版本
|
||||
Data res = await PublicService.update(params: {});
|
||||
if (res.updateForce == 0) {
|
||||
force = false;
|
||||
} else {
|
||||
force = true;
|
||||
}
|
||||
// 如果需要升级
|
||||
if (int.parse(Config.packageInfo.buildNumber) < res.updateVersionCode) {
|
||||
if (_dialog != null && _dialog.isShowing()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 显示弹窗
|
||||
_dialog = UpdateDialog.showUpdate(context,
|
||||
title: "发现新版本 v${res.updateVersion},请升级!",
|
||||
updateContent: res.updateContent,
|
||||
width: Screen.setWidth(280),
|
||||
topImage: Image.asset(R.libStaticImgUpdateBgAppTopPng),
|
||||
themeColor: ColorConfig.ThemeColor,
|
||||
updateButtonText: '升级到最新版',
|
||||
ignoreButtonText: '忽略',
|
||||
enableIgnore: !force, // true 可以忽略,不强制升级
|
||||
onIgnore: () {
|
||||
_dialog.dismiss();
|
||||
},
|
||||
isForce: force, // false 显示关闭按钮 不强制升级
|
||||
onUpdate: () async {
|
||||
// 如果是android 那么下载app
|
||||
if (Config.isAndroid) {
|
||||
print("如果是android 那么下载app");
|
||||
// 获取临时下载地址
|
||||
_apkFile = await getApkFileByUpdateEntity(res);
|
||||
await onUpdate(res);
|
||||
// 如果是ios 那么打开appstore
|
||||
} else {
|
||||
InstallPlugin.gotoAppStore(Config.iosDownApkUrl);
|
||||
}
|
||||
}
|
||||
);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// 下载文件,更新进度条
|
||||
Future<void> onUpdate(Data res) async {
|
||||
await HttpApi().downloadFile(
|
||||
res.updateDownUrl, _apkFile.path,
|
||||
onReceiveProgress: (int count, int total) {
|
||||
_progress = count.toDouble() / total;
|
||||
if (_progress <= 1.0001) {
|
||||
_dialog.update(_progress);
|
||||
}
|
||||
}).then((value) {
|
||||
_dialog.dismiss();
|
||||
installAPP();
|
||||
}).catchError((value) {
|
||||
_dialog.dismiss();
|
||||
});
|
||||
}
|
||||
|
||||
/// android 安装app
|
||||
void installAPP() async {
|
||||
String packageName = Config.packageInfo.packageName;
|
||||
InstallPlugin.installApk(_apkFile.path, packageName);
|
||||
}
|
||||
|
||||
/// 根据更新信息获取apk安装文件
|
||||
Future<File> getApkFileByUpdateEntity(Data res) async {
|
||||
// 获取app文件名
|
||||
String appName = getApkNameByDownloadUrl(res.updateDownUrl);
|
||||
// 获取下载的缓存路径
|
||||
String dirPath = await getDownloadDirPath();
|
||||
return File("$dirPath/${res.updateVersion}/$appName");
|
||||
}
|
||||
|
||||
///获取下载缓存路径
|
||||
Future<String> getDownloadDirPath() async {
|
||||
Directory directory = Config.isAndroid
|
||||
? await getExternalStorageDirectory()
|
||||
: await getApplicationDocumentsDirectory();
|
||||
return directory.path;
|
||||
}
|
||||
|
||||
///根据下载地址获取文件名
|
||||
String getApkNameByDownloadUrl(String downloadUrl) {
|
||||
if (downloadUrl.isEmpty) {
|
||||
return "temp_${currentTimeMillis()}.apk";
|
||||
} else {
|
||||
String appName = downloadUrl.substring(downloadUrl.lastIndexOf("/") + 1);
|
||||
if (!appName.endsWith(".apk")) {
|
||||
appName = "temp_${currentTimeMillis()}.apk";
|
||||
}
|
||||
return appName;
|
||||
}
|
||||
}
|
||||
|
||||
/// 返回随机文件名
|
||||
int currentTimeMillis() {
|
||||
return DateTime.now().millisecondsSinceEpoch;
|
||||
}
|
||||
}
|
||||
20
moehu/moehu_fontend/lib/utils/Core.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
/*
|
||||
* 核心的utils,主要封装UI相关的操作
|
||||
*/
|
||||
class Core {
|
||||
//修改状态栏颜色
|
||||
static void barColor(Color color) {
|
||||
SystemUiOverlayStyle uiStyle = SystemUiOverlayStyle.light.copyWith(
|
||||
statusBarColor: color,
|
||||
);
|
||||
SystemChrome.setSystemUIOverlayStyle(uiStyle);
|
||||
}
|
||||
|
||||
/// 复制文字到剪切板
|
||||
static void copy(String message) {
|
||||
Clipboard.setData(ClipboardData(text: message));
|
||||
}
|
||||
}
|
||||
16
moehu/moehu_fontend/lib/utils/IconFont.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
|
||||
/*
|
||||
* IconFont 字体图标
|
||||
*/
|
||||
class IconFont {
|
||||
static Icon LogoIcon(
|
||||
{double size = 24.0, Color color = ColorConfig.WhiteBackColor}) {
|
||||
return Icon(
|
||||
const IconData(0xe61c, fontFamily: 'iconfont'),
|
||||
size: size,
|
||||
color: color,
|
||||
);
|
||||
}
|
||||
}
|
||||
27
moehu/moehu_fontend/lib/utils/Screen.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
/*
|
||||
* 尺寸兼容,类似前端的rem
|
||||
*/
|
||||
class Screen {
|
||||
static double setWidth(double width) {
|
||||
return ScreenUtil().setWidth(width);
|
||||
}
|
||||
|
||||
static double setHeight(double height) {
|
||||
return ScreenUtil().setHeight(height);
|
||||
}
|
||||
|
||||
static double setFontSize(double Size) {
|
||||
return ScreenUtil().setSp(Size);
|
||||
}
|
||||
|
||||
static double width(BuildContext context) {
|
||||
return MediaQuery.of(context).size.width;
|
||||
}
|
||||
|
||||
static double height(BuildContext context) {
|
||||
return MediaQuery.of(context).size.height;
|
||||
}
|
||||
}
|
||||
51
moehu/moehu_fontend/lib/utils/SharedPreferences.dart
Normal file
@@ -0,0 +1,51 @@
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
/*
|
||||
* shared_preferences 配置
|
||||
*/
|
||||
class SPreferences {
|
||||
static final SPreferences _instance = SPreferences._();
|
||||
factory SPreferences() => _instance;
|
||||
SPreferences._();
|
||||
static SharedPreferences _prefs;
|
||||
|
||||
static Future<void> init() async {
|
||||
if (_prefs == null) {
|
||||
_prefs = await SharedPreferences.getInstance();
|
||||
}
|
||||
}
|
||||
|
||||
// 设置数字类型
|
||||
Future<bool> setInt(String key, int value) async {
|
||||
return await _prefs.setInt(key, value);
|
||||
}
|
||||
|
||||
// 设置bool
|
||||
Future<bool> setBool(String key, bool value) async {
|
||||
return await _prefs.setBool(key, value);
|
||||
}
|
||||
|
||||
// 设置String
|
||||
Future<bool> setString(String key, String value) async {
|
||||
return await _prefs.setString(key, value);
|
||||
}
|
||||
|
||||
String getString(String key) {
|
||||
return _prefs.getString(key);
|
||||
}
|
||||
|
||||
bool getIsLogin() {
|
||||
if (_prefs.containsKey("isLogin")) {
|
||||
return _prefs.getBool("isLogin");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool getBool(String key) {
|
||||
if (!(_prefs.containsKey(key))) {
|
||||
_prefs.setBool(key, true);
|
||||
return false;
|
||||
}
|
||||
return _prefs.getBool(key);
|
||||
}
|
||||
}
|
||||
200
moehu/moehu_fontend/lib/utils/Tool.dart
Normal file
@@ -0,0 +1,200 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'package:convert/convert.dart';
|
||||
import 'package:crypto/crypto.dart';
|
||||
import 'dart:io';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
|
||||
/*
|
||||
* 工具函数,主要给dart逻辑使用
|
||||
*/
|
||||
class Tool {
|
||||
/// 按照指定下标将数组分割为二维数组
|
||||
static List<List<T>> splitList<T>(List<T> list, int len) {
|
||||
if (len <= 1) {
|
||||
return [list];
|
||||
}
|
||||
|
||||
List<List<T>> result = List();
|
||||
int index = 1;
|
||||
|
||||
while (true) {
|
||||
if (index * len < list.length) {
|
||||
List<T> temp = list.skip((index - 1) * len).take(len).toList();
|
||||
result.add(temp);
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
List<T> temp = list.skip((index - 1) * len).toList();
|
||||
result.add(temp);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// 生成N位随机数
|
||||
static String randomBit([int len = 15]) {
|
||||
String scopeF = '123456789'; //首位
|
||||
String scopeC = '0123456789'; //中间
|
||||
String result = '';
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (i == 0) {
|
||||
result = scopeF[Random().nextInt(scopeF.length)];
|
||||
} else {
|
||||
result = result + scopeC[Random().nextInt(scopeC.length)];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// 检查用户是否有权限打开【单手模式】
|
||||
/// 权限规则:
|
||||
/// 1:对弹窗给的 androidid 进行 MD5 加密
|
||||
/// 2:在 com.example.untitled/files 文件夹中 用第一步的密文来创建文件
|
||||
/// 3:向文件中 写入 设备的 androidid
|
||||
/// 通过验证,正常访问..
|
||||
static Future<bool> checkIsOpen() async {
|
||||
String androidId = Config.androidDeviceInfo.androidId;
|
||||
Directory filesPath = await getExternalStorageDirectory();
|
||||
File completePath = File("${filesPath.path}/${generateMd5(androidId)}");
|
||||
if (completePath.existsSync()) {
|
||||
String textMessage = await completePath.readAsString();
|
||||
return textMessage == androidId ? true : false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* md5 加密
|
||||
*/
|
||||
static String generateMd5(String data) {
|
||||
var content = new Utf8Encoder().convert(data);
|
||||
var digest = md5.convert(content);
|
||||
// 这里其实就是 digest.toString()
|
||||
return hex.encode(digest.bytes);
|
||||
}
|
||||
|
||||
/// 从本地读取用户信息
|
||||
static Map userInfo() {
|
||||
String username = SPreferences().getString("username");
|
||||
String objectId = SPreferences().getString("objectId");
|
||||
String createdAt = SPreferences().getString("createdAt");
|
||||
String userType = SPreferences().getString("userType");
|
||||
String userWeiXin = SPreferences().getString("userWeiXin");
|
||||
Map info = new Map();
|
||||
info.addAll({
|
||||
'username': username,
|
||||
'objectId': objectId,
|
||||
'createdAt': createdAt,
|
||||
'userType': userType,
|
||||
'userWeiXin': userWeiXin,
|
||||
});
|
||||
return info;
|
||||
}
|
||||
|
||||
/// 验证是否为合法的手机号
|
||||
static bool isPhone(String str) {
|
||||
return new RegExp(
|
||||
'^((13[0-9])|(15[^4])|(166)|(17[0-8])|(18[0-9])|(19[8-9])|(147,145))\\d{8}\$')
|
||||
.hasMatch(str);
|
||||
}
|
||||
|
||||
// 防抖
|
||||
// // const Duration(milliseconds: 2000)
|
||||
static debounce(Function func, Duration mill) {
|
||||
Timer timer;
|
||||
Duration delay = mill;
|
||||
Function target = () {
|
||||
if (timer?.isActive ?? false) {
|
||||
timer?.cancel();
|
||||
}
|
||||
timer = Timer(delay, () {
|
||||
func?.call();
|
||||
});
|
||||
};
|
||||
return target;
|
||||
}
|
||||
|
||||
/* 时间戳转字符串
|
||||
* timestamp 时间戳
|
||||
* formart :"y-m":年和月之间的符号,
|
||||
* "m-d":月和日之间的符号
|
||||
* "h-m":时和分之间的符号,
|
||||
* "m-s":分和秒之间的符号;
|
||||
* "m-a":是否显示上午和下午
|
||||
*/
|
||||
static String dateAndTimeToString(var timestamp,
|
||||
{Map<String, String> formart}) {
|
||||
if (timestamp == null || timestamp == "") {
|
||||
return "";
|
||||
}
|
||||
String targetString = "";
|
||||
final date = new DateTime.fromMicrosecondsSinceEpoch(timestamp * 1000);
|
||||
// final String tmp = date.toString();
|
||||
String year = date.year.toString();
|
||||
String month = date.month.toString();
|
||||
if (date.month <= 9) {
|
||||
month = "0" + month;
|
||||
}
|
||||
String day = date.day.toString();
|
||||
if (date.day <= 9) {
|
||||
day = "0" + day;
|
||||
}
|
||||
String hour = date.hour.toString();
|
||||
if (date.hour <= 9) {
|
||||
hour = "0" + hour;
|
||||
}
|
||||
String minute = date.minute.toString();
|
||||
if (date.minute <= 9) {
|
||||
minute = "0" + minute;
|
||||
}
|
||||
String second = date.second.toString();
|
||||
if (date.second <= 9) {
|
||||
second = "0" + second;
|
||||
}
|
||||
// String millisecond = date.millisecond.toString();
|
||||
String morningOrafternoon = "上午";
|
||||
if (date.hour >= 12) {
|
||||
morningOrafternoon = "下午";
|
||||
}
|
||||
|
||||
if (formart["y-m"] != null && formart["m-d"] != null) {
|
||||
targetString = year + formart["y-m"] + month + formart["m-d"] + day;
|
||||
} else if (formart["y-m"] == null && formart["m-d"] != null) {
|
||||
targetString = month + formart["m-d"] + day;
|
||||
} else if (formart["y-m"] != null && formart["m-d"] == null) {
|
||||
targetString = year + formart["y-m"] + month;
|
||||
}
|
||||
|
||||
targetString += " ";
|
||||
|
||||
if (formart["m-a"] != null) {
|
||||
targetString += morningOrafternoon + " ";
|
||||
}
|
||||
|
||||
if (formart["h-m"] != null && formart["m-s"] != null) {
|
||||
targetString += hour + formart["h-m"] + minute + formart["m-s"] + second;
|
||||
} else if (formart["h-m"] == null && formart["m-s"] != null) {
|
||||
targetString += minute + formart["m-s"] + second;
|
||||
} else if (formart["h-m"] != null && formart["m-s"] == null) {
|
||||
targetString += hour + formart["h-m"] + minute;
|
||||
}
|
||||
|
||||
return targetString;
|
||||
}
|
||||
|
||||
/*
|
||||
* 2021-05-22T10:37:06.000+00:00 => 1621679826000
|
||||
* 把标准时间格式转换成时间戳
|
||||
*/
|
||||
static int timeToStamp(String str) {
|
||||
String _time = str;
|
||||
int _intendtime = DateTime.parse(_time).millisecondsSinceEpoch;
|
||||
return _intendtime;
|
||||
}
|
||||
}
|
||||
10
moehu/moehu_fontend/lib/utils/_.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
library utils;
|
||||
|
||||
export 'Screen.dart';
|
||||
export 'IconFont.dart';
|
||||
export 'Core.dart';
|
||||
export 'Tool.dart';
|
||||
export 'AuthorityApplication.dart';
|
||||
export 'CLearCache.dart';
|
||||
export 'SharedPreferences.dart';
|
||||
export 'CheckUpdate.dart';
|
||||
1
moehu/moehu_fontend/lib/views/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
6a7874ca-a847-408f-bb27-f0bbc9012436
|
||||
80
moehu/moehu_fontend/lib/views/App.dart
Normal file
@@ -0,0 +1,80 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
|
||||
import 'Appointment/Appointment.dart';
|
||||
import 'Customized/Customized.dart';
|
||||
import 'Dynamic/Dynamic.dart';
|
||||
import 'Index/Index.dart';
|
||||
import 'Index/PersonalpPop.dart';
|
||||
import 'Personal/Personal.dart';
|
||||
|
||||
/**
|
||||
* 有状态StatefulWidget
|
||||
* 继承于 StatefulWidget,通过 State 的 build 方法去构建控件
|
||||
*/
|
||||
class App extends StatefulWidget {
|
||||
App();
|
||||
|
||||
//主要是负责创建state
|
||||
@override
|
||||
BotomeMenumTabBarPageState createState() => BotomeMenumTabBarPageState();
|
||||
}
|
||||
|
||||
/**
|
||||
* 在 State 中,可以动态改变数据
|
||||
* 在 setState 之后,改变的数据会触发 Widget 重新构建刷新
|
||||
*/
|
||||
class BotomeMenumTabBarPageState extends State<App>
|
||||
with SingleTickerProviderStateMixin {
|
||||
BotomeMenumTabBarPageState();
|
||||
TabController tabController;
|
||||
@override
|
||||
void initState() {
|
||||
///初始化,这个函数在生命周期中只调用一次
|
||||
super.initState();
|
||||
CheckUpdate().check(context);
|
||||
tabController = new TabController(length: 4, vsync: this);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Config.context = context;
|
||||
//构建页面
|
||||
Core.barColor(Colors.transparent);
|
||||
return new Scaffold(
|
||||
extendBody: true,
|
||||
body: new TabBarView(controller: tabController, children: [
|
||||
Builder(builder: (BuildContext context) {
|
||||
return Index(clickHead: () => {Scaffold.of(context).openDrawer()});
|
||||
}),
|
||||
Appointment(),
|
||||
Dynamic(),
|
||||
Customized(),
|
||||
// Personal()
|
||||
]),
|
||||
bottomNavigationBar: Container(
|
||||
height: Screen.setHeight(50),
|
||||
decoration: new BoxDecoration(
|
||||
color: ColorConfig.WhiteBackColor,
|
||||
border: new Border(top: BorderSide(color: ColorConfig.LineColor)),
|
||||
),
|
||||
child: new TabBar(
|
||||
indicatorColor: Colors.transparent,
|
||||
labelColor: ColorConfig.ThemeColor,
|
||||
unselectedLabelColor: ColorConfig.TextColor,
|
||||
controller: tabController,
|
||||
tabs: <Tab>[
|
||||
new Tab(text: "首页", icon: new Icon(Icons.home)),
|
||||
new Tab(text: "约稿", icon: new Icon(Icons.find_in_page)),
|
||||
new Tab(text: "动态", icon: new Icon(Icons.message)),
|
||||
new Tab(text: "定制", icon: new Icon(Icons.person)),
|
||||
// new Tab(text: "个人", icon: new Icon(Icons.person)),
|
||||
],
|
||||
indicatorWeight: 0.1,
|
||||
labelStyle: TextStyle(height: 0.5),
|
||||
),
|
||||
),
|
||||
drawer: PersonalpPop());
|
||||
}
|
||||
}
|
||||
1
moehu/moehu_fontend/lib/views/Appointment/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
bf367505-32e1-4734-9a41-9ab3be795c38
|
||||
32
moehu/moehu_fontend/lib/views/Appointment/Appointment.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/*
|
||||
* 约稿
|
||||
*/
|
||||
class Appointment extends StatefulWidget {
|
||||
@override
|
||||
_Appointment createState() => _Appointment();
|
||||
}
|
||||
|
||||
class _Appointment extends State<Appointment> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
new Container(
|
||||
margin: const EdgeInsets.only(top: 8.0),
|
||||
child: new Text(
|
||||
"测试",
|
||||
style: new TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
32
moehu/moehu_fontend/lib/views/BlankPage.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/*
|
||||
* 约稿
|
||||
*/
|
||||
class BlankPage extends StatefulWidget {
|
||||
@override
|
||||
_BlankPage createState() => _BlankPage();
|
||||
}
|
||||
|
||||
class _BlankPage extends State<BlankPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
new Container(
|
||||
margin: const EdgeInsets.only(top: 8.0),
|
||||
child: new Text(
|
||||
"测试",
|
||||
style: new TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
1
moehu/moehu_fontend/lib/views/Customized/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
e3d1e081-185d-46c1-8b94-b2b5cb5a9fd3
|
||||
32
moehu/moehu_fontend/lib/views/Customized/Customized.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/*
|
||||
* 定制
|
||||
*/
|
||||
class Customized extends StatefulWidget {
|
||||
@override
|
||||
_Customized createState() => _Customized();
|
||||
}
|
||||
|
||||
class _Customized extends State<Customized> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return new Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
new Container(
|
||||
margin: const EdgeInsets.only(top: 8.0),
|
||||
child: new Text(
|
||||
"测试",
|
||||
style: new TextStyle(
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
1
moehu/moehu_fontend/lib/views/Dynamic/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
526bc4e1-6a8b-4b67-b7fa-a0786968ba28
|
||||
193
moehu/moehu_fontend/lib/views/Dynamic/Dynamic.dart
Normal file
@@ -0,0 +1,193 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
import 'package:peach/event/_.dart';
|
||||
import 'package:peach/service/TagService.dart';
|
||||
import 'package:peach/service/_.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
import 'package:peach/views/Dynamic/DynamicItem.dart';
|
||||
import 'package:peach/views/Dynamic/Topic.dart';
|
||||
import 'package:peach/widget/_.dart';
|
||||
|
||||
import 'MostFrequently.dart';
|
||||
|
||||
/*
|
||||
* 动态
|
||||
*/
|
||||
class Dynamic extends StatefulWidget {
|
||||
@override
|
||||
_Dynamic createState() => _Dynamic();
|
||||
}
|
||||
|
||||
class _Dynamic extends State<Dynamic> {
|
||||
EasyRefreshController _easyRefreshController;
|
||||
List<DynamicTabsDynamicEntity> dynamicList = [];
|
||||
List<DynamicDynamicHistoryEntity> history = [];
|
||||
List<TagRecommendTagEntityData> recommendTagList = [];
|
||||
|
||||
PageEntity page = PageEntity();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_easyRefreshController = EasyRefreshController();
|
||||
super.initState();
|
||||
future();
|
||||
listenChange();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
toolbarHeight: Screen.setHeight(82),
|
||||
backgroundColor: ColorConfig.WhiteBackColor,
|
||||
elevation: 0,
|
||||
leading: SizedBox(width: 0.1),
|
||||
title: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Text("动态",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: ColorConfig.TitleColor)),
|
||||
),
|
||||
actions: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.of(context).pushNamed("/releaseNews");
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 10),
|
||||
width: Screen.setWidth(45),
|
||||
child: Icon(Icons.edit_road, color: ColorConfig.TitleColor),
|
||||
),
|
||||
)
|
||||
],
|
||||
bottom: bottom(),
|
||||
),
|
||||
body: Container(
|
||||
height: Screen.height(context) - Screen.setHeight(158),
|
||||
child: easyRefresh(Column(
|
||||
children: [
|
||||
MostFrequently(
|
||||
history: history,
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Line(),
|
||||
Topic(
|
||||
topicList: recommendTagList,
|
||||
)
|
||||
],
|
||||
),
|
||||
...dynamicList
|
||||
.asMap()
|
||||
.keys
|
||||
.map((e) => DynamicItem(dynamicData: dynamicList[e]))
|
||||
.toList(),
|
||||
],
|
||||
)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget bottom() {
|
||||
return PreferredSize(
|
||||
preferredSize: Size.fromHeight(45),
|
||||
child: Container(
|
||||
height: Screen.setHeight(37),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
top: BorderSide(
|
||||
color: ColorConfig.LineColor, width: 1, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
color: ColorConfig.LineColor, width: 1, style: BorderStyle.solid),
|
||||
)),
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Panel(
|
||||
top: 5,
|
||||
bottom: 5,
|
||||
child: ExhibitionSearch(
|
||||
backgroundColor: ColorConfig.AshPlacement,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 下拉刷新上啦加载
|
||||
Widget easyRefresh(Widget child) {
|
||||
return EasyRefresh(
|
||||
header: BezierCircleHeader(backgroundColor: ColorConfig.ThemeColor),
|
||||
footer: BezierBounceFooter(backgroundColor: ColorConfig.ThemeColor),
|
||||
enableControlFinishRefresh: false,
|
||||
enableControlFinishLoad: true,
|
||||
controller: _easyRefreshController,
|
||||
child: child,
|
||||
bottomBouncing: true,
|
||||
onRefresh: () async {
|
||||
page.page = 1;
|
||||
dynamicList = [];
|
||||
page.isLoad = false;
|
||||
await dynamicPersonalDynamic();
|
||||
_easyRefreshController.finishRefresh(success: true);
|
||||
},
|
||||
onLoad: () async {
|
||||
if (!page.isLoad) {
|
||||
page.page += 1;
|
||||
await dynamicPersonalDynamic();
|
||||
_easyRefreshController.finishLoad();
|
||||
} else {
|
||||
new Future.delayed(Duration(seconds: 1), () {
|
||||
_easyRefreshController.finishLoad();
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
listenChange() {
|
||||
Config.eventBus.on<ClassEditEvent>().listen((event) {
|
||||
print("${event.update}-------");
|
||||
if (event.update) {
|
||||
print(1);
|
||||
page.page = 1;
|
||||
dynamicList = [];
|
||||
future();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
future() async {
|
||||
await dynamicPersonalDynamic();
|
||||
await dynamicDynamicHistory();
|
||||
await tagRecommendTag();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
dynamicPersonalDynamic() async {
|
||||
DynamicTabsDynamicEntityData res = await DynamicService.dynamicTabsDynamic(
|
||||
{"page": page.page, "count": page.count});
|
||||
if (res == null) return;
|
||||
if (res.result.length < page.count) {
|
||||
page.isLoad = true;
|
||||
}
|
||||
dynamicList = [...dynamicList, ...res.result];
|
||||
}
|
||||
|
||||
dynamicDynamicHistory() async {
|
||||
DynamicDynamicHistoryEntityData res =
|
||||
await DynamicService.dynamicDynamicHistory({"page": 1, "count": 50});
|
||||
if (res == null) return;
|
||||
history = res.result;
|
||||
}
|
||||
|
||||
tagRecommendTag() async {
|
||||
List<TagRecommendTagEntityData> res = await TagService.tagRecommendTag({});
|
||||
if (res == null) return;
|
||||
recommendTagList = res.take(5).toList();
|
||||
}
|
||||
}
|
||||
350
moehu/moehu_fontend/lib/views/Dynamic/DynamicInfo.dart
Normal file
@@ -0,0 +1,350 @@
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
import 'package:peach/event/_.dart';
|
||||
import 'package:peach/service/_.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
import 'package:peach/views/ImageView/ImageView.dart';
|
||||
import 'package:peach/widget/Empty.dart';
|
||||
import 'package:peach/widget/InputWidget/default_extra_item.dart';
|
||||
import 'package:peach/widget/InputWidget/input_widget.dart';
|
||||
import 'package:peach/widget/Line.dart';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:peach/widget/Panel.dart';
|
||||
import 'package:peach/widget/_.dart';
|
||||
|
||||
/*
|
||||
* 动态
|
||||
*/
|
||||
class DynamicInfo extends StatefulWidget {
|
||||
final String dynamicId;
|
||||
|
||||
const DynamicInfo({this.dynamicId});
|
||||
|
||||
@override
|
||||
_DynamicInfo createState() => _DynamicInfo(this.dynamicId);
|
||||
}
|
||||
|
||||
class _DynamicInfo extends State<DynamicInfo> {
|
||||
var hintText;
|
||||
|
||||
final String dynamicId;
|
||||
|
||||
FocusNode focusNode;
|
||||
|
||||
List<CommenListEntity> commenList = [];
|
||||
|
||||
TextEditingController ctl = TextEditingController();
|
||||
|
||||
EasyRefreshController _easyRefreshController;
|
||||
|
||||
DynamicInfoEntityData data;
|
||||
|
||||
PageEntity page = PageEntity();
|
||||
|
||||
bool loading = true;
|
||||
|
||||
int commentReplyId;
|
||||
|
||||
_DynamicInfo(this.dynamicId);
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_easyRefreshController = EasyRefreshController();
|
||||
ctl.addListener(onValueChange);
|
||||
this.future();
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
ctl.removeListener(onValueChange);
|
||||
ctl.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void onValueChange() {
|
||||
print("${ctl.text} +++++++");
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (loading) return Loading();
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () {
|
||||
// 触摸收起键盘
|
||||
FocusScope.of(context).requestFocus(FocusNode());
|
||||
},
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
toolbarHeight: Screen.setHeight(45),
|
||||
backgroundColor: ColorConfig.WhiteBackColor,
|
||||
elevation: 0,
|
||||
leading: Icon(
|
||||
Icons.arrow_back,
|
||||
color: ColorConfig.BlackBackColor,
|
||||
),
|
||||
title: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Text("详情",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: ColorConfig.TitleColor)),
|
||||
),
|
||||
),
|
||||
body: Container(
|
||||
height: Screen.height(context) - Screen.setHeight(45) - Config.top,
|
||||
margin: EdgeInsets.only(bottom: 100),
|
||||
child: easyRefresh(
|
||||
ListView(
|
||||
children: [
|
||||
Panel(
|
||||
child: Row(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
child: ClipOval(
|
||||
child: data?.userInfo?.userHeadImg != null
|
||||
? Image.network(
|
||||
data?.userInfo?.userHeadImg,
|
||||
width: Screen.setWidth(40),
|
||||
height: Screen.setWidth(40),
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("${data?.userInfo?.userNickname}"),
|
||||
Text(
|
||||
"${data?.dynamicTime}",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Text("置顶"),
|
||||
],
|
||||
),
|
||||
),
|
||||
Panel(
|
||||
child: Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
"${data?.dynamicIntroduce}",
|
||||
style: TextStyle(fontSize: 16),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
),
|
||||
Panel(
|
||||
child: data != null
|
||||
? Container(
|
||||
height: gridViewHeight(data.dynamicImgs.length),
|
||||
child: GridView(
|
||||
physics: new NeverScrollableScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount:
|
||||
gridCrossAxisCount(data.dynamicImgs.length),
|
||||
),
|
||||
children: [
|
||||
...data.dynamicImgs
|
||||
.asMap()
|
||||
.keys
|
||||
.map((e) => _createGridViewItem(
|
||||
data.dynamicImgs[e].imgUrl, e))
|
||||
.toList()
|
||||
],
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
Line(),
|
||||
Panel(
|
||||
child: Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
"热门评论",
|
||||
style: TextStyle(fontSize: 16),
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
),
|
||||
commenList != null
|
||||
? CommentList(
|
||||
comment: commenList,
|
||||
reply: (String userNickname, int id) {
|
||||
hintText = userNickname;
|
||||
commentReplyId = id;
|
||||
Config.eventBus
|
||||
.fire(ClasshHntTextEvent("@${userNickname}"));
|
||||
FocusScope.of(context).requestFocus(focusNode);
|
||||
},
|
||||
)
|
||||
: Empty(),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
bottomSheet: InputWidget(
|
||||
controller: ctl,
|
||||
// hintText: hintText,
|
||||
extraWidget: DefaultExtraWidget(),
|
||||
onSend: (value) {
|
||||
// print("send text $value");
|
||||
commentAdd(value);
|
||||
},
|
||||
onFocusNode: (FocusNode node) {
|
||||
this.focusNode = node;
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 下拉刷新上啦加载
|
||||
Widget easyRefresh(Widget child) {
|
||||
return EasyRefresh(
|
||||
header: BezierCircleHeader(backgroundColor: ColorConfig.ThemeColor),
|
||||
footer: BezierBounceFooter(backgroundColor: ColorConfig.ThemeColor),
|
||||
enableControlFinishRefresh: false,
|
||||
enableControlFinishLoad: true,
|
||||
controller: _easyRefreshController,
|
||||
child: child,
|
||||
bottomBouncing: true,
|
||||
onRefresh: () async {
|
||||
commenList = [];
|
||||
page.page = 1;
|
||||
await this.getCommentList();
|
||||
_easyRefreshController.finishRefresh(success: true);
|
||||
},
|
||||
onLoad: () async {
|
||||
if (!page.isLoad) {
|
||||
page.page++;
|
||||
await this.getCommentList();
|
||||
_easyRefreshController.finishLoad();
|
||||
} else {
|
||||
new Future.delayed(Duration(seconds: 1), () {
|
||||
_easyRefreshController.finishLoad();
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
_createGridViewItem(String str, int e) {
|
||||
List<ImagePickerEntity> arr = data.dynamicImgs
|
||||
.map((e) => ImagePickerEntity(netWorkPath: e.imgUrl))
|
||||
.toList();
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.of(context).push(
|
||||
new FadeRoute(
|
||||
page: PhotoViewGalleryScreen(
|
||||
images: arr,
|
||||
index: e,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
height: Screen.setHeight(80),
|
||||
child: str != null
|
||||
? Image.network(
|
||||
str,
|
||||
width: Screen.setWidth(40),
|
||||
height: Screen.setWidth(40),
|
||||
fit: BoxFit.cover,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
gridViewHeight(int imgLength) {
|
||||
double height = Screen.width(context) - Screen.setHeight(20);
|
||||
if (imgLength == 1) {
|
||||
return height / 1.5 + 1;
|
||||
} else if (imgLength <= 3) {
|
||||
return height / 2 + 1;
|
||||
} else if (imgLength <= 6) {
|
||||
return height / 1.5 + 1;
|
||||
} else {
|
||||
return height + 1;
|
||||
}
|
||||
}
|
||||
|
||||
gridCrossAxisCount(int imgLength) {
|
||||
if (imgLength == 1) {
|
||||
return 1;
|
||||
} else if (imgLength == 2) {
|
||||
return 2;
|
||||
} else {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
future() async {
|
||||
await dynamicInfo();
|
||||
await getCommentList();
|
||||
setState(() {
|
||||
loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 评论列表
|
||||
*/
|
||||
getCommentList() async {
|
||||
CommenListEntityData res = await CommentService.getCommentList({
|
||||
"dynamic_id": dynamicId,
|
||||
"page": page.page,
|
||||
"count": page.count,
|
||||
"comment_type": 2,
|
||||
});
|
||||
if (res == null) return;
|
||||
if (page.count > res.result.length) {
|
||||
page.isLoad = true;
|
||||
}
|
||||
commenList = [...commenList, ...res.result];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前详情信息
|
||||
*/
|
||||
dynamicInfo() async {
|
||||
DynamicInfoEntityData res =
|
||||
await DynamicService.dynamicInfo({"dynamic_id": dynamicId});
|
||||
data = res;
|
||||
}
|
||||
|
||||
commentAdd(String str) async {
|
||||
if (str.trim().length <= 0) {
|
||||
BotToast.showText(text: "回复内容不能为空");
|
||||
return;
|
||||
}
|
||||
print(commentReplyId);
|
||||
Null res = await CommentService.commentAdd({
|
||||
"dynamic_id": dynamicId,
|
||||
"comment_content": str,
|
||||
"comment_type": 2,
|
||||
"comment_reply_id": commentReplyId,
|
||||
});
|
||||
BotToast.showText(text: "发送成功");
|
||||
page.page = 1;
|
||||
page.isLoad = false;
|
||||
commenList = [];
|
||||
getCommentList();
|
||||
}
|
||||
}
|
||||
206
moehu/moehu_fontend/lib/views/Dynamic/DynamicItem.dart
Normal file
@@ -0,0 +1,206 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:peach/config/Colors.dart';
|
||||
import 'package:peach/entity/DynamicTabsDynamicEntity.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
import 'package:peach/widget/_.dart';
|
||||
import 'dart:math' as math;
|
||||
|
||||
/*
|
||||
* 动态列表
|
||||
*/
|
||||
class DynamicItem extends StatefulWidget {
|
||||
final dynamic dynamicData;
|
||||
|
||||
const DynamicItem({this.dynamicData});
|
||||
|
||||
@override
|
||||
_DynamicItem createState() => _DynamicItem(this.dynamicData);
|
||||
}
|
||||
|
||||
class _DynamicItem extends State<DynamicItem> {
|
||||
final dynamic dynamicData;
|
||||
|
||||
_DynamicItem(this.dynamicData);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return item();
|
||||
}
|
||||
|
||||
Widget item() {
|
||||
return Column(
|
||||
children: [
|
||||
Line(),
|
||||
Panel(
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Modular.to.pushNamed(
|
||||
"/personal/${dynamicData.userInfo.userId}");
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
child: ClipOval(
|
||||
child: Image.network(
|
||||
dynamicData.userInfo.userHeadImg,
|
||||
width: Screen.setWidth(40),
|
||||
height: Screen.setWidth(40),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 10),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(dynamicData.userInfo.userNickname),
|
||||
Text(
|
||||
Tool.dateAndTimeToString(
|
||||
Tool.timeToStamp(dynamicData.dynamicTime),
|
||||
formart: {"y-m": "-", "m-d": "-", "h-m": ":"},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
itemShowDialog();
|
||||
},
|
||||
child: Transform.rotate(
|
||||
//旋转90度
|
||||
angle: math.pi / 2,
|
||||
child: Icon(Icons.more_horiz),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
if (dynamicData.dynamicType == 1) {
|
||||
Modular.to.pushNamed("/worksInfo/${dynamicData.opusId}");
|
||||
} else {
|
||||
Modular.to
|
||||
.pushNamed("/dynamicInfo/${dynamicData.dynamicId}");
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 10),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
dynamicData.dynamicIntroduce,
|
||||
textAlign: TextAlign.left,
|
||||
),
|
||||
),
|
||||
),
|
||||
dynamicData.dynamicImg != ""
|
||||
? GestureDetector(
|
||||
onTap: () {
|
||||
if (dynamicData.dynamicType == 1) {
|
||||
Modular.to
|
||||
.pushNamed("/worksInfo/${dynamicData.opusId}");
|
||||
} else {
|
||||
Modular.to.pushNamed(
|
||||
"/dynamicInfo/${dynamicData.dynamicId}");
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(top: 10),
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Image.network(
|
||||
dynamicData.dynamicImg,
|
||||
width: Screen.width(context),
|
||||
height: Screen.setWidth(182),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
)
|
||||
: Container(),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.near_me,
|
||||
size: 18,
|
||||
color: ColorConfig.TextColor,
|
||||
),
|
||||
SizedBox(width: Screen.setFontSize(5),),
|
||||
Text(
|
||||
dynamicData.dynamicShareCount.toString(),
|
||||
style: TextStyle(
|
||||
color: ColorConfig.TextColor,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.chat_bubble,
|
||||
size: 16,
|
||||
color: ColorConfig.TextColor,
|
||||
),
|
||||
SizedBox(width: Screen.setFontSize(5),),
|
||||
Text(
|
||||
dynamicData.dynamicCommentCount.toString(),
|
||||
style: TextStyle(
|
||||
color: ColorConfig.TextColor,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.thumb_up,
|
||||
size: 18,
|
||||
color: ColorConfig.TextColor,
|
||||
),
|
||||
SizedBox(width: Screen.setFontSize(5),),
|
||||
Text(
|
||||
dynamicData.dynamicSatisfiedCount.toString(),
|
||||
style: TextStyle(
|
||||
color: ColorConfig.TextColor,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
itemShowDialog() {
|
||||
RoutineShowDialog.itemShowDialog(context);
|
||||
}
|
||||
}
|
||||
79
moehu/moehu_fontend/lib/views/Dynamic/MostFrequently.dart
Normal file
@@ -0,0 +1,79 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:peach/config/_.dart';
|
||||
import 'package:peach/entity/DynamicDynamicHistoryEntity.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
import 'package:peach/widget/_.dart';
|
||||
|
||||
/*
|
||||
* 动态
|
||||
*/
|
||||
|
||||
class MostFrequently extends StatelessWidget {
|
||||
final List<DynamicDynamicHistoryEntity> history;
|
||||
|
||||
const MostFrequently({this.history});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Panel(
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(flex: 1, child: Text("最近访问")),
|
||||
// Row(
|
||||
// children: [
|
||||
// Text(
|
||||
// "查看更多",
|
||||
// style: TextStyle(color: ColorConfig.TextColor),
|
||||
// ),
|
||||
// Icon(
|
||||
// Icons.arrow_forward_ios,
|
||||
// size: 12,
|
||||
// color: ColorConfig.TextColor,
|
||||
// )
|
||||
// ],
|
||||
// )
|
||||
],
|
||||
),
|
||||
history.length > 0
|
||||
? Container(
|
||||
margin: EdgeInsets.only(top: 11),
|
||||
height: Screen.setHeight(58),
|
||||
child: GridView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 1,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
return Column(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
child: ClipOval(
|
||||
child: Image.network(
|
||||
history[index].userHeadImg,
|
||||
width: Screen.setWidth(50),
|
||||
height: Screen.setWidth(50),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)),
|
||||
Text(
|
||||
history[index].userNickname,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(fontSize: 12),
|
||||
)
|
||||
],
|
||||
);
|
||||
},
|
||||
itemCount: history.length,
|
||||
),
|
||||
)
|
||||
: EmptyText()
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
75
moehu/moehu_fontend/lib/views/Dynamic/Topic.dart
Normal file
@@ -0,0 +1,75 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:peach/config/Colors.dart';
|
||||
import 'package:peach/entity/_.dart';
|
||||
import 'package:peach/utils/_.dart';
|
||||
import 'package:peach/widget/_.dart';
|
||||
|
||||
/*
|
||||
* 话题
|
||||
*/
|
||||
// class Topic extends StatefulWidget {
|
||||
// final List<TagRecommendTagEntityData> topicList;
|
||||
// final TagRecommendTagEntityData topic;
|
||||
|
||||
// Topic({this.topicList, this.topic});
|
||||
|
||||
// @override
|
||||
// _Topic createState() => _Topic(this.topicList, this.topic);
|
||||
// }
|
||||
|
||||
class Topic extends StatelessWidget {
|
||||
final List<TagRecommendTagEntityData> topicList;
|
||||
|
||||
final Function onTap;
|
||||
|
||||
Topic({this.topicList, this.onTap});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Panel(
|
||||
child: Column(
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text("话题"),
|
||||
),
|
||||
topicList.length > 0
|
||||
? Container(
|
||||
margin: EdgeInsets.only(top: 11),
|
||||
height: Screen.setHeight(90),
|
||||
child: GridView(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2, childAspectRatio: 10 / 2),
|
||||
children: [
|
||||
...topicList
|
||||
.asMap()
|
||||
.keys
|
||||
.map((e) => RowItem(topicList[e].tagsTitle))
|
||||
.toList()
|
||||
],
|
||||
),
|
||||
)
|
||||
: EmptyText()
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ignore: non_constant_identifier_names
|
||||
Widget RowItem(String title) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
onTap(title);
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 5, bottom: 5),
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(color: ColorConfig.Jump),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
1
moehu/moehu_fontend/lib/views/EditMaterials/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
3be3baef-fabd-44bd-88b8-f27c18d1934a
|
||||
125
moehu/moehu_fontend/lib/views/EditMaterials/EditMaterials.dart
Normal file
@@ -0,0 +1,125 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:peach/config/Colors.dart';
|
||||
import 'package:peach/utils/Screen.dart';
|
||||
import 'package:peach/widget/Panel.dart';
|
||||
|
||||
/*
|
||||
* 编辑资料
|
||||
*/
|
||||
class EditMaterials extends StatefulWidget {
|
||||
@override
|
||||
_EditMaterials createState() => _EditMaterials();
|
||||
}
|
||||
|
||||
class _EditMaterials extends State<EditMaterials> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: ColorConfig.WhiteBackColor,
|
||||
centerTitle: true,
|
||||
title: Text(
|
||||
'编辑个人资料',
|
||||
style: TextStyle(color: ColorConfig.BlackBackColor),
|
||||
),
|
||||
iconTheme: IconThemeData(
|
||||
color: ColorConfig.BlackBackColor,
|
||||
),
|
||||
actions: [
|
||||
Container(
|
||||
alignment: Alignment.center,
|
||||
margin: EdgeInsets.only(right: 10),
|
||||
child: TextButton(
|
||||
child: Text(
|
||||
"保存",
|
||||
style: TextStyle(color: ColorConfig.TextColor, fontSize: 18),
|
||||
),
|
||||
onPressed: () {
|
||||
print("文字按钮");
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Panel(
|
||||
child: Column(
|
||||
children: [
|
||||
GestureDetector(
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
child: ClipOval(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(
|
||||
"https://upload.jianshu.io/users/upload_avatars/5685558/23e20d58-c5e1-4fd6-90d4-a3752cbe7d6a"),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
height: Screen.setHeight(77),
|
||||
width: Screen.setHeight(77),
|
||||
child: Container(
|
||||
color: Color.fromRGBO(0, 0, 0, .3),
|
||||
child: Icon(
|
||||
Icons.party_mode,
|
||||
color: ColorConfig.LineColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: () {},
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 10),
|
||||
child: Text(
|
||||
"点击更换头像",
|
||||
style:
|
||||
TextStyle(color: ColorConfig.TextColor, fontSize: 16),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Divider(height: 1),
|
||||
itemListTile(title: Text('昵称'), trailing: rightText("昵称")),
|
||||
itemListTile(title: Text('简介'), trailing: rightText("简介")),
|
||||
itemListTile(title: Text('性别'), trailing: rightText("性别")),
|
||||
itemListTile(title: Text('出生日期'), trailing: rightText("地区")),
|
||||
itemListTile(title: Text('地区'), trailing: rightText("地区"))
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget itemListTile({Widget title, Widget trailing}) {
|
||||
return Column(
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text('地区'),
|
||||
trailing: trailing,
|
||||
),
|
||||
Divider(height: 1),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget rightText(String text) {
|
||||
return Container(
|
||||
width: Screen.setWidth(200),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text(text),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 18,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
1
moehu/moehu_fontend/lib/views/Fans/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
3e58ab1d-150c-40e2-ac44-d4fe0d135641
|
||||