├── .gitignore
├── LICENSE
├── README.md
├── art
├── WechatIMG73.jpeg
├── WechatIMG74.jpeg
├── WechatIMG76.jpeg
├── WechatIMG77.jpeg
└── WechatIMG78.jpeg
└── source
├── client
├── .gitignore
├── .idea
│ └── .gitignore
└── flutter_cili
│ ├── .gitignore
│ ├── README.md
│ ├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── vincent
│ │ │ │ │ └── flutter
│ │ │ │ │ └── flutter_cili
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
│ ├── assets
│ └── loading.json
│ ├── images
│ ├── avatar.png
│ ├── head_left.png
│ ├── head_left_protect.png
│ ├── head_right.png
│ ├── head_right_protect.png
│ └── logo.png
│ ├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ ├── lib
│ ├── core
│ │ ├── base_state.dart
│ │ └── base_tab_state.dart
│ ├── http
│ │ ├── core
│ │ │ ├── dio_adapter.dart
│ │ │ ├── net_adapter.dart
│ │ │ ├── net_controller.dart
│ │ │ └── net_error.dart
│ │ ├── request
│ │ │ ├── base_request.dart
│ │ │ ├── cancel_like_request.dart
│ │ │ ├── canel_hate_request.dart
│ │ │ ├── collect_request.dart
│ │ │ ├── collectlist_request.dart
│ │ │ ├── hate_request.dart
│ │ │ ├── home_request.dart
│ │ │ ├── like_request.dart
│ │ │ ├── login_request.dart
│ │ │ ├── notice_request.dart
│ │ │ ├── profile_request.dart
│ │ │ ├── ranking_request.dart
│ │ │ ├── uncollect_request.dart
│ │ │ └── video_detail_request.dart
│ │ └── usecase
│ │ │ ├── collect_case.dart
│ │ │ ├── collectlist_case.dart
│ │ │ ├── hate_case.dart
│ │ │ ├── home_case.dart
│ │ │ ├── like_case.dart
│ │ │ ├── login_case.dart
│ │ │ ├── notice_case.dart
│ │ │ ├── profile_dao.dart
│ │ │ ├── ranking_case.dart
│ │ │ └── video_detail_case.dart
│ ├── main.dart
│ ├── model
│ │ ├── home_data.dart
│ │ ├── notice_data.dart
│ │ ├── owner.dart
│ │ ├── profile_data.dart
│ │ ├── ranking_data.dart
│ │ ├── video.dart
│ │ └── video_detail_data.dart
│ ├── navigator
│ │ ├── bottom_navigator.dart
│ │ └── navigator_controller.dart
│ ├── page
│ │ ├── collectlist_page.dart
│ │ ├── home_page.dart
│ │ ├── home_tab_page.dart
│ │ ├── login_page.dart
│ │ ├── mine_page.dart
│ │ ├── notice_page.dart
│ │ ├── profile_page.dart
│ │ ├── ranking_page.dart
│ │ ├── ranking_tab_page.dart
│ │ ├── regist_page.dart
│ │ └── video_detail_page.dart
│ ├── storage
│ │ └── cache_controller.dart
│ ├── util
│ │ ├── color.dart
│ │ ├── format_util.dart
│ │ ├── log_util.dart
│ │ ├── string_util.dart
│ │ ├── toast.dart
│ │ └── view_util.dart
│ └── widget
│ │ ├── appbar.dart
│ │ ├── banner_widget.dart
│ │ ├── benefit_card.dart
│ │ ├── course_card.dart
│ │ ├── custom_blur.dart
│ │ ├── expandable_content.dart
│ │ ├── hi_flexible_header.dart
│ │ ├── immersion_navigationbar.dart
│ │ ├── loading.dart
│ │ ├── login_button.dart
│ │ ├── login_effect.dart
│ │ ├── login_input.dart
│ │ ├── navigation_bar.dart
│ │ ├── notice_card.dart
│ │ ├── v_tab.dart
│ │ ├── video_card.dart
│ │ ├── video_header.dart
│ │ ├── video_large_card.dart
│ │ ├── video_toolbar.dart
│ │ ├── video_view.dart
│ │ └── vincent_video_control.dart
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ └── test
│ └── widget_test.dart
└── server
└── funvideo
├── .gitignore
├── .mvn
└── wrapper
│ └── maven-wrapper.jar
├── mvnw
├── mvnw.cmd
└── src
├── main
├── java
│ └── com
│ │ └── vincent
│ │ └── funvideo
│ │ ├── FunVideoApplication.java
│ │ ├── aop
│ │ └── TokenAspect.java
│ │ ├── config
│ │ ├── ExceptionAdvice.java
│ │ ├── RabbitMQConfig.java
│ │ ├── SwaggerConfig.java
│ │ ├── ThreadPoolConfig.java
│ │ ├── shiro
│ │ │ ├── JwtUtil.java
│ │ │ ├── OAuth2Filter.java
│ │ │ ├── OAuth2Realm.java
│ │ │ ├── OAuth2Token.java
│ │ │ ├── ShiroConfig.java
│ │ │ └── ThreadLocalToken.java
│ │ └── xss
│ │ │ ├── XssFilter.java
│ │ │ └── XssHttpServletRequestWrapper.java
│ │ ├── controller
│ │ ├── BaseController.java
│ │ ├── RecordController.java
│ │ ├── UserController.java
│ │ ├── VideoController.java
│ │ └── form
│ │ │ ├── BaseForm.java
│ │ │ ├── DetailFrom.java
│ │ │ ├── LoginForm.java
│ │ │ ├── PageForm.java
│ │ │ ├── RankForm.java
│ │ │ ├── RecordForm.java
│ │ │ └── VideoForm.java
│ │ ├── db
│ │ ├── dao
│ │ │ ├── AuthoriseDao.java
│ │ │ ├── BannerDao.java
│ │ │ ├── RecordDao.java
│ │ │ ├── TypeDao.java
│ │ │ ├── UserDao.java
│ │ │ └── VideoDao.java
│ │ └── pojo
│ │ │ ├── Authorise.java
│ │ │ ├── Banner.java
│ │ │ ├── Record.java
│ │ │ ├── Type.java
│ │ │ ├── User.java
│ │ │ └── Video.java
│ │ ├── service
│ │ ├── AuthoriseService.java
│ │ ├── BannerService.java
│ │ ├── RecordService.java
│ │ ├── TypeService.java
│ │ ├── UserService.java
│ │ ├── VideoService.java
│ │ └── impl
│ │ │ ├── AuthoriseServiceImpl.java
│ │ │ ├── BannerServiceImpl.java
│ │ │ ├── RecordServiceImpl.java
│ │ │ ├── TypeServiceImpl.java
│ │ │ ├── UserServiceImpl.java
│ │ │ └── VideoServiceImpl.java
│ │ └── util
│ │ ├── R.java
│ │ └── VideoException.java
└── resources
│ ├── application.yml
│ └── mapper
│ ├── AuthoriseDao.xml
│ ├── BannerDao.xml
│ ├── RecordDao.xml
│ ├── TypeDao.xml
│ ├── UserDao.xml
│ └── VideoDao.xml
└── test
└── java
└── com
└── vincent
└── funvideo
└── FunVideoApplicationTests.java
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | source/server/funvideo/.mvn/wrapper/maven-wrapper.jar
3 | source/server/funvideo/.mvn/wrapper/maven-wrapper.jar
4 | source/server/funvideo/.mvn/wrapper/maven-wrapper.properties
5 | source/server/funvideo/.mvn/wrapper/MavenWrapperDownloader.java
6 | source/server/funvideo/.mvn/wrapper/maven-wrapper.jar
7 | source/client/.idea/.name
8 | source/client/.idea/gradle.xml
9 | source/client/.idea/misc.xml
10 | source/client/.idea/vcs.xml
11 | source/client/flutter_cili/.metadata
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | 
3 | ## 项目介绍
4 |
5 | #### 嘻哩嘻哩(CiliCili)是一款视频App,项目采用 SpringBoot+Flutter 开发,项目加入常见的企业级应用所涉及到的技术点,例如 Redis、JWT、Shiro 等。前端使用Flutter开发。
6 | #### Just For Fun。
7 |
8 |
9 |
10 | ### 项目技术栈
11 |
12 | #### 后端技术栈
13 |
14 | ```text
15 | 1. SpringBoot
16 | 2. Shiro
17 | 3. MyBatis
18 | 4. MySQL
19 | 5. Redis
20 | 6. JWT
21 | ```
22 |
23 | #### App技术栈
24 |
25 | ```text
26 | 1. Flutter
27 | ```
28 |
29 | ### 项目效果图
30 | 
31 | 
32 | 
33 |
34 | 
35 | 
36 | 
37 | 
38 |
39 | ### 图标设计
40 | 感谢 Morgan
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/art/WechatIMG73.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/art/WechatIMG73.jpeg
--------------------------------------------------------------------------------
/art/WechatIMG74.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/art/WechatIMG74.jpeg
--------------------------------------------------------------------------------
/art/WechatIMG76.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/art/WechatIMG76.jpeg
--------------------------------------------------------------------------------
/art/WechatIMG77.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/art/WechatIMG77.jpeg
--------------------------------------------------------------------------------
/art/WechatIMG78.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/art/WechatIMG78.jpeg
--------------------------------------------------------------------------------
/source/client/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/source/client/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/README.md:
--------------------------------------------------------------------------------
1 | # flutter_cili
2 |
3 | A new Flutter application
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 30
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | defaultConfig {
36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 | applicationId "com.vincent.flutter.flutter_cili"
38 | minSdkVersion 16
39 | targetSdkVersion 30
40 | versionCode flutterVersionCode.toInteger()
41 | versionName flutterVersionName
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
59 | }
60 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
13 |
17 |
21 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/kotlin/com/vincent/flutter/flutter_cili/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.vincent.flutter.flutter_cili
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
7 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/images/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/images/avatar.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/images/head_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/images/head_left.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/images/head_left_protect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/images/head_left_protect.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/images/head_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/images/head_right.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/images/head_right_protect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/images/head_right_protect.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/images/logo.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/VincentTung/CiliCili/9b1b4ec4b7e01836e18e683a94125d6e184b8789/source/client/flutter_cili/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_cili
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/core/base_state.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter_cili/util/log_util.dart';
5 |
6 | abstract class BaseState extends State{
7 |
8 | @override
9 | void setState(fn) {
10 |
11 | if(mounted) {
12 | super.setState(fn);
13 | }else{
14 | logD('页面已经销毁,本次setState不执行',tag: 'StateController');
15 | }
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/core/base_tab_state.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_cili/core/base_state.dart';
3 | import 'package:flutter_cili/http/core/net_error.dart';
4 | import 'package:flutter_cili/util/color.dart';
5 | import 'package:flutter_cili/util/log_util.dart';
6 | import 'package:flutter_cili/util/toast.dart';
7 | import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
8 |
9 | /// M 数据实体类 L列表数据模型 T为具体widget
10 | abstract class BaseTabState extends BaseState
11 | with AutomaticKeepAliveClientMixin {
12 | final int LOADING_MORE_DISTANCE = 300;
13 | List dataList = [];
14 | int pageIndex = 1;
15 | bool _isLoading = false;
16 |
17 | get contentChild;
18 |
19 | ScrollController scrollController = ScrollController();
20 |
21 | @override
22 | void initState() {
23 | super.initState();
24 |
25 | scrollController.addListener(() {
26 | var distance = scrollController.position.maxScrollExtent -
27 | scrollController.position.pixels;
28 | if (distance < LOADING_MORE_DISTANCE &&
29 | !_isLoading &&
30 | //fix 数据不满一屏的时候 下拉刷新导致加载更多的问题
31 | scrollController.position.maxScrollExtent != 0) {
32 | logD('load data');
33 | loadData(loadMore: true);
34 | }
35 | });
36 | loadData();
37 | }
38 |
39 | @override
40 | void dispose() {
41 | scrollController.dispose();
42 | super.dispose();
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | super.build(context);
48 | return RefreshIndicator(
49 | child: MediaQuery.removePadding(
50 | removeTop: true, context: context, child: contentChild),
51 | onRefresh: loadData,
52 | color: primary,
53 | );
54 | }
55 |
56 | //获取页面
57 | Future getData(int pageIndex);
58 |
59 | //M中解析出list数据
60 | List parseList(M result);
61 |
62 | Future loadData({loadMore = false}) async {
63 | if (_isLoading) {
64 | logD('还在加载中....');
65 | return;
66 | }
67 |
68 | _isLoading = true;
69 |
70 | if (!loadMore) {
71 | pageIndex = 1;
72 | }
73 |
74 | var currentIndex = pageIndex + (loadMore ? 1 : 0);
75 | try {
76 | var result = await getData(currentIndex);
77 |
78 | setState(() {
79 | if (loadMore) {
80 | dataList = [...dataList, ...parseList(result)];
81 | if (parseList(result).length != 0) {
82 | pageIndex++;
83 | }
84 | } else {
85 | dataList = parseList(result);
86 | }
87 | });
88 | Future.delayed(Duration(milliseconds: 1000), () {
89 | setState(() {
90 | _isLoading = false;
91 | });
92 | });
93 | } on NeedAuth catch (e) {
94 | print(e);
95 | showWarningToast(e.message);
96 | setState(() {
97 | _isLoading = false;
98 | });
99 | } on NetError catch (e) {
100 | print(e);
101 | showWarningToast(e.message);
102 | setState(() {
103 | _isLoading = false;
104 | });
105 | }
106 | }
107 |
108 | @override
109 | bool get wantKeepAlive => true;
110 | }
111 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/core/dio_adapter.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:flutter_cili/http/core/net_adapter.dart';
3 | import 'package:flutter_cili/http/core/net_error.dart';
4 | import 'package:flutter_cili/http/request/base_request.dart';
5 | import 'package:flutter_cili/util/log_util.dart';
6 |
7 | class DioAdapter extends NetAdapter {
8 | @override
9 | Future> send(BaseRequest request) async {
10 | var response;
11 | var error;
12 | //向dio传递header
13 | var option = Options(headers: request.header);
14 | try {
15 | var method = request.httpMethod();
16 |
17 | switch (method) {
18 | case HttpMethod.GET:
19 | response = await Dio().get(request.url(),options: option);
20 | break;
21 |
22 | case HttpMethod.POST:
23 | response = await Dio().post(request.url(),options: option,data:request.params);
24 | break;
25 |
26 | case HttpMethod.DELETE:
27 | response = await Dio().delete(request.url(),options: option,data:request.params);
28 | break;
29 |
30 | case HttpMethod.PUT:
31 | response = await Dio().put(request.url(),options: option,data:request.params);
32 | break;
33 | }
34 | } on DioError catch (e) {
35 | error = e;
36 | response = e.response;
37 | }
38 | logD('${request.url()}---header:${request.header}');
39 | logD(response);
40 | if (error != null) {
41 | throw NetError(response?.code ??-1, error.toString(),data:buildResponse(response, request) );
42 | }
43 | return buildResponse(response, request);
44 | }
45 |
46 |
47 | NetResponse buildResponse(Response response,BaseRequest request){
48 |
49 | return NetResponse(data: response.data,request: request,code: response.statusCode,
50 | statusMessage: response.statusMessage,extra: response);
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/core/net_adapter.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter_cili/http/request/base_request.dart';
4 |
5 |
6 | abstract class NetAdapter {
7 | Future> send(BaseRequest request);
8 | }
9 |
10 |
11 | class NetResponse {
12 | NetResponse({this.data,
13 | this.request,
14 | this.code,
15 | this.statusMessage,
16 | this.extra});
17 |
18 | T data;
19 | BaseRequest request;
20 | int code;
21 | String statusMessage;
22 | dynamic extra;
23 |
24 | @override
25 | String toString() {
26 | if (data is Map) {
27 | return json.encode(data);
28 | } else {
29 | return data.toString();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/core/net_controller.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter_cili/http/core/dio_adapter.dart';
3 | import 'package:flutter_cili/http/core/net_error.dart';
4 | import 'package:flutter_cili/http/request/base_request.dart';
5 | import 'package:flutter_cili/http/core/net_adapter.dart';
6 | import 'package:flutter_cili/util/log_util.dart';
7 |
8 | class NetController {
9 | ///定义私有构造函数
10 | NetController._();
11 |
12 | static NetController _instance;
13 |
14 | static NetController getInstance() {
15 | if (_instance == null) {
16 | _instance = NetController._();
17 | }
18 | return _instance;
19 | }
20 |
21 | Future send(BaseRequest request) async {
22 | NetResponse response;
23 | var error;
24 | try {
25 | response = await _realSendRequest(request);
26 | logD(response);
27 | } on NetError catch (e) {
28 | error = e;
29 | printLog(e);
30 | }
31 | if (response == null) {
32 | printLog(error);
33 | }
34 |
35 | var status = response.code;
36 | var result = response.data;
37 | switch (status) {
38 | case 200:
39 | return result;
40 | case 401:
41 | throw NeedLogin();
42 | case 403:
43 | throw NeedAuth(result.toString());
44 | default:
45 | throw NetError(status, result.toString());
46 | }
47 | }
48 |
49 | printLog(dynamic msg) {
50 | print('netcontroller:${msg.toString()}');
51 | }
52 |
53 | ///真正发送网络请求
54 | Future> _realSendRequest(BaseRequest request) async {
55 | NetAdapter netAdapter = DioAdapter();
56 | return netAdapter.send(request);
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/core/net_error.dart:
--------------------------------------------------------------------------------
1 | class NetError implements Exception {
2 | final int code;
3 | final String message;
4 | final dynamic data;
5 |
6 | NetError(this.code, this.message, {this.data});
7 | }
8 |
9 | class NeedAuth extends NetError {
10 | NeedAuth(String message, {int code: 403, dynamic data})
11 | : super(code, message, data: data);
12 | }
13 |
14 | class NeedLogin extends NetError {
15 | NeedLogin({String message: '请先登录', int code: 401})
16 | : super(code, message);
17 | }
18 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/base_request.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 | import 'package:flutter_cili/http/usecase/login_case.dart';
3 | import 'package:flutter_cili/storage/cache_controller.dart';
4 |
5 | enum HttpMethod { GET, POST, DELETE, PUT }
6 |
7 | ///网络请求基类
8 | abstract class BaseRequest {
9 |
10 | var pathParams;
11 | var userHttps = false;
12 |
13 |
14 | BaseRequest() {
15 | header[LoginCase.TOKEN] = LoginCase.getToken();
16 | }
17 |
18 |
19 | String domain() {
20 | return "127.0.0.1";
21 | }
22 |
23 | HttpMethod httpMethod();
24 |
25 | String path();
26 |
27 | String url() {
28 | params['apikey'] = 'youapyike';
29 | Uri uri;
30 | var pathString = path();
31 |
32 | if (pathParams != null) {
33 | if (path().endsWith("/")) {
34 | pathString = '${path()}$pathParams';
35 | } else {
36 | pathString = '${path()}/$pathParams';
37 | }
38 | }
39 |
40 | if (userHttps) {
41 | uri = Uri.https(domain(), pathString, params);
42 | } else {
43 | uri = Uri.http(domain(), pathString, params);
44 | }
45 |
46 | var url = uri.toString();
47 | print('url:$url');
48 | return url;
49 | }
50 |
51 |
52 | bool needLogin();
53 |
54 | Map params = Map();
55 |
56 | BaseRequest addParams(String key, Object value) {
57 | params[key] = value.toString();
58 | return this;
59 | }
60 |
61 | Map header = Map();
62 |
63 | BaseRequest addHeader(String key, Object value) {
64 | header[key] = value.toString();
65 | return this;
66 | }
67 |
68 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/cancel_like_request.dart:
--------------------------------------------------------------------------------
1 | import 'base_request.dart';
2 |
3 | class CancelLikeRequest extends BaseRequest {
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.DELETE;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'funvideo-api/action/like';
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/canel_hate_request.dart:
--------------------------------------------------------------------------------
1 | import 'base_request.dart';
2 |
3 | class CancelHateRequest extends BaseRequest {
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.DELETE;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'funvideo-api/action/hate';
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/collect_request.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/request/base_request.dart';
2 |
3 | class CollectRequest extends BaseRequest {
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.POST;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'funvideo-api/action/collect';
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/collectlist_request.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/request/base_request.dart';
2 |
3 | class CollectListRequest extends BaseRequest {
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.GET;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'funvideo-api/action/collect';
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/hate_request.dart:
--------------------------------------------------------------------------------
1 | import 'base_request.dart';
2 |
3 | class HateRequest extends BaseRequest {
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.POST;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'funvideo-api/action/hate';
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/home_request.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/request/base_request.dart';
2 |
3 | class HomeRequest extends BaseRequest{
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.GET;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 |
12 | throw true;
13 | }
14 |
15 | @override
16 | String path() {
17 | return 'funvideo-api/video/list';
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/like_request.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/request/base_request.dart';
2 |
3 | class LikeRequest extends BaseRequest {
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.POST;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'funvideo-api/action/like';
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/login_request.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/request/base_request.dart';
2 |
3 | class LoginRequest extends BaseRequest {
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.POST;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return false;
12 | }
13 |
14 | @override
15 | String path() {
16 | return "/funvideo-api/user/login";
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/notice_request.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/request/base_request.dart';
2 |
3 | class NoticeRequest extends BaseRequest {
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.GET;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'uapi/notice';
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/profile_request.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'base_request.dart';
4 |
5 | class ProfileRequest extends BaseRequest {
6 | @override
7 | HttpMethod httpMethod() {
8 | return HttpMethod.GET;
9 | }
10 |
11 | @override
12 | bool needLogin() {
13 | return true;
14 | }
15 |
16 | @override
17 | String path() {
18 | return "funvideo-api/user/profile";
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/ranking_request.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/request/base_request.dart';
2 |
3 | class RankingRequest extends BaseRequest{
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.GET;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'funvideo-api/video/rank';
17 | }
18 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/uncollect_request.dart:
--------------------------------------------------------------------------------
1 | import 'base_request.dart';
2 |
3 | class UnCollectRequest extends BaseRequest {
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.DELETE;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'funvideo-api/action/collect';
17 | }
18 |
19 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/request/video_detail_request.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/request/base_request.dart';
2 |
3 | class VideoDetailRequest extends BaseRequest{
4 | @override
5 | HttpMethod httpMethod() {
6 | return HttpMethod.GET;
7 | }
8 |
9 | @override
10 | bool needLogin() {
11 | return true;
12 | }
13 |
14 | @override
15 | String path() {
16 | return 'funvideo-api/video/detail';
17 | }
18 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/collect_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/core/net_controller.dart';
2 | import 'package:flutter_cili/http/request/base_request.dart';
3 | import 'package:flutter_cili/http/request/uncollect_request.dart';
4 | import 'package:flutter_cili/http/request/collect_request.dart';
5 | import 'package:flutter_cili/util/log_util.dart';
6 |
7 | class CollectCase {
8 |
9 | static collect(int vid, bool isFavorite) async {
10 | BaseRequest request = isFavorite
11 | ? CollectRequest()
12 | : UnCollectRequest();
13 | request.params['vid'] = vid.toString();
14 | var result = await NetController.getInstance().send(request);
15 |
16 | logD(result);
17 |
18 | return result;
19 | }
20 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/collectlist_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/core/net_controller.dart';
2 | import 'package:flutter_cili/http/request/base_request.dart';
3 | import 'package:flutter_cili/http/request/collectlist_request.dart';
4 | import 'package:flutter_cili/http/request/uncollect_request.dart';
5 | import 'package:flutter_cili/http/request/collect_request.dart';
6 | import 'package:flutter_cili/model/ranking_data.dart';
7 | import 'package:flutter_cili/util/log_util.dart';
8 | ///收藏列表
9 | class CollectListCase {
10 | static get({int pageIndex = 1, int pageSize = 10}) async {
11 | CollectListRequest request = CollectListRequest();
12 | request.addParams('pageIndex', pageIndex).addParams('pageSize', pageSize);
13 | var result = await NetController.getInstance().send(request);
14 |
15 | logD(result);
16 |
17 | return RankingData.fromJson(result['data']);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/hate_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/core/net_controller.dart';
2 | import 'package:flutter_cili/http/request/base_request.dart';
3 | import 'package:flutter_cili/http/request/cancel_like_request.dart';
4 | import 'package:flutter_cili/http/request/canel_hate_request.dart';
5 | import 'package:flutter_cili/http/request/hate_request.dart';
6 | import 'package:flutter_cili/http/request/like_request.dart';
7 | import 'package:flutter_cili/http/request/uncollect_request.dart';
8 | import 'package:flutter_cili/http/request/collect_request.dart';
9 | import 'package:flutter_cili/util/log_util.dart';
10 |
11 | class HateCase {
12 |
13 | static hate(int vid, bool isCancel) async {
14 | BaseRequest request = isCancel
15 | ? CancelHateRequest()
16 | : HateRequest();
17 | request.params['vid'] = vid.toString();
18 | var result = await NetController.getInstance().send(request);
19 |
20 | logD(result);
21 |
22 | return result;
23 | }
24 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/home_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/core/net_controller.dart';
2 | import 'package:flutter_cili/http/request/base_request.dart';
3 | import 'package:flutter_cili/http/request/home_request.dart';
4 | import 'package:flutter_cili/model/home_data.dart';
5 | import 'package:flutter_cili/util/log_util.dart';
6 |
7 | class HomeCase {
8 | static get(String categoryName,{int pageIndex = 1,int pageSize = 20}) async{
9 | HomeRequest request = HomeRequest();
10 | request.addParams('pageIndex', pageIndex).addParams('pageSize', pageSize);
11 | request.addParams('category', categoryName);
12 |
13 | var result = await NetController.getInstance().send(request);
14 | logD(result);
15 | return HomeData.fromJson(result['data']);
16 | }
17 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/like_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/core/net_controller.dart';
2 | import 'package:flutter_cili/http/request/base_request.dart';
3 | import 'package:flutter_cili/http/request/cancel_like_request.dart';
4 | import 'package:flutter_cili/http/request/like_request.dart';
5 | import 'package:flutter_cili/http/request/uncollect_request.dart';
6 | import 'package:flutter_cili/http/request/collect_request.dart';
7 | import 'package:flutter_cili/util/log_util.dart';
8 |
9 | class LikeCase {
10 |
11 | static like(int vid, bool isLike) async {
12 | BaseRequest request = isLike
13 | ? LikeRequest()
14 | : CancelLikeRequest();
15 | request.params['vid'] = vid.toString();
16 | var result = await NetController.getInstance().send(request);
17 |
18 | logD(result);
19 |
20 | return result;
21 | }
22 | }
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/login_case.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter_cili/http/core/net_controller.dart';
4 | import 'package:flutter_cili/http/request/base_request.dart';
5 | import 'package:flutter_cili/http/request/login_request.dart';
6 | import 'package:flutter_cili/storage/cache_controller.dart';
7 |
8 | class LoginCase {
9 | static const TOKEN = "token";
10 |
11 | static login(String userName, String password) {
12 | return _send(userName, password);
13 | }
14 |
15 | static registration(
16 | String userName, String password, String imoocId, String orderId) {
17 | return _send(userName, password);
18 | }
19 |
20 | static _send(String userName, String password) async {
21 | BaseRequest request = LoginRequest();
22 |
23 | request = request
24 | .addParams("username", userName)
25 | .addParams("pwd", password);
26 | var result = await NetController.getInstance().send(request);
27 |
28 | print('---------');
29 | print(result);
30 | if (result['code'] == 200 && result['token'] != null) {
31 | //保存登录令牌
32 | CacheController.getInstance().setString(TOKEN, result['token']);
33 | }
34 | return result;
35 | }
36 |
37 | static getToken() {
38 | return CacheController.getInstance().getString(TOKEN);
39 | }
40 | static clearToken(){
41 | CacheController.getInstance().delete(TOKEN);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/notice_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/core/net_controller.dart';
2 | import 'package:flutter_cili/http/request/base_request.dart';
3 | import 'package:flutter_cili/http/request/notice_request.dart';
4 | import 'package:flutter_cili/http/request/uncollect_request.dart';
5 | import 'package:flutter_cili/http/request/collect_request.dart';
6 | import 'package:flutter_cili/model/notice_data.dart';
7 | import 'package:flutter_cili/util/log_util.dart';
8 |
9 | class NoticeCase {
10 | static get({int pageIndex = 1, int pageSize = 10}) async {
11 | NoticeRequest request = NoticeRequest();
12 |
13 | request.addParams('pageIndex', pageIndex).addParams('pageSize', pageSize);
14 | var result = await NetController.getInstance().send(request);
15 |
16 | logD(result);
17 |
18 | return NoticeData.fromJson(result['data']);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/profile_dao.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter_cili/http/core/net_controller.dart';
4 | import 'package:flutter_cili/http/request/profile_request.dart';
5 | import 'package:flutter_cili/model/profile_data.dart';
6 |
7 | class ProfileDao {
8 | //https://api.devio.org/uapi/fa/profile
9 | static get() async {
10 | ProfileRequest request = ProfileRequest();
11 | var result = await NetController.getInstance().send(request);
12 | print(result);
13 | return ProfileData.fromJson(result['data']);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/ranking_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/core/net_controller.dart';
2 | import 'package:flutter_cili/http/request/base_request.dart';
3 | import 'package:flutter_cili/http/request/ranking_request.dart';
4 | import 'package:flutter_cili/http/request/uncollect_request.dart';
5 | import 'package:flutter_cili/http/request/collect_request.dart';
6 | import 'package:flutter_cili/model/ranking_data.dart';
7 | import 'package:flutter_cili/util/log_util.dart';
8 |
9 | class RankingCase {
10 | static get(String sort, {int pageIndex = 1, pageSize = 10}) async {
11 | RankingRequest request = RankingRequest();
12 | request
13 | .addParams('sort', sort)
14 | .addParams('pageIndex', pageIndex)
15 | .addParams('pageSize', pageSize);
16 | var result = await NetController.getInstance().send(request);
17 |
18 | logD(result);
19 |
20 | return RankingData.fromJson(result['data']);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/http/usecase/video_detail_case.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_cili/http/core/net_controller.dart';
2 | import 'package:flutter_cili/http/request/video_detail_request.dart';
3 | import 'package:flutter_cili/model/video_detail_data.dart';
4 | import 'package:flutter_cili/util/log_util.dart';
5 |
6 | class VideoDetailCase {
7 | static get(int id) async {
8 | VideoDetailRequest request = VideoDetailRequest();
9 | request.params['id'] = id.toString();
10 | var result = await NetController.getInstance().send(request);
11 | logD(result);
12 | return VideoDetailData.fromJson(result['data']);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/source/client/flutter_cili/lib/model/home_data.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter_cili/model/video.dart';
3 |
4 | ///
5 | class HomeData {
6 | List bannerList;
7 | List categoryList;
8 | List