diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index 79ef042..3eb1970 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -53,8 +53,8 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
//选择要添加的对应cpu类型的.so库。
- abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
- //abiFilters 'armeabi-v7a','x86_64'
+ abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a'
+ //abiFilters 'armeabi-v7a','x86_64'
}
}
@@ -108,14 +108,14 @@ android {
}
-// // 应用信息配置
+ // 应用信息配置
// productFlavors {
// // 智夜生活
// zhiying {
// applicationId "cn.zhios.zhiying"
-// versionCode 48
+// versionCode 55
// dimension "app"
-// versionName '1.3.6'
+// versionName '1.3.15'
// // 签名信息
// signingConfig signingConfigs.zhiying
// }
@@ -156,6 +156,7 @@ flutter {
source '../..'
}
+
dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
@@ -184,6 +185,9 @@ dependencies {
implementation 'com.alibaba.sdk.android:AlibcTradeBiz:4.0.0.16@aar'
implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar'
implementation 'com.alibaba:fastjson:1.2.41@jar'
+
+ implementation fileTree(include: ['*.jar'], dir: 'libs')
+
}
diff --git a/example/android/app/libs/AMap_Location_V5.2.0_20200915.jar b/example/android/app/libs/AMap_Location_V5.2.0_20200915.jar
new file mode 100644
index 0000000..28c3dae
Binary files /dev/null and b/example/android/app/libs/AMap_Location_V5.2.0_20200915.jar differ
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
index fc4845f..14397e2 100644
--- a/example/android/app/src/main/AndroidManifest.xml
+++ b/example/android/app/src/main/AndroidManifest.xml
@@ -26,6 +26,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -36,7 +47,8 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:usesCleartextTraffic="true"
- tools:replace="android:name, android:allowBackup">
+ android:authorities="${applicationId}.fileprovider"
+ tools:replace="android:name, android:allowBackup,android:authorities">
-
+
diff --git a/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java b/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java
index 82e5a81..9e27b1b 100644
--- a/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java
+++ b/example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java
@@ -85,39 +85,26 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
view.addView(launchImageFrame, params);
}
- Timer timer=new Timer();
+ Timer timer = new Timer();
///移除启动页
void removeLaunchView() {
//此处延时是为了不显示启动页往上顶
- if(timer!=null){
- timer.schedule(new TimerTask() {
- @Override
- public void run() {
- MainActivity.this.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- if (view != null && launchImageFrame != null) {
- getWindow().getDecorView().setBackground(new ColorDrawable(Color.parseColor("#000000")));
+
+ if (view != null && launchImageFrame != null) {
+ getWindow().getDecorView().setBackground(new ColorDrawable(Color.parseColor("#000000")));
// Animation alphaAnimation = new AlphaAnimation(1, 1);
// alphaAnimation.setDuration(100);
// alphaAnimation.setFillAfter(true);
// launchImageFrame.startAnimation(alphaAnimation);
- Log.d("----------------", "----------------------清除启动页---------------");
- view.removeView(launchImageFrame);
- launchImageFrame = null;
- view = null;
- }
- }
- });
- timer=null;
- }
- },100);
-
+ Log.d("----------------", "----------------------清除启动页---------------");
+ view.removeView(launchImageFrame);
+ launchImageFrame = null;
+ view = null;
}
-
}
+
@Override
protected void onNewIntent(@NonNull Intent intent) {
super.onNewIntent(intent);
@@ -167,10 +154,21 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
@Override
public Map getSetting() {
Map map = new HashMap();
- map.put("domain", "http://inapi.izhyin.cn/"); //"http://120.76.175.204:8989");
-// map.put("domain", "http://api.zhios.cn/");45678910,
+// ///测试
+ map.put("domain", "http://inapi.izhyin.cn/");//"http://120.76.175.204:8989");http://47.114.51.254:80 http://inapi.izhyin.cn/
map.put("master_id", "123456");
map.put("secret_key", "123456");
+
+ ///正式
+// map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689
+// map.put("master_id", "99813608");
+// map.put("secret_key", "123456");
+
+ //客户测试
+// map.put("domain", "http://api.zhiyingos.com/");//45678910,api.zhios.cn84198689
+// map.put("master_id", "13376168");
+// map.put("secret_key", "123456");
+
// map.put("token", "123465");
return map;
}
diff --git a/example/android/settings_aar.gradle b/example/android/settings_aar.gradle
new file mode 100644
index 0000000..e7b4def
--- /dev/null
+++ b/example/android/settings_aar.gradle
@@ -0,0 +1 @@
+include ':app'
diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock
index 7cf61c7..2e9b0d6 100644
--- a/example/ios/Podfile.lock
+++ b/example/ios/Podfile.lock
@@ -4,8 +4,12 @@ PODS:
- AliAuthSDK (1.1.0.41-bc)
- AlibcTradeSDK (4.0.1.6)
- AliLinkPartnerSDK (4.0.0.24)
- - AlipaySDK_No_UTDID_SUN (15.2.0):
- - UTDID
+ - amap_flutter_location (0.0.1):
+ - AMapLocation (~> 2.6.7)
+ - Flutter
+ - AMapFoundation (1.6.5.1)
+ - AMapLocation (2.6.7):
+ - AMapFoundation (~> 1.6.4)
- BCUserTrack (5.2.0.18-appkeys):
- UTDID
- connectivity (0.0.1):
@@ -32,10 +36,17 @@ PODS:
- Flutter
- flutter_plugin_android_lifecycle (0.0.1):
- Flutter
+ - flutter_user_agent (1.2.2):
+ - Flutter
+ - flutter_webview_plugin (0.0.1):
+ - Flutter
- flutter_xupdate (0.0.1):
- Flutter
- fluttertoast (0.0.2):
- Flutter
+ - fluwx (0.0.1):
+ - Flutter
+ - WechatOpenSDK (= 1.8.7.1)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
@@ -95,7 +106,7 @@ PODS:
- mob_sharesdk/ShareSDKPlatforms/WatermelonVideo (4.3.16):
- mob_sharesdk/ShareSDK
- MOBFoundation (>= 3.2.9)
- - mob_sharesdk/ShareSDKPlatforms/WeChat (4.3.16):
+ - mob_sharesdk/ShareSDKPlatforms/WeChat_Lite (4.3.16):
- mob_sharesdk/ShareSDK
- MOBFoundation (>= 3.2.9)
- mob_sharesdk/ShareSDKRestoreScene (4.3.16):
@@ -116,6 +127,8 @@ PODS:
- mobsms (0.0.1):
- Flutter
- mob_smssdk
+ - more_picture_share (0.0.1):
+ - Flutter
- mtopSDK (3.0.0.3-BC)
- package_info (0.0.1):
- Flutter
@@ -162,14 +175,13 @@ PODS:
- mob_sharesdk/ShareSDKPlatforms/SnapChat
- mob_sharesdk/ShareSDKPlatforms/Twitter
- mob_sharesdk/ShareSDKPlatforms/WatermelonVideo
- - mob_sharesdk/ShareSDKPlatforms/WeChat
+ - mob_sharesdk/ShareSDKPlatforms/WeChat_Lite
- mob_sharesdk/ShareSDKRestoreScene
- mob_sharesdk/ShareSDKUI
- sqflite (0.0.1):
- Flutter
- FMDB (~> 2.7.2)
- tobias (0.0.1):
- - AlipaySDK_No_UTDID_SUN (~> 15.2.0)
- Flutter
- TOCropViewController (2.5.5)
- url_launcher (0.0.1):
@@ -183,8 +195,13 @@ PODS:
- url_launcher_windows (0.0.1):
- Flutter
- UTDID (1.1.0.16)
+ - video_player (0.0.1):
+ - Flutter
+ - video_player_web (0.0.1):
+ - Flutter
- webview_flutter (0.0.1):
- Flutter
+ - WechatOpenSDK (1.8.7.1)
- WindVane (8.5.0.46-bc11):
- WindVane/Basic (= 8.5.0.46-bc11)
- WindVane/Core (= 8.5.0.46-bc11)
@@ -194,17 +211,24 @@ PODS:
- WindVane/WindVane (8.5.0.46-bc11)
- zhiying_base_widget (0.0.1):
- Flutter
- - mob_sharesdk
- - mob_sharesdk/ShareSDKExtension
- - mob_sharesdk/ShareSDKPlatforms/QQ
- - mob_sharesdk/ShareSDKPlatforms/SinaWeibo
- - mob_sharesdk/ShareSDKPlatforms/WeChat
- - mob_sharesdk/ShareSDKUI
+ - zhiying_business_college (0.0.1):
+ - Flutter
- zhiying_comm (0.0.1):
- Flutter
+ - zhiying_equity_card (0.0.1):
+ - Flutter
+ - zhiying_member_upgrade (0.0.1):
+ - Flutter
+ - zhiying_new_user_free (0.0.1):
+ - Flutter
+ - zhiying_official (0.0.1):
+ - Flutter
+ - zhiying_wechat_teacher (0.0.1):
+ - Flutter
DEPENDENCIES:
- ali_auth_wbq (from `.symlinks/plugins/ali_auth_wbq/ios`)
+ - amap_flutter_location (from `.symlinks/plugins/amap_flutter_location/ios`)
- connectivity (from `.symlinks/plugins/connectivity/ios`)
- connectivity_for_web (from `.symlinks/plugins/connectivity_for_web/ios`)
- connectivity_macos (from `.symlinks/plugins/connectivity_macos/ios`)
@@ -213,8 +237,11 @@ DEPENDENCIES:
- flutter_alibc (from `.symlinks/plugins/flutter_alibc/ios`)
- flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`)
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/ios`)
+ - flutter_user_agent (from `.symlinks/plugins/flutter_user_agent/ios`)
+ - flutter_webview_plugin (from `.symlinks/plugins/flutter_webview_plugin/ios`)
- flutter_xupdate (from `.symlinks/plugins/flutter_xupdate/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
+ - fluwx (from `.symlinks/plugins/fluwx/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- imei_plugin (from `.symlinks/plugins/imei_plugin/ios`)
@@ -222,6 +249,7 @@ DEPENDENCIES:
- moblink (from `.symlinks/plugins/moblink/ios`)
- mobpush_plugin (from `.symlinks/plugins/mobpush_plugin/ios`)
- mobsms (from `.symlinks/plugins/mobsms/ios`)
+ - more_picture_share (from `.symlinks/plugins/more_picture_share/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
@@ -244,9 +272,17 @@ DEPENDENCIES:
- url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`)
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`)
- url_launcher_windows (from `.symlinks/plugins/url_launcher_windows/ios`)
+ - video_player (from `.symlinks/plugins/video_player/ios`)
+ - video_player_web (from `.symlinks/plugins/video_player_web/ios`)
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
- zhiying_base_widget (from `.symlinks/plugins/zhiying_base_widget/ios`)
+ - zhiying_business_college (from `.symlinks/plugins/zhiying_business_college/ios`)
- zhiying_comm (from `.symlinks/plugins/zhiying_comm/ios`)
+ - zhiying_equity_card (from `.symlinks/plugins/zhiying_equity_card/ios`)
+ - zhiying_member_upgrade (from `.symlinks/plugins/zhiying_member_upgrade/ios`)
+ - zhiying_new_user_free (from `.symlinks/plugins/zhiying_new_user_free/ios`)
+ - zhiying_official (from `.symlinks/plugins/zhiying_official/ios`)
+ - zhiying_wechat_teacher (from `.symlinks/plugins/zhiying_wechat_teacher/ios`)
SPEC REPOS:
http://repo.baichuan-ios.taobao.com/baichuanSDK/AliBCSpecs.git:
@@ -258,8 +294,9 @@ SPEC REPOS:
- securityGuard
- UTDID
- WindVane
- https://github.com/CocoaPods/Specs:
- - AlipaySDK_No_UTDID_SUN
+ https://github.com/CocoaPods/Specs.git:
+ - AMapFoundation
+ - AMapLocation
- FMDB
- mob_linksdk_pro
- mob_pushsdk
@@ -269,10 +306,13 @@ SPEC REPOS:
- MOBFoundation
- Reachability
- TOCropViewController
+ - WechatOpenSDK
EXTERNAL SOURCES:
ali_auth_wbq:
:path: ".symlinks/plugins/ali_auth_wbq/ios"
+ amap_flutter_location:
+ :path: ".symlinks/plugins/amap_flutter_location/ios"
connectivity:
:path: ".symlinks/plugins/connectivity/ios"
connectivity_for_web:
@@ -289,10 +329,16 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_native_image/ios"
flutter_plugin_android_lifecycle:
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios"
+ flutter_user_agent:
+ :path: ".symlinks/plugins/flutter_user_agent/ios"
+ flutter_webview_plugin:
+ :path: ".symlinks/plugins/flutter_webview_plugin/ios"
flutter_xupdate:
:path: ".symlinks/plugins/flutter_xupdate/ios"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
+ fluwx:
+ :path: ".symlinks/plugins/fluwx/ios"
image_cropper:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker:
@@ -307,6 +353,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/mobpush_plugin/ios"
mobsms:
:path: ".symlinks/plugins/mobsms/ios"
+ more_picture_share:
+ :path: ".symlinks/plugins/more_picture_share/ios"
package_info:
:path: ".symlinks/plugins/package_info/ios"
path_provider:
@@ -351,19 +399,37 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_web/ios"
url_launcher_windows:
:path: ".symlinks/plugins/url_launcher_windows/ios"
+ video_player:
+ :path: ".symlinks/plugins/video_player/ios"
+ video_player_web:
+ :path: ".symlinks/plugins/video_player_web/ios"
webview_flutter:
:path: ".symlinks/plugins/webview_flutter/ios"
zhiying_base_widget:
:path: ".symlinks/plugins/zhiying_base_widget/ios"
+ zhiying_business_college:
+ :path: ".symlinks/plugins/zhiying_business_college/ios"
zhiying_comm:
:path: ".symlinks/plugins/zhiying_comm/ios"
+ zhiying_equity_card:
+ :path: ".symlinks/plugins/zhiying_equity_card/ios"
+ zhiying_member_upgrade:
+ :path: ".symlinks/plugins/zhiying_member_upgrade/ios"
+ zhiying_new_user_free:
+ :path: ".symlinks/plugins/zhiying_new_user_free/ios"
+ zhiying_official:
+ :path: ".symlinks/plugins/zhiying_official/ios"
+ zhiying_wechat_teacher:
+ :path: ".symlinks/plugins/zhiying_wechat_teacher/ios"
SPEC CHECKSUMS:
ali_auth_wbq: 83e881b20722051dccc9117062f674d736509468
AliAuthSDK: 7018e8f3c8be3382e60f69d3b517c7de34c351e0
AlibcTradeSDK: 9a3e7af6cd648dd1f85684e82694c213fe48dad2
AliLinkPartnerSDK: c5778cdfdcee7bfe342238d39a77766184d36a46
- AlipaySDK_No_UTDID_SUN: ac3f953a08c8ac8eaade23e338862208b885c344
+ amap_flutter_location: 3e33b57f1aad80b0dfb4b399de857a1a9f071e62
+ AMapFoundation: b67560a6f21aab81c8c12f84616b55a3833b6253
+ AMapLocation: a46c30d9930d0f3a3bd21139d8f845d10ac3f01d
BCUserTrack: 49251c6fb7c65cbbc221a492bbd3f3e142f1fb0f
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b
@@ -373,8 +439,11 @@ SPEC CHECKSUMS:
flutter_alibc: 0e2a29e7c1de759672d87a260051240d209964b9
flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35
+ flutter_user_agent: 27c45d034dc31b80948d29998cea52cd3a7bf936
+ flutter_webview_plugin: ed9e8a6a96baf0c867e90e1bce2673913eeac694
flutter_xupdate: bdb588f0fe4f6c5e45436b8b0de08d505a50c04e
fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b
+ fluwx: 8d47bee15c7fed07b94c2a12fb2381677232431a
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
@@ -389,6 +458,7 @@ SPEC CHECKSUMS:
moblink: 3480a191e86c33f4e84af0cb5d2cc5627e78bf65
mobpush_plugin: 7b5a56692c538bc06e0386916cf7b21f77c1eb09
mobsms: 141956ad151a39a69a47a2ddf2e186405346c4ef
+ more_picture_share: f5b68ae17896e80168b24a0bc894395a104af0c5
mtopSDK: d6fdf81730342a69be920b576541c7bb81a683d5
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
@@ -406,9 +476,9 @@ SPEC CHECKSUMS:
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9
shared_preferences_windows: 36b76d6f54e76ead957e60b49e2f124b4cd3e6ae
- sharesdk_plugin: de8d8b87c50d60017472c5da425db1acd2911e0a
+ sharesdk_plugin: 455844465fc821a8ead9a9851ac928fa877cb379
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0
- tobias: 46e3fae88556c31a512721b97fc509a015174ebf
+ tobias: da6d872837de666e33393e7647aa6bc4ccb370b1
TOCropViewController: da59f531f8ac8a94ef6d6c0fc34009350f9e8bfe
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
@@ -416,10 +486,19 @@ SPEC CHECKSUMS:
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c
url_launcher_windows: 683d7c283894db8d1914d3ab2223b20cc1ad95d5
UTDID: c28855683c5ea2e77e597cb14609328f7d470d6e
+ video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
+ video_player_web: da8cadb8274ed4f8dbee8d7171b420dedd437ce7
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
+ WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
WindVane: 56e096abae757397ccd3accb66a959f3ffcbf949
- zhiying_base_widget: 064547d1dfe4a5832487f275cd4775d6da8f260c
+ zhiying_base_widget: 00868c0d2723a3a425c18b27204fbc67e3f7e59d
+ zhiying_business_college: dc3ba7fb32aad4db421aa94dbbc1ef712e7d00cd
zhiying_comm: 0daef4a480f4f4dbea3e11b615f3264aafea924b
+ zhiying_equity_card: 1afe5c3c8e5317dcebf55159b4087cd0d57e49ff
+ zhiying_member_upgrade: 1207671575ad01ed3336c604e235843a98fa1a0c
+ zhiying_new_user_free: 1640f83c12643475f03fabffcba13f498e555243
+ zhiying_official: 058e85b2792fbc6925b68f9c51f482a21e7400ee
+ zhiying_wechat_teacher: f93967511de28d14943cd69ba3f02fac0a5fcb00
PODFILE CHECKSUM: b66ec2c625af7ee344f37aae8918540c4b58b5ef
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 2c309d7..71000f8 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -392,7 +392,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -476,7 +475,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -532,7 +530,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m
index 6b18197..1e66d3b 100644
--- a/example/ios/Runner/AppDelegate.m
+++ b/example/ios/Runner/AppDelegate.m
@@ -41,7 +41,7 @@
if (![[AlibcTradeSDK sharedInstance] application:application openURL:url sourceApplication:sourceApplication annotation:annotation]) {
return YES;
}
- return NO;
+ return [super application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
}
@@ -51,15 +51,18 @@
if (@available(iOS 9.0, *)) {
__unused BOOL isHandledByALBBSDK=[[AlibcTradeSDK sharedInstance] application:application openURL:url options:options];
- return isHandledByALBBSDK;
+ if (isHandledByALBBSDK)
+ return isHandledByALBBSDK;
} else {
// Fallback on earlier versions
}//处理其他app跳转到自己的app,如果百川处理过会返回YES
- return NO;
+ return [super application:application openURL:url options:options];
}
+
+
@end
diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist
index 3b55609..39587e2 100644
--- a/example/ios/Runner/Info.plist
+++ b/example/ios/Runner/Info.plist
@@ -2,6 +2,8 @@
+ NSLocationDefaultAccuracyReduced
+ YES
CFBundleDevelopmentRegion
$(DEVELOPMENT_LANGUAGE)
CFBundleExecutable
@@ -98,6 +100,16 @@
sdkbackf17dcdf22df3bd440fac4c3cbcc76bff
+
+ CFBundleTypeRole
+ Editor
+ CFBundleURLName
+ alipay
+ CFBundleURLSchemes
+
+ alisdkdemo
+
+
CFBundleVersion
$(FLUTTER_BUILD_NUMBER)
@@ -164,6 +176,7 @@
fbauth2
fbshareextension
alipays
+ alipay
alitrip
fleamarket
youku
@@ -189,6 +202,8 @@
获取定位权限用于搜索附近的网点和查找附近的油站信息
NSLocationWhenInUseUsageDescription
获取定位权限用于搜索附近的网点和查找附近的油站信息
+ NSLocationAlwaysAndWhenInUseUsageDescription
+ 获取定位权限用于搜索附近的网点和查找附近的油站信息
NSMicrophoneUsageDescription
获取访问麦克风权限录制语音或视频
NSPhotoLibraryAddUsageDescription
diff --git a/example/lib/main.dart b/example/lib/main.dart
index 0a1fb93..9b6d622 100644
--- a/example/lib/main.dart
+++ b/example/lib/main.dart
@@ -21,6 +21,8 @@ import 'package:zhiying_wechat_teacher/register.dart';
import 'package:zhiying_moments/register.dart';
import 'package:zhiying_member_upgrade/register.dart';
import 'package:zhiying_equity_card/zhiying_equity_card.dart';
+import 'package:zhiying_official/register.dart';
+import 'package:zhiying_base_widget/zhiying_base_widget.dart';
void main() {
FlutterError.onError = (FlutterErrorDetails details) {
@@ -37,21 +39,16 @@ class MyApp extends StatefulWidget {
}
class _MyAppState extends State {
-
Widget getErrorWidget(BuildContext context, FlutterErrorDetails error) {
- var erroStr='';
+ var erroStr = '';
const bool inProduction = const bool.fromEnvironment("dart.vm.product");
- if ( !inProduction) {
- erroStr=error.exceptionAsString();
+ if (!inProduction) {
+ erroStr = error.exceptionAsString();
}
return Center(
child: Text(
- "走神了~"+erroStr,
- style: Theme
- .of(context)
- .textTheme
- .title
- .copyWith(color: Colors.redAccent),
+ "" + erroStr,
+ style: Theme.of(context).textTheme.title.copyWith(color: Colors.grey[200]),
),
);
}
@@ -67,18 +64,19 @@ class _MyAppState extends State {
FriendCircleRegister.init();
MemberUpgradeRegister.init();
EquityCardRegister.init();
+ OfficialRegister.init();
print('初始化百川');
FlutterAlibc.initAlibc(version: "", appName: "").then((result) {
print("白川" + '${result.errorCode} ${result.errorMessage}');
});
MobPushUtil.setCanPush();
+ EventUtil.instance.on().listen((event) {});
// app更新插件
AppUpdateUtil.initXUpdate();
}
-
@override
Widget build(BuildContext context) {
ErrorWidget.builder = (FlutterErrorDetails errorDetails) {
@@ -88,49 +86,54 @@ class _MyAppState extends State {
providers: [
ChangeNotifierProvider.value(value: UserInfoNotifier()),
],
- child: MaterialApp(
- builder: (context,child){
- return MediaQuery(
- //设置文字大小不随系统设置改变
- data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
- child: child,
- );
- },
- theme: ThemeData(
- fontFamily: 'PingFang',
- primaryColor: HexColor.fromHex('#FF4242'),
- accentColor: HexColor.fromHex('#FF4242'),
- ),
- routes: {
- '/homePage': (BuildContext context) => HomePage(),
+ child: GestureDetector(
+ onTap: () {
+ FocusScopeNode currentFocus = FocusScope.of(context);
+ if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) {
+ FocusManager.instance.primaryFocus.unfocus();
+ }
},
- navigatorKey: navigatorKey,
- localizationsDelegates: [
- RefreshLocalizations.delegate,
- GlobalMaterialLocalizations.delegate,
- GlobalWidgetsLocalizations.delegate,
- CommonLocalizationsDelegate(),
- ],
- supportedLocales: [
- const Locale('en'),
- const Locale('zh'),
- ],
- localeResolutionCallback: (Locale locale, Iterable supportedLocales) {
- print("change language ${locale.toString()}");
- return locale;
- },
- home: GestureDetector(
- onTap: () {
- FocusScopeNode currentFocus = FocusScope.of(context);
- if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) {
- FocusManager.instance.primaryFocus.unfocus();
- }
+ child: MaterialApp(
+ builder: (context, child) {
+ return MediaQuery(
+ //设置文字大小不随系统设置改变
+ data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
+ child: child,
+ );
},
- child: LaunchPage(
- // builder: (context) => HomePage(),
+ theme: ThemeData(
+ fontFamily: 'PingFang',
+ primaryColor: HexColor.fromHex('#FF4242'),
+ accentColor: HexColor.fromHex('#FF4242'),
),
+ routes: {
+ '/homePage': (BuildContext context) => HomeCenterPage(),
+ },
+ navigatorKey: navigatorKey,
+ localizationsDelegates: [
+ RefreshLocalizations.delegate,
+ GlobalMaterialLocalizations.delegate,
+ GlobalWidgetsLocalizations.delegate,
+ CommonLocalizationsDelegate(),
+ ],
+ supportedLocales: [
+ const Locale('en'),
+ const Locale('zh'),
+ ],
+ localeResolutionCallback: (Locale locale, Iterable supportedLocales) {
+ print("change language ${locale.toString()}");
+ return locale;
+ },
+ home: LaunchPage(
+ // builder: (context) => HomePage(),
+ ),
),
),
);
}
}
+
+// FocusScopeNode currentFocus = FocusScope.of(context);
+// if (!currentFocus.hasPrimaryFocus && currentFocus.focusedChild != null) {
+// FocusManager.instance.primaryFocus.unfocus();
+// }
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index c1d1019..ed6a08a 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -30,6 +30,8 @@ dev_dependencies:
path: ../../zhiying_business_college
zhiying_equity_card:
path: ../../zhiying_equity_card
+ zhiying_official:
+ path: ../../zhiying_official
#微信导师
zhiying_wechat_teacher:
#path: ../zhiying_wechat_teacher
diff --git a/ios/zhiying_base_widget.podspec b/ios/zhiying_base_widget.podspec
index 8b5e9d9..bceb452 100644
--- a/ios/zhiying_base_widget.podspec
+++ b/ios/zhiying_base_widget.podspec
@@ -16,12 +16,6 @@ A new Flutter plugin.
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
- s.dependency 'mob_sharesdk'
- s.dependency 'mob_sharesdk/ShareSDKExtension'
- s.dependency 'mob_sharesdk/ShareSDKUI'
- s.dependency 'mob_sharesdk/ShareSDKPlatforms/QQ'
- s.dependency 'mob_sharesdk/ShareSDKPlatforms/SinaWeibo'
- s.dependency 'mob_sharesdk/ShareSDKPlatforms/WeChat'
s.platform = :ios, '8.0'
diff --git a/lib/models/app_config_model.dart b/lib/models/app_config_model.dart
index 4ab6574..7c654e3 100644
--- a/lib/models/app_config_model.dart
+++ b/lib/models/app_config_model.dart
@@ -15,7 +15,7 @@ class AppConfigModel {
///新引导页参数
GuideData guideData;
- static String appStartDelay="0.5";
+ static String appStartDelay = "0.5";
static AppConfigModel _config;
@@ -54,7 +54,7 @@ class AppConfigModel {
keys = json['keys'] != null ? new AppConfigKeyModel.fromJson(json['keys']) : null;
guideImage = json['guide_image'] != null ? new AppConfigGuideModel.fromJson(json['guide_image']) : null;
guideData = json['guide_data'] != null ? GuideData.fromJson(json['guide_data']) : null;
- appStartDelay=json['app_start_delay']!=null?json['app_start_delay']:'0.5';
+ appStartDelay = json['app_start_delay'] != null ? json['app_start_delay'] : '0.5';
}
Map toJson() {
@@ -75,6 +75,7 @@ class AppConfigKeyModel {
AppConfigKeyItemModel weixin;
AppConfigKeyItemModel jdIos;
AppConfigKeyItemModel jdAndroid;
+ GDModel gd;
AppConfigKeyModel({this.weibo, this.qq, this.weixin, this.jdIos, this.jdAndroid});
@@ -84,6 +85,7 @@ class AppConfigKeyModel {
weixin = json['weixin'] != null ? new AppConfigKeyItemModel.fromJson(json['weixin']) : null;
jdIos = json['jd_ios'] != null ? new AppConfigKeyItemModel.fromJson(json['jd_ios']) : null;
jdAndroid = json['jd_android'] != null ? new AppConfigKeyItemModel.fromJson(json['jd_android']) : null;
+ gd = json['gd'] != null ? GDModel.fromJson(json['gd']) : null;
}
Map toJson() {
@@ -103,6 +105,10 @@ class AppConfigKeyModel {
if (this.jdAndroid != null) {
data['jd_android'] = this.jdAndroid.toJson();
}
+ if (this.gd != null) {
+ data['gd'] = this.gd.toJson();
+ }
+
return data;
}
}
@@ -216,3 +222,22 @@ class AppConfigGuideModel {
return data;
}
}
+
+class GDModel {
+ String androidKey;
+ String iosKey;
+
+ GDModel({this.androidKey, this.iosKey});
+
+ GDModel.fromJson(Map json) {
+ androidKey = json['android_key'];
+ iosKey = json['ios_key'];
+ }
+
+ Map toJson() {
+ final Map data = new Map();
+ data['android_key'] = this.androidKey;
+ data['ios_key'] = this.iosKey;
+ return data;
+ }
+}
diff --git a/lib/pages/custom_page/bloc/custom_item_page_repository.dart b/lib/pages/custom_page/bloc/custom_item_page_repository.dart
index 43d241d..1dc43d5 100644
--- a/lib/pages/custom_page/bloc/custom_item_page_repository.dart
+++ b/lib/pages/custom_page/bloc/custom_item_page_repository.dart
@@ -1,3 +1,6 @@
+import 'dart:async';
+
+import 'package:zhiying_base_widget/pages/custom_page/event/reload_event.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
class CustomItemPageRepository {
@@ -15,10 +18,16 @@ class CustomItemPageRepository {
if (!EmptyUtil.isEmpty(reqUrl)) {
var result = await NetUtil.post(reqUrl, method: NetMethod.GET, cache: true);
if (NetUtil.isSuccess(result) && !EmptyUtil.isEmpty(result[GlobalConfig.HTTP_RESPONSE_KEY_DATA])) {
- List mobList = !EmptyUtil.isEmpty(data) ? List.from(result[GlobalConfig.HTTP_RESPONSE_KEY_DATA][tabIndex.toString()]) : List.from(result[GlobalConfig.HTTP_RESPONSE_KEY_DATA]);
+ List mobList =
+ !EmptyUtil.isEmpty(data) ? List.from(result[GlobalConfig.HTTP_RESPONSE_KEY_DATA][tabIndex.toString()]) : List.from(result[GlobalConfig.HTTP_RESPONSE_KEY_DATA]);
if (!EmptyUtil.isEmpty(mobList)) {
+ ReloadEvent.com = 0;
return mobList.map((e) => Map.from(e)).toList();
}
+ } else {
+ Timer(Duration(milliseconds: 1000), () {
+ EventUtil.instance.fire(ReloadEvent());
+ });
}
}
} catch (e, s) {
diff --git a/lib/pages/custom_page/bloc/custom_page_repository.dart b/lib/pages/custom_page/bloc/custom_page_repository.dart
index 83cd9a4..8eff7a1 100644
--- a/lib/pages/custom_page/bloc/custom_page_repository.dart
+++ b/lib/pages/custom_page/bloc/custom_page_repository.dart
@@ -1,5 +1,8 @@
+import 'dart:async';
import 'dart:convert';
+import 'package:zhiying_base_widget/dialog/loading/loading.dart';
+import 'package:zhiying_base_widget/pages/custom_page/event/reload_event.dart';
import 'package:zhiying_base_widget/pages/main_page/model/background_model.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
@@ -37,6 +40,12 @@ class CustomPageRepository {
}
return customPageData;
}
+ }else{
+
+ Timer(Duration(milliseconds: 1000), (){
+ EventUtil.instance.fire(ReloadEvent());
+ });
+
}
}
} catch (e, s) {
diff --git a/lib/pages/custom_page/custom_item_page.dart b/lib/pages/custom_page/custom_item_page.dart
index 83afea4..fe12c86 100644
--- a/lib/pages/custom_page/custom_item_page.dart
+++ b/lib/pages/custom_page/custom_item_page.dart
@@ -92,7 +92,6 @@ class __CustomItemPageContainerState extends State<_CustomItemPageContainer> wit
_eventBus = EventBus();
_refreshController = RefreshController(initialRefresh: false);
_initEvent();_controller.addListener(() {
- print(_controller.offset.toString());
if(widget.scroller!=null){
widget?.scroller(_controller.offset);
}
@@ -166,6 +165,7 @@ class __CustomItemPageContainerState extends State<_CustomItemPageContainer> wit
header: RefreshGifHeader(),
// footer: RefreshFooter(),
child: CustomScrollView(
+ physics: BouncingScrollPhysics(),
controller: _controller,
slivers: _buildContentWidgets(model),
),
diff --git a/lib/pages/custom_page/custom_page.dart b/lib/pages/custom_page/custom_page.dart
index 454a00e..8e8c075 100644
--- a/lib/pages/custom_page/custom_page.dart
+++ b/lib/pages/custom_page/custom_page.dart
@@ -60,7 +60,7 @@ class _CommonPageContainer extends StatefulWidget {
__CommonPageContainerState createState() => __CommonPageContainerState();
}
-class __CommonPageContainerState extends State<_CommonPageContainer> with SingleTickerProviderStateMixin ,AutomaticKeepAliveClientMixin{
+class __CommonPageContainerState extends State<_CommonPageContainer> with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
TabController _tabController;
// 是否有AppBar
@@ -80,7 +80,7 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
@override
void initState() {
- backgroundBloc=BackgroundBloc();
+ backgroundBloc = BackgroundBloc();
super.initState();
}
@@ -94,40 +94,38 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
@override
Widget build(BuildContext context) {
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark);
- return MediaQuery.removePadding(
- context: context,
- child: BlocConsumer(
- listener: (context, state) {},
- buildWhen: (prev, current) {
- if (current is CustomPageErrorState) {
- return false;
- }
- if (current is CustomPageRefreshSuccessState) {
- // _refreshController.refreshCompleted(resetFooterState: true);
- return false;
- }
- if (current is CustomPageRefreshErrorState) {
- // _refreshController.refreshFailed();
- return false;
- }
- return true;
- },
- builder: (context, state) {
- /// 有数据
- if (state is CustomPageLoadedState) {
- if (EmptyUtil.isEmpty(state.model)) return _buildEmptyWidget();
- return _buildMainWidget(state.model, state.backgroundModel);
- }
-
- /// 初始化失败
- if (state is CustomPageInitErrorState) {
- return _buildEmptyWidget();
- }
-
- /// 骨架图
- return _buildSkeletonWidget();
- },
- ),
+ return BlocConsumer(
+ listener: (context, state) {},
+ buildWhen: (prev, current) {
+ if (current is CustomPageErrorState) {
+ return false;
+ }
+ if (current is CustomPageRefreshSuccessState) {
+ // _refreshController.refreshCompleted(resetFooterState: true);
+ return false;
+ }
+ if (current is CustomPageRefreshErrorState) {
+ // _refreshController.refreshFailed();
+ return false;
+ }
+ return true;
+ },
+ builder: (context, state) {
+ /// 有数据
+ if (state is CustomPageLoadedState) {
+ if (EmptyUtil.isEmpty(state.model)) return _buildEmptyWidget();
+ Logger.log("通用模板数据", state.model);
+ return _buildMainWidget(state.model, state.backgroundModel);
+ }
+
+ /// 初始化失败
+ if (state is CustomPageInitErrorState) {
+ return _buildEmptyWidget();
+ }
+
+ /// 骨架图
+ return _buildSkeletonWidget();
+ },
);
}
@@ -271,7 +269,11 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
onPressed: () => Navigator.maybePop(context),
),
title: Text(
- null != data && data.containsKey('app_bar_name') ? data['app_bar_name'] != '自定义页面' ? data['app_bar_name'] : parentTitle : parentTitle,
+ null != data && data.containsKey('app_bar_name')
+ ? data['app_bar_name'] != '自定义页面'
+ ? data['app_bar_name']
+ : parentTitle
+ : parentTitle,
style: TextStyle(
color: HexColor.fromHex(null != data ? data['app_bar_name_color'] ?? '#333333' : '#333333'),
fontSize: 16,
@@ -370,16 +372,15 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
return result;
}
-
_buildBackground(BackgroundModel backgroundModel) {
if (backgroundModel != null) {
var headerBg = backgroundModel.headerBg;
return StreamBuilder(
stream: backgroundBloc.outData,
- builder: (context,asncy){
- return Container(
+ builder: (context, asncy) {
+ return Container(
constraints: BoxConstraints(minHeight: 0),
- height: (double.tryParse(headerBg?.height)??0)+backgroundTopMargin ?? 0,
+ height: (double.tryParse(headerBg?.height) ?? 0) + backgroundTopMargin ?? 0,
width: double.infinity,
decoration: BoxDecoration(
gradient: LinearGradient(
@@ -389,7 +390,6 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
);
},
);
-
} else {
return Container();
}
@@ -423,7 +423,7 @@ class __CommonPageContainerState extends State<_CommonPageContainer> with Single
@override
// TODO: implement wantKeepAlive
- bool get wantKeepAlive =>true;
+ bool get wantKeepAlive => true;
}
/// 回到顶部的icon
diff --git a/lib/pages/custom_page/event/reload_event.dart b/lib/pages/custom_page/event/reload_event.dart
new file mode 100644
index 0000000..344c4dd
--- /dev/null
+++ b/lib/pages/custom_page/event/reload_event.dart
@@ -0,0 +1,12 @@
+//
+import 'dart:async';
+
+class ReloadEvent {
+ static int com = 0;
+ final String id;
+
+ ReloadEvent({this.id}) {
+ com++;
+ }
+
+}
diff --git a/lib/pages/goods_share_page/goods_share_image/goods_share_image.dart b/lib/pages/goods_share_page/goods_share_image/goods_share_image.dart
index 96d814a..8af4d0e 100644
--- a/lib/pages/goods_share_page/goods_share_image/goods_share_image.dart
+++ b/lib/pages/goods_share_page/goods_share_image/goods_share_image.dart
@@ -27,6 +27,7 @@ import 'package:zhiying_base_widget/widgets/public/custom_button/custom_button_m
import 'package:zhiying_base_widget/widgets/share/models/share_data_model.dart';
import 'package:zhiying_base_widget/widgets/share/share_alert.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
+import 'package:zhiying_comm/zhiying_comm.dart';
class GoodsShareImage extends StatefulWidget {
final Map model;
@@ -177,15 +178,15 @@ class _GoodsShareImageContentState extends State<_GoodsShareImageContent> with A
);
List moreImageList = List();
- try{
+ try {
moreImageList = List.from(widget?.params['image_url_list']).map((e) => e.toString()).toList();
- }catch(e,s){
+ } catch (e, s) {
print(e);
print(s);
}
_style.customImage.addAll(moreImageList);
- _style.customImage=_style.customImage.reversed.toList();
+ _style.customImage = _style.customImage.reversed.toList();
for (int index = 0; index < _style.customImage.length; index++) {
String image = _style.customImage[index];
// 分享图片
@@ -344,17 +345,16 @@ class _GoodsShareImageContentState extends State<_GoodsShareImageContent> with A
}
List paths = await ImageDownloadUtil.download(images);
- for(var item in paths){
+ for (var item in paths) {
Uint8List data = File(item).readAsBytesSync();
isSaveSuccess = await SaveImage.save(imageBytes: data);
}
if (isSaveSuccess) {
Fluttertoast.showToast(msg: '保存成功');
- } else{
+ } else {
Fluttertoast.showToast(msg: '保存失败');
}
-
Loading.dismiss();
}
@@ -363,11 +363,14 @@ class _GoodsShareImageContentState extends State<_GoodsShareImageContent> with A
BuildContext buildContext = _globalKey.currentContext;
if (null != buildContext) {
RenderRepaintBoundary boundary = buildContext.findRenderObject();
- ui.Image image = await boundary.toImage(pixelRatio: 1.5);
+ ui.Image image = await boundary.toImage(pixelRatio: 4);
// 注意:png是压缩后格式,如果需要图片的原始像素数据,请使用rawRgba
+ Loading.show(context);
ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png);
Uint8List pngBytes = byteData.buffer.asUint8List();
- _shareModel.poster = pngBytes;
+ File file = await EncodeUtil.compressImage(context,images: pngBytes, size: 400);
+ Loading.dismiss();
+ _shareModel.poster = file.readAsBytesSync();
}
} else {
_shareModel.poster = null;
diff --git a/lib/pages/goods_share_page/goods_share_link/goods_share_link.dart b/lib/pages/goods_share_page/goods_share_link/goods_share_link.dart
index 1acc067..1ec6de5 100644
--- a/lib/pages/goods_share_page/goods_share_link/goods_share_link.dart
+++ b/lib/pages/goods_share_page/goods_share_link/goods_share_link.dart
@@ -24,8 +24,7 @@ class GoodsShareLink extends StatefulWidget {
final String shareType;
- const GoodsShareLink(this.model, this.params, this.shareType, {Key key})
- : super(key: key);
+ const GoodsShareLink(this.model, this.params, this.shareType, {Key key}) : super(key: key);
@override
_GoodsShareLinkState createState() => _GoodsShareLinkState();
@@ -36,8 +35,7 @@ class _GoodsShareLinkState extends State {
Widget build(BuildContext context) {
return BlocProvider(
bloc: GoodsShareContentBloc(),
- child:
- _GoodsShareLinkContent(widget.model, widget.params, widget.shareType),
+ child: _GoodsShareLinkContent(widget.model, widget.params, widget.shareType),
);
}
}
@@ -49,16 +47,13 @@ class _GoodsShareLinkContent extends StatefulWidget {
// final GoodsShareTempDataModel datas;
- const _GoodsShareLinkContent(this.model, this.params, this.shareType,
- {Key key})
- : super(key: key);
+ const _GoodsShareLinkContent(this.model, this.params, this.shareType, {Key key}) : super(key: key);
@override
_GoodsShareLinkContentState createState() => _GoodsShareLinkContentState();
}
-class _GoodsShareLinkContentState extends State<_GoodsShareLinkContent>
- with AutomaticKeepAliveClientMixin {
+class _GoodsShareLinkContentState extends State<_GoodsShareLinkContent> with AutomaticKeepAliveClientMixin {
GoodsShareImageModel _style;
Map _images = Map();
List widgets = List();
@@ -95,6 +90,13 @@ class _GoodsShareLinkContentState extends State<_GoodsShareLinkContent>
if (_content == null || _content == '') {
_content = data.shareContent;
}
+
+ _shareModel.image = List();
+
+ _shareModel.title = data?.appName ?? "";
+ _shareModel.content=_content;
+ // _shareModel.image.add(data?.imgUrl ?? "");
+
widgets.add(GoodsShareItem(
imgHeader: _style?.cssList?.headerImage ?? '',
imgCheck: _style?.cssList?.unChooseImage ?? '',
@@ -125,10 +127,7 @@ class _GoodsShareLinkContentState extends State<_GoodsShareLinkContent>
onEditorClick: () {
Fluttertoast.showToast(msg: '正在开发中');
return;
- Navigator.push(
- context,
- CupertinoPageRoute(
- builder: (context) => GoodsShareEditor(_style)));
+ Navigator.push(context, CupertinoPageRoute(builder: (context) => GoodsShareEditor(_style)));
},
onTempChange: (temp) {
setState(() {
@@ -160,34 +159,25 @@ class _GoodsShareLinkContentState extends State<_GoodsShareLinkContent>
child: Container(
margin: EdgeInsets.only(bottom: 4),
padding: EdgeInsets.only(top: 10),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.only(
- bottomLeft: Radius.circular(8),
- bottomRight: Radius.circular(8))),
+ decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.only(bottomLeft: Radius.circular(8), bottomRight: Radius.circular(8))),
child: SingleChildScrollView(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: MainAxisAlignment.start,
- children: widgets),
+ child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: widgets),
),
),
),
- _createBottom(),
+ _createBottom(data),
],
);
});
}
- Widget _createBottom() {
+ Widget _createBottom(GoodsShareTempDataModel data) {
Map shareImages = _style?.cssList?.shareLink;
if (shareImages == null) {
return Container();
}
- CustomButtonModel btnCopy = CustomButtonModel.fromJson(
- Map.from(shareImages['copy_btn']));
- CustomButtonModel btnShare = CustomButtonModel.fromJson(
- Map.from(shareImages['share_btn']));
+ CustomButtonModel btnCopy = CustomButtonModel.fromJson(Map.from(shareImages['copy_btn']));
+ CustomButtonModel btnShare = CustomButtonModel.fromJson(Map.from(shareImages['share_btn']));
return SafeArea(
child: Container(
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 4, bottom: 4),
@@ -202,7 +192,11 @@ class _GoodsShareLinkContentState extends State<_GoodsShareLinkContent>
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(18),
),
- child: CustomButton(btnCopy)),
+ child: GestureDetector(
+ onTap: () {
+ Clipboard.setData(ClipboardData(text: _content));
+ },
+ child: CustomButton(btnCopy))),
btnShare == null
? Container()
: GestureDetector(
@@ -225,15 +219,16 @@ class _GoodsShareLinkContentState extends State<_GoodsShareLinkContent>
}
void _showShare() async {
- List images = List();
- for (int index = 0; index < _style.customImage.length; index++) {
- if (_images.containsKey(index)) {
- images.add(_images[index]);
- }
- }
- if (images.length >= 0) {
- _shareModel.image = images;
- }
+ // List images = List();
+ // for (int index = 0; index < _style.customImage.length; index++) {
+ // if (_images.containsKey(index)) {
+ // images.add(_images[index]);
+ // }
+ // }
+ // if (images.length >= 0) {
+ // _shareModel.image = images;
+ // }
+
showCupertinoModalPopup(
context: context,
builder: (context) => ShareAlert(
diff --git a/lib/pages/goods_share_page/goods_share_miniprogram/goods_share_miniprogram.dart b/lib/pages/goods_share_page/goods_share_miniprogram/goods_share_miniprogram.dart
index 2d8cbb3..9459fba 100644
--- a/lib/pages/goods_share_page/goods_share_miniprogram/goods_share_miniprogram.dart
+++ b/lib/pages/goods_share_page/goods_share_miniprogram/goods_share_miniprogram.dart
@@ -9,6 +9,9 @@ import 'package:zhiying_base_widget/pages/goods_share_page/widgets/goods_share_m
import 'package:zhiying_base_widget/widgets/public/custom_button/custom_bottom.dart';
import 'package:zhiying_base_widget/widgets/public/custom_button/custom_button_model.dart';
import 'package:zhiying_comm/util/base_bloc.dart';
+import 'package:zhiying_comm/zhiying_comm.dart';
+import 'package:sharesdk_plugin/sharesdk_plugin.dart';
+import 'package:fluwx/fluwx.dart';
class GoodsShareMiniprogram extends StatefulWidget {
final Map model;
@@ -16,9 +19,7 @@ class GoodsShareMiniprogram extends StatefulWidget {
final String shareType;
- const GoodsShareMiniprogram(this.model, this.params, this.shareType,
- {Key key})
- : super(key: key);
+ const GoodsShareMiniprogram(this.model, this.params, this.shareType, {Key key}) : super(key: key);
@override
_GoodsShareMiniprogramState createState() => _GoodsShareMiniprogramState();
@@ -29,8 +30,7 @@ class _GoodsShareMiniprogramState extends State {
Widget build(BuildContext context) {
return BlocProvider(
bloc: GoodsShareContentBloc(),
- child: _GoodsShareMiniprogramContent(
- widget.model, widget.params, widget.shareType),
+ child: _GoodsShareMiniprogramContent(widget.model, widget.params, widget.shareType),
);
}
}
@@ -40,18 +40,13 @@ class _GoodsShareMiniprogramContent extends StatefulWidget {
final Map params;
final String shareType;
- const _GoodsShareMiniprogramContent(this.model, this.params, this.shareType,
- {Key key})
- : super(key: key);
+ const _GoodsShareMiniprogramContent(this.model, this.params, this.shareType, {Key key}) : super(key: key);
@override
- _GoodsShareMiniprogramContentState createState() =>
- _GoodsShareMiniprogramContentState();
+ _GoodsShareMiniprogramContentState createState() => _GoodsShareMiniprogramContentState();
}
-class _GoodsShareMiniprogramContentState
- extends State<_GoodsShareMiniprogramContent>
- with AutomaticKeepAliveClientMixin {
+class _GoodsShareMiniprogramContentState extends State<_GoodsShareMiniprogramContent> with AutomaticKeepAliveClientMixin {
GoodsShareImageModel _style;
Map _images = Map();
List widgets = List();
@@ -85,11 +80,7 @@ class _GoodsShareMiniprogramContentState
child: Container(
margin: EdgeInsets.only(bottom: 4),
padding: EdgeInsets.only(top: 10),
- decoration: BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.only(
- bottomLeft: Radius.circular(8),
- bottomRight: Radius.circular(8))),
+ decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.only(bottomLeft: Radius.circular(8), bottomRight: Radius.circular(8))),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -112,22 +103,21 @@ class _GoodsShareMiniprogramContentState
),
),
),
- _createBottom(),
+ _createBottom(data),
],
);
});
return Material();
}
- Widget _createBottom() {
- Map shareImages = _style.cssList.shareImage;
+ Widget _createBottom(GoodsShareTempDataModel data) {
+ Map shareImages = _style.cssList.shareMini;
if (shareImages == null) {
return Container();
}
// CustomButtonModel btnCopy = CustomButtonModel.fromJson(
// Map.from(shareImages['copy_btn']));
- CustomButtonModel btnShare = CustomButtonModel.fromJson(
- Map.from(shareImages['share_btn']));
+ CustomButtonModel btnShare = CustomButtonModel.fromJson(Map.from(shareImages['share_btn']));
return SafeArea(
child: Container(
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 4, bottom: 4),
@@ -145,11 +135,27 @@ class _GoodsShareMiniprogramContentState
borderRadius: BorderRadius.circular(18),
),
child: CustomButton(btnShare)),
- onTap: () {},
+ onTap: () {
+ print(data.toJson());
+ _shareMini(data);
+ },
),
],
),
),
);
}
+
+ void _shareMini(GoodsShareTempDataModel data) {
+ WeChatShareMiniProgramModel shareMiniProgramModel = WeChatShareMiniProgramModel(
+ miniProgramType: WXMiniProgramType.RELEASE,
+ userName: data?.userName,
+ webPageUrl: data?.page,
+ path: data?.page,
+ title: data?.miniAppTitle,
+ thumbnail: WeChatImage.network(data?.imageUrl));
+
+ shareToWeChat(shareMiniProgramModel);
+
+ }
}
diff --git a/lib/pages/goods_share_page/goods_share_page.dart b/lib/pages/goods_share_page/goods_share_page.dart
index 04be686..a79b750 100644
--- a/lib/pages/goods_share_page/goods_share_page.dart
+++ b/lib/pages/goods_share_page/goods_share_page.dart
@@ -49,9 +49,10 @@ class _GoodsShareContainerState extends State<_GoodsShareContainer>
// Map data =
// Map.from(convert.jsonDecode(d));
Map data = widget.model;
- Logger.debug(data['share_url_args'].toString());
+ Logger.debug(data.toString());
_bloc = BlocProvider.of(context);
_params = data['share_url_args'];
+ _params['good_id']=data['good_id'];
_bloc.loadData('taobao', _params);
super.initState();
}
diff --git a/lib/pages/goods_share_page/models/goods_share_style_model.dart b/lib/pages/goods_share_page/models/goods_share_style_model.dart
index cd3875f..7c44f26 100644
--- a/lib/pages/goods_share_page/models/goods_share_style_model.dart
+++ b/lib/pages/goods_share_page/models/goods_share_style_model.dart
@@ -11,6 +11,7 @@ class GoodsShareStyleModel {
Map shareImage;
GoodsShareTempEditorModel editTemplate;
Map shareLink;
+ Map shareMini;
GoodsShareStyleModel(
{this.unChooseColor,
@@ -33,6 +34,7 @@ class GoodsShareStyleModel {
rewardText = json['reward_text'];
shareImage = json['share_image'];
shareLink=json['share_link'];
+ shareMini=json['share_mini'];
if (json['edit_template'] != null) {
editTemplate = GoodsShareTempEditorModel.fromJson(
Map.from(json['edit_template']));
diff --git a/lib/pages/goods_share_page/models/goods_share_temp_add_model.dart b/lib/pages/goods_share_page/models/goods_share_temp_add_model.dart
index 606cfd5..2f6bae7 100644
--- a/lib/pages/goods_share_page/models/goods_share_temp_add_model.dart
+++ b/lib/pages/goods_share_page/models/goods_share_temp_add_model.dart
@@ -14,12 +14,13 @@ class GoodsShareTempDataModel {
String miniAppCode;
String miniAppDesc;
- GoodsShareTempDataModel(
- {this.shareContent,
- this.shareTemplate,
- this.shareTip,
- this.appUrl,
- this.miniAppUrl});
+ String appId;
+ String userName;
+ String miniprogramType;
+ String page;
+ String imageUrl;
+
+ GoodsShareTempDataModel({this.shareContent, this.shareTemplate, this.shareTip, this.appUrl, this.miniAppUrl});
GoodsShareTempDataModel.fromJson(Map json) {
shareContent = json['template_content'];
@@ -41,14 +42,18 @@ class GoodsShareTempDataModel {
miniAppCode = json['mini_app_code'];
miniAppDesc = json['mini_app_desc'];
imgUrl = json['image_url'];
+ appId = json['app_id'];
+ userName = json['user_name'];
+ miniprogramType = json['miniprogram_type'];
+ page = json['page'];
+ imageUrl=json['image_url'];
}
Map toJson() {
final Map data = new Map();
data['share_content'] = this.shareContent;
if (this.shareTemplate != null) {
- data['template_content'] =
- this.shareTemplate.map((v) => v.toJson()).toList();
+ data['template_content'] = this.shareTemplate.map((v) => v.toJson()).toList();
}
data['share_tip'] = this.shareTip;
data['app_url'] = this.appUrl;
@@ -64,6 +69,10 @@ class GoodsShareTempDataModel {
data['mini_app_url'] = this.miniAppUrl;
data['mini_app_code'] = this.miniAppCode;
data['mini_app_desc'] = this.miniAppDesc;
+ data['app_id'] = appId;
+ data['user_name'] = userName;
+ data['miniprogram_type'] = miniprogramType;
+ data['page'] = page;
return data;
}
}
diff --git a/lib/pages/goods_share_page/widgets/goods_share_miniprogram_widget.dart b/lib/pages/goods_share_page/widgets/goods_share_miniprogram_widget.dart
index 01dc17c..f8b9ec3 100644
--- a/lib/pages/goods_share_page/widgets/goods_share_miniprogram_widget.dart
+++ b/lib/pages/goods_share_page/widgets/goods_share_miniprogram_widget.dart
@@ -56,12 +56,12 @@ class GoodsShareMiniprogramWidget extends StatelessWidget {
),
Row(
children: [
- Container(
- margin: EdgeInsets.only(right: 6),
- width: 15,
- height: 15,
- // color: Colors.redAccent,
- ),
+ // Container(
+ // margin: EdgeInsets.only(right: 6),
+ // width: 15,
+ // height: 15,
+ // // color: Colors.redAccent,
+ // ),
Text(
'小程序',
style: TextStyle(fontSize: 11, color: Color(0xff333333)),
diff --git a/lib/pages/guide_page/guide_page.dart b/lib/pages/guide_page/guide_page.dart
index 837e140..7dc71a9 100644
--- a/lib/pages/guide_page/guide_page.dart
+++ b/lib/pages/guide_page/guide_page.dart
@@ -59,15 +59,21 @@ class _GuidePageState extends State {
height: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
- image: Image.memory(
- bgImage,
- ).image,
+ image: bgImage != null
+ ? Image.memory(
+ bgImage,
+ ).image
+ : CachedNetworkImageProvider(""),
fit: BoxFit.fill)),
child: Center(
- child: Image.memory(
- widget.imageDatas[index],
- fit: BoxFit.fitWidth,
- ))),
+ child: widget.imageDatas[index] != null
+ ? Image.memory(
+ widget.imageDatas[index],
+ fit: BoxFit.fitWidth,
+ )
+ : Container(
+ color: Colors.white,
+ ))),
index == widget?.bgImageDatas?.length - 1
? Positioned(
left: 0,
diff --git a/lib/pages/home_page/home_page.dart b/lib/pages/home_page/home_page.dart
index 859cfac..a463313 100644
--- a/lib/pages/home_page/home_page.dart
+++ b/lib/pages/home_page/home_page.dart
@@ -22,8 +22,10 @@ import 'package:zhiying_base_widget/dialog/global_dialog/notification_setting_di
import 'package:zhiying_base_widget/dialog/global_dialog/policy_dialog/policy_dialog.dart';
import 'package:zhiying_base_widget/dialog/tip_dialog/tip_dialog.dart';
import 'package:zhiying_base_widget/models/app_config_model.dart';
+import 'package:zhiying_base_widget/pages/custom_page/event/reload_event.dart';
import 'package:zhiying_base_widget/utils/contants.dart';
import 'package:zhiying_base_widget/utils/mob_push_util.dart';
+import 'package:zhiying_base_widget/widgets/restart_widget/restart_widget.dart';
import 'package:zhiying_comm/models/base/base_tab_model.dart';
import 'package:zhiying_comm/util/image_util.dart';
import 'package:zhiying_comm/util/mob_util/mob_util.dart';
@@ -39,6 +41,18 @@ import 'package:zhiying_comm/util/event_util/event_util.dart';
import 'package:zhiying_comm/util/event_util/log_out.dart';
import 'package:package_info/package_info.dart';
+class HomeCenterPage extends StatefulWidget {
+ @override
+ _HomeCenterPageState createState() => _HomeCenterPageState();
+}
+
+class _HomeCenterPageState extends State {
+ @override
+ Widget build(BuildContext context) {
+ return RestartWidget(child: HomePage());
+ }
+}
+
class HomePage extends StatefulWidget {
HomePage({Key key}) : super(key: key);
@@ -52,21 +66,33 @@ class _HomePageState extends State with WidgetsBindingObserver, Ticker
static const EventChannel _eventChannel = const EventChannel('JAVA_TO_FLUTTER');
StreamSubscription streamSubscription;
+ StreamSubscription reloadSubscription;
+ StreamSubscription aliasSubscription;
+ StreamSubscription logOutSubscription;
+ StreamSubscription loginSubscription;
+
+ StreamSubscription eventChannelSubscription;
+
@override
void initState() {
///初始化一些数据
initAsync();
//如果登出则重新打开首页
- streamSubscription = EventUtil.instance.on().listen((event) async{
- UserInfoModel user =
- await Provider.of(context, listen: false)
- .getUserInfoModel();
- user.token='';
+ streamSubscription = EventUtil.instance.on().listen((event) async {
+ UserInfoModel user = await Provider.of(context, listen: false).getUserInfoModel();
+ user.token = '';
Navigator.maybePop(context);
+ print("重启1");
Navigator.pushReplacementNamed(context, "/homePage");
});
+ reloadSubscription = EventUtil.instance.on().listen((event) async {
+ print("重启2");
+ await BaseSettingModel.init(isGetCache: false);
+ RestartWidget.restartApp(context);
+ });
+
super.initState();
}
@@ -82,16 +108,9 @@ class _HomePageState extends State with WidgetsBindingObserver, Ticker
NativeUtil.notifyInitSuccess();
});
});
- String data = BaseSettingModel.setting.tab['data'];
- try {
- List list = convert.jsonDecode(data);
- _data = list.map((item) {
- return Map.from(item);
- }).toList();
- Logger.debug(_data);
- } catch (error) {
- Logger.error(error);
- }
+
+ initBaseSet();
+
Constants.isShowIntellectDialog = false;
TaobaoAuth.initAuth(context);
@@ -108,10 +127,10 @@ class _HomePageState extends State with WidgetsBindingObserver, Ticker
//app后台杀死时候的还原
Moblink.restoreScene(_restore);
// 监听开始(传递监听到原生端,用户监听场景还原的数据回传回来)
- _eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError);
+ eventChannelSubscription= _eventChannel.receiveBroadcastStream().listen(_onEvent, onError: _onError);
MobPushUtil.addPushReceiver();
- EventUtil.instance.on().listen((event) async {
+ aliasSubscription = EventUtil.instance.on().listen((event) async {
UserInfoModel userInfo = UserInfoNotifier?.staitcUserInfo;
var setting = await NativeUtil.getSetting();
String masterId = setting['master_id'];
@@ -121,12 +140,12 @@ class _HomePageState extends State with WidgetsBindingObserver, Ticker
}
});
- EventUtil.instance.on().listen((event) {
+ logOutSubscription = EventUtil.instance.on().listen((event) {
MobPushUtil.deleteAlias();
});
- super.initState();
+
MobPushUtil.addPushReceiver();
- EventUtil.instance.on().listen((event) async {
+ loginSubscription = EventUtil.instance.on().listen((event) async {
UserInfoModel userInfo = UserInfoNotifier?.staitcUserInfo;
var setting = await NativeUtil.getSetting();
String masterId = setting['master_id'];
@@ -136,19 +155,36 @@ class _HomePageState extends State with WidgetsBindingObserver, Ticker
}
});
- EventUtil.instance.on().listen((event) {
- MobPushUtil.deleteAlias();
- });
+
} catch (e, s) {
print(e);
print(s);
}
+
+ }
+
+ initBaseSet() {
+ String data = BaseSettingModel.setting.tab['data'];
+ try {
+ List list = convert.jsonDecode(data);
+ _data = list.map((item) {
+ return Map.from(item);
+ }).toList();
+ Logger.debug(_data);
+ } catch (error) {
+ Logger.error(error);
+ }
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
streamSubscription.cancel();
+ reloadSubscription?.cancel();
+ aliasSubscription?.cancel();
+ logOutSubscription?.cancel();
+ loginSubscription?.cancel();
+ eventChannelSubscription?.cancel();
super.dispose();
}
diff --git a/lib/pages/hot_ranking_page/hot_ranking_page_sk.dart b/lib/pages/hot_ranking_page/hot_ranking_page_sk.dart
index caefe4d..905bdc9 100644
--- a/lib/pages/hot_ranking_page/hot_ranking_page_sk.dart
+++ b/lib/pages/hot_ranking_page/hot_ranking_page_sk.dart
@@ -35,7 +35,7 @@ class HotRankingPageSkeleton extends StatelessWidget {
_buildBottomListItem() {
List listWidget = List();
- for (var index = 0; index < 3; index++) {
+ for (var index = 0; index < 10; index++) {
listWidget.add(Container(
margin: EdgeInsets.only(left: 16, top: 10, bottom: 10),
child: Row(
diff --git a/lib/pages/launch_page/launch_page.dart b/lib/pages/launch_page/launch_page.dart
index 0394013..eb58166 100644
--- a/lib/pages/launch_page/launch_page.dart
+++ b/lib/pages/launch_page/launch_page.dart
@@ -40,14 +40,12 @@ class LaunchPage extends StatefulWidget {
class _LaunchPageState extends State with TickerProviderStateMixin {
final GlobalKey navigatorKey = new GlobalKey();
- ///闪屏动画
- AnimationController animationController;
int showTime = 0;
@override
void initState() {
- animationController = AnimationController(vsync: this);
+
validateInit();
super.initState();
}
@@ -59,7 +57,6 @@ class _LaunchPageState extends State with TickerProviderStateMixin {
Logger.debug('ConnectivityResult.wifi');
print('ConnectivityResult.wifi');
Application.init().then((_) async {
-
///引导页
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String versionNumber = await SharedPreferencesUtil.getStringValue(Constants.versionNumber);
@@ -76,7 +73,8 @@ class _LaunchPageState extends State with TickerProviderStateMixin {
// CupertinoPageRoute(builder: (context) => HomePage()));
Navigator.of(context).pushReplacementNamed('/homePage');
}
- }).catchError((err) async {
+ }).catchError((err, s) async {
+ print(s);
// if (err.toString().contains("BaseSettingModel")) {
// await showDialog(
// context: context,
@@ -121,22 +119,30 @@ class _LaunchPageState extends State with TickerProviderStateMixin {
Dio dio = Dio();
print("加载图片");
List guideImages = List();
- ListbgImages = List();
+ List bgImages = List();
for (int i = 0; i < guide.guideData.guideCss.length; i++) {
- Response response = await dio.get(guide.guideData.guideCss[i].contentImage, options: Options(responseType: ResponseType.bytes));
- if (response.statusCode == 200) {
- Uint8List data = Uint8List.fromList(response.data);
- guideImages.add(data);
+ try {
+ Response response = await dio.get(guide.guideData.guideCss[i].contentImage, options: Options(responseType: ResponseType.bytes));
+ if (response.statusCode == 200) {
+ Uint8List data = Uint8List.fromList(response.data);
+ guideImages.add(data);
+ }
+ } catch (e, s) {
+ guideImages.add(null);
}
- response = await dio.get(guide.guideData.guideCss[i].bgImage, options: Options(responseType: ResponseType.bytes));
- if (response.statusCode == 200) {
- Uint8List data = Uint8List.fromList(response.data);
- bgImages.add(data);
+
+ try {
+ Response response = await dio.get(guide.guideData.guideCss[i].bgImage, options: Options(responseType: ResponseType.bytes));
+ if (response.statusCode == 200) {
+ Uint8List data = Uint8List.fromList(response.data);
+ bgImages.add(data);
+ }
+ } catch (e, s) {
+ bgImages.add(null);
}
}
-
NativeUtil.notifyInitSuccess();
- await Navigator.of(context).push(CupertinoPageRoute(builder: (context) => GuidePage(guide.guideData, guideImages,bgImages)));
+ await Navigator.of(context).push(CupertinoPageRoute(builder: (context) => GuidePage(guide.guideData, guideImages, bgImages)));
}
} catch (e) {
throw "引导图加载失败";
diff --git a/lib/pages/mine_detail_page/mine_detail_page.dart b/lib/pages/mine_detail_page/mine_detail_page.dart
index 7bee974..c5ce758 100644
--- a/lib/pages/mine_detail_page/mine_detail_page.dart
+++ b/lib/pages/mine_detail_page/mine_detail_page.dart
@@ -316,8 +316,9 @@ class _MineDetailContainerState extends State<_MineDetailContainer> {
if (cropperFile == null) {
return;
}
- File resultFile = await EncodeUtil.compressImage(cropperFile, 800);
Loading.show(context);
+ File resultFile = await EncodeUtil.compressImage(context,file:cropperFile,size: 800);
+
_bloc.uploadAvatar(resultFile);
}
}
diff --git a/lib/pages/search_think_page/bloc/search_think_event.dart b/lib/pages/search_think_page/bloc/search_think_event.dart
index f7930f1..b9529b4 100644
--- a/lib/pages/search_think_page/bloc/search_think_event.dart
+++ b/lib/pages/search_think_page/bloc/search_think_event.dart
@@ -26,6 +26,12 @@ class SearchThinkChangeTypeEvent extends SearchThinkEvent{
/// 显示原本视图
class SearchThinkShowBaseViewEvent extends SearchThinkEvent{
+
+ ///选中搜索的类型
+ final String type;
+
+ SearchThinkShowBaseViewEvent({this.type});
+
@override
List