Commit 2ffc9c3c authored by 关振斌's avatar 关振斌

update

parent fa129e94
...@@ -7,11 +7,15 @@ PODS: ...@@ -7,11 +7,15 @@ PODS:
- Flutter - Flutter
- alipay_kit_ios/vendor (5.0.0): - alipay_kit_ios/vendor (5.0.0):
- Flutter - Flutter
- "app_settings (3.0.0+1)":
- Flutter
- babstrap_settings_screen (0.0.1): - babstrap_settings_screen (0.0.1):
- Flutter - Flutter
- connectivity_plus (0.0.1): - connectivity_plus (0.0.1):
- Flutter - Flutter
- ReachabilitySwift - ReachabilitySwift
- device_info_plus (0.0.1):
- Flutter
- DKImagePickerController/Core (4.3.4): - DKImagePickerController/Core (4.3.4):
- DKImagePickerController/ImageDataManager - DKImagePickerController/ImageDataManager
- DKImagePickerController/Resource - DKImagePickerController/Resource
...@@ -51,11 +55,11 @@ PODS: ...@@ -51,11 +55,11 @@ PODS:
- FirebaseAuth (~> 10.3.0) - FirebaseAuth (~> 10.3.0)
- Firebase/CoreOnly (10.3.0): - Firebase/CoreOnly (10.3.0):
- FirebaseCore (= 10.3.0) - FirebaseCore (= 10.3.0)
- firebase_auth (4.2.6): - firebase_auth (4.2.10):
- Firebase/Auth (= 10.3.0) - Firebase/Auth (= 10.3.0)
- firebase_core - firebase_core
- Flutter - Flutter
- firebase_core (2.5.0): - firebase_core (2.7.1):
- Firebase/CoreOnly (= 10.3.0) - Firebase/CoreOnly (= 10.3.0)
- Flutter - Flutter
- FirebaseAuth (10.3.0): - FirebaseAuth (10.3.0):
...@@ -147,8 +151,10 @@ PODS: ...@@ -147,8 +151,10 @@ PODS:
DEPENDENCIES: DEPENDENCIES:
- alipay_kit_ios (from `.symlinks/plugins/alipay_kit_ios/ios`) - alipay_kit_ios (from `.symlinks/plugins/alipay_kit_ios/ios`)
- app_settings (from `.symlinks/plugins/app_settings/ios`)
- babstrap_settings_screen (from `.symlinks/plugins/babstrap_settings_screen/ios`) - babstrap_settings_screen (from `.symlinks/plugins/babstrap_settings_screen/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`) - connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) - firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`)
...@@ -194,10 +200,14 @@ SPEC REPOS: ...@@ -194,10 +200,14 @@ SPEC REPOS:
EXTERNAL SOURCES: EXTERNAL SOURCES:
alipay_kit_ios: alipay_kit_ios:
:path: ".symlinks/plugins/alipay_kit_ios/ios" :path: ".symlinks/plugins/alipay_kit_ios/ios"
app_settings:
:path: ".symlinks/plugins/app_settings/ios"
babstrap_settings_screen: babstrap_settings_screen:
:path: ".symlinks/plugins/babstrap_settings_screen/ios" :path: ".symlinks/plugins/babstrap_settings_screen/ios"
connectivity_plus: connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios" :path: ".symlinks/plugins/connectivity_plus/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
file_picker: file_picker:
:path: ".symlinks/plugins/file_picker/ios" :path: ".symlinks/plugins/file_picker/ios"
firebase_auth: firebase_auth:
...@@ -247,14 +257,16 @@ EXTERNAL SOURCES: ...@@ -247,14 +257,16 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
alipay_kit_ios: bfa484b12d4690cc48a803f39ed5fb58fa774d2e alipay_kit_ios: bfa484b12d4690cc48a803f39ed5fb58fa774d2e
app_settings: d103828c9f5d515c4df9ee754dabd443f7cedcf3
babstrap_settings_screen: 535097da0fa521a47fef6f6678ff2b464ee15937 babstrap_settings_screen: 535097da0fa521a47fef6f6678ff2b464ee15937
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
device_info_plus: e5c5da33f982a436e103237c0c85f9031142abed
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: ce3938a0df3cc1ef404671531facef740d03f920 file_picker: ce3938a0df3cc1ef404671531facef740d03f920
Firebase: f92fc551ead69c94168d36c2b26188263860acd9 Firebase: f92fc551ead69c94168d36c2b26188263860acd9
firebase_auth: b196f91b4f7c6d72015c3c12aaa82eb6972b2c2c firebase_auth: e94093901bee37bdba241fd8647c1d3ea6f55c8b
firebase_core: f95c8bbe65213d406d592573ad42a12d64849cb8 firebase_core: 1ae9f9aa76e6e1edc14fb181637ad466fd6c6fa4
FirebaseAuth: 0e415d29d846c1dce2fb641e46f35e9888d9bec6 FirebaseAuth: 0e415d29d846c1dce2fb641e46f35e9888d9bec6
FirebaseCore: 988754646ab3bd4bdcb740f1bfe26b9f6c0d5f2a FirebaseCore: 988754646ab3bd4bdcb740f1bfe26b9f6c0d5f2a
FirebaseCoreInternal: e463f41bb935cd049505bf7e9a5bdd7dcea90df6 FirebaseCoreInternal: e463f41bb935cd049505bf7e9a5bdd7dcea90df6
...@@ -268,24 +280,24 @@ SPEC CHECKSUMS: ...@@ -268,24 +280,24 @@ SPEC CHECKSUMS:
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
GTMSessionFetcher: c9e714f7eec91a55641e2bab9f45fd83a219b882 GTMSessionFetcher: c9e714f7eec91a55641e2bab9f45fd83a219b882
image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4 open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4
OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852 path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: 8ab87d4b3e5cc4927bd47f78db6ceb0b94442577 SDWebImage: 8ab87d4b3e5cc4927bd47f78db6ceb0b94442577
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440 sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
smart_auth: 4bedbc118723912d0e45a07e8ab34039c19e04f2 smart_auth: 4bedbc118723912d0e45a07e8ab34039c19e04f2
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
url_launcher_ios: fb12c43172927bb5cf75aeebd073f883801f1993 url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241 vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241
video_player_avfoundation: e489aac24ef5cf7af82702979ed16f2a5ef84cff video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
C059CC5B29B6DFCC0068B7F5 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C059CC5A29B6DFCC0068B7F5 /* StoreKit.framework */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
...@@ -48,7 +47,6 @@ ...@@ -48,7 +47,6 @@
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C059CC5929B6DFA10068B7F5 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = "<group>"; }; C059CC5929B6DFA10068B7F5 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = "<group>"; };
C059CC5A29B6DFCC0068B7F5 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
C08A8E50299A2161008F4DB8 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; }; C08A8E50299A2161008F4DB8 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
C0C4655B29A3007E00C47A11 /* RunnerProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerProfile.entitlements; sourceTree = "<group>"; }; C0C4655B29A3007E00C47A11 /* RunnerProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerProfile.entitlements; sourceTree = "<group>"; };
D2718D25F9034030E31B924F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; D2718D25F9034030E31B924F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
...@@ -60,7 +58,6 @@ ...@@ -60,7 +58,6 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
8B8F5CAD6B019351870A46AE /* Pods_Runner.framework in Frameworks */, 8B8F5CAD6B019351870A46AE /* Pods_Runner.framework in Frameworks */,
C059CC5B29B6DFCC0068B7F5 /* StoreKit.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -70,7 +67,6 @@ ...@@ -70,7 +67,6 @@
36FEE18528C617843FAFC14B /* Frameworks */ = { 36FEE18528C617843FAFC14B /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
C059CC5A29B6DFCC0068B7F5 /* StoreKit.framework */,
5A7A6DEAB487D7E066FC9441 /* Pods_Runner.framework */, 5A7A6DEAB487D7E066FC9441 /* Pods_Runner.framework */,
); );
name = Frameworks; name = Frameworks;
......
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
<dict> <dict>
<key>CADisableMinimumFrameDurationOnPhone</key> <key>CADisableMinimumFrameDurationOnPhone</key>
<true/> <true/>
<key>CFBundleLocalizations</key>
<array>
<string>zh</string>
</array>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string> <string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
...@@ -18,6 +14,10 @@ ...@@ -18,6 +14,10 @@
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleLocalizations</key>
<array>
<string>zh</string>
</array>
<key>CFBundleName</key> <key>CFBundleName</key>
<string>chart</string> <string>chart</string>
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
...@@ -28,10 +28,21 @@ ...@@ -28,10 +28,21 @@
<string>????</string> <string>????</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>
<array> <array>
<dict/> <dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array/>
</dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string> <string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>weixinULAPI</string>
<string>weixinOpenSDK</string>
</array>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key> <key>com.apple.developer.associated-domains</key>
<array> <array>
<string>applinks:www.fusiontech.cn/</string> <string>applinks:www.fusiontech.cn/</string>
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key> <key>com.apple.developer.associated-domains</key>
<array> <array>
<string>applinks:www.fusiontech.cn/</string> <string>applinks:www.fusiontech.cn/</string>
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>com.apple.developer.applesignin</key>
<array>
<string>Default</string>
</array>
<key>com.apple.developer.associated-domains</key> <key>com.apple.developer.associated-domains</key>
<array> <array>
<string>applinks:www.fusiontech.cn/</string> <string>applinks:www.fusiontech.cn/</string>
......
...@@ -15,6 +15,15 @@ class UserAPI { ...@@ -15,6 +15,15 @@ class UserAPI {
return LoginEntity.fromMap(response['data']); return LoginEntity.fromMap(response['data']);
} }
/// 登录
static Future<LoginEntity> appleLogin(Map<String, dynamic> parameters) async {
var response = await HttpUtil().post(
'/user/appleLogin',
data: parameters,
);
return LoginEntity.fromMap(response['data']);
}
// /pay/notifyApplePay // /pay/notifyApplePay
static Future<ApplePayEntity> notifyApplePay( static Future<ApplePayEntity> notifyApplePay(
Map<String, dynamic> parameters) async { Map<String, dynamic> parameters) async {
...@@ -49,10 +58,14 @@ class UserAPI { ...@@ -49,10 +58,14 @@ class UserAPI {
//创建会话 //创建会话
static Future<int> createConversion() async { static Future<int> createConversion() async {
var response = await HttpUtil().get( try {
'/openAi/createConversion', var response = await HttpUtil().get(
); '/openAi/createConversion',
return response['data']; );
return response['data'];
} catch (e) {
return 401;
}
} }
static Future<int> endConversion(Map<String, dynamic> parameters) async { static Future<int> endConversion(Map<String, dynamic> parameters) async {
......
...@@ -14,5 +14,6 @@ class AppRoutes { ...@@ -14,5 +14,6 @@ class AppRoutes {
static const PRIVACT = '/privacy'; static const PRIVACT = '/privacy';
static const USER_PRIVACT = '/user_privacy'; static const USER_PRIVACT = '/user_privacy';
static const WILL_COME = '/will_come'; static const WILL_COME = '/will_come';
static const USER_EULA = '/eula';
// UserPrivacyPage // UserPrivacyPage
} }
import 'package:chart/pages/chat/view.dart'; import 'package:chart/pages/chat/view.dart';
import 'package:chart/pages/eula/bindings.dart';
import 'package:chart/pages/eula/view.dart';
import 'package:chart/pages/frame/android_pay_list/view.dart'; import 'package:chart/pages/frame/android_pay_list/view.dart';
import 'package:chart/pages/frame/notfound/index.dart'; import 'package:chart/pages/frame/notfound/index.dart';
import 'package:chart/pages/frame/pay_list/view.dart'; import 'package:chart/pages/frame/pay_list/view.dart';
...@@ -75,6 +77,17 @@ class AppPages { ...@@ -75,6 +77,17 @@ class AppPages {
// ] // ]
), ),
GetPage(
name: AppRoutes.USER_EULA,
page: () => UserEulaPage(), //ApplicationPage(),
binding: UserEulaBinding(), // ApplicationBinding(),
middlewares: [
// RouteAuthMiddleware(priority: 1),
],
// children: [
// ]
),
GetPage( GetPage(
name: AppRoutes.SIGN_IN, name: AppRoutes.SIGN_IN,
page: () => SignInPage(), page: () => SignInPage(),
......
...@@ -12,7 +12,7 @@ class ConfigStore extends GetxController { ...@@ -12,7 +12,7 @@ class ConfigStore extends GetxController {
PackageInfo? _platform; PackageInfo? _platform;
String get version => _platform?.version ?? '-'; String get version => _platform?.version ?? '-';
bool get isRelease => bool.fromEnvironment("dart.vm.product"); bool get isRelease => bool.fromEnvironment("dart.vm.product");
Locale locale = Locale('en', 'US'); Locale locale = Locale('zh', 'CN');
List<Locale> languages = [ List<Locale> languages = [
Locale('en', 'US'), Locale('en', 'US'),
Locale('zh', 'CN'), Locale('zh', 'CN'),
......
import 'dart:convert'; import 'dart:convert';
import 'package:chart/pages/main/controller.dart';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:device_info_plus/device_info_plus.dart';
import 'package:chart/common/apis/apis.dart'; import 'package:chart/common/apis/apis.dart';
import 'package:chart/common/entities/entities.dart'; import 'package:chart/common/entities/entities.dart';
import 'package:chart/common/routers/routes.dart'; import 'package:chart/common/routers/routes.dart';
...@@ -7,12 +9,20 @@ import 'package:chart/common/services/services.dart'; ...@@ -7,12 +9,20 @@ import 'package:chart/common/services/services.dart';
import 'package:chart/common/values/values.dart'; import 'package:chart/common/values/values.dart';
import 'package:chart/entity/login_entity.dart'; import 'package:chart/entity/login_entity.dart';
import 'package:chart/pages/application/index.dart'; import 'package:chart/pages/application/index.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
// import 'package:connectivity_plus/connectivity_plus.dart';
// import 'package:highlight/languages/rust.dart';
// import 'package:social_login_buttons/social_login_buttons.dart';
import '../../entity/user_entity.dart'; import '../../entity/user_entity.dart';
class UserStore extends GetxController { class UserStore extends GetxController {
static UserStore get to => Get.put(UserStore()); static UserStore get to => Get.put(UserStore());
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
var subscription;
// Get.find(); // Get.find();
// static StorageService get to => Get.put(StorageService()); // static StorageService get to => Get.put(StorageService());
...@@ -30,35 +40,82 @@ class UserStore extends GetxController { ...@@ -30,35 +40,82 @@ class UserStore extends GetxController {
bool get hasToken => token.isNotEmpty; bool get hasToken => token.isNotEmpty;
@override @override
void onInit() { void onInit() async {
super.onInit(); super.onInit();
token = StorageService.to.getString(STORAGE_USER_TOKEN_KEY); subscription = Connectivity()
var profileOffline = StorageService.to.getString(STORAGE_USER_PROFILE_KEY); .onConnectivityChanged
if (profileOffline.isNotEmpty) { .listen((ConnectivityResult result) {
var l = jsonDecode(profileOffline); print("resultresultresultresult$result");
if (result == ConnectivityResult.none ||
final copiedMap = Map.from(l); result == ConnectivityResult.other) {
} else {
// Map<String, dynamic> map = json.decode(l); refreshInfo();
copiedMap.update("expireTime",
(value) => value == null ? null : DateTime?.parse(value)); // asyncLoadBannerData();
// copiedMap // Get.back();
}
final value = IntegralEntity(
expireTime: copiedMap['expireTime'], // Got a new connectivity status!
id: copiedMap['id'], });
token: copiedMap['token'],
username: copiedMap['username'], if (GetPlatform.isAndroid) {
integral: copiedMap['integral']); token = StorageService.to.getString(STORAGE_USER_TOKEN_KEY);
_profile.value = _profile(value); var profileOffline =
StorageService.to.getString(STORAGE_USER_PROFILE_KEY);
if (profile.id != '') { if (profileOffline.isNotEmpty) {
_isLogin.value = true; var l = jsonDecode(profileOffline);
final copiedMap = Map.from(l);
// Map<String, dynamic> map = json.decode(l);
copiedMap.update("expireTime",
(value) => value == null ? null : DateTime?.parse(value));
// copiedMap
final value = IntegralEntity(
expireTime: copiedMap['expireTime'],
id: copiedMap['id'],
token: copiedMap['token'],
username: copiedMap['username'],
integral: copiedMap['integral']);
_profile.value = _profile(value);
if (profile.id != '') {
_isLogin.value = true;
}
} }
// _profile(IntegralEntity.fromMap(); } else {
// IntegralEntity.fromMap(result['data']); // refreshInfo();
// _profile(UserLoginResponseEntity.fromJson(jsonDecode(profileOffline))); // appleLogin
// "phone": "",
// "smsCode": ""
// print('Running on ${iosInfo.data['identifierForVendor']}');
}
}
Future refreshInfo() async {
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
final res = await UserAPI.appleLogin({
"phone": iosInfo.data['identifierForVendor'],
});
final value = IntegralEntity(
expireTime: res.expireTime == null ? null : res.expireTime,
id: res.id,
token: res.token,
username: res.username,
integral: res.integral,
);
token = res.token;
_profile.value = _profile(value);
if (profile.id != '') {
_isLogin.value = true;
} }
await MainController.to.asyncLoadBannerData();
} }
handleLogin(IntegralEntity res) async { handleLogin(IntegralEntity res) async {
...@@ -97,6 +154,12 @@ class UserStore extends GetxController { ...@@ -97,6 +154,12 @@ class UserStore extends GetxController {
// } // }
} }
@override
dispose() {
subscription?.cancel();
super.dispose();
}
// 保存 token // 保存 token
Future<void> setToken(String value) async { Future<void> setToken(String value) async {
await StorageService.to.setString(STORAGE_USER_TOKEN_KEY, value); await StorageService.to.setString(STORAGE_USER_TOKEN_KEY, value);
......
// baidu yapi // baidu yapi
// const SERVER_API_URL = 'https://yapi.baidu.com/mock/41008'; // const SERVER_API_URL = 'https://yapi.baidu.com/mock/41008';
// const SERVER_API_URL = 'http://192.168.110.127:8083/api'; // const SERVER_API_URL = 'http://192.168.120.175:8083/api';
const SERVER_API_URL = 'http://101.34.153.228:8083/api';//线上 const SERVER_API_URL = 'http://101.34.153.228:8083/api';//线上
// const SERVER_API_URL = 'http://192.168.2.178:8083/api';//线上 // const SERVER_API_URL = 'http://192.168.2.178:8083/api';//线上
//http://192.168.2.178:8083/api/doc.html //http://192.168.2.178:8083/api/doc.html
......
...@@ -36,6 +36,7 @@ class ChatApp extends StatelessWidget { ...@@ -36,6 +36,7 @@ class ChatApp extends StatelessWidget {
theme: AppTheme.light, theme: AppTheme.light,
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
initialRoute: AppPages.INITIAL, initialRoute: AppPages.INITIAL,
// initialBinding: AllControllerBinding(), // initialBinding: AllControllerBinding(),
getPages: AppPages.routes, getPages: AppPages.routes,
builder: EasyLoading.init(), builder: EasyLoading.init(),
......
...@@ -41,6 +41,7 @@ class CategoryController extends GetxController { ...@@ -41,6 +41,7 @@ class CategoryController extends GetxController {
} }
void onLoading() { void onLoading() {
print("${state.newsList.length}-${total}321321312321321");
if (state.newsList.length < total) { if (state.newsList.length < total) {
fetchNewsList().then((_) { fetchNewsList().then((_) {
refreshController.loadComplete(); refreshController.loadComplete();
...@@ -57,20 +58,22 @@ class CategoryController extends GetxController { ...@@ -57,20 +58,22 @@ class CategoryController extends GetxController {
// 拉取数据 // 拉取数据
Future<void> fetchNewsList({bool isRefresh = false}) async { Future<void> fetchNewsList({bool isRefresh = false}) async {
// //
var result = await NewsAPI.getConversionByUserId( try {
{'page': curPage, "size": pageSize}); var result = await NewsAPI.getConversionByUserId(
{'page': curPage, "size": pageSize});
if (isRefresh == true) {
curPage = 1; if (isRefresh == true) {
total = result.total!; curPage = 1;
state.newsList.clear(); total = result.total!;
} else { state.newsList.clear();
curPage++; } else {
curPage++;
}
state.newsList.addAll(result.records!);
} catch (e) {
print(e);
} }
state.newsList.addAll(result.records!);
print("${state.newsList.length}");
} }
/// 生命周期 /// 生命周期
......
...@@ -30,6 +30,16 @@ class _NewsPageListState extends State<NewsPageList> ...@@ -30,6 +30,16 @@ class _NewsPageListState extends State<NewsPageList>
controller: controller.refreshController, controller: controller.refreshController,
onRefresh: controller.onRefresh, onRefresh: controller.onRefresh,
onLoading: controller.onLoading, onLoading: controller.onLoading,
header: ClassicHeader(
releaseText: "松开刷新",
refreshingText: "刷新数据中",
completeText: "刷新数据成功",
idleText: "下拉刷新"),
footer: ClassicFooter(
loadingText: "正在加载中...",
// loadStyle: LoadStyle.ShowWhenLoading,
// completeDuration: Duration(milliseconds: 500),
noDataText: '没有更多数据啦'),
child: CustomScrollView( child: CustomScrollView(
slivers: [ slivers: [
SliverPadding( SliverPadding(
......
import 'package:get/get.dart';
import 'controller.dart';
class UserEulaBinding implements Bindings {
@override
void dependencies() {
Get.lazyPut<UserEulaController>(() => UserEulaController());
}
}
import 'package:get/get.dart';
import 'index.dart';
class UserEulaController extends GetxController {
UserEulaController();
final state = UserEulaState();
// tap
void handleTap(int index) {
Get.snackbar(
"标题",
"消息",
);
}
/// 在 widget 内存中分配后立即调用。
@override
void onInit() {
super.onInit();
}
/// 在 onInit() 之后调用 1 帧。这是进入的理想场所
@override
void onReady() {
super.onReady();
}
/// 在 [onDelete] 方法之前调用。
@override
void onClose() {
super.onClose();
}
/// dispose 释放内存
@override
void dispose() {
super.dispose();
}
}
library user_privacy;
export './state.dart';
export './controller.dart';
export './bindings.dart';
export './view.dart';
import 'package:get/get.dart';
class UserEulaState {
final _title = """
1、用户通过付费订阅后可免费使用AI聊天无限次,AI写作,写小说等高级功能订阅后可使用。
2.您可选择通过授权Apple支付(iOS端)AI写作大师会员服务(支持自动续费功能),订阅的金额分别为:AI写作大师连续包年会员(1年),价格498/年;AI写作大师连续包月会员(1个月),价格48/月。
3.您可通过下述途径解除连续订阅的自动扣费服务,连续订阅将在您解除后的下一个服务期限(计费周期)开始前自动终止:
打开App store---点击右上角头像图标,进入账户页面---点击管理订阅---取消订阅
以上解除方式会因第三方支付机构的软件升级等原因而不时发生变化,如因前述原因导致您无法操作解除连续订阅服务,请您第一时间按照本规则内载明的联系方式联系得到客服解决。
4.如调整连续订阅的计费标准,则会在下一个服务期限(计费周期)扣费前,通过短信、微信公众号留言等方式向您确认是否以调整后的计费标准进行代扣,如您明确回复拒绝或不予回复的,您购买的连续订阅服务将在已付费服务期限(计费周期)届满后自动终止。
5.本服务为在线使用的数字化商品服务,一经购买成功后,不提供退货退款。
6.其他未尽事宜,以《服务协议和隐私协议》的规定为准。
"""
.obs;
set title(value) => _title.value = value;
get title => _title.value;
}
import 'package:chart/common/values/values.dart';
import 'package:chart/common/widgets/widgets.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:glassmorphism/glassmorphism.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'index.dart';
import 'widgets/widgets.dart';
class UserEulaPage extends GetView<UserEulaController> {
const UserEulaPage({Key? key}) : super(key: key);
// 主视图
Widget _buildView() {
return GlassmorphicContainer(
height: double.infinity,
width: double.infinity,
// flex: 1,
borderRadius: 16,
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
blur: 14,
alignment: Alignment.bottomCenter,
border: 2,
linearGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF0FFFF).withOpacity(0.2),
Color(0xFF0FFFF).withOpacity(0.2),
],
),
child: const HelloWidget(),
// margin: EdgeInsets.only(bottom: 16.h),
borderGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF0FFFF).withOpacity(1),
Color(0xFFFFFFF),
Color(0xFF0FFFF).withOpacity(1),
],
));
}
@override
Widget build(BuildContext context) {
return GetBuilder<UserEulaController>(
builder: (_) {
return Scaffold(
appBar: transparentAppBar(
leading: IconButton(
tooltip: '返回上一页',
icon: const Icon(
Icons.arrow_back,
color: AppColors.primaryElementText,
),
onPressed: () async {
// Get.back();
// Get.offAll(ApplicationPage());
// await Get.off(ApplicationPage());
// Get.toNamed(AppRoutes.Application);
Get.back();
// await Get.toNamed();
// Navigator.of(context).pop();
//_nextPage(-1);
},
),
title: const Text(
"服务协议",
style: TextStyle(color: Colors.white),
)),
body: Container(
height: double.infinity,
width: double.infinity,
child: WebView(
initialUrl: "https://p.kdocs.cn/s/UODC2BAAYQ",
),
));
},
);
}
}
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:webview_flutter/webview_flutter.dart';
import '../index.dart';
/// hello
class HelloWidget extends GetView<UserEulaController> {
const HelloWidget({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Center(
// Obx(() => ListView(
// padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
// children: [
// Text(
// controller.state.title,
// style: TextStyle(
// fontFamily: 'Montserrat',
// fontSize: 18,
// color: Colors.white),
// )
// ],
// )),
);
}
}
library widgets;
export './hello.dart';
...@@ -155,6 +155,7 @@ class ChatNewController extends GetxController { ...@@ -155,6 +155,7 @@ class ChatNewController extends GetxController {
_addMessage(receiveErrorMessage); _addMessage(receiveErrorMessage);
EasyLoading.dismiss(); EasyLoading.dismiss();
Vibrate.feedback(FeedbackType.error); Vibrate.feedback(FeedbackType.error);
Get.toNamed(AppRoutes.SIGN_IN);
} }
} catch (e) { } catch (e) {
print("eeeeeeee$e"); print("eeeeeeee$e");
...@@ -307,6 +308,7 @@ class ChatNewController extends GetxController { ...@@ -307,6 +308,7 @@ class ChatNewController extends GetxController {
sse = SSEClient.subscribeToSSE( sse = SSEClient.subscribeToSSE(
url: "$SERVER_API_URL/openAi/connect/${UserStore.to.profile.id}", url: "$SERVER_API_URL/openAi/connect/${UserStore.to.profile.id}",
header: {}).listen((event) async { header: {}).listen((event) async {
print(event);
if (event.data!.trim().isEmpty) { if (event.data!.trim().isEmpty) {
return; return;
} else if (event.id == "[DONE]") { } else if (event.id == "[DONE]") {
...@@ -322,6 +324,8 @@ class ChatNewController extends GetxController { ...@@ -322,6 +324,8 @@ class ChatNewController extends GetxController {
_updateMessage("${jsonMap['content']}" as String); _updateMessage("${jsonMap['content']}" as String);
} }
}); });
// print(sse);
} }
Future createConversionId() async { Future createConversionId() async {
......
...@@ -5,6 +5,7 @@ import 'package:chart/common/routers/routes.dart'; ...@@ -5,6 +5,7 @@ import 'package:chart/common/routers/routes.dart';
import 'package:chart/common/store/store.dart'; import 'package:chart/common/store/store.dart';
import 'package:chart/entity/user_entity.dart'; import 'package:chart/entity/user_entity.dart';
import 'package:chart/pages/application/index.dart'; import 'package:chart/pages/application/index.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_inapp_purchase/flutter_inapp_purchase.dart'; import 'package:flutter_inapp_purchase/flutter_inapp_purchase.dart';
import 'package:flutter_inapp_purchase/modules.dart'; import 'package:flutter_inapp_purchase/modules.dart';
...@@ -19,9 +20,8 @@ class PayListController extends GetxController { ...@@ -19,9 +20,8 @@ class PayListController extends GetxController {
final state = PayListState(); final state = PayListState();
final List<String> _productLists = [ final List<String> _productLists = [
"com.wudi.app.weekly_pass", "com.wudi.monthly_pass_chat",
"com.wudi.app.monthly_pass", "com.wudi.yearly_pass_chat",
"com.wudi.app.60stars"
]; ];
final List<dynamic> _mapData = [ final List<dynamic> _mapData = [
...@@ -136,6 +136,30 @@ class PayListController extends GetxController { ...@@ -136,6 +136,30 @@ class PayListController extends GetxController {
}); });
} }
void restorePurchases() async {
Vibrate.feedback(FeedbackType.selection);
EasyLoading.show(status: '恢复购买中...');
List<PurchasedItem>? purchases =
await FlutterInappPurchase.instance.getAvailablePurchases();
for (var purchase in purchases!) {
// com.wudi.yearly_pass_chat
if (purchase.productId == 'com.wudi.yearly_pass_chat' ||
purchase.productId == "com.wudi.monthly_pass_chat") {
// // IAPItem item
FlutterInappPurchase.instance.requestPurchase(purchase.productId!);
EasyLoading.showSuccess("恢复购买成功");
} else {
EasyLoading.dismiss();
}
// print("${item.productId}");
// 处理以前购买的产品
}
}
Future _getProduct() async { Future _getProduct() async {
try { try {
List<IAPItem> items = List<IAPItem> items =
......
...@@ -7,7 +7,7 @@ class PayListState { ...@@ -7,7 +7,7 @@ class PayListState {
set title(value) => this._title.value = value; set title(value) => this._title.value = value;
get title => this._title.value; get title => this._title.value;
final _selected = "com.wudi.app.60stars".obs; final _selected = "com.wudi.monthly_pass_chat".obs;
set selected(value) => _selected.value = value; set selected(value) => _selected.value = value;
get selected => _selected.value; get selected => _selected.value;
......
import 'dart:convert'; import 'dart:convert';
import 'package:chart/common/apis/apis.dart'; import 'package:chart/common/apis/apis.dart';
import 'package:chart/common/routers/routes.dart';
import 'package:chart/common/store/user.dart'; import 'package:chart/common/store/user.dart';
import 'package:chart/common/values/values.dart'; import 'package:chart/common/values/values.dart';
import 'package:chart/entity/user_entity.dart'; import 'package:chart/entity/user_entity.dart';
...@@ -171,7 +172,8 @@ class ProductController extends GetxController { ...@@ -171,7 +172,8 @@ class ProductController extends GetxController {
// state.isWhite = true; // state.isWhite = true;
// state.loading = false; // state.loading = false;
} else { } else {
EasyLoading.showError("你还未登录,请登录后再使用"); // EasyLoading.showError("你还未登录,请登录后再使用");
Get.toNamed(AppRoutes.SIGN_IN);
state.isWhite = false; state.isWhite = false;
state.loading = false; state.loading = false;
// Get.snackbar("错误提示", "您的问题还没有填完", colorText: Colors.white); // Get.snackbar("错误提示", "您的问题还没有填完", colorText: Colors.white);
...@@ -184,7 +186,8 @@ class ProductController extends GetxController { ...@@ -184,7 +186,8 @@ class ProductController extends GetxController {
print("$str"); print("$str");
} else { } else {
Get.snackbar("错误提示", "您的问题还没有填完", colorText: Colors.white); EasyLoading.showInfo("为了生成完整内容,请输入两项内容在进行创作");
// Get.snackbar("错误提示", "您的问题还没有填完", colorText: Colors.white);
} }
} }
...@@ -201,13 +204,16 @@ class ProductController extends GetxController { ...@@ -201,13 +204,16 @@ class ProductController extends GetxController {
} }
showModal() { showModal() {
// print("awaitawaitawaitawaitawaitawaitawait"); if (UserStore.to.isLogin) {
state.inderText = '';
// Share.share('Text I wish to share');
Get.bottomSheet(
FormWidget(),
);
} else {
Get.toNamed(AppRoutes.SIGN_IN);
}
state.inderText = '';
// Share.share('Text I wish to share');
Get.bottomSheet(
FormWidget(),
);
// useRootNavigator: false, // useRootNavigator: false,
// // backgroundColor: Colors.white, // // backgroundColor: Colors.white,
// shape: const RoundedRectangleBorder( // shape: const RoundedRectangleBorder(
......
...@@ -17,6 +17,7 @@ class WelcomeController extends GetxController { ...@@ -17,6 +17,7 @@ class WelcomeController extends GetxController {
// 跳转 注册界面 // 跳转 注册界面
handleHome() async { handleHome() async {
await UserStore.to.refreshInfo();
await ConfigStore.to.saveAlreadyOpen(); await ConfigStore.to.saveAlreadyOpen();
Get.offAndToNamed(AppRoutes.Application); Get.offAndToNamed(AppRoutes.Application);
} }
......
...@@ -13,7 +13,7 @@ import '../../entity/user_entity.dart'; ...@@ -13,7 +13,7 @@ import '../../entity/user_entity.dart';
import 'index.dart'; import 'index.dart';
class MainController extends GetxController { class MainController extends GetxController {
MainController(); static MainController get to => Get.put(MainController());
/// 响应式成员变量 /// 响应式成员变量
...@@ -129,9 +129,12 @@ class MainController extends GetxController { ...@@ -129,9 +129,12 @@ class MainController extends GetxController {
/// onInit 之后 /// onInit 之后
@override @override
void onReady() { void onReady() {
super.onReady();
// asyncLoadAllData();
asyncLoadBannerData(); asyncLoadBannerData();
super.onReady();
// if (UserStore.to.token.isNotEmpty) {
// }
} }
/// 关闭页面 /// 关闭页面
......
...@@ -15,7 +15,8 @@ class NewsCategoriesWidget extends GetView<MainController> { ...@@ -15,7 +15,8 @@ class NewsCategoriesWidget extends GetView<MainController> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final userC = Get.put(UserStore()); final userC = Get.put(UserStore());
return Obx(() => controller.state.bannerList == null final bC = Get.put(MainController());
return Obx(() => bC.state.bannerList == null
? Container() ? Container()
: Container( : Container(
// color: Colors.red, // color: Colors.red,
...@@ -31,51 +32,61 @@ class NewsCategoriesWidget extends GetView<MainController> { ...@@ -31,51 +32,61 @@ class NewsCategoriesWidget extends GetView<MainController> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
// ignore: prefer_const_literals_to_create_immutables // ignore: prefer_const_literals_to_create_immutables
children: [ children: [
// ignore: prefer_const_constructors GetPlatform.isIOS
Obx( ? Text(
() => userC.isLogin "AI写作大师", maxLines: 1,
? Container( textAlign: TextAlign.left,
width: 200, overflow: TextOverflow.clip,
child: Text( softWrap: true,
// userC.isLogin // ignore: prefer_const_constructors
// ? style: TextStyle(
"Hi, ${userC.profile.username}", color: Colors.white,
// : "您还未登录", fontWeight: FontWeight.w800,
maxLines: 1, fontSize: 20),
textAlign: TextAlign.left, )
overflow: TextOverflow.clip, : Obx(() => userC.isLogin
softWrap: true, ? Container(
// ignore: prefer_const_constructors width: 200,
style: TextStyle( child: Text(
color: Colors.white, // userC.isLogin
fontWeight: FontWeight.w800, // ?
fontSize: 20), "Hi, ${userC.profile.username}",
), // : "您还未登录",
) maxLines: 1,
: Container( textAlign: TextAlign.left,
width: 200, overflow: TextOverflow.clip,
child: GestureDetector( softWrap: true,
onTap: () { // ignore: prefer_const_constructors
Vibrate.feedback(FeedbackType.impact); style: TextStyle(
Get.toNamed(AppRoutes.SIGN_IN); color: Colors.white,
}, fontWeight: FontWeight.w800,
child: Text( fontSize: 20),
// userC.isLogin ),
// ? )
"点我登录", : Container(
// : "您还未登录", width: 200,
maxLines: 1, child: GestureDetector(
textAlign: TextAlign.left, onTap: () {
overflow: TextOverflow.clip, Vibrate.feedback(
softWrap: true, FeedbackType.impact);
// ignore: prefer_const_constructors Get.toNamed(AppRoutes.SIGN_IN);
style: TextStyle( },
color: Colors.white, child: Text(
fontWeight: FontWeight.w800, // userC.isLogin
fontSize: 20), // ?
)), "点我登录",
), // : "您还未登录",
), maxLines: 1,
textAlign: TextAlign.left,
overflow: TextOverflow.clip,
softWrap: true,
// ignore: prefer_const_constructors
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 20),
)),
)),
SizedBox(height: 30), SizedBox(height: 30),
// ignore: prefer_const_constructors // ignore: prefer_const_constructors
Text( Text(
...@@ -95,8 +106,8 @@ class NewsCategoriesWidget extends GetView<MainController> { ...@@ -95,8 +106,8 @@ class NewsCategoriesWidget extends GetView<MainController> {
if (GetPlatform.isAndroid) { if (GetPlatform.isAndroid) {
Get.toNamed(AppRoutes.AN_PAY_LIST); Get.toNamed(AppRoutes.AN_PAY_LIST);
} else { } else {
Get.toNamed(AppRoutes.AN_PAY_LIST); // Get.toNamed(AppRoutes.AN_PAY_LIST);
// Get.toNamed(AppRoutes.PAY_LIST); Get.toNamed(AppRoutes.PAY_LIST);
} }
// AN_PAY_LIST // AN_PAY_LIST
......
...@@ -18,8 +18,9 @@ class SiperBannerWidget extends GetView<MainController> { ...@@ -18,8 +18,9 @@ class SiperBannerWidget extends GetView<MainController> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final c = Get.put(MainController());
List<Widget> _renderList(int index) { List<Widget> _renderList(int index) {
return controller.state.bannerList! return c.state.bannerList!
.asMap() .asMap()
.keys .keys
.map((idx) => _generateWidget( .map((idx) => _generateWidget(
...@@ -27,7 +28,7 @@ class SiperBannerWidget extends GetView<MainController> { ...@@ -27,7 +28,7 @@ class SiperBannerWidget extends GetView<MainController> {
.toList(); .toList();
} }
return Obx(() => controller.state.bannerList == null return Obx(() => c.state.bannerList == null
? Container() ? Container()
: Container( : Container(
height: 230, height: 230,
......
...@@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; ...@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:glassmorphism/glassmorphism.dart'; import 'package:glassmorphism/glassmorphism.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'index.dart'; import 'index.dart';
import 'widgets/widgets.dart'; import 'widgets/widgets.dart';
...@@ -68,18 +69,23 @@ class PrivacyPage extends GetView<PrivacyController> { ...@@ -68,18 +69,23 @@ class PrivacyPage extends GetView<PrivacyController> {
}, },
), ),
title: const Text( title: const Text(
"隐私协议", "隐私政策",
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
)), )),
body: Container( body: Container(
height: double.infinity, height: double.infinity,
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( child: WebView(
image: DecorationImage( initialUrl: "https://p.kdocs.cn/s/YXFCYBAAYQ",
image: Image.asset("assets/images/bg.png").image,
fit: BoxFit.cover),
), ),
child: _buildView(), // 【金山文档】 隐私政策
// decoration: BoxDecoration(
// image: DecorationImage(
// image: Image.asset("assets/images/bg.png").image,
// fit: BoxFit.cover),
// ),
// child: _buildView(),
), ),
); );
}, },
......
This diff is collapsed.
...@@ -6,6 +6,7 @@ import FlutterMacOS ...@@ -6,6 +6,7 @@ import FlutterMacOS
import Foundation import Foundation
import connectivity_plus import connectivity_plus
import device_info_plus
import firebase_auth import firebase_auth
import firebase_core import firebase_core
import package_info import package_info
...@@ -19,6 +20,7 @@ import url_launcher_macos ...@@ -19,6 +20,7 @@ import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin")) FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
......
This diff is collapsed.
...@@ -117,6 +117,8 @@ dependencies: ...@@ -117,6 +117,8 @@ dependencies:
eventsource: ^0.4.0 eventsource: ^0.4.0
flutter_client_sse: ^1.0.0 flutter_client_sse: ^1.0.0
highlight: ^0.7.0 highlight: ^0.7.0
device_info_plus: ^8.1.0
app_settings: ^4.2.0
# package:bubble/bubble.dart # package:bubble/bubble.dart
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment