diff --git a/android/build.gradle b/android/build.gradle index 91bcb83..cc4941b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -33,6 +33,6 @@ android { } dependencies { - // implementation 'com.amap.api:location:5.2.0' + } } diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 72f7620..b81116c 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -54,7 +54,7 @@ android { ndk { //选择要添加的对应cpu类型的.so库。 abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a' - //abiFilters 'armeabi-v7a','x86_64','arm64-v8a' + // abiFilters 'armeabi-v7a','x86_64' } } @@ -109,19 +109,19 @@ android { // 应用信息配置 -// productFlavors { -// // 智夜生活 -// zhiying { -// applicationId "cn.zhios.zhiying" -// versionCode 57 -// dimension "app" -// versionName '1.3.17' -// // 签名信息 -// signingConfig signingConfigs.zhiying -// } -// } -// -// // 打包脚本 + productFlavors { + // 智夜生活 + zhiying { + applicationId "cn.zhios.zhiying" + versionCode 59 + dimension "app" + versionName '1.3.19' + // 签名信息 + 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") @@ -136,18 +136,18 @@ android { // } // } // } - - configurations.all { - resolutionStrategy.eachDependency { DependencyResolveDetails details -> - def requested = details.requested - if (requested.group == 'com.android.support') { - if (!requested.name.startsWith("multidex")) { - details.useVersion '28.0.3' - } - } - resolutionStrategy.force 'com.android.support:support-v4:28.0.0' - } - } +// +// configurations.all { +// resolutionStrategy.eachDependency { DependencyResolveDetails details -> +// def requested = details.requested +// if (requested.group == 'com.android.support') { +// if (!requested.name.startsWith("multidex")) { +// details.useVersion '28.0.3' +// } +// } +// resolutionStrategy.force 'com.android.support:support-v4:28.0.0' +// } +// } } @@ -186,6 +186,7 @@ dependencies { implementation 'com.alibaba.sdk.android:nb_trade:4.0.0.16@aar' implementation 'com.alibaba:fastjson:1.2.41@jar' + implementation 'com.amap.api:location:5.2.0' } diff --git a/android/libs/AMap_Location_V4.9.0_20200228.jar b/example/android/app/libs/AMap_Location_V4.9.0_20200228.jar similarity index 100% rename from android/libs/AMap_Location_V4.9.0_20200228.jar rename to example/android/app/libs/AMap_Location_V4.9.0_20200228.jar 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 4bd7141..b8f36e8 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 @@ -155,9 +155,9 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN public Map getSetting() { Map map = new HashMap(); // ///测试 -// 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://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 @@ -165,9 +165,9 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN // map.put("secret_key", "123456"); //客户测试 - map.put("domain", "http://admin.asmetymj.com/");//45678910,api.zhios.cn84198689 - map.put("master_id", "32053480"); - map.put("secret_key", "123456"); +// map.put("domain", "http://api.zhios.cn/");//45678910,api.zhios.cn84198689 +// map.put("master_id", "13376168"); +// map.put("secret_key", "123456"); // map.put("token", "123465"); return map; diff --git a/example/lib/main.dart b/example/lib/main.dart index 9b6d622..0997527 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -23,6 +23,7 @@ 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'; +import 'package:zhiying_acquisition/register.dart'; void main() { FlutterError.onError = (FlutterErrorDetails details) { @@ -65,6 +66,7 @@ class _MyAppState extends State { MemberUpgradeRegister.init(); EquityCardRegister.init(); OfficialRegister.init(); + AcquisitionRegister.init(); print('初始化百川'); FlutterAlibc.initAlibc(version: "", appName: "").then((result) { print("白川" + '${result.errorCode} ${result.errorMessage}'); @@ -72,9 +74,12 @@ class _MyAppState extends State { MobPushUtil.setCanPush(); EventUtil.instance.on().listen((event) {}); + const bool inProduction = const bool.fromEnvironment("dart.vm.product"); + if (!inProduction) { + //debug app不更新 app更新插件 + AppUpdateUtil.initXUpdate(); + } - // app更新插件 - AppUpdateUtil.initXUpdate(); } @override diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 5c3a35e..f97c094 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -32,6 +32,8 @@ dev_dependencies: path: ../../zhiying_equity_card zhiying_official: path: ../../zhiying_official + zhiying_acquisition: + path: ../../zhiying_acquisition #微信导师 zhiying_wechat_teacher: #path: ../zhiying_wechat_teacher @@ -42,7 +44,7 @@ dev_dependencies: zhiying_moments: #path: ../zhiying_moments git: - ref: 0.2.0 + ref: 0.2.2 url: http://192.168.0.138:3000/FnuoOS_ZhiYing/zhiying_moments.git #会员升级 zhiying_member_upgrade: diff --git a/lib/dialog/global_dialog/activity_dialog/activity_dialog.dart b/lib/dialog/global_dialog/activity_dialog/activity_dialog.dart index 01c46e7..a925e28 100644 --- a/lib/dialog/global_dialog/activity_dialog/activity_dialog.dart +++ b/lib/dialog/global_dialog/activity_dialog/activity_dialog.dart @@ -14,6 +14,8 @@ class ActivityDialog extends StatelessWidget { const ActivityDialog(this.model, {Key key}) : super(key: key); + + static Future show(BuildContext context) async { try { Map result = await NetUtil.post('/api/v1/mod/pub.flutter.current_activity_dialog', method: NetMethod.GET); 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 8af4d0e..c7c7f96 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 @@ -368,7 +368,7 @@ class _GoodsShareImageContentState extends State<_GoodsShareImageContent> with A Loading.show(context); ByteData byteData = await image.toByteData(format: ui.ImageByteFormat.png); Uint8List pngBytes = byteData.buffer.asUint8List(); - File file = await EncodeUtil.compressImage(context,images: pngBytes, size: 400); + File file = await EncodeUtil.compressImage(context, images: pngBytes, size: 400); Loading.dismiss(); _shareModel.poster = file.readAsBytesSync(); } @@ -406,6 +406,10 @@ class _GoodsShareImageContentState extends State<_GoodsShareImageContent> with A // ============= 复制文案 ================= Clipboard.setData(ClipboardData(text: _content)); + if(_shareModel.image==null){ + _shareModel.image=List(); + } + showCupertinoModalPopup( context: context, builder: (context) => ShareAlert( diff --git a/lib/pages/launch_page/launch_page.dart b/lib/pages/launch_page/launch_page.dart index eb58166..6514547 100644 --- a/lib/pages/launch_page/launch_page.dart +++ b/lib/pages/launch_page/launch_page.dart @@ -40,12 +40,10 @@ class LaunchPage extends StatefulWidget { class _LaunchPageState extends State with TickerProviderStateMixin { final GlobalKey navigatorKey = new GlobalKey(); - int showTime = 0; @override void initState() { - validateInit(); super.initState(); } @@ -56,6 +54,20 @@ class _LaunchPageState extends State with TickerProviderStateMixin { // I am connected to a wifi network. Logger.debug('ConnectivityResult.wifi'); print('ConnectivityResult.wifi'); + + ///检查是否覆盖安装 + //取masterId + String lasterMasterId = await SharedPreferencesUtil.getStringValue(Constants.masterId, defaultVal: "1"); + Map setting = await NativeUtil.getSetting(); + String masterId = setting['master_id']; + if (lasterMasterId != "1") { + if (masterId != lasterMasterId) { + await SharedPreferencesUtil.clean(); + } + } + + SharedPreferencesUtil.setStringValue(Constants.masterId, masterId); + Application.init().then((_) async { ///引导页 PackageInfo packageInfo = await PackageInfo.fromPlatform(); diff --git a/lib/utils/contants.dart b/lib/utils/contants.dart index cd1aa6a..e0434e9 100644 --- a/lib/utils/contants.dart +++ b/lib/utils/contants.dart @@ -29,4 +29,8 @@ class Constants { //==============================版本号,控制引导页显示=================================== static String versionNumber = "versionNumber"; + + + ///masterId + static String masterId="sp_master_id"; }