@@ -53,8 +53,8 @@ android { | |||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||||
ndk { | ndk { | ||||
//选择要添加的对应cpu类型的.so库。 | //选择要添加的对应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' | |||||
} | } | ||||
} | } | ||||
@@ -109,33 +109,33 @@ android { | |||||
// 应用信息配置 | // 应用信息配置 | ||||
// productFlavors { | |||||
// // 智夜生活 | |||||
// zhiying { | |||||
// applicationId "cn.zhios.zhiying" | |||||
// versionCode 50 | |||||
// dimension "app" | |||||
// versionName '1.3.10' | |||||
// // 签名信息 | |||||
// signingConfig signingConfigs.zhiying | |||||
// } | |||||
// } | |||||
// | |||||
// // 打包脚本 | |||||
// android.applicationVariants.all { variant -> | |||||
// if (variant.buildType.name != "debug") { | |||||
// variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk") | |||||
// } | |||||
// | |||||
// variant.outputs.all { output -> | |||||
// def outputFile = output.outputFile | |||||
// if (outputFile != null && outputFile.name.endsWith('.apk')) { | |||||
// //这里修改apk文件名 | |||||
// def fileName = "${variant.productFlavors[0].name}_${releaseTime()}01_&V${variant.productFlavors[0].versionCode}.apk" | |||||
// outputFileName = fileName | |||||
// } | |||||
// } | |||||
// } | |||||
productFlavors { | |||||
// 智夜生活 | |||||
zhiying { | |||||
applicationId "cn.zhios.zhiying" | |||||
versionCode 52 | |||||
dimension "app" | |||||
versionName '1.3.12' | |||||
// 签名信息 | |||||
signingConfig signingConfigs.zhiying | |||||
} | |||||
} | |||||
// 打包脚本 | |||||
android.applicationVariants.all { variant -> | |||||
if (variant.buildType.name != "debug") { | |||||
variant.getPackageApplicationProvider().get().outputDirectory = new File(project.rootDir.absolutePath + "/app/build/outputs/apk") | |||||
} | |||||
variant.outputs.all { output -> | |||||
def outputFile = output.outputFile | |||||
if (outputFile != null && outputFile.name.endsWith('.apk')) { | |||||
//这里修改apk文件名 | |||||
def fileName = "${variant.productFlavors[0].name}_${releaseTime()}01_&V${variant.productFlavors[0].versionCode}.apk" | |||||
outputFileName = fileName | |||||
} | |||||
} | |||||
} | |||||
configurations.all { | configurations.all { | ||||
resolutionStrategy.eachDependency { DependencyResolveDetails details -> | resolutionStrategy.eachDependency { DependencyResolveDetails details -> | ||||
@@ -26,6 +26,16 @@ | |||||
<uses-permission android:name="android.permission.INTERNET" /> | <uses-permission android:name="android.permission.INTERNET" /> | ||||
<!-- 定位--> | |||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | |||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |||||
<uses-permission android:name="android.permission.ACCESS_GPS" /> | |||||
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" /> | |||||
<uses-permission android:name="android.permission.ACCESS_LOCATION" /> | |||||
<!--<!– <!– Permissions options for the `ignoreBatteryOptimizations` group –>–>--> | <!--<!– <!– Permissions options for the `ignoreBatteryOptimizations` group –>–>--> | ||||
<!-- <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />--> | <!-- <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />--> | ||||
@@ -36,7 +46,8 @@ | |||||
android:icon="@mipmap/ic_launcher" | android:icon="@mipmap/ic_launcher" | ||||
android:label="@string/app_name" | android:label="@string/app_name" | ||||
android:usesCleartextTraffic="true" | android:usesCleartextTraffic="true" | ||||
tools:replace="android:name, android:allowBackup"> | |||||
android:authorities="${applicationId}.fileprovider" | |||||
tools:replace="android:name, android:allowBackup,android:authorities"> | |||||
<activity | <activity | ||||
android:name=".MainActivity" | android:name=".MainActivity" | ||||
@@ -73,8 +84,10 @@ | |||||
android:name="androidx.core.content.FileProvider" | android:name="androidx.core.content.FileProvider" | ||||
android:authorities="com.zhiying.demo.fileprovider" | android:authorities="com.zhiying.demo.fileprovider" | ||||
android:exported="false" | android:exported="false" | ||||
tools:replace="android:authorities" | |||||
android:grantUriPermissions="true"> | android:grantUriPermissions="true"> | ||||
<meta-data | <meta-data | ||||
tools:replace="android:resource" | |||||
android:name="android.support.FILE_PROVIDER_PATHS" | android:name="android.support.FILE_PROVIDER_PATHS" | ||||
android:resource="@xml/zhiying_file_path" /> | android:resource="@xml/zhiying_file_path" /> | ||||
</provider> | </provider> | ||||
@@ -154,8 +154,9 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN | |||||
@Override | @Override | ||||
public Map getSetting() { | public Map getSetting() { | ||||
Map map = new HashMap(); | 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,api.zhios.cn68703914 | |||||
map.put("domain", "http://inapi.izhyin.cn/");//"http://120.76.175.204:8989"); | |||||
// map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689 | |||||
//map.put("domain", "http://192.168.0.88:5000/"); | |||||
map.put("master_id", "123456"); | map.put("master_id", "123456"); | ||||
map.put("secret_key", "123456"); | map.put("secret_key", "123456"); | ||||
// map.put("token", "123465"); | // map.put("token", "123465"); | ||||
@@ -4,8 +4,6 @@ PODS: | |||||
- AliAuthSDK (1.1.0.41-bc) | - AliAuthSDK (1.1.0.41-bc) | ||||
- AlibcTradeSDK (4.0.1.6) | - AlibcTradeSDK (4.0.1.6) | ||||
- AliLinkPartnerSDK (4.0.0.24) | - AliLinkPartnerSDK (4.0.0.24) | ||||
- AlipaySDK_No_UTDID_SUN (15.2.0): | |||||
- UTDID | |||||
- BCUserTrack (5.2.0.18-appkeys): | - BCUserTrack (5.2.0.18-appkeys): | ||||
- UTDID | - UTDID | ||||
- connectivity (0.0.1): | - connectivity (0.0.1): | ||||
@@ -32,10 +30,17 @@ PODS: | |||||
- Flutter | - Flutter | ||||
- flutter_plugin_android_lifecycle (0.0.1): | - flutter_plugin_android_lifecycle (0.0.1): | ||||
- Flutter | - Flutter | ||||
- flutter_user_agent (1.2.2): | |||||
- Flutter | |||||
- flutter_webview_plugin (0.0.1): | |||||
- Flutter | |||||
- flutter_xupdate (0.0.1): | - flutter_xupdate (0.0.1): | ||||
- Flutter | - Flutter | ||||
- fluttertoast (0.0.2): | - fluttertoast (0.0.2): | ||||
- Flutter | - Flutter | ||||
- fluwx (0.0.1): | |||||
- Flutter | |||||
- WechatOpenSDK (= 1.8.7.1) | |||||
- FMDB (2.7.5): | - FMDB (2.7.5): | ||||
- FMDB/standard (= 2.7.5) | - FMDB/standard (= 2.7.5) | ||||
- FMDB/standard (2.7.5) | - FMDB/standard (2.7.5) | ||||
@@ -95,7 +100,7 @@ PODS: | |||||
- mob_sharesdk/ShareSDKPlatforms/WatermelonVideo (4.3.16): | - mob_sharesdk/ShareSDKPlatforms/WatermelonVideo (4.3.16): | ||||
- mob_sharesdk/ShareSDK | - mob_sharesdk/ShareSDK | ||||
- MOBFoundation (>= 3.2.9) | - MOBFoundation (>= 3.2.9) | ||||
- mob_sharesdk/ShareSDKPlatforms/WeChat (4.3.16): | |||||
- mob_sharesdk/ShareSDKPlatforms/WeChat_Lite (4.3.16): | |||||
- mob_sharesdk/ShareSDK | - mob_sharesdk/ShareSDK | ||||
- MOBFoundation (>= 3.2.9) | - MOBFoundation (>= 3.2.9) | ||||
- mob_sharesdk/ShareSDKRestoreScene (4.3.16): | - mob_sharesdk/ShareSDKRestoreScene (4.3.16): | ||||
@@ -116,6 +121,8 @@ PODS: | |||||
- mobsms (0.0.1): | - mobsms (0.0.1): | ||||
- Flutter | - Flutter | ||||
- mob_smssdk | - mob_smssdk | ||||
- more_picture_share (0.0.1): | |||||
- Flutter | |||||
- mtopSDK (3.0.0.3-BC) | - mtopSDK (3.0.0.3-BC) | ||||
- package_info (0.0.1): | - package_info (0.0.1): | ||||
- Flutter | - Flutter | ||||
@@ -162,14 +169,13 @@ PODS: | |||||
- mob_sharesdk/ShareSDKPlatforms/SnapChat | - mob_sharesdk/ShareSDKPlatforms/SnapChat | ||||
- mob_sharesdk/ShareSDKPlatforms/Twitter | - mob_sharesdk/ShareSDKPlatforms/Twitter | ||||
- mob_sharesdk/ShareSDKPlatforms/WatermelonVideo | - mob_sharesdk/ShareSDKPlatforms/WatermelonVideo | ||||
- mob_sharesdk/ShareSDKPlatforms/WeChat | |||||
- mob_sharesdk/ShareSDKPlatforms/WeChat_Lite | |||||
- mob_sharesdk/ShareSDKRestoreScene | - mob_sharesdk/ShareSDKRestoreScene | ||||
- mob_sharesdk/ShareSDKUI | - mob_sharesdk/ShareSDKUI | ||||
- sqflite (0.0.1): | - sqflite (0.0.1): | ||||
- Flutter | - Flutter | ||||
- FMDB (~> 2.7.2) | - FMDB (~> 2.7.2) | ||||
- tobias (0.0.1): | - tobias (0.0.1): | ||||
- AlipaySDK_No_UTDID_SUN (~> 15.2.0) | |||||
- Flutter | - Flutter | ||||
- TOCropViewController (2.5.5) | - TOCropViewController (2.5.5) | ||||
- url_launcher (0.0.1): | - url_launcher (0.0.1): | ||||
@@ -183,8 +189,13 @@ PODS: | |||||
- url_launcher_windows (0.0.1): | - url_launcher_windows (0.0.1): | ||||
- Flutter | - Flutter | ||||
- UTDID (1.1.0.16) | - UTDID (1.1.0.16) | ||||
- video_player (0.0.1): | |||||
- Flutter | |||||
- video_player_web (0.0.1): | |||||
- Flutter | |||||
- webview_flutter (0.0.1): | - webview_flutter (0.0.1): | ||||
- Flutter | - Flutter | ||||
- WechatOpenSDK (1.8.7.1) | |||||
- WindVane (8.5.0.46-bc11): | - WindVane (8.5.0.46-bc11): | ||||
- WindVane/Basic (= 8.5.0.46-bc11) | - WindVane/Basic (= 8.5.0.46-bc11) | ||||
- WindVane/Core (= 8.5.0.46-bc11) | - WindVane/Core (= 8.5.0.46-bc11) | ||||
@@ -194,14 +205,20 @@ PODS: | |||||
- WindVane/WindVane (8.5.0.46-bc11) | - WindVane/WindVane (8.5.0.46-bc11) | ||||
- zhiying_base_widget (0.0.1): | - zhiying_base_widget (0.0.1): | ||||
- Flutter | - 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): | - zhiying_comm (0.0.1): | ||||
- Flutter | - 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: | DEPENDENCIES: | ||||
- ali_auth_wbq (from `.symlinks/plugins/ali_auth_wbq/ios`) | - ali_auth_wbq (from `.symlinks/plugins/ali_auth_wbq/ios`) | ||||
@@ -213,8 +230,11 @@ DEPENDENCIES: | |||||
- flutter_alibc (from `.symlinks/plugins/flutter_alibc/ios`) | - flutter_alibc (from `.symlinks/plugins/flutter_alibc/ios`) | ||||
- flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`) | - flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`) | ||||
- flutter_plugin_android_lifecycle (from `.symlinks/plugins/flutter_plugin_android_lifecycle/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`) | - flutter_xupdate (from `.symlinks/plugins/flutter_xupdate/ios`) | ||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) | ||||
- fluwx (from `.symlinks/plugins/fluwx/ios`) | |||||
- image_cropper (from `.symlinks/plugins/image_cropper/ios`) | - image_cropper (from `.symlinks/plugins/image_cropper/ios`) | ||||
- image_picker (from `.symlinks/plugins/image_picker/ios`) | - image_picker (from `.symlinks/plugins/image_picker/ios`) | ||||
- imei_plugin (from `.symlinks/plugins/imei_plugin/ios`) | - imei_plugin (from `.symlinks/plugins/imei_plugin/ios`) | ||||
@@ -222,6 +242,7 @@ DEPENDENCIES: | |||||
- moblink (from `.symlinks/plugins/moblink/ios`) | - moblink (from `.symlinks/plugins/moblink/ios`) | ||||
- mobpush_plugin (from `.symlinks/plugins/mobpush_plugin/ios`) | - mobpush_plugin (from `.symlinks/plugins/mobpush_plugin/ios`) | ||||
- mobsms (from `.symlinks/plugins/mobsms/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`) | - package_info (from `.symlinks/plugins/package_info/ios`) | ||||
- path_provider (from `.symlinks/plugins/path_provider/ios`) | - path_provider (from `.symlinks/plugins/path_provider/ios`) | ||||
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) | - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) | ||||
@@ -244,9 +265,17 @@ DEPENDENCIES: | |||||
- url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) | - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) | ||||
- url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) | - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) | ||||
- url_launcher_windows (from `.symlinks/plugins/url_launcher_windows/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`) | - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) | ||||
- zhiying_base_widget (from `.symlinks/plugins/zhiying_base_widget/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_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: | SPEC REPOS: | ||||
http://repo.baichuan-ios.taobao.com/baichuanSDK/AliBCSpecs.git: | http://repo.baichuan-ios.taobao.com/baichuanSDK/AliBCSpecs.git: | ||||
@@ -258,8 +287,7 @@ SPEC REPOS: | |||||
- securityGuard | - securityGuard | ||||
- UTDID | - UTDID | ||||
- WindVane | - WindVane | ||||
https://github.com/CocoaPods/Specs: | |||||
- AlipaySDK_No_UTDID_SUN | |||||
https://github.com/CocoaPods/Specs.git: | |||||
- FMDB | - FMDB | ||||
- mob_linksdk_pro | - mob_linksdk_pro | ||||
- mob_pushsdk | - mob_pushsdk | ||||
@@ -269,6 +297,7 @@ SPEC REPOS: | |||||
- MOBFoundation | - MOBFoundation | ||||
- Reachability | - Reachability | ||||
- TOCropViewController | - TOCropViewController | ||||
- WechatOpenSDK | |||||
EXTERNAL SOURCES: | EXTERNAL SOURCES: | ||||
ali_auth_wbq: | ali_auth_wbq: | ||||
@@ -289,10 +318,16 @@ EXTERNAL SOURCES: | |||||
:path: ".symlinks/plugins/flutter_native_image/ios" | :path: ".symlinks/plugins/flutter_native_image/ios" | ||||
flutter_plugin_android_lifecycle: | flutter_plugin_android_lifecycle: | ||||
:path: ".symlinks/plugins/flutter_plugin_android_lifecycle/ios" | :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: | flutter_xupdate: | ||||
:path: ".symlinks/plugins/flutter_xupdate/ios" | :path: ".symlinks/plugins/flutter_xupdate/ios" | ||||
fluttertoast: | fluttertoast: | ||||
:path: ".symlinks/plugins/fluttertoast/ios" | :path: ".symlinks/plugins/fluttertoast/ios" | ||||
fluwx: | |||||
:path: ".symlinks/plugins/fluwx/ios" | |||||
image_cropper: | image_cropper: | ||||
:path: ".symlinks/plugins/image_cropper/ios" | :path: ".symlinks/plugins/image_cropper/ios" | ||||
image_picker: | image_picker: | ||||
@@ -307,6 +342,8 @@ EXTERNAL SOURCES: | |||||
:path: ".symlinks/plugins/mobpush_plugin/ios" | :path: ".symlinks/plugins/mobpush_plugin/ios" | ||||
mobsms: | mobsms: | ||||
:path: ".symlinks/plugins/mobsms/ios" | :path: ".symlinks/plugins/mobsms/ios" | ||||
more_picture_share: | |||||
:path: ".symlinks/plugins/more_picture_share/ios" | |||||
package_info: | package_info: | ||||
:path: ".symlinks/plugins/package_info/ios" | :path: ".symlinks/plugins/package_info/ios" | ||||
path_provider: | path_provider: | ||||
@@ -351,19 +388,34 @@ EXTERNAL SOURCES: | |||||
:path: ".symlinks/plugins/url_launcher_web/ios" | :path: ".symlinks/plugins/url_launcher_web/ios" | ||||
url_launcher_windows: | url_launcher_windows: | ||||
:path: ".symlinks/plugins/url_launcher_windows/ios" | :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: | webview_flutter: | ||||
:path: ".symlinks/plugins/webview_flutter/ios" | :path: ".symlinks/plugins/webview_flutter/ios" | ||||
zhiying_base_widget: | zhiying_base_widget: | ||||
:path: ".symlinks/plugins/zhiying_base_widget/ios" | :path: ".symlinks/plugins/zhiying_base_widget/ios" | ||||
zhiying_business_college: | |||||
:path: ".symlinks/plugins/zhiying_business_college/ios" | |||||
zhiying_comm: | zhiying_comm: | ||||
:path: ".symlinks/plugins/zhiying_comm/ios" | :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: | SPEC CHECKSUMS: | ||||
ali_auth_wbq: 83e881b20722051dccc9117062f674d736509468 | ali_auth_wbq: 83e881b20722051dccc9117062f674d736509468 | ||||
AliAuthSDK: 7018e8f3c8be3382e60f69d3b517c7de34c351e0 | AliAuthSDK: 7018e8f3c8be3382e60f69d3b517c7de34c351e0 | ||||
AlibcTradeSDK: 9a3e7af6cd648dd1f85684e82694c213fe48dad2 | AlibcTradeSDK: 9a3e7af6cd648dd1f85684e82694c213fe48dad2 | ||||
AliLinkPartnerSDK: c5778cdfdcee7bfe342238d39a77766184d36a46 | AliLinkPartnerSDK: c5778cdfdcee7bfe342238d39a77766184d36a46 | ||||
AlipaySDK_No_UTDID_SUN: ac3f953a08c8ac8eaade23e338862208b885c344 | |||||
BCUserTrack: 49251c6fb7c65cbbc221a492bbd3f3e142f1fb0f | BCUserTrack: 49251c6fb7c65cbbc221a492bbd3f3e142f1fb0f | ||||
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 | connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467 | ||||
connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b | connectivity_for_web: 2b8584556930d4bd490d82b836bcf45067ce345b | ||||
@@ -373,8 +425,11 @@ SPEC CHECKSUMS: | |||||
flutter_alibc: 0e2a29e7c1de759672d87a260051240d209964b9 | flutter_alibc: 0e2a29e7c1de759672d87a260051240d209964b9 | ||||
flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe | flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe | ||||
flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35 | flutter_plugin_android_lifecycle: dc0b544e129eebb77a6bfb1239d4d1c673a60a35 | ||||
flutter_user_agent: 27c45d034dc31b80948d29998cea52cd3a7bf936 | |||||
flutter_webview_plugin: ed9e8a6a96baf0c867e90e1bce2673913eeac694 | |||||
flutter_xupdate: bdb588f0fe4f6c5e45436b8b0de08d505a50c04e | flutter_xupdate: bdb588f0fe4f6c5e45436b8b0de08d505a50c04e | ||||
fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b | fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b | ||||
fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902 | |||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a | ||||
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a | image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a | ||||
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 | image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 | ||||
@@ -389,6 +444,7 @@ SPEC CHECKSUMS: | |||||
moblink: 3480a191e86c33f4e84af0cb5d2cc5627e78bf65 | moblink: 3480a191e86c33f4e84af0cb5d2cc5627e78bf65 | ||||
mobpush_plugin: 7b5a56692c538bc06e0386916cf7b21f77c1eb09 | mobpush_plugin: 7b5a56692c538bc06e0386916cf7b21f77c1eb09 | ||||
mobsms: 141956ad151a39a69a47a2ddf2e186405346c4ef | mobsms: 141956ad151a39a69a47a2ddf2e186405346c4ef | ||||
more_picture_share: f5b68ae17896e80168b24a0bc894395a104af0c5 | |||||
mtopSDK: d6fdf81730342a69be920b576541c7bb81a683d5 | mtopSDK: d6fdf81730342a69be920b576541c7bb81a683d5 | ||||
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 | package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 | ||||
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c | ||||
@@ -406,9 +462,9 @@ SPEC CHECKSUMS: | |||||
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 | shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 | ||||
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 | shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 | ||||
shared_preferences_windows: 36b76d6f54e76ead957e60b49e2f124b4cd3e6ae | shared_preferences_windows: 36b76d6f54e76ead957e60b49e2f124b4cd3e6ae | ||||
sharesdk_plugin: de8d8b87c50d60017472c5da425db1acd2911e0a | |||||
sharesdk_plugin: 455844465fc821a8ead9a9851ac928fa877cb379 | |||||
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 | sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 | ||||
tobias: 46e3fae88556c31a512721b97fc509a015174ebf | |||||
tobias: da6d872837de666e33393e7647aa6bc4ccb370b1 | |||||
TOCropViewController: da59f531f8ac8a94ef6d6c0fc34009350f9e8bfe | TOCropViewController: da59f531f8ac8a94ef6d6c0fc34009350f9e8bfe | ||||
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef | url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef | ||||
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0 | url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0 | ||||
@@ -416,10 +472,19 @@ SPEC CHECKSUMS: | |||||
url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c | url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c | ||||
url_launcher_windows: 683d7c283894db8d1914d3ab2223b20cc1ad95d5 | url_launcher_windows: 683d7c283894db8d1914d3ab2223b20cc1ad95d5 | ||||
UTDID: c28855683c5ea2e77e597cb14609328f7d470d6e | UTDID: c28855683c5ea2e77e597cb14609328f7d470d6e | ||||
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e | |||||
video_player_web: da8cadb8274ed4f8dbee8d7171b420dedd437ce7 | |||||
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 | webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 | ||||
WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44 | |||||
WindVane: 56e096abae757397ccd3accb66a959f3ffcbf949 | WindVane: 56e096abae757397ccd3accb66a959f3ffcbf949 | ||||
zhiying_base_widget: 064547d1dfe4a5832487f275cd4775d6da8f260c | |||||
zhiying_base_widget: 00868c0d2723a3a425c18b27204fbc67e3f7e59d | |||||
zhiying_business_college: dc3ba7fb32aad4db421aa94dbbc1ef712e7d00cd | |||||
zhiying_comm: 0daef4a480f4f4dbea3e11b615f3264aafea924b | 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 | PODFILE CHECKSUM: b66ec2c625af7ee344f37aae8918540c4b58b5ef | ||||
@@ -392,7 +392,6 @@ | |||||
/* Begin XCBuildConfiguration section */ | /* Begin XCBuildConfiguration section */ | ||||
249021D3217E4FDB00AE95B9 /* Profile */ = { | 249021D3217E4FDB00AE95B9 /* Profile */ = { | ||||
isa = XCBuildConfiguration; | isa = XCBuildConfiguration; | ||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | |||||
buildSettings = { | buildSettings = { | ||||
ALWAYS_SEARCH_USER_PATHS = NO; | ALWAYS_SEARCH_USER_PATHS = NO; | ||||
CLANG_ANALYZER_NONNULL = YES; | CLANG_ANALYZER_NONNULL = YES; | ||||
@@ -476,7 +475,6 @@ | |||||
}; | }; | ||||
97C147031CF9000F007C117D /* Debug */ = { | 97C147031CF9000F007C117D /* Debug */ = { | ||||
isa = XCBuildConfiguration; | isa = XCBuildConfiguration; | ||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; | |||||
buildSettings = { | buildSettings = { | ||||
ALWAYS_SEARCH_USER_PATHS = NO; | ALWAYS_SEARCH_USER_PATHS = NO; | ||||
CLANG_ANALYZER_NONNULL = YES; | CLANG_ANALYZER_NONNULL = YES; | ||||
@@ -532,7 +530,6 @@ | |||||
}; | }; | ||||
97C147041CF9000F007C117D /* Release */ = { | 97C147041CF9000F007C117D /* Release */ = { | ||||
isa = XCBuildConfiguration; | isa = XCBuildConfiguration; | ||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | |||||
buildSettings = { | buildSettings = { | ||||
ALWAYS_SEARCH_USER_PATHS = NO; | ALWAYS_SEARCH_USER_PATHS = NO; | ||||
CLANG_ANALYZER_NONNULL = YES; | CLANG_ANALYZER_NONNULL = YES; | ||||
@@ -21,6 +21,7 @@ import 'package:zhiying_wechat_teacher/register.dart'; | |||||
import 'package:zhiying_moments/register.dart'; | import 'package:zhiying_moments/register.dart'; | ||||
import 'package:zhiying_member_upgrade/register.dart'; | import 'package:zhiying_member_upgrade/register.dart'; | ||||
import 'package:zhiying_equity_card/zhiying_equity_card.dart'; | import 'package:zhiying_equity_card/zhiying_equity_card.dart'; | ||||
import 'package:zhiying_official/register.dart'; | |||||
void main() { | void main() { | ||||
FlutterError.onError = (FlutterErrorDetails details) { | FlutterError.onError = (FlutterErrorDetails details) { | ||||
@@ -67,6 +68,7 @@ class _MyAppState extends State<MyApp> { | |||||
FriendCircleRegister.init(); | FriendCircleRegister.init(); | ||||
MemberUpgradeRegister.init(); | MemberUpgradeRegister.init(); | ||||
EquityCardRegister.init(); | EquityCardRegister.init(); | ||||
OfficialRegister.init(); | |||||
print('初始化百川'); | print('初始化百川'); | ||||
FlutterAlibc.initAlibc(version: "", appName: "").then((result) { | FlutterAlibc.initAlibc(version: "", appName: "").then((result) { | ||||
print("白川" + '${result.errorCode} ${result.errorMessage}'); | print("白川" + '${result.errorCode} ${result.errorMessage}'); | ||||
@@ -30,6 +30,8 @@ dev_dependencies: | |||||
path: ../../zhiying_business_college | path: ../../zhiying_business_college | ||||
zhiying_equity_card: | zhiying_equity_card: | ||||
path: ../../zhiying_equity_card | path: ../../zhiying_equity_card | ||||
zhiying_official: | |||||
path: ../../zhiying_official | |||||
#微信导师 | #微信导师 | ||||
zhiying_wechat_teacher: | zhiying_wechat_teacher: | ||||
#path: ../zhiying_wechat_teacher | #path: ../zhiying_wechat_teacher | ||||
@@ -26,6 +26,12 @@ class SearchThinkChangeTypeEvent extends SearchThinkEvent{ | |||||
/// 显示原本视图 | /// 显示原本视图 | ||||
class SearchThinkShowBaseViewEvent extends SearchThinkEvent{ | class SearchThinkShowBaseViewEvent extends SearchThinkEvent{ | ||||
///选中搜索的类型 | |||||
final String type; | |||||
SearchThinkShowBaseViewEvent({this.type}); | |||||
@override | @override | ||||
List<Object> get props => []; | List<Object> get props => []; | ||||
} | } |
@@ -3,6 +3,7 @@ import 'dart:io'; | |||||
import 'package:flutter/cupertino.dart'; | import 'package:flutter/cupertino.dart'; | ||||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
import 'package:flutter_user_agent/flutter_user_agent.dart'; | |||||
import 'package:zhiying_base_widget/pages/launch_page/launch_page.dart'; | import 'package:zhiying_base_widget/pages/launch_page/launch_page.dart'; | ||||
import 'package:zhiying_comm/util/log/let_log.dart'; | import 'package:zhiying_comm/util/log/let_log.dart'; | ||||
import 'package:zhiying_comm/util/empty_util.dart'; | import 'package:zhiying_comm/util/empty_util.dart'; | ||||
@@ -45,7 +46,7 @@ class _BaseWebviewState extends State<BaseWebview> { | |||||
loadData() { | loadData() { | ||||
print("加载数据"); | print("加载数据"); | ||||
progress = 0.0; | progress = 0.0; | ||||
if(timer?.isActive??false){ | |||||
if (timer?.isActive ?? false) { | |||||
timer?.cancel(); | timer?.cancel(); | ||||
} | } | ||||
timer = Timer.periodic(Duration(milliseconds: 10), (timer) { | timer = Timer.periodic(Duration(milliseconds: 10), (timer) { | ||||
@@ -77,27 +78,33 @@ class _BaseWebviewState extends State<BaseWebview> { | |||||
@override | @override | ||||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
print("设备:"+FlutterUserAgent.webViewUserAgent); | |||||
return Scaffold( | return Scaffold( | ||||
appBar: _createNav(), | appBar: _createNav(), | ||||
backgroundColor: Colors.white, | backgroundColor: Colors.white, | ||||
body: Stack( | body: Stack( | ||||
children: <Widget>[ | children: <Widget>[ | ||||
WebView( | WebView( | ||||
initialMediaPlaybackPolicy: AutoMediaPlaybackPolicy.always_allow, | |||||
initialUrl: _url, | initialUrl: _url, | ||||
userAgent: FlutterUserAgent.userAgent, | |||||
javascriptMode: JavascriptMode.unrestricted, | javascriptMode: JavascriptMode.unrestricted, | ||||
onWebViewCreated: (WebViewController webViewController) { | onWebViewCreated: (WebViewController webViewController) { | ||||
_webViewController = webViewController; | _webViewController = webViewController; | ||||
loadData(); | loadData(); | ||||
}, | }, | ||||
navigationDelegate: (NavigationRequest request) async { | navigationDelegate: (NavigationRequest request) async { | ||||
print("重定向" + request.url); | |||||
// 解决Android的拼多多webview 转发的问题 | // 解决Android的拼多多webview 转发的问题 | ||||
if (Platform.isAndroid) { | if (Platform.isAndroid) { | ||||
String url = request?.url?.toString(); | String url = request?.url?.toString(); | ||||
if (!EmptyUtil.isEmpty(url) && !url.startsWith('https://') && !url.startsWith('http://')) { | if (!EmptyUtil.isEmpty(url) && !url.startsWith('https://') && !url.startsWith('http://')) { | ||||
Logger.log('navigation url = $url'); | Logger.log('navigation url = $url'); | ||||
// if(await canLaunch(url)){ | |||||
// await launch(url); | |||||
// } | |||||
if (await canLaunch(url)) { | |||||
await launch(url); | |||||
} | |||||
return NavigationDecision.prevent; | return NavigationDecision.prevent; | ||||
} | } | ||||
} | } | ||||
@@ -107,14 +114,14 @@ class _BaseWebviewState extends State<BaseWebview> { | |||||
print('Page started loading: $url'); | print('Page started loading: $url'); | ||||
}, | }, | ||||
onPageFinished: (String url) { | onPageFinished: (String url) { | ||||
if(progress<0.8){ | |||||
if (progress < 0.8) { | |||||
progress = 0.8; | progress = 0.8; | ||||
} | } | ||||
setState(() {}); | |||||
//setState(() {}); | |||||
print('Page finished loading: $url'); | print('Page finished loading: $url'); | ||||
_webViewController.getTitle().then((title) { | _webViewController.getTitle().then((title) { | ||||
_title = title; | _title = title; | ||||
setState(() {}); | |||||
// setState(() {}); | |||||
}); | }); | ||||
}, | }, | ||||
gestureNavigationEnabled: true, | gestureNavigationEnabled: true, | ||||
@@ -1,5 +1,6 @@ | |||||
import 'dart:io'; | import 'dart:io'; | ||||
import 'package:flutter_user_agent/flutter_user_agent.dart'; | |||||
import 'package:jdsdk/jdsdk.dart'; | import 'package:jdsdk/jdsdk.dart'; | ||||
import 'package:sharesdk_plugin/sharesdk_interface.dart'; | import 'package:sharesdk_plugin/sharesdk_interface.dart'; | ||||
import 'package:sharesdk_plugin/sharesdk_register.dart'; | import 'package:sharesdk_plugin/sharesdk_register.dart'; | ||||
@@ -159,6 +160,9 @@ class BaseWidgetRegister { | |||||
// // 考拉 | // // 考拉 | ||||
// NetUtil.post('/api/v1/rec/kaola?page=1', method: NetMethod.GET, cache: true, showToast: false); | // NetUtil.post('/api/v1/rec/kaola?page=1', method: NetMethod.GET, cache: true, showToast: false); | ||||
LoginStyleUtil.fetchNetPageData(); | LoginStyleUtil.fetchNetPageData(); | ||||
FlutterUserAgent.init(force: true); | |||||
return null; | return null; | ||||
}); | }); | ||||
@@ -1,3 +1,4 @@ | |||||
import 'dart:async'; | |||||
import 'dart:convert'; | import 'dart:convert'; | ||||
import 'package:flutter/cupertino.dart'; | import 'package:flutter/cupertino.dart'; | ||||
@@ -7,6 +8,7 @@ import 'package:zhiying_base_widget/pages/search_page/notifier/search_tag_notifi | |||||
import 'package:zhiying_base_widget/pages/search_result_page/search_result_page.dart'; | import 'package:zhiying_base_widget/pages/search_result_page/search_result_page.dart'; | ||||
import 'package:zhiying_base_widget/pages/search_think_page/model/search_think_model.dart'; | import 'package:zhiying_base_widget/pages/search_think_page/model/search_think_model.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/history_tag/model/search_history_model.dart'; | import 'package:zhiying_base_widget/widgets/search/history_tag/model/search_history_model.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/input/model/SearchTabBarEvent.dart'; | |||||
import 'package:zhiying_base_widget/widgets/search/widget/text_tag_widget.dart'; | import 'package:zhiying_base_widget/widgets/search/widget/text_tag_widget.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/widget/title_widget.dart'; | import 'package:zhiying_base_widget/widgets/search/widget/title_widget.dart'; | ||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
@@ -39,15 +41,18 @@ class _SearchHistoryTagWidgetState extends State<SearchHistoryTagWidget> { | |||||
/// 最大存储条数 | /// 最大存储条数 | ||||
static final int MAX_COUNT = 10; | static final int MAX_COUNT = 10; | ||||
String type; | |||||
StreamSubscription subscription; | |||||
/// 点击历史标签 | /// 点击历史标签 | ||||
void _historyTagClick(String tag) { | void _historyTagClick(String tag) { | ||||
if (!EmptyUtil.isEmpty(tag)) { | if (!EmptyUtil.isEmpty(tag)) { | ||||
SearchThinkModel model = SearchThinkModel(); | SearchThinkModel model = SearchThinkModel(); | ||||
model.type = (Provider.of<SearchTagNotifier>(context, listen: false)?.getType()) ?? GlobalConfig.PROVIDER_TB; | |||||
model.type = type ?? GlobalConfig.PROVIDER_TB; | |||||
model.keywords = tag ?? ''; | model.keywords = tag ?? ''; | ||||
Provider.of<SearchTagNotifier>(context, listen: false).addTag(tag); | Provider.of<SearchTagNotifier>(context, listen: false).addTag(tag); | ||||
Navigator.push( | |||||
context, CupertinoPageRoute(builder: (_) => SearchResultPage(model.toJson()..['tag'] = 'search_page'))); | |||||
Navigator.push(context, CupertinoPageRoute(builder: (_) => SearchResultPage(model.toJson()..['tag'] = 'search_page'))); | |||||
// Navigator.push( | // Navigator.push( | ||||
// context, CupertinoPageRoute(builder: (_) => SearchResultPage({'keywords': tag ?? '', 'tag': 'search_page'}))); | // context, CupertinoPageRoute(builder: (_) => SearchResultPage({'keywords': tag ?? '', 'tag': 'search_page'}))); | ||||
} | } | ||||
@@ -96,6 +101,9 @@ class _SearchHistoryTagWidgetState extends State<SearchHistoryTagWidget> { | |||||
@override | @override | ||||
void initState() { | void initState() { | ||||
subscription = EventUtil.instance.on<SearchTabBarEvent>().listen((event) { | |||||
type = event.type; | |||||
}); | |||||
_initHistoryTag(); | _initHistoryTag(); | ||||
super.initState(); | super.initState(); | ||||
} | } | ||||
@@ -111,6 +119,12 @@ class _SearchHistoryTagWidgetState extends State<SearchHistoryTagWidget> { | |||||
super.didChangeDependencies(); | super.didChangeDependencies(); | ||||
} | } | ||||
@override | |||||
void dispose() { | |||||
subscription?.cancel(); | |||||
super.dispose(); | |||||
} | |||||
@override | @override | ||||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
return Container( | return Container( | ||||
@@ -1,3 +1,4 @@ | |||||
import 'dart:async'; | |||||
import 'dart:convert'; | import 'dart:convert'; | ||||
import 'package:flutter/cupertino.dart'; | import 'package:flutter/cupertino.dart'; | ||||
@@ -6,6 +7,7 @@ import 'package:zhiying_base_widget/pages/search_page/notifier/search_tag_notifi | |||||
import 'package:zhiying_base_widget/pages/search_result_page/search_result_page.dart'; | import 'package:zhiying_base_widget/pages/search_result_page/search_result_page.dart'; | ||||
import 'package:zhiying_base_widget/pages/search_think_page/model/search_think_model.dart'; | import 'package:zhiying_base_widget/pages/search_think_page/model/search_think_model.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/hot_tag/model/search_hot_tag_model.dart'; | import 'package:zhiying_base_widget/widgets/search/hot_tag/model/search_hot_tag_model.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/input/model/SearchTabBarEvent.dart'; | |||||
import 'package:zhiying_base_widget/widgets/search/widget/text_tag_widget.dart'; | import 'package:zhiying_base_widget/widgets/search/widget/text_tag_widget.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/widget/title_widget.dart'; | import 'package:zhiying_base_widget/widgets/search/widget/title_widget.dart'; | ||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
@@ -14,7 +16,8 @@ import 'package:provider/provider.dart'; | |||||
/// | /// | ||||
/// 搜索页面,热门搜索的标签 | /// 搜索页面,热门搜索的标签 | ||||
/// | /// | ||||
class SearchHotTagWidget extends StatelessWidget { | |||||
class SearchHotTagWidget extends StatefulWidget { | |||||
final Map<String, dynamic> data; | final Map<String, dynamic> data; | ||||
SearchHotTagModel model; | SearchHotTagModel model; | ||||
@@ -26,18 +29,42 @@ class SearchHotTagWidget extends StatelessWidget { | |||||
} | } | ||||
} | } | ||||
@override | |||||
_SearchHotTagWidgetState createState() => _SearchHotTagWidgetState(); | |||||
} | |||||
class _SearchHotTagWidgetState extends State<SearchHotTagWidget> { | |||||
Map<String, dynamic> data; | |||||
SearchHotTagModel model; | |||||
String type; | |||||
StreamSubscription subscription; | |||||
@override | |||||
void initState() { | |||||
data = widget?.data; | |||||
model = widget?.model; | |||||
subscription = EventUtil.instance.on<SearchTabBarEvent>().listen((event) { | |||||
type = event.type; | |||||
}); | |||||
super.initState(); | |||||
} | |||||
@override | |||||
void dispose() { | |||||
subscription?.cancel(); | |||||
super.dispose(); | |||||
} | |||||
/// 点击事件 | /// 点击事件 | ||||
void _tagOnClick(BuildContext context, SearchHostTagItemModel model) async { | void _tagOnClick(BuildContext context, SearchHostTagItemModel model) async { | ||||
print('${model?.keyword}'); | print('${model?.keyword}'); | ||||
if (!EmptyUtil.isEmpty(model?.keyword)) { | if (!EmptyUtil.isEmpty(model?.keyword)) { | ||||
Provider.of<SearchTagNotifier>(context, listen: false).addTag(model.keyword); | Provider.of<SearchTagNotifier>(context, listen: false).addTag(model.keyword); | ||||
SearchThinkModel searchThinkModel = SearchThinkModel(); | SearchThinkModel searchThinkModel = SearchThinkModel(); | ||||
searchThinkModel.type = (Provider.of<SearchTagNotifier>(context, listen: false)?.getType()) ?? GlobalConfig.PROVIDER_TB; | |||||
searchThinkModel.type = type ?? GlobalConfig.PROVIDER_TB; | |||||
searchThinkModel.keywords = model?.keyword ?? ''; | searchThinkModel.keywords = model?.keyword ?? ''; | ||||
Navigator.push( | |||||
context, CupertinoPageRoute(builder: (_) => SearchResultPage(searchThinkModel.toJson()..['tag'] = 'search_page'))); | |||||
Navigator.push(context, CupertinoPageRoute(builder: (_) => SearchResultPage(searchThinkModel.toJson()..['tag'] = 'search_page'))); | |||||
// Navigator.push(context, CupertinoPageRoute(builder: (_) => SearchResultPage({'keywords': model?.keyword ?? '', 'tag': 'search_page'}))); | // Navigator.push(context, CupertinoPageRoute(builder: (_) => SearchResultPage({'keywords': model?.keyword ?? '', 'tag': 'search_page'}))); | ||||
} | } | ||||
} | } | ||||
@@ -0,0 +1,7 @@ | |||||
///用于搜索第一页的tabbar事件 | |||||
class SearchTabBarEvent{ | |||||
final String type; | |||||
SearchTabBarEvent(this.type); | |||||
} |
@@ -1,3 +1,4 @@ | |||||
import 'dart:async'; | |||||
import 'dart:convert'; | import 'dart:convert'; | ||||
import 'dart:ui'; | import 'dart:ui'; | ||||
@@ -12,6 +13,7 @@ import 'package:zhiying_base_widget/pages/search_result_page/search_result_page. | |||||
import 'package:zhiying_base_widget/pages/search_think_page/bloc/search_think_bloc.dart'; | import 'package:zhiying_base_widget/pages/search_think_page/bloc/search_think_bloc.dart'; | ||||
import 'package:zhiying_base_widget/pages/search_think_page/model/search_think_model.dart'; | import 'package:zhiying_base_widget/pages/search_think_page/model/search_think_model.dart'; | ||||
import 'package:zhiying_base_widget/pages/search_think_page/search_think_page.dart'; | import 'package:zhiying_base_widget/pages/search_think_page/search_think_page.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/input/model/SearchTabBarEvent.dart'; | |||||
import 'package:zhiying_base_widget/widgets/search/input/model/search_input_model.dart'; | import 'package:zhiying_base_widget/widgets/search/input/model/search_input_model.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/input/search_input_sk.dart'; | import 'package:zhiying_base_widget/widgets/search/input/search_input_sk.dart'; | ||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
@@ -38,6 +40,8 @@ class SearchInputWidget extends StatefulWidget { | |||||
class _SearchInputWidgetState extends State<SearchInputWidget> { | class _SearchInputWidgetState extends State<SearchInputWidget> { | ||||
FocusNode _focusNode; | FocusNode _focusNode; | ||||
TextEditingController _editingController; | TextEditingController _editingController; | ||||
String type; | |||||
StreamSubscription subscription; | |||||
/// 点击搜索按钮 | /// 点击搜索按钮 | ||||
void _onSearchButtomClick() async { | void _onSearchButtomClick() async { | ||||
@@ -48,10 +52,10 @@ class _SearchInputWidgetState extends State<SearchInputWidget> { | |||||
Provider.of<SearchTagNotifier>(context, listen: false).addTag(content); | Provider.of<SearchTagNotifier>(context, listen: false).addTag(content); | ||||
RouterUtil.hideKeyboard(context); | RouterUtil.hideKeyboard(context); | ||||
SearchThinkModel searchThinkModel = SearchThinkModel(); | SearchThinkModel searchThinkModel = SearchThinkModel(); | ||||
searchThinkModel.type = (Provider.of<SearchTagNotifier>(context, listen: false)?.getType()) ?? GlobalConfig.PROVIDER_TB; | |||||
searchThinkModel.type = type ?? GlobalConfig.PROVIDER_TB; | |||||
searchThinkModel.keywords = content ?? ''; | searchThinkModel.keywords = content ?? ''; | ||||
Navigator.push( | |||||
context, CupertinoPageRoute(builder: (_) => SearchResultPage(searchThinkModel.toJson()..['tag'] = 'search_page'))); | |||||
Navigator.push(context, CupertinoPageRoute(builder: (_) => SearchResultPage(searchThinkModel.toJson()..['tag'] = 'search_page'))); | |||||
// Navigator.push(context, CupertinoPageRoute(builder: (_) => SearchResultPage({'keywords': content, 'tag': 'search_page'}))); | // Navigator.push(context, CupertinoPageRoute(builder: (_) => SearchResultPage({'keywords': content, 'tag': 'search_page'}))); | ||||
} else { | } else { | ||||
@@ -89,6 +93,9 @@ class _SearchInputWidgetState extends State<SearchInputWidget> { | |||||
void initState() { | void initState() { | ||||
_focusNode = FocusNode(); | _focusNode = FocusNode(); | ||||
_editingController = TextEditingController(); | _editingController = TextEditingController(); | ||||
subscription = EventUtil.instance.on<SearchTabBarEvent>().listen((event) { | |||||
type = event.type; | |||||
}); | |||||
super.initState(); | super.initState(); | ||||
} | } | ||||
@@ -97,6 +104,7 @@ class _SearchInputWidgetState extends State<SearchInputWidget> { | |||||
_focusNode?.unfocus(); | _focusNode?.unfocus(); | ||||
_focusNode?.dispose(); | _focusNode?.dispose(); | ||||
_editingController?.dispose(); | _editingController?.dispose(); | ||||
subscription?.cancel(); | |||||
super.dispose(); | super.dispose(); | ||||
} | } | ||||
@@ -10,6 +10,7 @@ import 'package:zhiying_base_widget/pages/search_result_page/search_result_page. | |||||
import 'package:zhiying_base_widget/pages/search_think_page/bloc/search_think_bloc.dart'; | import 'package:zhiying_base_widget/pages/search_think_page/bloc/search_think_bloc.dart'; | ||||
import 'package:zhiying_base_widget/pages/search_think_page/model/search_think_model.dart'; | import 'package:zhiying_base_widget/pages/search_think_page/model/search_think_model.dart'; | ||||
import 'package:zhiying_base_widget/widgets/home/home_quick_entry/cached_network_image_util.dart'; | import 'package:zhiying_base_widget/widgets/home/home_quick_entry/cached_network_image_util.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/input/model/SearchTabBarEvent.dart'; | |||||
import 'package:zhiying_base_widget/widgets/search/tabbar/search_tab_sk.dart'; | import 'package:zhiying_base_widget/widgets/search/tabbar/search_tab_sk.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search/widget/my_tab.dart'; | import 'package:zhiying_base_widget/widgets/search/widget/my_tab.dart'; | ||||
import 'package:flutter_bloc/flutter_bloc.dart'; | import 'package:flutter_bloc/flutter_bloc.dart'; | ||||
@@ -63,6 +64,7 @@ class _SearchTabWidgetState extends State<SearchTabWidget> { | |||||
try { | try { | ||||
_type = widget.model.search_icon_list[_tabController.index].type; | _type = widget.model.search_icon_list[_tabController.index].type; | ||||
Provider.of<SearchTagNotifier>(context, listen: false).setType(_type); | Provider.of<SearchTagNotifier>(context, listen: false).setType(_type); | ||||
EventUtil.instance.fire(SearchTabBarEvent(_type)); | |||||
} catch (e, s) { | } catch (e, s) { | ||||
Logger.error(e, s); | Logger.error(e, s); | ||||
} | } | ||||
@@ -1,3 +1,4 @@ | |||||
import 'dart:async'; | |||||
import 'dart:convert'; | import 'dart:convert'; | ||||
import 'package:flutter/cupertino.dart'; | import 'package:flutter/cupertino.dart'; | ||||
@@ -7,6 +8,7 @@ import 'package:zhiying_base_widget/pages/search_result_page/search_result_page. | |||||
import 'package:zhiying_base_widget/pages/search_think_page/bloc/search_think_bloc.dart'; | import 'package:zhiying_base_widget/pages/search_think_page/bloc/search_think_bloc.dart'; | ||||
import 'package:provider/provider.dart'; | import 'package:provider/provider.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search_result/search_input/model/search_result_input_model.dart'; | import 'package:zhiying_base_widget/widgets/search_result/search_input/model/search_result_input_model.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search_result/tarbar/model/search_btn_event.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
import 'dart:ui'; | import 'dart:ui'; | ||||
import 'package:flutter_bloc/flutter_bloc.dart'; | import 'package:flutter_bloc/flutter_bloc.dart'; | ||||
@@ -35,6 +37,12 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||||
FocusNode _focusNode; | FocusNode _focusNode; | ||||
bool _canSearchTag = true; | bool _canSearchTag = true; | ||||
StreamSubscription subscription; | |||||
String lastText; | |||||
String _type; | |||||
/// 返回事件 | /// 返回事件 | ||||
void _openPop() { | void _openPop() { | ||||
Navigator.maybePop(context); | Navigator.maybePop(context); | ||||
@@ -44,57 +52,68 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||||
void _onSearchButtomClick() { | void _onSearchButtomClick() { | ||||
print('搜索商品'); | print('搜索商品'); | ||||
RouterUtil.hideKeyboard(context); | RouterUtil.hideKeyboard(context); | ||||
/// 搜索 | /// 搜索 | ||||
if(!_canSearchTag){ | |||||
if (!_canSearchTag) { | |||||
BlocProvider.of<SearchThinkBloc>(context).add(SearchThinkShowBaseViewEvent()); | BlocProvider.of<SearchThinkBloc>(context).add(SearchThinkShowBaseViewEvent()); | ||||
} | } | ||||
if(_canSearchTag){ | |||||
_onSearchInputSubmit(); | |||||
} | |||||
} | } | ||||
/// 搜索事件 | /// 搜索事件 | ||||
void _onSearchInputSubmit(){ | |||||
void _onSearchInputSubmit() { | |||||
String text = _textEditingController?.text?.toString()?.trim(); | String text = _textEditingController?.text?.toString()?.trim(); | ||||
if(!EmptyUtil.isEmpty(text)) { | if(!EmptyUtil.isEmpty(text)) { | ||||
Provider.of<SearchTagNotifier>(context, listen: false).addTag(text); | Provider.of<SearchTagNotifier>(context, listen: false).addTag(text); | ||||
RouterUtil.hideKeyboard(context); | RouterUtil.hideKeyboard(context); | ||||
// TODO ❌ 如果使用咸鱼,则这里需要改成 push | // TODO ❌ 如果使用咸鱼,则这里需要改成 push | ||||
Navigator.pushReplacement(context, CupertinoPageRoute( | Navigator.pushReplacement(context, CupertinoPageRoute( | ||||
builder: (_) => SearchResultPage({'keywords':text}), | |||||
builder: (_) => SearchResultPage({'keywords':text,'type':_type}), | |||||
//SearchResultPage(model.toJson()..['tag'] = 'search_page') | //SearchResultPage(model.toJson()..['tag'] = 'search_page') | ||||
)); | )); | ||||
} | } | ||||
} | } | ||||
/// 输入变化 | /// 输入变化 | ||||
void _onChanged(String text){ | |||||
void _onChanged(String text) { | |||||
Logger.log('onChanged input text = $text'); | Logger.log('onChanged input text = $text'); | ||||
if(!EmptyUtil.isEmpty(text)){ | |||||
if (!EmptyUtil.isEmpty(text)) { | |||||
BlocProvider.of<SearchThinkBloc>(context).add(SearchThinkKeyWrodsChangeEvent(text)); | BlocProvider.of<SearchThinkBloc>(context).add(SearchThinkKeyWrodsChangeEvent(text)); | ||||
}else{ | |||||
} else { | |||||
BlocProvider.of<SearchThinkBloc>(context).add(SearchThinkShowBaseViewEvent()); | BlocProvider.of<SearchThinkBloc>(context).add(SearchThinkShowBaseViewEvent()); | ||||
} | } | ||||
} | } | ||||
@override | @override | ||||
void initState() { | void initState() { | ||||
_textEditingController = TextEditingController(text: widget?.model?.keywords ?? ''); | _textEditingController = TextEditingController(text: widget?.model?.keywords ?? ''); | ||||
_focusNode = FocusNode()..addListener(() { | |||||
bool hasFocus = _focusNode?.hasFocus ?? false; | |||||
Logger.log('onInputClick input onTap = $hasFocus'); | |||||
if(hasFocus){ | |||||
lastText = _textEditingController.text; | |||||
if(widget?.data.containsKey('type')){ | |||||
_type=widget?.data['type']; | |||||
} | |||||
_focusNode = FocusNode() | |||||
..addListener(() { | |||||
bool hasFocus = _focusNode?.hasFocus ?? false; | |||||
Logger.log('onInputClick input onTap = $hasFocus'); | |||||
if (hasFocus) { | |||||
String text = _textEditingController?.text?.toString()?.trim(); | String text = _textEditingController?.text?.toString()?.trim(); | ||||
if(!EmptyUtil.isEmpty(text)){ | |||||
if (!EmptyUtil.isEmpty(text)) { | |||||
BlocProvider.of<SearchThinkBloc>(context).add(SearchThinkKeyWrodsChangeEvent(text)); | BlocProvider.of<SearchThinkBloc>(context).add(SearchThinkKeyWrodsChangeEvent(text)); | ||||
} | } | ||||
setState(() { | setState(() { | ||||
_canSearchTag = false; | _canSearchTag = false; | ||||
}); | }); | ||||
}else{ | |||||
} else { | |||||
setState(() { | setState(() { | ||||
_canSearchTag =true; | |||||
_canSearchTag = true; | |||||
}); | }); | ||||
} | |||||
} | |||||
}); | |||||
subscription = EventUtil.instance.on<SearchBtnEvent>().listen((event) { | |||||
_type=event.type; | |||||
}); | }); | ||||
super.initState(); | super.initState(); | ||||
} | } | ||||
@@ -104,10 +123,10 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||||
_focusNode?.unfocus(); | _focusNode?.unfocus(); | ||||
_focusNode?.dispose(); | _focusNode?.dispose(); | ||||
_textEditingController?.dispose(); | _textEditingController?.dispose(); | ||||
subscription?.cancel(); | |||||
super.dispose(); | super.dispose(); | ||||
} | } | ||||
@override | @override | ||||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
return Container( | return Container( | ||||
@@ -143,7 +162,6 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||||
Icons.arrow_back_ios, | Icons.arrow_back_ios, | ||||
size: 22, | size: 22, | ||||
color: HexColor.fromHex('#000000'), | color: HexColor.fromHex('#000000'), | ||||
), | ), | ||||
onPressed: () => _openPop(), | onPressed: () => _openPop(), | ||||
); | ); | ||||
@@ -151,9 +169,10 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||||
/// 搜索按钮 | /// 搜索按钮 | ||||
Widget _createSubmitButtomWidget(SearchResultInputModel model) { | Widget _createSubmitButtomWidget(SearchResultInputModel model) { | ||||
return GestureDetector( | return GestureDetector( | ||||
behavior: HitTestBehavior.opaque, | behavior: HitTestBehavior.opaque, | ||||
onTap: ()=> _onSearchButtomClick(), | |||||
onTap: () => _onSearchButtomClick(), | |||||
child: Container( | child: Container( | ||||
alignment: Alignment.center, | alignment: Alignment.center, | ||||
padding: const EdgeInsets.only( | padding: const EdgeInsets.only( | ||||
@@ -163,7 +182,8 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||||
), | ), | ||||
child: Text( | child: Text( | ||||
_canSearchTag ? model?.search_button ?? '搜索' : '取消', | _canSearchTag ? model?.search_button ?? '搜索' : '取消', | ||||
style: TextStyle(fontSize: 14, color: HexColor.fromHex(_canSearchTag ?model?.search_button_color : '#999999'), fontWeight: _canSearchTag? FontWeight.bold : FontWeight.normal), | |||||
style: TextStyle( | |||||
fontSize: 14, color: HexColor.fromHex(_canSearchTag ? model?.search_button_color : '#999999'), fontWeight: _canSearchTag ? FontWeight.bold : FontWeight.normal), | |||||
), | ), | ||||
), | ), | ||||
); | ); | ||||
@@ -196,7 +216,7 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||||
contentPadding: EdgeInsets.zero, | contentPadding: EdgeInsets.zero, | ||||
// contentPadding: const EdgeInsets.only(left: 0, right: 0,top: 0 ,bottom: 12), | // contentPadding: const EdgeInsets.only(left: 0, right: 0,top: 0 ,bottom: 12), | ||||
// focusColor: Colors.transparent, | // focusColor: Colors.transparent, | ||||
fillColor: Colors.transparent, | |||||
fillColor: Colors.transparent, | |||||
border: InputBorder.none, | border: InputBorder.none, | ||||
focusedBorder: InputBorder.none, | focusedBorder: InputBorder.none, | ||||
focusedErrorBorder: InputBorder.none, | focusedErrorBorder: InputBorder.none, | ||||
@@ -210,5 +230,4 @@ class _SearchResultInputWidgetState extends State<SearchResultInputWidget> { | |||||
), | ), | ||||
); | ); | ||||
} | } | ||||
} | } |
@@ -0,0 +1,8 @@ | |||||
///点击tabBar时的类型传递 | |||||
class SearchBtnEvent{ | |||||
final String type; | |||||
SearchBtnEvent(this.type); | |||||
} |
@@ -1,5 +1,6 @@ | |||||
import 'dart:convert'; | import 'dart:convert'; | ||||
import 'package:event_bus/event_bus.dart'; | |||||
import 'package:flutter/cupertino.dart'; | import 'package:flutter/cupertino.dart'; | ||||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
import 'package:cached_network_image/cached_network_image.dart'; | import 'package:cached_network_image/cached_network_image.dart'; | ||||
@@ -14,6 +15,7 @@ import 'package:zhiying_base_widget/widgets/search/tabbar/search_tab_sk.dart'; | |||||
import 'package:zhiying_base_widget/widgets/search/widget/my_tab.dart'; | import 'package:zhiying_base_widget/widgets/search/widget/my_tab.dart'; | ||||
import 'package:provider/provider.dart'; | import 'package:provider/provider.dart'; | ||||
import 'package:flutter_bloc/flutter_bloc.dart'; | import 'package:flutter_bloc/flutter_bloc.dart'; | ||||
import 'package:zhiying_base_widget/widgets/search_result/tarbar/model/search_btn_event.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
@@ -66,6 +68,9 @@ class _SearchResultTabWidgetState extends State<SearchResultTabWidget> { | |||||
} | } | ||||
} | } | ||||
}catch(_){} | }catch(_){} | ||||
Future.delayed(Duration(milliseconds: 10),(){ | |||||
EventUtil.instance.fire(SearchBtnEvent(_type)); | |||||
}); | |||||
_tabController = TabController(length: length, vsync: ScrollableState(), initialIndex: initIndex) | _tabController = TabController(length: length, vsync: ScrollableState(), initialIndex: initIndex) | ||||
..addListener(() { | ..addListener(() { | ||||
try{ | try{ | ||||
@@ -75,6 +80,7 @@ class _SearchResultTabWidgetState extends State<SearchResultTabWidget> { | |||||
}catch(e, s){ | }catch(e, s){ | ||||
Logger.error(e, s); | Logger.error(e, s); | ||||
} | } | ||||
EventUtil.instance.fire(SearchBtnEvent(_type)); | |||||
}); | }); | ||||
@@ -4,4 +4,5 @@ export 'dialog/loading/loading.dart'; | |||||
export 'package:flutter_swiper/flutter_swiper.dart'; | export 'package:flutter_swiper/flutter_swiper.dart'; | ||||
export 'package:zhiying_base_widget/pages/main_page/model/background_model.dart'; | export 'package:zhiying_base_widget/pages/main_page/model/background_model.dart'; | ||||
export 'package:zhiying_base_widget/pages/custom_page/bloc/background_bloc.dart'; | export 'package:zhiying_base_widget/pages/custom_page/bloc/background_bloc.dart'; | ||||
export 'package:pull_to_refresh/pull_to_refresh.dart'; | |||||
export 'package:pull_to_refresh/pull_to_refresh.dart'; | |||||
export 'package:flutter_user_agent/flutter_user_agent.dart'; |
@@ -50,11 +50,14 @@ dependencies: | |||||
intl: 0.16.1 | intl: 0.16.1 | ||||
loading_indicator: ^1.2.0 | loading_indicator: ^1.2.0 | ||||
#webView | |||||
flutter_webview_plugin: 0.3.11 | |||||
mobpush_plugin: | mobpush_plugin: | ||||
plugin_platform_interface: ^1.0.1 | plugin_platform_interface: ^1.0.1 | ||||
permission_handler_platform_interface: ^2.0.1 | permission_handler_platform_interface: ^2.0.1 | ||||
flutter_user_agent: ^1.2.2 | |||||
dev_dependencies: | dev_dependencies: | ||||