first commit

This commit is contained in:
编码猿
2024-09-27 01:31:25 +08:00
commit 07c46ac300
558 changed files with 37414 additions and 0 deletions

76
untitled/.gitignore vendored Executable file
View File

@@ -0,0 +1,76 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
key.jks
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
.vscode/
pubspec.lock
Podfile
Podfile.lock
Pods/
.symlinks/
**/Flutter/App.framework/
**/Flutter/Flutter.framework/
**/Flutter/Generated.xcconfig
**/Flutter/flutter_assets/
ServiceDefinitions.json
xcuserdata/
**/DerivedData/
local.properties
keystore.properties
.gradle/
gradlew
gradlew.bat
gradle-wrapper.jar
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
GeneratedPluginRegistrant.java
build/
.project
.classpath
.settings
!.idea/

10
untitled/.metadata Normal file
View File

@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 8f89f6505b941329a864fef1527243a72800bf4d
channel: beta
project_type: app

1
untitled/.pydio Normal file
View File

@@ -0,0 +1 @@
69b863bd-73ad-4688-bc9e-e83527b0377c

21
untitled/LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 编码猿
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

55
untitled/README.md Normal file
View File

@@ -0,0 +1,55 @@
## 蜜桃社
使用Flutter开发的模特写真App项目目前开发完成对Flutter感兴趣的可以先看看代码支持LinuxMacWindowsWebAndroid Ios 等多端
> PS: Flutter写的应用也太丝滑太流畅了吧众多App框架中只服Flutter
核心代码都在 `/lib` 文件夹中,文件说明:
```text
|____widget # 公共组件
|____config # 项目的配置
|____entity # 数据实体
|____db # 数据库配置
|____event # 事件控制中心
|____utils # 工具函数
|____main.dart # 主入口
|____R.dart # 静态资源类作用类似android中的R文件
|____http # Dio 的封装
|____static # 静态资源
|____service # 请求中间层
|____views # 主页面
|____router # 路由配置
|____Configure.dart # 各种工具和配置的初始化
|____main.dart # 主启动文件
|____R.dart # 静态资源配置
```
## 实现功能:
- 搜索
- 分类编辑
- 机构
- 模特
- 收藏写真
- 收藏单图
- 分享
- 保存到相册
- 检测升级
- 最近更新
- 清除缓存
- 极光推送
- 登录 / 注册 / Vip权限控制
等...
看图:
![1.jpg](docs/1.jpg)
![2.jpg](docs/2.jpg)
![3.jpg](docs/3.jpg)
![4.jpg](docs/4.jpg)
![5.jpg](docs/5.jpg)
![6.jpg](docs/6.jpg)
![7.jpg](docs/7.jpg)
![8.jpg](docs/8.jpg)
![9.jpg](docs/9.jpg)
![10.jpg](docs/10.jpg)

11
untitled/android/.gitignore vendored Normal file
View File

@@ -0,0 +1,11 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties

1
untitled/android/.pydio Normal file
View File

@@ -0,0 +1 @@
5e234995-074b-4b13-8878-e2e0a155a0eb

View File

@@ -0,0 +1 @@
265255f6-bfd5-4bec-821f-2de6cde670b1

View File

@@ -0,0 +1,82 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
compileSdkVersion 29
defaultConfig {
applicationId "com.picture.peach"
minSdkVersion 19
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
ndk {
abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
}
manifestPlaceholders = [
JPUSH_PKGNAME: applicationId,
JPUSH_APPKEY : "d4e22ab876276f4a374880ca", // NOTE: JPush 上注册的包名对应的 Appkey.
JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
]
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
}
flutter {
source '../..'
}

View File

@@ -0,0 +1,7 @@
#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }

View File

@@ -0,0 +1 @@
6a35edbb-8b1a-4a48-928f-87725da1b22a

View File

@@ -0,0 +1 @@
f7acc579-c89b-45d8-8467-eff117e61639

View File

@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.picture.peach">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@@ -0,0 +1 @@
7ee06137-ba62-48a8-8ab0-b5a8a50326df

View File

@@ -0,0 +1,74 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.picture.peach">
<!--允许程序写入外部存储-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--允许获取网络信息状态-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--允许获取当前WiFi接入的状态以及WLAN热点的信息-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!--允许程序访问网络连接可能产生GPRS流量-->
<uses-permission android:name="android.permission.INTERNET" />
<!--允许程序访问电话状态-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!--允许应用程序读取设备外部存储空间的文件-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--允许程序写入外部存储-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--安装app-->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!--允许挂载和反挂载外部文件系统可移动存储-->
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
<uses-permission android:name = "android.permission.SET_WALLPAPER"/>
<application
android:label="屁桃儿"
android:requestLegacyExternalStorage="true"
android:icon="@mipmap/ic_launcher">
<activity
android:name="com.picture.peach.MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!--通过浏览器Url启动app-->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="openfile"
android:scheme="mitao" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>

View File

@@ -0,0 +1 @@
83c50025-5742-4f97-aa6f-a6ad16d6cfbb

View File

@@ -0,0 +1 @@
42ef3096-4d7f-4f3b-b679-ad780a063666

View File

@@ -0,0 +1 @@
fc5e47d9-0e33-4230-8a2f-eae7a237771d

View File

@@ -0,0 +1 @@
ddee1f3e-f490-4c48-9cc1-381069fec57f

View File

@@ -0,0 +1,6 @@
package com.picture.peach;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}

View File

@@ -0,0 +1 @@
41221280-e881-4615-a939-1fd6da4ed244

View File

@@ -0,0 +1 @@
b7b0de61-76c4-40a6-8682-5393d2107d7f

View File

@@ -0,0 +1 @@
a4c3f563-072c-49c7-bc92-daf483c16746

View File

@@ -0,0 +1 @@
5a85048e-9142-48ae-98ba-449116abca94

View File

@@ -0,0 +1 @@
18ae3e25-e8d7-4fd8-b304-5b3ee859c9fd

View File

@@ -0,0 +1 @@
3bd2169c-0756-435e-a5e3-406c62fd96ab

View File

@@ -0,0 +1 @@
bffec605-3db9-4a2c-b58a-f153253fc92f

View File

@@ -0,0 +1,6 @@
package com.example.untitled
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}

View File

@@ -0,0 +1 @@
356cdbef-b52a-4080-93c8-f8b1b6ae21cf

View File

@@ -0,0 +1 @@
994a5296-0a26-43f6-a673-5671e7928604

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@@ -0,0 +1 @@
1c5257fb-f306-44d9-9a16-d92a0b5e3daa

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@@ -0,0 +1 @@
e9fc3ffa-d76b-44b5-abdd-115e1c88d3ec

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1 @@
13ae13a7-184e-4edb-944d-6457662cdb2d

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1 @@
dae6e027-be46-48cd-8237-46af65abb254

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1 @@
d5e93dbd-9008-46c4-82c2-2cb7a5590ca5

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1 @@
c7dc325d-5b88-4976-abb5-bf7af8354548

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1 @@
48678e93-4c3c-49d6-b1d8-f2f5678257da

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@@ -0,0 +1 @@
3a29f427-76ed-46f1-817f-cb1128154e56

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@@ -0,0 +1 @@
ab0e21c2-2621-43b1-a91a-ab9e366a808c

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>

View File

@@ -0,0 +1 @@
d1bea652-4cc7-4d60-a270-890185b50e9d

View File

@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.picture.peach">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@@ -0,0 +1,31 @@
buildscript {
repositories {
google()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
}
}
allprojects {
repositories {
google()
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

View File

@@ -0,0 +1 @@
7368acd6-71b5-4ba2-80e6-4bf1cc0b879a

View File

@@ -0,0 +1 @@
c477c113-a8c7-4468-a4ca-6d0e3b797bab

View File

@@ -0,0 +1,6 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

View File

@@ -0,0 +1,11 @@
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

View File

@@ -0,0 +1 @@
include ':app'

91
untitled/asset_generator.dart Executable file
View File

@@ -0,0 +1,91 @@
import 'dart:io';
// ignore: non_constant_identifier_names
var preview_server_port = 2227;
void main() async {
bool working = false;
var pubSpec = new File('pubspec.yaml');
var pubLines = pubSpec.readAsLinesSync();
var newLines = <String>[];
var resource = <String>[];
for (var line in pubLines) {
if (line.contains('begin') && line.contains('#') && line.contains('assets')) {
working = true;
newLines.add(line);
}
if (line.contains('end') && line.contains('#') && line.contains('assets')) working = false;
if (working) {
if (line.trim().startsWith('#') && line.trim().endsWith('*')) {
newLines.add(line);
var directory = new Directory(line.replaceAll('#', '').replaceAll('*', '').trim());
if (directory.existsSync()) {
var list = directory.listSync(recursive: true);
resource.add("/// 静态资源配置,程序自动生成,请勿手动修改");
for (var file in list) {
if (new File(file.path)
.statSync()
.type == FileSystemEntityType.file) {
var path = file.path.replaceAll('\\', '/');
var varName = path.replaceAll('/', '_').replaceAll('.', '_').toLowerCase();
var pos = 0;
String char;
while (true) {
pos = varName.indexOf('_', pos);
if (pos == -1) break;
char = varName.substring(pos + 1, pos + 2);
varName = varName.replaceFirst('_$char', '_${char.toUpperCase()}');
pos++;
}
varName = varName.replaceAll('_', '');
resource.add("/// ![](http://127.0.0.1:$preview_server_port/$path)");
resource.add("static final String $varName = '$path';");
newLines.add(' - $path');
}
}
} else {
throw new FileSystemException('Directory wrong');
}
}
} else {
newLines.add(line);
}
}
var r = new File('lib/R.dart');
if (r.existsSync()) {
r.deleteSync();
}
r.createSync();
var content = 'class R {\n';
for (var line in resource) {
content = '$content $line\n';
}
content = '$content}\n';
r.writeAsStringSync(content);
var spec = '';
for (var line in newLines) {
spec = '$spec$line\n';
}
pubSpec.writeAsStringSync(spec);
var ser;
try {
ser = await HttpServer.bind('127.0.0.1', preview_server_port);
print('成功启动图片预览服务器于本机<$preview_server_port>端口');
ser.listen(
(req) {
var index = req.uri.path.lastIndexOf('.');
var subType = req.uri.path.substring(index);
req.response
..headers.contentType = new ContentType('image', subType)
..add(new File('.${req.uri.path}').readAsBytesSync())
..close();
},
);
} catch (e) {
print('图片预览服务器已启动或端口被占用');
}
}

1
untitled/docs/.pydio Normal file
View File

@@ -0,0 +1 @@
38323431-3441-47fb-9c7e-5e1dd43a06f3

BIN
untitled/docs/1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
untitled/docs/10.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 KiB

BIN
untitled/docs/2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

BIN
untitled/docs/3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

BIN
untitled/docs/4.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 KiB

BIN
untitled/docs/5.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

BIN
untitled/docs/6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 KiB

BIN
untitled/docs/7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

BIN
untitled/docs/8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1021 KiB

BIN
untitled/docs/9.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 KiB

1
untitled/gen/.pydio Normal file
View File

@@ -0,0 +1 @@
73cf648b-443a-42d5-8659-e24a13ddd30b

1
untitled/lib/.pydio Normal file
View File

@@ -0,0 +1 @@
53c54fc3-dd3f-4d4d-9385-bc1001382434

View File

@@ -0,0 +1,46 @@
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();
// 如果不是第一次打开,那么设置主题色,否则不设置
if (!Config.isFirstOpen) {
Core.SetStatusThemeColor();
}
// 初始化极光
JiGuangPush();
// 初始化事件控制中心
Config.eventBus = EventBus();
// 读取保存设备信息
DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
Config.isAndroid
? Config.androidDeviceInfo = await deviceInfoPlugin.androidInfo
: Config.iosDeviceInfo = await deviceInfoPlugin.iosInfo;
// 保存App软件包信息
Config.packageInfo = await PackageInfo.fromPlatform();
}
}

21
untitled/lib/R.dart Normal file
View File

@@ -0,0 +1,21 @@
class R {
/// 静态资源配置,程序自动生成,请勿手动修改
/// ![](http://127.0.0.1:2227/lib/static/img/update_ic_close.png)
static final String libStaticImgUpdateIcClosePng = 'lib/static/img/update_ic_close.png';
/// ![](http://127.0.0.1:2227/lib/static/img/taxi.png)
static final String libStaticImgTaxiPng = 'lib/static/img/taxi.png';
/// ![](http://127.0.0.1:2227/lib/static/img/.DS_Store)
static final String libStaticImgDsStore = 'lib/static/img/.DS_Store';
/// ![](http://127.0.0.1:2227/lib/static/img/welcome3.png)
static final String libStaticImgWelcome3Png = 'lib/static/img/welcome3.png';
/// ![](http://127.0.0.1:2227/lib/static/img/welcome2.png)
static final String libStaticImgWelcome2Png = 'lib/static/img/welcome2.png';
/// ![](http://127.0.0.1:2227/lib/static/img/update_bg_app_top.png)
static final String libStaticImgUpdateBgAppTopPng = 'lib/static/img/update_bg_app_top.png';
/// ![](http://127.0.0.1:2227/lib/static/img/logo.png)
static final String libStaticImgLogoPng = 'lib/static/img/logo.png';
/// ![](http://127.0.0.1:2227/lib/static/img/vipLogo.png)
static final String libStaticImgViplogoPng = 'lib/static/img/vipLogo.png';
/// ![](http://127.0.0.1:2227/lib/static/img/back.png)
static final String libStaticImgBackPng = 'lib/static/img/back.png';
}

View File

@@ -0,0 +1 @@
90f95b79-eab7-4698-ade6-5337af05eef9

View File

@@ -0,0 +1,22 @@
import 'package:flutter/material.dart';
class ColorConfig {
// 主题色
static const Color ThemeColor = Color(0XFFfb7299);
// static const Color ThemeColor = Color(0XFFffd101);
// 比主题稍微淡一点的主题色
static const Color ThemeOtherColor = Color(0XFFfe7fa2);
// 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 WhiteBackColor = Colors.white;
}

View File

@@ -0,0 +1,221 @@
import 'dart:io';
import 'package:event_bus/event_bus.dart';
import 'package:package_info/package_info.dart';
import 'package:device_info/device_info.dart';
import 'package:intro_views_flutter/Models/page_view_model.dart';
import 'package:flutter/material.dart';
import 'package:peach/R.dart';
import 'package:peach/config/_.dart';
import 'package:peach/entity/_.dart';
import 'package:peach/utils/_.dart';
class Config {
/// 第一次打开本地无值返回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;
/// IOS app 下载地址
// static String iosDownApkUrl = "https://apps.apple.com/cn/app/qq/id444934666";
static String iosDownApkUrl = "itms-apps://itunes.apple.com/cn/app/id444934666";
static int currentIndex = 0;
// 保存视频数组
static List<Feeds> feeds = [];
/// 首页 /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/";
/// 极光推送的配置
static final Map<String, dynamic> JgConfig = {
"appKey": 'd4e22ab876276f4a374880ca',
"channel": 'pitaoer',
"production": true,
"debug": false,
};
/// 首页底部Tab的控制器
static PageController tabController;
/// 事件控制中心
static EventBus eventBus;
static List vipList = [
{
"id": 1,
"vipTitle": "月卡",
"vipMoney": 30,
"vipDay": 1,
"vipExplain": [
"1✅ 可以收藏(单图收藏&写真收藏)",
"2❎ 无法保存图片到相册",
"3❎ 无法使用【成人视频】功能",
"4❎ 无法下载【成人视频】功能"
]
},
{
"id": 2,
"vipTitle": "季卡",
"vipMoney": 88,
"vipDay": 0.9,
"vipExplain": [
"1✅ 可以收藏(单图收藏&写真收藏)",
"2✅ 可以下载保存到相册",
"3❎ 无法使用【成人视频】功能",
"4❎ 无法下载【成人视频】功能"
]
},
{
"id": 3,
"vipTitle": "年卡",
"vipMoney": 324,
"vipDay": 0.8,
"vipExplain": [
"1✅ 可以收藏(单图收藏&写真收藏)",
"2✅ 可以下载保存到相册",
"3✅ 可以使用【成人视频】功能",
"4✅ 可以下载【成人视频】功能"
]
},
];
/// 接口地址
static final Map<String, dynamic> ApiUrl = {
// 写真图片接口基地址
'PhotoBaseUrl': 'http://192.168.0.105:3000/api/json',
// 'PhotoBaseUrl': 'http://120.27.144.174:3000/api/json',
// 'VideoBaseUrl': 'http://47.114.153.249:1314',
'VideoBaseUrl': 'http://192.168.0.105:8090/api',
// 视频接口基地址
'ApiList': {
'update': '/updateVersion', // App升级接口
'index': '/index', // 首页
'class': '/class', // 获取分类菜单
'login': '/login', // 登录
'register': '/register', // 注册
'agentreg': '/agentreg', // 代理注册
'freeUse': '/freeUse', // vip计数
'place': '/placeOrder', // 办理vip
'orderStatus': '/orderStatus', // 查询购买记录
'agentInfo': '/agent/info', // 【新接口,替换】代替原本的详情
'info': '/info', // 进入详情
'classList': '/classList', // 获取分类列表下数据
'agentClassList': '/agent/classList', //【新接口,替换】 代替原本的 获取分类列表下数据
'mechanism': '/mechanism', // 机构列表
'mechanismList': '/mechanismList', // 机构列表点击进入详情
'agentMechanismList': '/agent/mechanismList', // 【新接口,替换】机构列表点击进入详情
'allModel': '/allModel', // 模特列表
'modelList': '/modelList', // 进入模特的个人套图页
'agentRecently': '/agent/recently', // 最近更新
'agentSearch': '/agent/search', // 搜索接口
'agentRandom': '/agent/random', // 随机展示
'videoType': '/likeList'
}
};
static final 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.libStaticImgLogoPng,
height: Screen.setHeight(225.0),
width: Screen.setWidth(225.0),
alignment: Alignment.center,
)),
PageViewModel(
pageColor: const Color(0xFF03A9F4),
body: Text(
'基于谷歌 Flutter+Dart 开发,体验更丝滑更流畅,响应速度让人惊叹',
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(
'国内外100多家写真机构198万张高清模特写真有你喜欢的',
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),
),
];
}

View File

@@ -0,0 +1,4 @@
library config;
export 'Colors.dart';
export 'Index.dart';

1
untitled/lib/db/.pydio Normal file
View File

@@ -0,0 +1 @@
ac4d75e7-753e-48af-8808-f26bd74a9f87

View File

@@ -0,0 +1,64 @@
import 'dart:io';
import 'package:path/path.dart';
import 'package:path_provider/path_provider.dart';
import 'package:sqflite/sqflite.dart';
class SQLite {
static final SQLite _singleton = SQLite._internal();
factory SQLite() => _singleton;
SQLite._internal();
static Database _db;
Future<Database> get db async {
if (_db != null) {
return _db;
}
_db = await _initDB();
return _db;
}
Future<Database> _initDB() async {
Directory documentsDirectory = await getApplicationDocumentsDirectory();
String path = join(documentsDirectory.path, 'MiTaoShe');
print("documentsDirectory.path ============ : ${path}");
return await openDatabase(
path,
version: 1,
onCreate: _onCreate
);
}
Future _onCreate(Database db, int version) async {
/// 创建like 喜欢表
await db.execute("CREATE TABLE Like ("
"id integer primary key AUTOINCREMENT,"
"preview TEXT,"
"source TEXT,"
"title TEXT,"
"totals TEXT,"
"user TEXT"
")");
/// 创建Menu 菜单 Principal(默认菜单) 表
await db.execute("CREATE TABLE Principal ("
"id integer primary key AUTOINCREMENT,"
"title TEXT,"
"page integer"
")");
/// 创建Menu 菜单 Additional(可选菜单) 表
await db.execute("CREATE TABLE Additional ("
"id integer primary key AUTOINCREMENT,"
"title TEXT,"
"page integer"
")");
/// 创建 单图收藏 表
await db.execute("CREATE TABLE SingleGraph ("
"id integer primary key AUTOINCREMENT,"
"src TEXT"
")");
}
}

View File

@@ -0,0 +1 @@
ec25c7b1-6f31-44ab-90df-f11a67fdde74

View File

@@ -0,0 +1,164 @@
import 'AgentInfoEntity.dart';
class AgentClassListEntity {
int status;
AgentClassListData data;
AgentClassListEntity({this.status, this.data});
AgentClassListEntity.fromJson(Map<String, dynamic> json) {
status = json['status'];
data = json['data'] != null ? new AgentClassListData.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
if (this.data != null) {
data['data'] = this.data.toJson();
}
return data;
}
}
class AgentClassListData {
dynamic total;
int num;
List<ItemList> list;
String page;
AgentClassListData({this.total, this.num, this.list, this.page});
AgentClassListData.fromJson(Map<String, dynamic> json) {
total = json['total'];
num = json['num'];
page = json['page'];
if (json['list'] != null) {
list = new List<ItemList>();
json['list'].forEach((v) {
list.add(new ItemList.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['total'] = this.total;
data['num'] = this.num;
data['page'] = this.page;
if (this.list != null) {
data['list'] = this.list.map((v) => v.toJson()).toList();
}
return data;
}
}
class ItemList {
String id;
String catid;
String title;
String renwu;
String biaoqian;
String jigou;
String bianhao;
String faxingshijian;
String shuliang;
String zhuangtai;
String shijian;
String tuijian;
String classname;
List<Biaoqianlist> biaoqianlist;
List<Biaoqianlist> jigoulist;
String renwunlist;
String isgood;
String imgSrc;
List<Biaoqianlist> renwulist;
ItemList(
{this.id,
this.catid,
this.title,
this.renwu,
this.biaoqian,
this.jigou,
this.bianhao,
this.faxingshijian,
this.shuliang,
this.zhuangtai,
this.shijian,
this.tuijian,
this.classname,
this.biaoqianlist,
this.jigoulist,
this.renwunlist,
this.isgood,
this.imgSrc,
this.renwulist});
ItemList.fromJson(Map<String, dynamic> json) {
id = json['id'];
catid = json['catid'];
title = json['title'];
renwu = json['renwu'];
biaoqian = json['biaoqian'];
jigou = json['jigou'];
bianhao = json['bianhao'];
faxingshijian = json['faxingshijian'];
shuliang = json['shuliang'];
zhuangtai = json['zhuangtai'];
shijian = json['shijian'];
tuijian = json['tuijian'];
classname = json['classname'];
if (json['biaoqianlist'] != null) {
biaoqianlist = new List<Biaoqianlist>();
json['biaoqianlist'].forEach((v) {
biaoqianlist.add(new Biaoqianlist.fromJson(v));
});
}
if (json['jigoulist'] != null) {
jigoulist = new List<Biaoqianlist>();
json['jigoulist'].forEach((v) {
jigoulist.add(new Biaoqianlist.fromJson(v));
});
}
renwunlist = json['renwunlist'];
isgood = json['isgood'];
imgSrc = json['img_src'];
if (json['renwulist'] != null) {
renwulist = new List<Biaoqianlist>();
json['renwulist'].forEach((v) {
renwulist.add(new Biaoqianlist.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['catid'] = this.catid;
data['title'] = this.title;
data['renwu'] = this.renwu;
data['biaoqian'] = this.biaoqian;
data['jigou'] = this.jigou;
data['bianhao'] = this.bianhao;
data['faxingshijian'] = this.faxingshijian;
data['shuliang'] = this.shuliang;
data['zhuangtai'] = this.zhuangtai;
data['shijian'] = this.shijian;
data['tuijian'] = this.tuijian;
data['classname'] = this.classname;
if (this.biaoqianlist != null) {
data['biaoqianlist'] = this.biaoqianlist.map((v) => v.toJson()).toList();
}
if (this.jigoulist != null) {
data['jigoulist'] = this.jigoulist.map((v) => v.toJson()).toList();
}
data['renwunlist'] = this.renwunlist;
data['isgood'] = this.isgood;
data['img_src'] = this.imgSrc;
if (this.renwulist != null) {
data['renwulist'] = this.renwulist.map((v) => v.toJson()).toList();
}
return data;
}
}

View File

@@ -0,0 +1,153 @@
class AgentInfoEntity {
int status;
AgentInfo data;
AgentInfoEntity({this.status, this.data});
AgentInfoEntity.fromJson(Map<String, dynamic> json) {
status = json['status'];
data = json['data'] != null ? new AgentInfo.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
if (this.data != null) {
data['data'] = this.data.toJson();
}
return data;
}
}
class AgentInfo {
String id;
String catid;
String title;
String renwu;
String biaoqian;
String jigou;
String bianhao;
String faxingshijian;
String shuliang;
String zhuangtai;
String shijian;
String tuijian;
String classname;
List<Biaoqianlist> biaoqianlist;
List<Biaoqianlist> jigoulist;
String renwunlist;
String isgood;
String imgSrc;
List<Biaoqianlist> renwulist;
List<String> imgs;
AgentInfo(
{this.id,
this.catid,
this.title,
this.renwu,
this.biaoqian,
this.jigou,
this.bianhao,
this.faxingshijian,
this.shuliang,
this.zhuangtai,
this.shijian,
this.tuijian,
this.classname,
this.biaoqianlist,
this.jigoulist,
this.renwunlist,
this.isgood,
this.imgSrc,
this.renwulist,
this.imgs});
AgentInfo.fromJson(Map<String, dynamic> json) {
id = json['id'];
catid = json['catid'];
title = json['title'];
renwu = json['renwu'];
biaoqian = json['biaoqian'];
jigou = json['jigou'];
bianhao = json['bianhao'];
faxingshijian = json['faxingshijian'];
shuliang = json['shuliang'];
zhuangtai = json['zhuangtai'];
shijian = json['shijian'];
tuijian = json['tuijian'];
classname = json['classname'];
if (json['biaoqianlist'] != null) {
biaoqianlist = new List<Biaoqianlist>();
json['biaoqianlist'].forEach((v) {
biaoqianlist.add(new Biaoqianlist.fromJson(v));
});
}
if (json['jigoulist'] != null) {
jigoulist = new List<Biaoqianlist>();
json['jigoulist'].forEach((v) {
jigoulist.add(new Biaoqianlist.fromJson(v));
});
}
renwunlist = json['renwunlist'];
isgood = json['isgood'];
imgSrc = json['img_src'];
if (json['renwulist'] != null) {
renwulist = new List<Biaoqianlist>();
json['renwulist'].forEach((v) {
renwulist.add(new Biaoqianlist.fromJson(v));
});
}
imgs = json['imgs'].cast<String>();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['catid'] = this.catid;
data['title'] = this.title;
data['renwu'] = this.renwu;
data['biaoqian'] = this.biaoqian;
data['jigou'] = this.jigou;
data['bianhao'] = this.bianhao;
data['faxingshijian'] = this.faxingshijian;
data['shuliang'] = this.shuliang;
data['zhuangtai'] = this.zhuangtai;
data['shijian'] = this.shijian;
data['tuijian'] = this.tuijian;
data['classname'] = this.classname;
if (this.biaoqianlist != null) {
data['biaoqianlist'] = this.biaoqianlist.map((v) => v.toJson()).toList();
}
if (this.jigoulist != null) {
data['jigoulist'] = this.jigoulist.map((v) => v.toJson()).toList();
}
data['renwunlist'] = this.renwunlist;
data['isgood'] = this.isgood;
data['img_src'] = this.imgSrc;
if (this.renwulist != null) {
data['renwulist'] = this.renwulist.map((v) => v.toJson()).toList();
}
data['imgs'] = this.imgs;
return data;
}
}
class Biaoqianlist {
dynamic id;
String name;
Biaoqianlist({this.id, this.name});
Biaoqianlist.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
return data;
}
}

View File

@@ -0,0 +1,109 @@
class ClassEntity {
int _status;
String _msg;
ClassResult _result;
ClassEntity({int status, String msg, ClassResult result}) {
this._status = status;
this._msg = msg;
this._result = result;
}
int get status => _status;
set status(int status) => _status = status;
String get msg => _msg;
set msg(String msg) => _msg = msg;
ClassResult get result => _result;
set result(ClassResult result) => _result = result;
ClassEntity.fromJson(Map<String, dynamic> json) {
_status = json['status'];
_msg = json['msg'];
_result =
json['result'] != null ? new ClassResult.fromJson(json['result']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this._status;
data['msg'] = this._msg;
if (this._result != null) {
data['result'] = this._result.toJson();
}
return data;
}
}
class ClassResult {
List<Principal> _principal;
List<Principal> _additional;
Result({List<Principal> principal, List<Principal> additional}) {
this._principal = principal;
this._additional = additional;
}
List<Principal> get principal => _principal;
set principal(List<Principal> principal) => _principal = principal;
List<Principal> get additional => _additional;
set additional(List<Principal> additional) => _additional = additional;
ClassResult.fromJson(Map<String, dynamic> json) {
if (json['principal'] != null) {
_principal = new List<Principal>();
json['principal'].forEach((v) {
_principal.add(new Principal.fromJson(v));
});
}
if (json['additional'] != null) {
_additional = new List<Principal>();
json['additional'].forEach((v) {
_additional.add(new Principal.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this._principal != null) {
data['principal'] = this._principal.map((v) => v.toJson()).toList();
}
if (this._additional != null) {
data['additional'] = this._additional.map((v) => v.toJson()).toList();
}
return data;
}
}
class Principal {
int _id;
String _title;
int _page;
Principal({int id, String title, int page}) {
this._id = id;
this._title = title;
this._page = page;
}
int get id => _id;
set id(int id) => _id = id;
String get title => _title;
set title(String title) => _title = title;
int get page => _page;
set page(int page) => _page = page;
Principal.fromJson(Map<String, dynamic> json) {
_id = json['id'];
_title = json['title'];
_page = json['page'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this._id;
data['title'] = this._title;
data['page'] = this._page;
return data;
}
}

View File

@@ -0,0 +1,77 @@
import 'package:peach/entity/_.dart';
class ClassListEntity {
int status;
String msg;
ClassListResult result;
ClassListEntity({this.status, this.msg, this.result});
ClassListEntity.fromJson(Map<String, dynamic> json) {
status = json['status'];
msg = json['msg'];
result =
json['result'] != null ? new ClassListResult.fromJson(json['result']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['msg'] = this.msg;
if (this.result != null) {
data['result'] = this.result.toJson();
}
return data;
}
}
class ClassListResult {
String group;
int currentPage;
int totalPage;
List<HomeEntityData> data;
ClassListResult({this.group, this.currentPage, this.totalPage, this.data});
ClassListResult.fromJson(Map<String, dynamic> json) {
group = json['group'];
currentPage = json['current_page'];
totalPage = json['total_page'];
if (json['data'] != null) {
data = new List<HomeEntityData>();
json['data'].forEach((v) {
data.add(new HomeEntityData.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['group'] = this.group;
data['current_page'] = this.currentPage;
data['total_page'] = this.totalPage;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
}
return data;
}
}
class ClassTags {
String title;
int id;
ClassTags({this.title, this.id});
ClassTags.fromJson(Map<String, dynamic> json) {
title = json['title'];
id = json['id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
data['id'] = this.id;
return data;
}
}

View File

@@ -0,0 +1,32 @@
class FreeUseEntity {
int _code;
String _error;
int _freeNumber;
FreeUseEntity({int code, String error, int freeNumber}) {
this._code = code;
this._error = error;
this._freeNumber = freeNumber;
}
int get code => _code;
set code(int code) => _code = code;
String get error => _error;
set error(String error) => _error = error;
int get freeNumber => _freeNumber;
set freeNumber(int freeNumber) => _freeNumber = freeNumber;
FreeUseEntity.fromJson(Map<String, dynamic> json) {
_code = json['code'];
_error = json['error'];
_freeNumber = json['FreeNumber'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['code'] = this._code;
data['error'] = this._error;
data['FreeNumber'] = this._freeNumber;
return data;
}
}

View File

@@ -0,0 +1,203 @@
class HomeEntity {
int status;
String msg;
Result result;
HomeEntity({this.status, this.msg, this.result});
HomeEntity.fromJson(Map<String, dynamic> json) {
status = json['status'];
msg = json['msg'];
result =
json['result'] != null ? new Result.fromJson(json['result']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['msg'] = this.msg;
if (this.result != null) {
data['result'] = this.result.toJson();
}
return data;
}
}
class Result {
Recommended recommended;
Recommended newest;
Models model;
Result({this.recommended, this.newest, this.model});
Result.fromJson(Map<String, dynamic> json) {
recommended = json['recommended'] != null
? new Recommended.fromJson(json['recommended'])
: null;
newest = json['newest'] != null
? new Recommended.fromJson(json['newest'])
: null;
model = json['model'] != null ? new Models.fromJson(json['model']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.recommended != null) {
data['recommended'] = this.recommended.toJson();
}
if (this.newest != null) {
data['newest'] = this.newest.toJson();
}
if (this.model != null) {
data['model'] = this.model.toJson();
}
return data;
}
}
class Recommended {
String title;
List<HomeEntityData> data;
Recommended({this.title, this.data});
Recommended.fromJson(Map<String, dynamic> json) {
title = json['title'];
if (json['data'] != null) {
data = new List<HomeEntityData>();
json['data'].forEach((v) {
data.add(new HomeEntityData.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
}
return data;
}
}
class HomeEntityData {
int id;
int total;
int totalPage;
String source;
String user;
List<Tags> tags;
String title;
String preview;
HomeEntityData(
{this.id,
this.total,
this.totalPage,
this.source,
this.user,
this.tags,
this.title,
this.preview});
HomeEntityData.fromJson(Map<String, dynamic> json) {
id = json['id'];
total = json['total'];
totalPage = json['total_page'];
source = json['source'];
user = json['user'];
if (json['tags'] != null) {
tags = new List<Tags>();
json['tags'].forEach((v) {
tags.add(new Tags.fromJson(v));
});
}
title = json['title'];
preview = json['preview'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['total'] = this.total;
data['total_page'] = this.totalPage;
data['source'] = this.source;
data['user'] = this.user;
if (this.tags != null) {
data['tags'] = this.tags.map((v) => v.toJson()).toList();
}
data['title'] = this.title;
data['preview'] = this.preview;
return data;
}
}
class Tags {
String title;
int id;
Tags({this.title, this.id});
Tags.fromJson(Map<String, dynamic> json) {
title = json['title'];
id = json['id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
data['id'] = this.id;
return data;
}
}
class Models {
String title;
List<Res> res;
Models({this.title, this.res});
Models.fromJson(Map<String, dynamic> json) {
title = json['title'];
if (json['res'] != null) {
res = new List<Res>();
json['res'].forEach((v) {
res.add(new Res.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
if (this.res != null) {
data['res'] = this.res.map((v) => v.toJson()).toList();
}
return data;
}
}
class Res {
int id;
String title;
String total;
String preview;
Res({this.id, this.title, this.total, this.preview});
Res.fromJson(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
total = json['total'];
preview = json['preview'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['title'] = this.title;
data['total'] = this.total;
data['preview'] = this.preview;
return data;
}
}

View File

@@ -0,0 +1,116 @@
import 'HomeEntity.dart';
class InfoEntity {
int status;
String msg;
InfoResult result;
InfoEntity({this.status, this.msg, this.result});
InfoEntity.fromJson(Map<String, dynamic> json) {
status = json['status'];
msg = json['msg'];
result =
json['result'] != null ? new InfoResult.fromJson(json['result']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['msg'] = this.msg;
if (this.result != null) {
data['result'] = this.result.toJson();
}
return data;
}
}
class InfoResult {
String title;
String source;
String total;
String info;
int currentPage;
int totalPage;
List<Data> data;
List<HomeEntityData> recommend;
List<HomeEntityData> relevant;
InfoResult(
{this.title,
this.source,
this.total,
this.info,
this.currentPage,
this.totalPage,
this.data,
this.recommend,
this.relevant});
InfoResult.fromJson(Map<String, dynamic> json) {
title = json['title'];
source = json['source'];
total = json['total'];
info = json['info'];
currentPage = json['current_page'];
totalPage = json['total_page'];
if (json['data'] != null) {
data = new List<Data>();
json['data'].forEach((v) {
data.add(new Data.fromJson(v));
});
}
if (json['recommend'] != null) {
recommend = new List<HomeEntityData>();
json['recommend'].forEach((v) {
recommend.add(new HomeEntityData.fromJson(v));
});
}
if (json['relevant'] != null) {
relevant = new List<HomeEntityData>();
json['relevant'].forEach((v) {
relevant.add(new HomeEntityData.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
data['source'] = this.source;
data['total'] = this.total;
data['info'] = this.info;
data['current_page'] = this.currentPage;
data['total_page'] = this.totalPage;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
}
if (this.recommend != null) {
data['recommend'] = this.recommend.map((v) => v.toJson()).toList();
}
if (this.relevant != null) {
data['relevant'] = this.relevant.map((v) => v.toJson()).toList();
}
return data;
}
}
class Data {
String title;
String src;
Data({this.title, this.src});
Data.fromJson(Map<String, dynamic> json) {
title = json['title'];
src = json['src'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['title'] = this.title;
data['src'] = this.src;
return data;
}
}

View File

@@ -0,0 +1,51 @@
import 'HomeEntity.dart';
class LikeEntity extends HomeEntityData {
int id;
String preview;
String source;
String title;
String totals;
String user;
LikeEntity({this.id, this.preview, this.source, this.title, this.totals, this.user});
LikeEntity.fromJson(Map<String, dynamic> json) {
id = json['id'];
preview = json['preview'];
source = json['source'];
title = json['title'];
totals = json['totals'];
user = json['user'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['preview'] = this.preview;
data['source'] = this.source;
data['title'] = this.title;
data['totals'] = this.totals;
data['user'] = this.user;
return data;
}
}
class SingleGraphEntity {
int id;
String src;
SingleGraphEntity({this.id, this.src});
SingleGraphEntity.fromJson(Map<String, dynamic> json) {
id = json['id'];
src = json['src'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['src'] = this.src;
return data;
}
}

View File

@@ -0,0 +1,34 @@
class LoginEntity {
int code;
String error;
String username;
String createdAt;
String objectId;
String userType;
String userWeiXin;
LoginEntity({this.code, this.error, this.username, this.createdAt, this.objectId, this.userType, this.userWeiXin});
LoginEntity.fromJson(Map<String, dynamic> json) {
code = json['code'];
error = json['error'];
username = json['username'];
createdAt = json['createdAt'];
objectId = json['objectId'];
userType = json['userType'];
userWeiXin = json['userWeiXin'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['code'] = this.code;
data['error'] = this.error;
data['username'] = this.username;
data['createdAt'] = this.createdAt;
data['objectId'] = this.objectId;
data['userType'] = this.userType;
data['userWeiXin'] = this.userWeiXin;
return data;
}
}

View File

@@ -0,0 +1,50 @@
class MechanismEntity {
int status;
String msg;
List<MechanismResult> result;
MechanismEntity({this.status, this.msg, this.result});
MechanismEntity.fromJson(Map<String, dynamic> json) {
status = json['status'];
msg = json['msg'];
if (json['result'] != null) {
result = new List<MechanismResult>();
json['result'].forEach((v) {
result.add(new MechanismResult.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['msg'] = this.msg;
if (this.result != null) {
data['result'] = this.result.map((v) => v.toJson()).toList();
}
return data;
}
}
class MechanismResult {
int id;
String title;
String quantity;
MechanismResult({this.id, this.title, this.quantity});
MechanismResult.fromJson(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
quantity = json['quantity'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['title'] = this.title;
data['quantity'] = this.quantity;
return data;
}
}

View File

@@ -0,0 +1,84 @@
import 'HomeEntity.dart';
class ModelEntity {
int status;
String msg;
ModelResult result;
ModelEntity({this.status, this.msg, this.result});
ModelEntity.fromJson(Map<String, dynamic> json) {
status = json['status'];
msg = json['msg'];
result =
json['result'] != null ? new ModelResult.fromJson(json['result']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['msg'] = this.msg;
if (this.result != null) {
data['result'] = this.result.toJson();
}
return data;
}
}
class ModelResult {
List<Res> hotModels;
List<Res> newest;
ModelResult({this.hotModels, this.newest});
ModelResult.fromJson(Map<String, dynamic> json) {
if (json['hot_models'] != null) {
hotModels = new List<Res>();
json['hot_models'].forEach((v) {
hotModels.add(new Res.fromJson(v));
});
}
if (json['newest'] != null) {
newest = new List<Res>();
json['newest'].forEach((v) {
newest.add(new Res.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.hotModels != null) {
data['hot_models'] = this.hotModels.map((v) => v.toJson()).toList();
}
if (this.newest != null) {
data['newest'] = this.newest.map((v) => v.toJson()).toList();
}
return data;
}
}
class HotModels {
int id;
String title;
String total;
String preview;
HotModels({this.id, this.title, this.total, this.preview});
HotModels.fromJson(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
total = json['total'];
preview = json['preview'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['title'] = this.title;
data['total'] = this.total;
data['preview'] = this.preview;
return data;
}
}

View File

@@ -0,0 +1,102 @@
import 'HomeEntity.dart';
class ModelInfoEntity {
int status;
String msg;
ModelInfoResult result;
ModelInfoEntity({this.status, this.msg, this.result});
ModelInfoEntity.fromJson(Map<String, dynamic> json) {
status = json['status'];
msg = json['msg'];
result =
json['result'] != null ? new ModelInfoResult.fromJson(json['result']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
data['msg'] = this.msg;
if (this.result != null) {
data['result'] = this.result.toJson();
}
return data;
}
}
class ModelInfoResult {
int currentPage;
int totalPage;
ModelInfo modelInfo;
List<HomeEntityData> data;
List<Res> similar;
ModelInfoResult(
{this.currentPage,
this.totalPage,
this.modelInfo,
this.data,
this.similar});
ModelInfoResult.fromJson(Map<String, dynamic> json) {
currentPage = json['current_page'];
totalPage = json['total_page'];
modelInfo = json['model_info'] != null
? new ModelInfo.fromJson(json['model_info'])
: null;
if (json['data'] != null) {
data = new List<HomeEntityData>();
json['data'].forEach((v) {
data.add(new HomeEntityData.fromJson(v));
});
}
if (json['similar'] != null) {
similar = new List<Res>();
json['similar'].forEach((v) {
similar.add(new Res.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['current_page'] = this.currentPage;
data['total_page'] = this.totalPage;
if (this.modelInfo != null) {
data['model_info'] = this.modelInfo.toJson();
}
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
}
if (this.similar != null) {
data['similar'] = this.similar.map((v) => v.toJson()).toList();
}
return data;
}
}
class ModelInfo {
String portrait;
String name;
String explain;
String total;
ModelInfo({this.portrait, this.name, this.explain, this.total});
ModelInfo.fromJson(Map<String, dynamic> json) {
portrait = json['portrait'];
name = json['name'];
explain = json['explain'];
total = json['total'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['portrait'] = this.portrait;
data['name'] = this.name;
data['explain'] = this.explain;
data['total'] = this.total;
return data;
}
}

View File

@@ -0,0 +1,38 @@
class RegisterEntity {
int _code;
String _error;
String _createdAt;
String _objectId;
RegisterEntity({int code, String error, String createdAt, String objectId}) {
this._code = code;
this._error = error;
this._createdAt = createdAt;
this._objectId = objectId;
}
int get code => _code;
set code(int code) => _code = code;
String get error => _error;
set error(String error) => _error = error;
String get createdAt => _createdAt;
set createdAt(String createdAt) => _createdAt = createdAt;
String get objectId => _objectId;
set objectId(String objectId) => _objectId = objectId;
RegisterEntity.fromJson(Map<String, dynamic> json) {
_code = json['code'];
_error = json['error'];
_createdAt = json['createdAt'];
_objectId = json['objectId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['code'] = this._code;
data['error'] = this._error;
data['createdAt'] = this._createdAt;
data['objectId'] = this._objectId;
return data;
}
}

View File

@@ -0,0 +1,28 @@
import 'AgentClassListEntity.dart';
class SearchEntity {
int status;
List<ItemList> data;
SearchEntity({this.status, this.data});
SearchEntity.fromJson(Map<String, dynamic> json) {
status = json['status'];
if (json['data'] != null) {
data = new List<ItemList>();
json['data'].forEach((v) {
data.add(new ItemList.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['status'] = this.status;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
}
return data;
}
}

Some files were not shown because too many files have changed in this diff Show More