Jelajahi Sumber

集成天天电竞

x1ongzhu 6 tahun lalu
induk
melakukan
b35e287f14
67 mengubah file dengan 670 tambahan dan 170 penghapusan
  1. 1 0
      android/app/build.gradle
  2. 1 0
      android/app/src/main/AndroidManifest.xml
  3. 2 0
      android/app/src/main/res/values/styles.xml
  4. 12 6
      ios/Podfile.lock
  5. 13 1
      ios/Runner.xcodeproj/project.pbxproj
  6. 9 5
      ios/Runner/Base.lproj/Main.storyboard
  7. 18 0
      ios/Runner/Info.plist
  8. 1 1
      ios/ScreenRecorder/SampleHandler.m
  9. 3 6
      lib/model/BindGameInfo.g.dart
  10. 4 12
      lib/model/CompetitionSeason.g.dart
  11. 0 6
      lib/model/GameInfo.g.dart
  12. 4 7
      lib/model/GameInfoSeasons.g.dart
  13. 10 24
      lib/model/HouseInfo.g.dart
  14. 0 6
      lib/model/HouseLevel.g.dart
  15. 13 12
      lib/model/PlayerInfo.g.dart
  16. 4 10
      lib/model/ProductInfo.g.dart
  17. 20 26
      lib/model/SystemNotice.g.dart
  18. 12 7
      lib/model/UserInfo.dart
  19. 11 1
      lib/model/UserInfo.g.dart
  20. 1 1
      lib/pages/loginSecond.dart
  21. 4 4
      lib/pages/setting.dart
  22. 5 1
      lib/redux/UserRedux.dart
  23. 10 0
      lib/widget/HomeDrawer.dart
  24. 1 0
      ttdj_plugin/android/build.gradle
  25. 33 13
      ttdj_plugin/android/src/main/java/com/izouma/ttdj_plugin/TtdjPlugin.java
  26. 1 0
      ttdj_plugin/ios/Classes/TtdjPlugin.h
  27. 38 10
      ttdj_plugin/ios/Classes/TtdjPlugin.m
  28. 2 1
      ttdj_plugin/ios/Classes/VipViewController.h
  29. 5 1
      ttdj_plugin/ios/Classes/VipViewController.m
  30. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/DJGameVIPSDK
  31. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/DJGameVipViewController.nib
  32. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/DJOpenVIPViewController.nib
  33. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/DJVIPPViewController.nib
  34. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/DJVipGradeCell.nib
  35. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/DJVipPayViewController.nib
  36. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/DJYEViewController.nib
  37. 114 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/AppDef.h
  38. 25 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJGameManager.h
  39. 25 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJGameVIPSDK.h
  40. 18 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJGameVipViewController.h
  41. 17 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJOpenVIPViewController.h
  42. 17 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJVIPPViewController.h
  43. 18 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJVipGradeCell.h
  44. 33 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJVipInfoModel.h
  45. 19 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJVipPayViewController.h
  46. 21 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJWeakScriptMessageDelegate.h
  47. 17 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJYEViewController.h
  48. 14 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DTBaseWebPageController.h
  49. 14 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DTMD5Utils.h
  50. 42 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DTNetworkHelper.h
  51. 17 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/ViewController.h
  52. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/Info.plist
  53. 6 0
      ttdj_plugin/ios/DJGameVIPSDK.framework/Modules/module.modulemap
  54. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/ViewController.nib
  55. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/pay_ali_icn.png
  56. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/pay_wx_icn.png
  57. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/selected_icn.png
  58. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/unselected_icn.png
  59. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/vip_bg_icn.png
  60. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/vip_diamond_icn.png
  61. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/vip_join_game_icn.png
  62. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/vip_sale_icn@3x.png
  63. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/vip_tickets_icn.png
  64. TEMPAT SAMPAH
      ttdj_plugin/ios/DJGameVIPSDK.framework/vip_title_icn.png
  65. 6 0
      ttdj_plugin/ios/ttdj_plugin.podspec
  66. 9 5
      ttdj_plugin/lib/ttdj_plugin.dart
  67. 0 4
      ttdj_plugin/test/ttdj_plugin_test.dart

+ 1 - 0
android/app/build.gradle

@@ -103,4 +103,5 @@ dependencies {
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
     implementation 'androidx.lifecycle:lifecycle-common:2.0.0'
     implementation 'androidx.annotation:annotation:1.0.2'
+    implementation 'androidx.appcompat:appcompat:1.0.2'
 }

+ 1 - 0
android/app/src/main/AndroidManifest.xml

@@ -10,6 +10,7 @@
         android:name="com.izouma.screen_stream_plugin.MyApplication"
         android:icon="@mipmap/ic_launcher"
         android:label="我要电竞"
+        android:theme="@style/AppTheme"
         android:usesCleartextTraffic="true">
         <activity
             android:name="com.yalantis.ucrop.UCropActivity"

+ 2 - 0
android/app/src/main/res/values/styles.xml

@@ -5,4 +5,6 @@
              Flutter draws its first frame -->
         <item name="android:windowBackground">@drawable/launch_background</item>
     </style>
+
+    <style name="AppTheme" parent="Theme.AppCompat.NoActionBar"></style>
 </resources>

+ 12 - 6
ios/Podfile.lock

@@ -7,7 +7,7 @@ PODS:
   - image_cropper (0.0.1):
     - Flutter
     - TOCropViewController (~> 2.4.0)
-  - JCore (2.0.0)
+  - JCore (2.0.1)
   - JPush (3.2.0):
     - JCore (< 3.0.0, >= 2.0.0)
   - jpush_flutter (0.0.2):
@@ -26,7 +26,9 @@ PODS:
   - shared_preferences (0.0.1):
     - Flutter
   - TOCropViewController (2.4.0)
-  - TXLiteAVSDK_Professional (6.3.7088)
+  - ttdj_plugin (0.0.1):
+    - Flutter
+  - TXLiteAVSDK_Professional (6.4.7328)
   - url_launcher (0.0.1):
     - Flutter
   - video_player (0.0.1):
@@ -34,7 +36,7 @@ PODS:
 
 DEPENDENCIES:
   - file_picker (from `.symlinks/plugins/file_picker/ios`)
-  - Flutter (from `.symlinks/flutter/ios-release`)
+  - Flutter (from `.symlinks/flutter/ios`)
   - flutter_picker (from `.symlinks/plugins/flutter_picker/ios`)
   - image_cropper (from `.symlinks/plugins/image_cropper/ios`)
   - jpush_flutter (from `.symlinks/plugins/jpush_flutter/ios`)
@@ -43,6 +45,7 @@ DEPENDENCIES:
   - screen (from `.symlinks/plugins/screen/ios`)
   - screen_stream_plugin (from `.symlinks/plugins/screen_stream_plugin/ios`)
   - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
+  - ttdj_plugin (from `.symlinks/plugins/ttdj_plugin/ios`)
   - TXLiteAVSDK_Professional (from `http://pod-1252463788.cosgz.myqcloud.com/liteavsdkspec/TXLiteAVSDK_Professional.podspec`)
   - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
   - video_player (from `.symlinks/plugins/video_player/ios`)
@@ -58,7 +61,7 @@ EXTERNAL SOURCES:
   file_picker:
     :path: ".symlinks/plugins/file_picker/ios"
   Flutter:
-    :path: ".symlinks/flutter/ios-release"
+    :path: ".symlinks/flutter/ios"
   flutter_picker:
     :path: ".symlinks/plugins/flutter_picker/ios"
   image_cropper:
@@ -75,6 +78,8 @@ EXTERNAL SOURCES:
     :path: ".symlinks/plugins/screen_stream_plugin/ios"
   shared_preferences:
     :path: ".symlinks/plugins/shared_preferences/ios"
+  ttdj_plugin:
+    :path: ".symlinks/plugins/ttdj_plugin/ios"
   TXLiteAVSDK_Professional:
     :podspec: http://pod-1252463788.cosgz.myqcloud.com/liteavsdkspec/TXLiteAVSDK_Professional.podspec
   url_launcher:
@@ -87,7 +92,7 @@ SPEC CHECKSUMS:
   Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
   flutter_picker: 8cd16302a9806a9789ba6e3ce85558c70c43b7f4
   image_cropper: 43c1f7f5ea92b68f43cae9340f55c84bdaad54bb
-  JCore: b962a2a1a61dc911ce5e79ba3ff21a95edaf5d23
+  JCore: 8425fb3f85f1400f9bc8ccf8121cd5694a790f3b
   JPush: 8459e7a709ad86f95884fcb49cbd57a6da24744e
   jpush_flutter: 1cc882286b5cac7a307a635fbd2a7c296730ca59
   package_info: d7c98b64f60add4c2908b9d94d82a45d3c8827ad
@@ -97,7 +102,8 @@ SPEC CHECKSUMS:
   screen_stream_plugin: 6eb868d62a7a7f7c734fcfdfe2a37896ea5857b8
   shared_preferences: 5a1d487c427ee18fcd3ea1f2a131569481834b53
   TOCropViewController: 368d8df3ea43b62c3dc5a61f11b9048274d240bd
-  TXLiteAVSDK_Professional: d723079dab26cb85e70db9a3bf673753f45625ea
+  ttdj_plugin: ed323aaa8b177a7a06e059f21f97331e9d948ff8
+  TXLiteAVSDK_Professional: 5b30ff38c244fa9fd81edb63a4430be1a8b17344
   url_launcher: 92b89c1029a0373879933c21642958c874539095
   video_player: 906796a841943c8d370ac7c13b18039aa9b56498
 

+ 13 - 1
ios/Runner.xcodeproj/project.pbxproj

@@ -9,6 +9,8 @@
 /* Begin PBXBuildFile section */
 		05FA4438F5705E88DE6B0554 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D281833404C36381285CE21 /* libPods-Runner.a */; };
 		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+		3ACAE0C22297E73A00FD5D06 /* DJGameVIPSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3ACAE0C12297E73A00FD5D06 /* DJGameVIPSDK.framework */; };
+		3ACAE0C32297E73D00FD5D06 /* DJGameVIPSDK.framework in Resources */ = {isa = PBXBuildFile; fileRef = 3ACAE0C12297E73A00FD5D06 /* DJGameVIPSDK.framework */; };
 		3AE2258D228942CF002955DA /* ReplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AE2258C228942CF002955DA /* ReplayKit.framework */; };
 		3AE22591228942CF002955DA /* SampleHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 3AE22590228942CF002955DA /* SampleHandler.m */; };
 		3AE22595228942CF002955DA /* ScreenRecorder.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 3AE2258B228942CF002955DA /* ScreenRecorder.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
@@ -68,6 +70,7 @@
 		2BB97FAFEA7F3EFD8F110150 /* libPods-ScreenRecorder.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ScreenRecorder.a"; sourceTree = BUILT_PRODUCTS_DIR; };
 		3AC8F7AF22894351003BC01E /* ScreenRecorder.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ScreenRecorder.entitlements; sourceTree = "<group>"; };
 		3AC8F7B022894363003BC01E /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
+		3ACAE0C12297E73A00FD5D06 /* DJGameVIPSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DJGameVIPSDK.framework; path = ../../ttdj_plugin/ios/DJGameVIPSDK.framework; sourceTree = "<group>"; };
 		3AE2258B228942CF002955DA /* ScreenRecorder.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ScreenRecorder.appex; sourceTree = BUILT_PRODUCTS_DIR; };
 		3AE2258C228942CF002955DA /* ReplayKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReplayKit.framework; path = System/Library/Frameworks/ReplayKit.framework; sourceTree = SDKROOT; };
 		3AE2258F228942CF002955DA /* SampleHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SampleHandler.h; sourceTree = "<group>"; };
@@ -110,6 +113,7 @@
 				9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
 				3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
 				05FA4438F5705E88DE6B0554 /* libPods-Runner.a in Frameworks */,
+				3ACAE0C22297E73A00FD5D06 /* DJGameVIPSDK.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -174,6 +178,7 @@
 		97C146F01CF9000F007C117D /* Runner */ = {
 			isa = PBXGroup;
 			children = (
+				3ACAE0C12297E73A00FD5D06 /* DJGameVIPSDK.framework */,
 				3AC8F7B022894363003BC01E /* Runner.entitlements */,
 				7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
 				7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
@@ -315,6 +320,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				3ACAE0C32297E73D00FD5D06 /* DJGameVIPSDK.framework in Resources */,
 				97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
 				3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
 				9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
@@ -349,7 +355,7 @@
 			);
 			inputPaths = (
 				"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
-				"${PODS_ROOT}/../.symlinks/flutter/ios-release/Flutter.framework",
+				"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
 			);
 			name = "[CP] Embed Pods Frameworks";
 			outputFileListPaths = (
@@ -554,6 +560,8 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
+					"$(USER_LIBRARY_DIR)/Containers/com.tencent.xinWeChat/Data/Library/Application\\ Support/com.tencent.xinWeChat/2.0b4.0.9/46735cf95ae82a51b54cdda23e1d250a/Message/MessageTemp/939268cafa0d80b9b5432e99e2f72cb5/File/VIPSDK_iOS",
+					"$(PROJECT_DIR)",
 				);
 				INFOPLIST_FILE = Runner/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -767,6 +775,8 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
+					"$(USER_LIBRARY_DIR)/Containers/com.tencent.xinWeChat/Data/Library/Application\\ Support/com.tencent.xinWeChat/2.0b4.0.9/46735cf95ae82a51b54cdda23e1d250a/Message/MessageTemp/939268cafa0d80b9b5432e99e2f72cb5/File/VIPSDK_iOS",
+					"$(PROJECT_DIR)",
 				);
 				INFOPLIST_FILE = Runner/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -793,6 +803,8 @@
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
+					"$(USER_LIBRARY_DIR)/Containers/com.tencent.xinWeChat/Data/Library/Application\\ Support/com.tencent.xinWeChat/2.0b4.0.9/46735cf95ae82a51b54cdda23e1d250a/Message/MessageTemp/939268cafa0d80b9b5432e99e2f72cb5/File/VIPSDK_iOS",
+					"$(PROJECT_DIR)",
 				);
 				INFOPLIST_FILE = Runner/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

+ 9 - 5
ios/Runner/Base.lproj/Main.storyboard

@@ -1,8 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
+    <device id="retina6_1" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
         <!--Flutter View Controller-->
@@ -14,9 +18,9 @@
                         <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
-                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                     </view>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>

+ 18 - 0
ios/Runner/Info.plist

@@ -25,6 +25,8 @@
 	<key>LSApplicationQueriesSchemes</key>
 	<array>
 		<string>pubgmhd1106467070</string>
+        <string>weixin</string>
+        <string>alipay</string>
 	</array>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
@@ -49,5 +51,21 @@
 	</array>
 	<key>UIViewControllerBasedStatusBarAppearance</key>
 	<false/>
+    <key>NSAppTransportSecurity</key>
+    <dict>
+        <key>NSAllowsArbitraryLoads</key>
+        <true/>
+    </dict>
+    <key>CFBundleURLTypes</key>
+    <array>
+        <dict>
+            <key>CFBundleTypeRole</key>
+            <string>Editor</string>
+            <key>CFBundleURLSchemes</key>
+            <array>
+                <string>wjt.cmel365.com</string>
+            </array>
+        </dict>
+    </array>
 </dict>
 </plist>

+ 1 - 1
ios/ScreenRecorder/SampleHandler.m

@@ -8,7 +8,7 @@
 
 
 #import "SampleHandler.h"
-#import <TXLiteAVSDK.h>
+#import <TXLiteAVSDK_Professional/TXLiteAVSDK.h>
 #import <UserNotifications/UserNotifications.h>
 
 static TXLivePush *s_txLivePublisher;

+ 3 - 6
lib/model/BindGameInfo.g.dart

@@ -12,14 +12,11 @@ BindGameInfo _$BindGameInfoFromJson(Map<String, dynamic> json) {
       json['gameId'] as int,
       json['userId'] as int,
       json['nickName'] as String,
-      GameInfo.fromJson(json['gameInfo'] as Map));
+      json['gameInfo'] == null
+          ? null
+          : GameInfo.fromJson(json['gameInfo'] as Map<String, dynamic>));
 }
 
-// int id;
-// int gameId;//游戏ID
-// int userId;//用户ID
-// String nickName;//用户昵称
-//  GameInfo gameInfo;//游戏信息
 Map<String, dynamic> _$BindGameInfoToJson(BindGameInfo instance) =>
     <String, dynamic>{
       'id': instance.id,

+ 4 - 12
lib/model/CompetitionSeason.g.dart

@@ -16,19 +16,11 @@ CompetitionSeason _$CompetitionSeasonFromJson(Map<String, dynamic> json) {
       json['bonus'] as int,
       json['statusFlag'] as int,
       json['gameId'] as int,
-
-      json['gameInfo']!=null?GameInfo.fromJson(json['gameInfo']):GameInfo.empty()
-      );
+      json['gameInfo'] == null
+          ? null
+          : GameInfo.fromJson(json['gameInfo'] as Map<String, dynamic>));
 }
 
-//  int id;
-//   String season;//名称
-//   String shortName;//简称
-//   int beginTime;//开始时间
-//   int endTime;//结束时间
-//   int bonus;//奖金数
-//   int statusFlag;//状态
-//   int gameId; //游戏ID
 Map<String, dynamic> _$CompetitionSeasonToJson(CompetitionSeason instance) =>
     <String, dynamic>{
       'id': instance.id,
@@ -39,5 +31,5 @@ Map<String, dynamic> _$CompetitionSeasonToJson(CompetitionSeason instance) =>
       'bonus': instance.bonus,
       'statusFlag': instance.statusFlag,
       'gameId': instance.gameId,
-      'gameInfo':instance.gameInfo
+      'gameInfo': instance.gameInfo
     };

+ 0 - 6
lib/model/GameInfo.g.dart

@@ -16,12 +16,6 @@ GameInfo _$GameInfoFromJson(Map<String, dynamic> json) {
       json['profile'] as String);
 }
 
-//  int id;
-//   String gameName;//名称
-//   String icon;//图标
-//   int typeFlag;//类型
-// String shortName;//简称
-// String profile;//简介
 Map<String, dynamic> _$GameInfoToJson(GameInfo instance) => <String, dynamic>{
       'id': instance.id,
       'gameName': instance.gameName,

+ 4 - 7
lib/model/GameInfoSeasons.g.dart

@@ -11,15 +11,12 @@ GameInfoSeasons _$GameInfoSeasonsFromJson(Map<String, dynamic> json) {
       json['id'] as int,
       json['gameName'] as String,
       json['typeFlag'] as int,
-      json['competitionSeason'] != null
-          ? CompetitionSeason.fromJson(json['competitionSeason'])
-          : CompetitionSeason.empty());
+      json['competitionSeason'] == null
+          ? null
+          : CompetitionSeason.fromJson(
+              json['competitionSeason'] as Map<String, dynamic>));
 }
 
-// int id;
-// String gameName; //名称
-// int typeFlag; //类型
-// CompetitionSeason competitionSeason;
 Map<String, dynamic> _$GameInfoSeasonsToJson(GameInfoSeasons instance) =>
     <String, dynamic>{
       'id': instance.id,

+ 10 - 24
lib/model/HouseInfo.g.dart

@@ -15,39 +15,25 @@ HouseInfo _$HouseInfoFromJson(Map<String, dynamic> json) {
       json['houseName'] as String,
       json['houseAbstract'] as String,
       json['video'] as String,
-      json['gameInfo'] != null ? GameInfo.fromJson(json['gameInfo']) : null,
+      json['gameInfo'] == null
+          ? null
+          : GameInfo.fromJson(json['gameInfo'] as Map<String, dynamic>),
       json['playerNumber'] as int,
       json['maxNumber'] as int,
       json['bonus'] as int,
       json['houseType'] as int,
-      json['houseLevelInfo'] != null
-          ? HouseLevel.fromJson(json['houseLevelInfo'])
-          : null,
+      json['houseLevel'] == null
+          ? null
+          : HouseLevel.fromJson(json['houseLevel'] as Map<String, dynamic>),
       json['gameHouseId'] as String,
       json['gameHousePassword'] as String,
       json['statusFlag'] as int,
       json['createUser'] as String,
       json['beginTime'] as int,
       json['createTime'] as int,
-      json['scoreType'] as int );
+      json['scoreType'] as int);
 }
 
-//  int id;
-//   int gameId; //游戏ID
-//   int userId; //用户ID
-//   int seasonId; //赛季ID
-//   String houseName; //房间名称
-//   String houseAbstract; //房间描述
-//   String video; //视频
-//   GameInfo gameInfo; //游戏信息
-// int playerNumber;//加入人数
-//   int maxNumber; //最大加入人数
-//   int bonus; //奖金
-//   int houseType; //0为个人1为官方
-//   HouseLevel houseLevel;
-//   String gameHouseId; //游戏房间号
-//   String gameHousePassword; //游戏密码
-//   int statusFlag; //状态
 Map<String, dynamic> _$HouseInfoToJson(HouseInfo instance) => <String, dynamic>{
       'id': instance.id,
       'gameId': instance.gameId,
@@ -66,7 +52,7 @@ Map<String, dynamic> _$HouseInfoToJson(HouseInfo instance) => <String, dynamic>{
       'gameHousePassword': instance.gameHousePassword,
       'statusFlag': instance.statusFlag,
       'createUser': instance.createUser,
-      'beginTime':instance.beginTime,
-      'createTime':instance.createTime,
-      'scoreType':instance.scoreType
+      'beginTime': instance.beginTime,
+      'createTime': instance.createTime,
+      'scoreType': instance.scoreType
     };

+ 0 - 6
lib/model/HouseLevel.g.dart

@@ -20,12 +20,6 @@ HouseLevel _$HouseLevelFromJson(Map<String, dynamic> json) {
       json['avgRatio'] as num);
 }
 
-// String levelName;//名称
-// String icon;//图标
-// int entryCoin;//加入金额
-// num feeRatio;//服务费
-// num poolRatio;//奖金池
-// num avgRatio;//平均分比例
 Map<String, dynamic> _$HouseLevelToJson(HouseLevel instance) =>
     <String, dynamic>{
       'id': instance.id,

+ 13 - 12
lib/model/PlayerInfo.g.dart

@@ -12,20 +12,21 @@ PlayerInfo _$PlayerInfoFromJson(Map<String, dynamic> json) {
       json['houseId'] as int,
       json['userId'] as int,
       json['statusFlag'] as int,
-      json['userInfo'] != null ? UserInfo.fromJson(json['userInfo']) : null,
+      json['userInfo'] == null
+          ? null
+          : UserInfo.fromJson(json['userInfo'] as Map<String, dynamic>),
       json['bonus'] as int,
-      json['gameInfo'] != null ? GameInfo.fromJson(json['gameInfo']) : null,
-      json['houseInfo'] != null ? HouseInfo.fromJson(json['houseInfo']) : null,
-      json['rank'] ?? null,
-      json['houseRank'] ?? null,
-      json['video']??'');
+      json['gameInfo'] == null
+          ? null
+          : GameInfo.fromJson(json['gameInfo'] as Map<String, dynamic>),
+      json['houseInfo'] == null
+          ? null
+          : HouseInfo.fromJson(json['houseInfo'] as Map<String, dynamic>),
+      json['rank'] as int,
+      json['houseRank'] as int,
+      json['video'] as String);
 }
 
-//  int id;
-//   int houseId;//房间id
-//   int userId;//用户id
-//   int statusFlag;//状态 0加入 1准备 2开始 3结束 6未比赛
-//   UserInfo userInfo;
 Map<String, dynamic> _$PlayerInfoToJson(PlayerInfo instance) =>
     <String, dynamic>{
       'id': instance.id,
@@ -38,5 +39,5 @@ Map<String, dynamic> _$PlayerInfoToJson(PlayerInfo instance) =>
       'houseInfo': instance.houseInfo,
       'rank': instance.rank,
       'houseRank': instance.houseRank,
-      'video':instance.video
+      'video': instance.video
     };

+ 4 - 10
lib/model/ProductInfo.g.dart

@@ -7,18 +7,12 @@ part of 'ProductInfo.dart';
 // **************************************************************************
 
 ProductInfo _$ProductInfoFromJson(Map<String, dynamic> json) {
-  return ProductInfo(
-      json['id'] as int,
-      json['productName'] as String,
-      json['money'] as int,
-      json['typeFlag'] as int);
+  return ProductInfo(json['id'] as int, json['productName'] as String,
+      json['money'] as int, json['typeFlag'] as int);
 }
 
-//  int id;
-//  String productName;//名称
-//   int money;//钱
-//   int typeFlag;//类型
-Map<String, dynamic> _$ProductInfoToJson(ProductInfo instance) => <String, dynamic>{
+Map<String, dynamic> _$ProductInfoToJson(ProductInfo instance) =>
+    <String, dynamic>{
       'id': instance.id,
       'productName': instance.productName,
       'money': instance.money,

+ 20 - 26
lib/model/SystemNotice.g.dart

@@ -19,39 +19,33 @@ SystemNotice _$SystemNoticeFromJson(Map<String, dynamic> json) {
       json['statusFlag'] as int,
       json['createTime'] as int,
       json['playerId'] as int,
-      json['gameInfo'] != null ? GameInfo.fromJson(json['gameInfo']) : null,
-      json['houseInfo'] != null ? HouseInfo.fromJson(json['houseInfo']) : null,
-      json['playerInfo']!=null?PlayerInfo.fromJson(json['playerInfo']):null,
-      json['bonus']??0);
+      json['gameInfo'] == null
+          ? null
+          : GameInfo.fromJson(json['gameInfo'] as Map<String, dynamic>),
+      json['houseInfo'] == null
+          ? null
+          : HouseInfo.fromJson(json['houseInfo'] as Map<String, dynamic>),
+      json['playerInfo'] == null
+          ? null
+          : PlayerInfo.fromJson(json['playerInfo'] as Map<String, dynamic>),
+      json['bonus'] as int);
 }
 
-// int id;
-//   int gameId;//游戏ID
-//   int houseId;//房间ID
-//   int userId;//用户ID
-//   int seasonId;//赛季ID
-//   String content;//内容
-//   String icon;//图标
-//   in typeFlag;//0.普通1.比赛结果2.领取奖励
-//   int statusFlag;//状态 0.未读1.已读
-//   int createTime;//创建时间
-// GameInfo gameInfo;//游戏信息
-// HouseInfo houseInfo;//房间信息
 Map<String, dynamic> _$SystemNoticeToJson(SystemNotice instance) =>
     <String, dynamic>{
       'id': instance.id,
-      'gameId': instance.gameId != null ? instance.gameId : 0,
-      'houseId': instance.houseId != null ? instance.houseId : 0,
+      'gameId': instance.gameId,
+      'houseId': instance.houseId,
       'userId': instance.userId,
-      'seasonId': instance.seasonId != null ? instance.seasonId : 0,
-      'icon': instance.icon != null ? instance.icon : '',
-      'typeFlag': instance.typeFlag,
+      'seasonId': instance.seasonId,
       'content': instance.content,
+      'icon': instance.icon,
+      'typeFlag': instance.typeFlag,
       'statusFlag': instance.statusFlag,
       'createTime': instance.createTime,
-      'playerId': instance.playerId != null ? instance.playerId : 0,
-      'gameInfo': instance.gameInfo != null ? instance.gameInfo : {},
-      'HouseInfo': instance.houseInfo != null ? instance.houseInfo : {},
-      'playerInfo':instance.playerInfo,
-      'bonus':instance.bonus
+      'playerId': instance.playerId,
+      'gameInfo': instance.gameInfo,
+      'houseInfo': instance.houseInfo,
+      'playerInfo': instance.playerInfo,
+      'bonus': instance.bonus
     };

+ 12 - 7
lib/model/UserInfo.dart

@@ -4,8 +4,8 @@ part 'UserInfo.g.dart';
 
 @JsonSerializable()
 class UserInfo {
-  UserInfo(this.id, this.nickname, this.username, this.icon, this.phone,
-      this.sex, this.moneyCoin, this.moneyPoint,this.birthday,this.noticeFlag,this.remindFlag,this.createFlag);
+  UserInfo(this.id, this.nickname, this.username, this.icon, this.phone, this.sex, this.moneyCoin, this.moneyPoint, this.birthday, this.noticeFlag,
+      this.remindFlag, this.createFlag, this.ttdjId, this.isVip, this.startDate, this.expierDate);
   int id;
   String nickname;
   String username;
@@ -15,11 +15,16 @@ class UserInfo {
   int moneyCoin; //余额
   double moneyPoint; //积分
   int birthday;
-  bool noticeFlag;//是否通知
-   bool remindFlag;//是否通知
-   bool createFlag;//创建房间权限
-  factory UserInfo.fromJson(Map<String, dynamic> json) =>
-      _$UserInfoFromJson(json);
+  bool noticeFlag; //是否通知
+  bool remindFlag; //是否通知
+  bool createFlag; //创建房间权限
+  String ttdjId;
+  String token;
+  int isVip;
+  String startDate;
+  String expierDate;
+
+  factory UserInfo.fromJson(Map<String, dynamic> json) => _$UserInfoFromJson(json);
 
   Map<String, dynamic> toJson() => _$UserInfoToJson(this);
 

+ 11 - 1
lib/model/UserInfo.g.dart

@@ -19,7 +19,12 @@ UserInfo _$UserInfoFromJson(Map<String, dynamic> json) {
       json['birthday'] as int,
       json['noticeFlag'] == 'Y',
       json['remindFlag'] == 'Y',
-      json['createFlag'] == 'Y');
+      json['createFlag'] == 'Y',
+      json['ttdjId'] as String,
+      json['isVip'] as int,
+      json['startDate'] as String,
+      json['expierDate'] as String)
+    ..token = json['token'] as String;
 }
 
 Map<String, dynamic> _$UserInfoToJson(UserInfo instance) => <String, dynamic>{
@@ -35,4 +40,9 @@ Map<String, dynamic> _$UserInfoToJson(UserInfo instance) => <String, dynamic>{
       'noticeFlag': instance.noticeFlag,
       'remindFlag': instance.remindFlag,
       'createFlag': instance.createFlag,
+      'ttdjId': instance.ttdjId,
+      'token': instance.token,
+      'isVip': instance.isVip,
+      'startDate': instance.startDate,
+      'expierDate': instance.expierDate
     };

+ 1 - 1
lib/pages/loginSecond.dart

@@ -2,6 +2,7 @@ import 'dart:async';
 import 'package:flutter/material.dart';
 import 'package:shared_preferences/shared_preferences.dart';
 import 'package:flutter/cupertino.dart';
+import 'package:ttdj_plugin/ttdj_plugin.dart';
 import '../styles/colors.dart';
 import 'dart:ui';
 import '../styles/totast.dart';
@@ -138,7 +139,6 @@ class LoginSecondState extends State<LoginSecond> {
                                       await prefs.setString('token', res.token);
                                       HttpManager.token = res.token;
                                       StoreProvider.of<AppState>(context).dispatch(UpdateUserAction(UserInfo.fromJson(res.data)));
-
                                       Toast.show(context, '登录成功', 1500, 'success');
                                       Navigator.pushReplacement(
                                         context,

+ 4 - 4
lib/pages/setting.dart

@@ -68,7 +68,7 @@ class SettingState extends State<Setting> {
                           physics: AlwaysScrollableScrollPhysics(),
                           child: Column(
                             children: <Widget>[
-                             _sectionDivier(),
+                              _sectionDivier(),
                               _section([
                                 _cell(
                                     '是否接收消息',
@@ -78,7 +78,7 @@ class SettingState extends State<Setting> {
                                           updateUserInfo(userInfo, val ? 'Y' : 'N', 'noticeFlag');
                                         }),
                                     showBorder: false),
-                                    _cell(
+                                _cell(
                                     '是否查看房间提醒',
                                     Switch(
                                         value: userInfo.remindFlag,
@@ -89,7 +89,7 @@ class SettingState extends State<Setting> {
                               ]),
                               _sectionDivier(),
                               _section([
-                                _cell('检查更新', ' ',onTap: (){
+                                _cell('检查更新', ' ', onTap: () {
                                   MyDialog.showDialog(context, '您已是最新版本。');
                                 }),
                                 _cell('版本号', version, showBorder: false),
@@ -156,7 +156,7 @@ class SettingState extends State<Setting> {
     } else {}
   }
 
-    Future<void> _chooseSex(BuildContext context) async {
+  Future<void> _chooseSex(BuildContext context) async {
     String sex = await showCupertinoModalPopup(
         context: context,
         builder: (BuildContext context) {

+ 5 - 1
lib/redux/UserRedux.dart

@@ -19,7 +19,11 @@ UserInfo _updateLoaded(UserInfo userInfo, action) {
   final JPush jpush = JPush();
   if (action.userInfo != null) {
     if (userInfo == null || (userInfo.id != action.userInfo.id)) {
-      jpush.setAlias(action.userInfo.id.toString()).then((map) {});
+      try {
+        jpush.setAlias(action.userInfo.id.toString()).then((map) {}).catchError((error) => {});
+      } catch (e) {
+        print(e.toString());
+      }
     }
   } else {
     jpush.deleteAlias();

+ 10 - 0
lib/widget/HomeDrawer.dart

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
 import 'package:redux/redux.dart';
 import 'package:flutter_redux/flutter_redux.dart';
 import 'package:flutter/cupertino.dart';
+import 'package:ttdj_plugin/ttdj_plugin.dart';
 import '../redux/AppState.dart';
 import '../model/UserInfo.dart';
 import '../pages/MyWallet.dart';
@@ -124,6 +125,15 @@ class HomeDrawerState extends State<HomeDrawer> {
                           Navigator.push(context, CupertinoPageRoute(builder: (context) => BindGame()));
                         },
                       ),
+                      Divder(),
+                      DrawerMenu(
+                        'images/icon_bangding.png',
+                        'VIP会员',
+                        onTap: () {
+                          TtdjPlugin.init(userInfo.ttdjId, userInfo.token);
+                          TtdjPlugin.gotoVipPage();
+                        },
+                      ),
                       // Divder(),
                       // DrawerMenu('images/home_icon_shezhi.png', '个人设置',onTap: (){
                       //    Navigator.push(context, CupertinoPageRoute(builder: (context) => Setting()));

+ 1 - 0
ttdj_plugin/android/build.gradle

@@ -38,4 +38,5 @@ android {
 
 dependencies {
     implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
+    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
 }

+ 33 - 13
ttdj_plugin/android/src/main/java/com/izouma/ttdj_plugin/TtdjPlugin.java

@@ -1,25 +1,45 @@
 package com.izouma.ttdj_plugin;
 
+import com.ttdj.clubcard.TTDJClubCard;
+
+import java.util.Objects;
+
 import io.flutter.plugin.common.MethodCall;
 import io.flutter.plugin.common.MethodChannel;
 import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
 import io.flutter.plugin.common.MethodChannel.Result;
 import io.flutter.plugin.common.PluginRegistry.Registrar;
 
-/** TtdjPlugin */
+/**
+ * TtdjPlugin
+ */
 public class TtdjPlugin implements MethodCallHandler {
-  /** Plugin registration. */
-  public static void registerWith(Registrar registrar) {
-    final MethodChannel channel = new MethodChannel(registrar.messenger(), "ttdj_plugin");
-    channel.setMethodCallHandler(new TtdjPlugin());
-  }
+    private Registrar registrar;
+
+    public TtdjPlugin(Registrar registrar) {
+        this.registrar = registrar;
+    }
+
+    /**
+     * Plugin registration.
+     */
+    public static void registerWith(Registrar registrar) {
+        final MethodChannel channel = new MethodChannel(registrar.messenger(), "ttdj_plugin");
+        channel.setMethodCallHandler(new TtdjPlugin(registrar));
+    }
 
-  @Override
-  public void onMethodCall(MethodCall call, Result result) {
-    if (call.method.equals("getPlatformVersion")) {
-      result.success("Android " + android.os.Build.VERSION.RELEASE);
-    } else {
-      result.notImplemented();
+    @Override
+    public void onMethodCall(MethodCall call, Result result) {
+        if (call.method.endsWith("init")) {
+            String userId = call.argument("userId");
+            String token = call.argument("token");
+            TTDJClubCard.getInstance().init(registrar.activity().getApplication(), "1557281556ibPS1wFSicpPkbem8eW1", "ecO8lX8W8bQp8vQ9HVhE93t2", userId, token);
+            result.success("success");
+        } else if (call.method.equals("gotoVipPage")) {
+            TTDJClubCard.getInstance().gotoClubCard(registrar.activity());
+            result.success("success");
+        } else {
+            result.notImplemented();
+        }
     }
-  }
 }

+ 1 - 0
ttdj_plugin/ios/Classes/TtdjPlugin.h

@@ -1,4 +1,5 @@
 #import <Flutter/Flutter.h>
 
 @interface TtdjPlugin : NSObject<FlutterPlugin>
++ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar;
 @end

+ 38 - 10
ttdj_plugin/ios/Classes/TtdjPlugin.m

@@ -1,20 +1,48 @@
 #import "TtdjPlugin.h"
+#import <DJGameVIPSDK/DJGameVIPSDK.h>
+#import "VipViewController.h"
+
+@interface TtdjPlugin() <FlutterPlugin>
+@property (nonatomic) UIViewController *viewController;
+@end
 
 @implementation TtdjPlugin
 + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
-  FlutterMethodChannel* channel = [FlutterMethodChannel
-      methodChannelWithName:@"ttdj_plugin"
-            binaryMessenger:[registrar messenger]];
-  TtdjPlugin* instance = [[TtdjPlugin alloc] init];
-  [registrar addMethodCallDelegate:instance channel:channel];
+    UIViewController *viewController = [UIApplication sharedApplication].delegate.window.rootViewController;
+    FlutterMethodChannel* channel = [FlutterMethodChannel
+                                     methodChannelWithName:@"ttdj_plugin"
+                                     binaryMessenger:[registrar messenger]];
+    TtdjPlugin* instance = [[TtdjPlugin alloc] initWithViewController:viewController];
+    [registrar addMethodCallDelegate:instance channel:channel];
+}
+
+- (instancetype)initWithViewController:(UIViewController *)viewController {
+    self = [super init];
+    if(self) {
+        self.viewController = viewController;
+    }
+    return self;
 }
 
 - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
-  if ([@"getPlatformVersion" isEqualToString:call.method]) {
-    result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
-  } else {
-    result(FlutterMethodNotImplemented);
-  }
+    if ([@"init" isEqualToString:call.method]) {
+        NSString *userId = call.arguments[@"userId"];
+        NSString *token = call.arguments[@"token"];
+        [[DJGameManager defaultManager] configWithAppKey:@"1557281556ibPS1wFSicpPkbem8eW1" secret:@"ecO8lX8W8bQp8vQ9HVhE93t2"];
+        [[DJGameManager defaultManager] configUserId:userId token:token];
+        result(@"success");
+    } else if ([@"gotoVipPage" isEqualToString:call.method]) {
+        NSBundle *bundle = [NSBundle bundleForClass:[self class]];
+        NSString *path = [bundle pathForResource:@"DJGameVIPSDK" ofType:@"framework"];
+        NSBundle *SDKBundle = [NSBundle bundleWithPath:path];
+        VipViewController *vc = [[VipViewController alloc] initWithNibName:@"DJGameVipViewController" bundle:SDKBundle];
+        UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
+        [self.viewController presentViewController:nvc animated:YES completion:nil];
+    }
+}
+
+- (void)close {
+    
 }
 
 @end

+ 2 - 1
ttdj_plugin/ios/Classes/VipViewController.h

@@ -6,10 +6,11 @@
 //
 
 #import <UIKit/UIKit.h>
+#import <DJGameVIPSDK/DJGameVIPSDK.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
-@interface VipViewController : UIViewController
+@interface VipViewController : DJGameVipViewController
 
 @end
 

+ 5 - 1
ttdj_plugin/ios/Classes/VipViewController.m

@@ -15,9 +15,13 @@
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    // Do any additional setup after loading the view.
+    self.navigationController.navigationBar.translucent = NO;
+    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"关闭" style:UIBarButtonItemStylePlain target:self action:@selector(close)];
 }
 
+- (void)close {
+    [self.navigationController dismissViewControllerAnimated:YES completion:nil];
+}
 /*
 #pragma mark - Navigation
 

TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/DJGameVIPSDK


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/DJGameVipViewController.nib


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/DJOpenVIPViewController.nib


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/DJVIPPViewController.nib


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/DJVipGradeCell.nib


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/DJVipPayViewController.nib


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/DJYEViewController.nib


+ 114 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/AppDef.h

@@ -0,0 +1,114 @@
+//
+//  AppDef.h
+//  Zhuawawa
+//
+//  Created by 曹福涛 on 2017/11/29.
+//  Copyright © 2017年 kennethmiao. All rights reserved.
+//
+
+#ifndef AppDef_h
+#define AppDef_h
+#import <UIKit/UIKit.h>
+#import <AdSupport/AdSupport.h>
+
+
+
+#define PageSize                20         //接口分页pagesize
+#define REQUEST_FAIL            @"请求失败"
+#define BASE_API                    @"http://test.ttdj.ttdianjing.com"
+#define VIP_API_WITH(var)           [BASE_API stringByAppendingString:var]
+#define QUERY_USER_VIP              VIP_API_WITH(@"/user/queryUserVip")
+#define VIP_GRADE_LIST              VIP_API_WITH(@"/user/vipList")
+
+#pragma mark - 尺寸
+#define kScreen_width   [UIScreen mainScreen].bounds.size.width
+#define kScreen_height  [UIScreen mainScreen].bounds.size.height
+#define NAVBAR_HEIGHT   44
+#define CELL_HEIGHT     49
+
+#define TABBAR_HEIGHT               (IS_IPHONEX ? 83:49)
+#define STATUSBAR_HEIGHT            [[UIApplication sharedApplication] statusBarFrame].size.height
+#define NAV_HEIGHT                  (NAVBAR_HEIGHT+STATUSBAR_HEIGHT)
+
+
+#define H_10 10.f
+#define H_15 15.f
+#define H_20 20.f
+#define H_25 25.f
+#define H_30 30.f
+#define H_40 40.f
+
+#pragma mark - 设备
+#define IS_IPHONE4 (([[UIScreen mainScreen] bounds].size.height-480)?NO:YES)
+
+#define IS_IPHONE5 (([[UIScreen mainScreen] bounds].size.height-568)?NO:YES)
+
+#define IS_IPHONE6 (([[UIScreen mainScreen] bounds].size.height-667)?NO:YES)
+
+#define IS_IPHONE6P (([[UIScreen mainScreen] bounds].size.height-736)?NO:YES)
+
+#define IS_IPHONEX ([UIScreen mainScreen].bounds.size.height == 812 || [UIScreen mainScreen].bounds.size.height == 896)
+
+//#define IS_IPHONEX \
+//({BOOL isPhoneX = NO;\
+//if (@available(iOS 11.0, *)) {\
+//isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\
+//}\
+//(isPhoneX);})
+
+#define SAFEAREA_BOTTOMHEIGHT       (IS_IPHONEX?34.f:0.f)
+
+#pragma mark - 字体
+
+
+#define FONT_10 [UIFont systemFontOfSize:10]
+#define FONT_11 [UIFont systemFontOfSize:11]
+#define FONT_12 [UIFont systemFontOfSize:12]
+#define FONT_13 [UIFont systemFontOfSize:13]
+#define FONT_14 [UIFont systemFontOfSize:14]
+#define FONT_15 [UIFont systemFontOfSize:15]
+#define FONT_16 [UIFont systemFontOfSize:16]
+#define FONT_17 [UIFont systemFontOfSize:17]
+#define FONT_18 [UIFont systemFontOfSize:18]
+#define FONT_20 [UIFont systemFontOfSize:20]
+#define FONT_21 [UIFont systemFontOfSize:21]
+#define FONT_22 [UIFont systemFontOfSize:22]
+#define FONT_24 [UIFont systemFontOfSize:24]
+#define FONT_40 [UIFont systemFontOfSize:40]
+
+#pragma mark - 颜色
+#define RGBACOLOR(r, g, b, a) [UIColor colorWithRed : (r) / 255.0f green : (g) / 255.0f blue : (b) / 255.0f alpha : (a)]
+#define COLOR_D1A956    HexColor(@"D1A956")
+#define COLOR_8F8F8F    HexColor(@"8F8F8F")
+#define COLOR_FEE1B3    HexColor(@"FEE1B3")
+#define COLOR_1A1A1A    HexColor(@"1A1A1A")
+#define COLOR_E6        HexColor(@"E6E6E6")
+#define COLOR_3EC6FF    HexColor(@"3EC6FF")
+#define COLOR_167DE7    HexColor(@"167DE7")
+#define COLOR_DEDEDE    HexColor(@"DEDEDE")
+#define COLOR_F5F5F5    HexColor(@"F5F5F5")
+#define COLOR_212121    HexColor(@"212121")
+
+
+NS_INLINE UIColor* HexColor(NSString *inColorString) {
+    UIColor *result = nil;
+    unsigned int colorCode = 0;
+    unsigned char redByte, greenByte, blueByte;
+    
+    if (nil != inColorString) {
+        NSScanner *scanner = [NSScanner scannerWithString:inColorString];
+        (void)[scanner scanHexInt:&colorCode];  // ignore error
+    }
+    redByte = (unsigned char)(colorCode >> 16);
+    greenByte = (unsigned char)(colorCode >> 8);
+    blueByte = (unsigned char)(colorCode);  // masks off high bits
+    result = [UIColor
+              colorWithRed:(float)redByte / 0xff
+              green:(float)greenByte / 0xff
+              blue:(float)blueByte / 0xff
+              alpha:1.0];
+    return result;
+}
+
+
+#endif /* AppDef_h */

+ 25 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJGameManager.h

@@ -0,0 +1,25 @@
+//
+//  DJGameManager.h
+//  DJGameVIPSDK
+//
+//  Created by 曹福涛 on 2019/5/14.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DJGameManager : NSObject
+@property (nonatomic, copy, readonly) NSString *appKey;
+@property (nonatomic, copy, readonly) NSString *secret;
+@property (nonatomic, copy, readonly) NSString *token;
+@property (nonatomic, copy, readonly) NSString *userId;
+
++ (instancetype)defaultManager;
+- (void)configWithAppKey:(NSString *)appKey secret:(NSString *)secret;
+- (void)configUserId:(NSString *)userId token:(NSString *)token;
+//- (void)configToken:(NSString *)token;
+@end
+
+NS_ASSUME_NONNULL_END

+ 25 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJGameVIPSDK.h

@@ -0,0 +1,25 @@
+//
+//  DJGameVIPSDK.h
+//  DJGameVIPSDK
+//
+//  Created by 曹福涛 on 2019/5/9.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+//! Project version number for DJGameVIPSDK.
+FOUNDATION_EXPORT double DJGameVIPSDKVersionNumber;
+
+//! Project version string for DJGameVIPSDK.
+FOUNDATION_EXPORT const unsigned char DJGameVIPSDKVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import <DJGameVIPSDK/PublicHeader.h>
+
+#import "DJGameManager.h"
+
+#import "DJYEViewController.h"
+#import "DJGameVipViewController.h"
+#import "DJVipPayViewController.h"
+
+#import "DJVipGradeCell.h"

+ 18 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJGameVipViewController.h

@@ -0,0 +1,18 @@
+//
+//  DJGameVipViewController.h
+//  DailyESports
+//
+//  Created by 曹福涛 on 2019/5/10.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DJGameVipViewController : UIViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 17 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJOpenVIPViewController.h

@@ -0,0 +1,17 @@
+//
+//  DJOpenVIPViewController.h
+//  DJGameVIPSDK
+//
+//  Created by 曹福涛 on 2019/5/9.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DJOpenVIPViewController : UIViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 17 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJVIPPViewController.h

@@ -0,0 +1,17 @@
+//
+//  DJVIPPViewController.h
+//  DJGameVIPSDK
+//
+//  Created by 曹福涛 on 2019/5/9.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DJVIPPViewController : UIViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 18 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJVipGradeCell.h

@@ -0,0 +1,18 @@
+//
+//  DJVipGradeCell.h
+//  DailyESports
+//
+//  Created by 曹福涛 on 2019/5/10.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "DJVipInfoModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DJVipGradeCell : UITableViewCell
+- (void)configCellWith:(DJVipGradeModel *)model;
+@end
+
+NS_ASSUME_NONNULL_END

+ 33 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJVipInfoModel.h

@@ -0,0 +1,33 @@
+//
+//  DJVipInfoModel.h
+//  DailyESports
+//
+//  Created by 曹福涛 on 2019/5/13.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DJVipInfoModel : NSObject
+@property (nonatomic, copy) NSString *userId;
+@property (nonatomic, copy) NSString *startDate;
+@property (nonatomic, copy) NSString *expireDate;
+@property (nonatomic, assign) BOOL isVip;
+@property (nonatomic, assign) BOOL isClose;
++ (instancetype)vipInfoModel:(NSDictionary *)dict;
+- (instancetype)initWithDict:(NSDictionary *)dict;
+@end
+
+@interface DJVipGradeModel : NSObject
+@property (nonatomic, copy) NSString *name;
+@property (nonatomic, assign) NSInteger days;
+@property (nonatomic, assign) NSInteger orderPrice;
+@property (nonatomic, assign) NSInteger orderType;
+@property (nonatomic, assign) BOOL isSelected;
++ (instancetype)vipGradeModel:(NSDictionary *)dict;
+- (instancetype)initWithDict:(NSDictionary *)dict;
+@end
+
+NS_ASSUME_NONNULL_END

+ 19 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJVipPayViewController.h

@@ -0,0 +1,19 @@
+//
+//  DJVipPayViewController.h
+//  DailyESports
+//
+//  Created by 曹福涛 on 2019/5/13.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "DJVipInfoModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DJVipPayViewController : UIViewController
+//@property (nonatomic, assign) NSInteger orderType;
+@property (nonatomic, strong) DJVipGradeModel *gradeModel;
+@end
+
+NS_ASSUME_NONNULL_END

+ 21 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJWeakScriptMessageDelegate.h

@@ -0,0 +1,21 @@
+//
+//  DJWeakScriptMessageDelegate.h
+//  DailyESports
+//
+//  Created by 曹福涛 on 2019/3/14.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <WebKit/WebKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DJWeakScriptMessageDelegate : NSObject<WKScriptMessageHandler>
+@property (nonatomic,weak)id<WKScriptMessageHandler> scriptDelegate;
+
+- (instancetype)initWithDelegate:(id<WKScriptMessageHandler>)scriptDelegate;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 17 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DJYEViewController.h

@@ -0,0 +1,17 @@
+//
+//  DJYEViewController.h
+//  DJGameVIPSDK
+//
+//  Created by 曹福涛 on 2019/5/9.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DJYEViewController : UIViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 14 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DTBaseWebPageController.h

@@ -0,0 +1,14 @@
+//
+//  DTBaseWebPageController.h
+//  Zhuawawa
+//
+//  Created by 曹福涛 on 2017/12/15.
+//  Copyright © 2017年 kennethmiao. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface DTBaseWebPageController : UIViewController
+
+- (instancetype)initWithUrl:(NSString *)url title:(NSString *)title;
+@end

+ 14 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DTMD5Utils.h

@@ -0,0 +1,14 @@
+//
+//  DTMD5Utils.h
+//  DTWawaSDK
+//
+//  Created by 曹福涛 on 2018/5/10.
+//  Copyright © 2018年 DatangNet. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface DTMD5Utils : NSObject
+//md5加密方法
++ (NSString *)md5EncryptWithString:(NSString *)string;
+@end

+ 42 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/DTNetworkHelper.h

@@ -0,0 +1,42 @@
+//
+//  DTNetworkHelper.h
+//  DTWawaDemo
+//
+//  Created by 曹福涛 on 2018/4/14.
+//  Copyright © 2018年 DatangNet. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "DJGameManager.h"
+
+#define BASE_URL        @"http://test.base.wwj.ttdianjing.com"
+#define SDK_API(var)    [BASE_URL stringByAppendingString:var]
+
+#define SDK_LOGIN               SDK_API(@"/api/login")          //登录
+#define SDK_DEVICE_DETAIL       SDK_API(@"/api/device/detail")   //详情
+#define SDK_GET_GAMEID       SDK_API(@"/api/game/getGameId")   //详情
+
+
+
+
+typedef void (^CompletioBlock)(NSDictionary *dic, NSURLResponse *response, NSError *error);
+typedef void (^SuccessBlock)(NSDictionary *response);
+typedef void (^FailureBlock)(NSError *error);
+
+@interface DTNetworkHelper : NSObject<NSURLSessionDelegate>
+
++ (instancetype)shareHelper;
+
++ (NSString *)generateSign:(NSDictionary *)param;
+
+/**
+ *  get请求
+ */
+- (void)getWithUrlString:(NSString *)url parameters:(id)parameters success:(SuccessBlock)successBlock failure:(FailureBlock)failureBlock;
+
+/**
+ * post请求
+ */
+- (void)postWithUrlString:(NSString *)url parameters:(id)parameters success:(SuccessBlock)successBlock failure:(FailureBlock)failureBlock;
+
+@end

+ 17 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Headers/ViewController.h

@@ -0,0 +1,17 @@
+//
+//  ViewController.h
+//  DJGameVIPSDK
+//
+//  Created by 曹福涛 on 2019/5/9.
+//  Copyright © 2019 com.cmel365. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ViewController : UIViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/Info.plist


+ 6 - 0
ttdj_plugin/ios/DJGameVIPSDK.framework/Modules/module.modulemap

@@ -0,0 +1,6 @@
+framework module DJGameVIPSDK {
+  umbrella header "DJGameVIPSDK.h"
+
+  export *
+  module * { export * }
+}

TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/ViewController.nib


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/pay_ali_icn.png


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/pay_wx_icn.png


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/selected_icn.png


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/unselected_icn.png


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/vip_bg_icn.png


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/vip_diamond_icn.png


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/vip_join_game_icn.png


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/vip_sale_icn@3x.png


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/vip_tickets_icn.png


TEMPAT SAMPAH
ttdj_plugin/ios/DJGameVIPSDK.framework/vip_title_icn.png


+ 6 - 0
ttdj_plugin/ios/ttdj_plugin.podspec

@@ -17,5 +17,11 @@ A new flutter plugin project.
   s.dependency 'Flutter'
 
   s.ios.deployment_target = '8.0'
+
+#  s.preserve_paths = 'DJGameVIPSDK.framework'
+#  s.xcconfig = { 'OTHER_LDFLAGS' => '-framework DJGameVIPSDK' }
+#  s.vendored_frameworks = 'DJGameVIPSDK.framework'
+
+  s.vendored_frameworks = 'DJGameVIPSDK.framework'
 end
 

+ 9 - 5
ttdj_plugin/lib/ttdj_plugin.dart

@@ -3,11 +3,15 @@ import 'dart:async';
 import 'package:flutter/services.dart';
 
 class TtdjPlugin {
-  static const MethodChannel _channel =
-      const MethodChannel('ttdj_plugin');
+  static const MethodChannel _channel = const MethodChannel('ttdj_plugin');
 
-  static Future<String> get platformVersion async {
-    final String version = await _channel.invokeMethod('getPlatformVersion');
-    return version;
+  static Future<String> init(String userId, String token) async {
+    final String res = await _channel.invokeMethod('init', {'userId': userId, 'token': token});
+    return res;
+  }
+
+  static Future<String> gotoVipPage() async {
+    final String res = await _channel.invokeMethod('gotoVipPage');
+    return res;
   }
 }

+ 0 - 4
ttdj_plugin/test/ttdj_plugin_test.dart

@@ -14,8 +14,4 @@ void main() {
   tearDown(() {
     channel.setMockMethodCallHandler(null);
   });
-
-  test('getPlatformVersion', () async {
-    expect(await TtdjPlugin.platformVersion, '42');
-  });
 }