From af4c1f22b8e729efe2cd4274078067f4fca6b5fb Mon Sep 17 00:00:00 2001
From: zhangmeng <494089941@qq.com>
Date: Fri, 29 Oct 2021 15:46:04 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8C=85=E5=91=BD?=
=?UTF-8?q?=E4=BB=A4=20=E4=BF=AE=E5=A4=8Dios=E6=94=AF=E4=BB=98=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ios/Runner/Info.plist | 155 ++++++++++--------
lib/pages/life_pay/pay_util.dart | 17 +-
.../things_page/widget/fixed_detail_page.dart | 22 ++-
lib/ui/market/goods/goods_detail_page.dart | 2 +-
.../market/goods/goods_order_detail_page.dart | 17 +-
pubspec.yaml | 2 +-
tool/_build.dart | 8 +-
tool/config.dart | 9 +-
tool/grind.dart | 18 +-
9 files changed, 149 insertions(+), 101 deletions(-)
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index a156b23b..66a2c5ff 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -1,76 +1,93 @@
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- 小蜜蜂智慧小区
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- $(FLUTTER_BUILD_NAME)
- CFBundleSignature
- ????
- CFBundleVersion
- $(FLUTTER_BUILD_NUMBER)
- LSRequiresIPhoneOS
-
- MinimumOSVersion
- 10.0
- NSAppTransportSecurity
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ 小蜜蜂智慧小区
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleURLTypes
+
- NSAllowsArbitraryLoads
-
+ CFBundleTypeRole
+ Editor
+ CFBundleURLName
+ alipay
+ CFBundleURLSchemes
+
+ akuCommunity
+
- NSAppleMusicUsageDescription
- 请允许访问,否则无法在小蜜蜂社区中发送及保存照片.
- NSCalendarsUsageDescription
- 请允许访问,否则无法查看您每日的浏览记录.
- NSCameraUsageDescription
- 我们需要访问您的相机,用于上传报修情况等相关功能
- NSContactsUsageDescription
- 我们需要访问您的通讯录,获取通讯录信息.
- NSLocationAlwaysUsageDescription
- 请允许访问,否则无法在小蜜蜂社区中使用商家服务、本都生活、发送地理位置等定位相关功能.
- NSLocationWhenInUseUsageDescription
- 获取定位权限: 小蜜蜂社区会在一键报警,查看物流等服务中使用您的位置信息.
- NSMotionUsageDescription
- 同步健康数据到App.
- NSPhotoLibraryUsageDescription
- 我们需要访问您的照片,用于上传报修状况等相关功能
- NSSpeechRecognitionUsageDescription
- 请允许访问,否则无法将语音消息转换为文字.
- NSBluetoothPeripheralUsageDescription
- 无需使用蓝牙
- NSBluetoothAlwaysUsageDescription
- 无需使用蓝牙
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UIViewControllerBasedStatusBarAppearance
-
- io.flutter.embedded_views_preview
-
- UIStatusBarHidden
+
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSApplicationQueriesSchemes
+
+ alipays
+
+ LSRequiresIPhoneOS
+
+ MinimumOSVersion
+ 10.0
+ NSAppTransportSecurity
+
+ NSAllowsArbitraryLoads
-
\ No newline at end of file
+ NSAppleMusicUsageDescription
+ 请允许访问,否则无法在小蜜蜂社区中发送及保存照片.
+ NSBluetoothAlwaysUsageDescription
+ 无需使用蓝牙
+ NSBluetoothPeripheralUsageDescription
+ 无需使用蓝牙
+ NSCalendarsUsageDescription
+ 请允许访问,否则无法查看您每日的浏览记录.
+ NSCameraUsageDescription
+ 我们需要访问您的相机,用于上传报修情况等相关功能
+ NSContactsUsageDescription
+ 我们需要访问您的通讯录,获取通讯录信息.
+ NSLocationAlwaysUsageDescription
+ 请允许访问,否则无法在小蜜蜂社区中使用商家服务、本都生活、发送地理位置等定位相关功能.
+ NSLocationWhenInUseUsageDescription
+ 获取定位权限: 小蜜蜂社区会在一键报警,查看物流等服务中使用您的位置信息.
+ NSMotionUsageDescription
+ 同步健康数据到App.
+ NSPhotoLibraryUsageDescription
+ 我们需要访问您的照片,用于上传报修状况等相关功能
+ NSSpeechRecognitionUsageDescription
+ 请允许访问,否则无法将语音消息转换为文字.
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UIStatusBarHidden
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ io.flutter.embedded_views_preview
+
+
+
diff --git a/lib/pages/life_pay/pay_util.dart b/lib/pages/life_pay/pay_util.dart
index e7c1a299..4cf6083a 100644
--- a/lib/pages/life_pay/pay_util.dart
+++ b/lib/pages/life_pay/pay_util.dart
@@ -1,13 +1,12 @@
import 'dart:convert';
+import 'package:aku_community/models/pay/pay_model.dart';
+import 'package:aku_community/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:dio/dio.dart';
import 'package:power_logger/power_logger.dart';
import 'package:tobias/tobias.dart';
-import 'package:aku_community/models/pay/pay_model.dart';
-import 'package:aku_community/utils/network/net_util.dart';
-
enum PAYTYPE {
///支付宝
ALI,
@@ -53,7 +52,17 @@ class PayUtil {
///传入订单信息和确认订单请求地址
Future callAliPay(String order, String apiPath) async {
- Map result = await aliPay(order);
+ var install = await isAliPayInstalled();
+ if (!install) {
+ BotToast.showText(text: '未安装支付宝!');
+ return false;
+ }
+ Map result = {};
+ try {
+ result = await aliPay(order);
+ } catch (e) {
+ print(e.toString());
+ }
_resultStatus = result['resultStatus'];
if (_resultStatus == '9000') {
String _res = result['result'];
diff --git a/lib/pages/things_page/widget/fixed_detail_page.dart b/lib/pages/things_page/widget/fixed_detail_page.dart
index 01012142..85badacc 100644
--- a/lib/pages/things_page/widget/fixed_detail_page.dart
+++ b/lib/pages/things_page/widget/fixed_detail_page.dart
@@ -1,13 +1,3 @@
-import 'package:flutter/cupertino.dart';
-import 'package:flutter/material.dart';
-
-import 'package:bot_toast/bot_toast.dart';
-import 'package:flutter_easyrefresh/easy_refresh.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:get/get.dart';
-import 'package:url_launcher/url_launcher.dart';
-import 'package:velocity_x/velocity_x.dart';
-
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/constants/api.dart';
@@ -22,6 +12,14 @@ import 'package:aku_community/utils/network/base_model.dart';
import 'package:aku_community/widget/bee_divider.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/views/horizontal_image_view.dart';
+import 'package:bot_toast/bot_toast.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_easyrefresh/easy_refresh.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+import 'package:url_launcher/url_launcher.dart';
+import 'package:velocity_x/velocity_x.dart';
class FixedDetailPage extends StatefulWidget {
final int id;
@@ -402,7 +400,7 @@ class _FixedDetailPageState extends State {
.callAliPay(baseModel.message!, API.pay.reportReapirCheck);
if (result) {
Get.back();
- Get.off(PayFinishPage());
+ Get.off(() => PayFinishPage());
}
} else {
Get.back();
@@ -528,7 +526,7 @@ class _FixedDetailPageState extends State {
MaterialButton(
minWidth: 375.w,
onPressed: () {
- Get.off(FixedEvaluatePage(_model));
+ Get.off(() => FixedEvaluatePage(_model));
},
child: '立即评价'.text.white.size(32.sp).bold.make(),
padding: EdgeInsets.symmetric(vertical: 26.w),
diff --git a/lib/ui/market/goods/goods_detail_page.dart b/lib/ui/market/goods/goods_detail_page.dart
index 05090014..39fe65c5 100644
--- a/lib/ui/market/goods/goods_detail_page.dart
+++ b/lib/ui/market/goods/goods_detail_page.dart
@@ -233,7 +233,7 @@ class _GoodsDetailPageState extends State {
color: kPrimaryColor,
height: 80.w,
onPressed: () async {
- Get.off(GoodsOrderDetailPage(
+ Get.off(() => GoodsOrderDetailPage(
model: _goodsModel,
name: _nameController.text,
phone: _phoneController.text));
diff --git a/lib/ui/market/goods/goods_order_detail_page.dart b/lib/ui/market/goods/goods_order_detail_page.dart
index 1cca4d36..0faea93d 100644
--- a/lib/ui/market/goods/goods_order_detail_page.dart
+++ b/lib/ui/market/goods/goods_order_detail_page.dart
@@ -1,11 +1,3 @@
-import 'package:flutter/material.dart';
-
-import 'package:bot_toast/bot_toast.dart';
-import 'package:flutter_easyrefresh/easy_refresh.dart';
-import 'package:flutter_screenutil/flutter_screenutil.dart';
-import 'package:get/get.dart';
-import 'package:velocity_x/velocity_x.dart';
-
import 'package:aku_community/base/base_style.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/constants/api.dart';
@@ -22,6 +14,12 @@ import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:aku_community/widget/buttons/bee_numberic_button.dart';
import 'package:aku_community/widget/buttons/bottom_button.dart';
import 'package:aku_community/widget/others/user_tool.dart';
+import 'package:bot_toast/bot_toast.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_easyrefresh/easy_refresh.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:get/get.dart';
+import 'package:velocity_x/velocity_x.dart';
class GoodsOrderDetailPage extends StatefulWidget {
final GoodsDetailModel model;
@@ -50,6 +48,7 @@ class _GoodsOrderDetailPageState extends State {
@override
void dispose() {
_refreshController.dispose();
+ BotToast.closeAllLoading();
super.dispose();
}
@@ -105,7 +104,7 @@ class _GoodsOrderDetailPageState extends State {
bool result = await PayUtil()
.callAliPay(baseModel.message!, API.pay.shoppingCheck);
if (result) {
- Get.off(PayFinishPage());
+ Get.off(() => PayFinishPage());
}
} else {
BotToast.showText(text: baseModel.message!);
diff --git a/pubspec.yaml b/pubspec.yaml
index 3e9769a3..cf6e8de4 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -2,7 +2,7 @@ name: aku_community
description: A new Flutter project.
publish_to: "none"
-version: 1.8.1-dev+45
+version: 1.8.2-dev+46
environment:
sdk: ">=2.12.0 <3.0.0"
diff --git a/tool/_build.dart b/tool/_build.dart
index 8f4cb506..249976df 100644
--- a/tool/_build.dart
+++ b/tool/_build.dart
@@ -16,9 +16,11 @@ buildApk() async {
String date = DateUtil.formatDate(DateTime.now(), format: 'yy_MM_dd_HH_mm');
String version = await getVersion();
+ await runAsync('rm', arguments: ['-rf', Config.apkDir]);
+ await runAsync('mkdir', arguments: ['-p', Config.apkDir]);
await runAsync('mv', arguments: [
Config.buildPath,
- '${Config.buildDir}/${Config.packageName}_${version}_release_$date.apk'
+ '${Config.apkDir}/${Config.packageName}_${version}_release_$date.apk'
]);
}
@@ -37,9 +39,11 @@ buildApkDev() async {
);
String date = DateUtil.formatDate(DateTime.now(), format: 'yy_MM_dd_HH_mm');
String version = await getVersion();
+ await runAsync('rm', arguments: ['-rf', Config.apkDevDir]);
+ await runAsync('mkdir', arguments: ['-p', Config.apkDevDir]);
await runAsync('mv', arguments: [
Config.buildPath,
- '${Config.buildDir}/${Config.packageName}_${version}_beta_$date.apk'
+ '${Config.apkDevDir}/${Config.packageName}_${version}_beta_$date.apk'
]);
}
diff --git a/tool/config.dart b/tool/config.dart
index 59b0abf0..fa66383e 100644
--- a/tool/config.dart
+++ b/tool/config.dart
@@ -9,6 +9,11 @@ class Config {
static String get buildPath =>
'./build/app/outputs/flutter-apk/app-release.apk';
- ///打包目录文件夹
- static String get buildDir => './build/app/outputs/flutter-apk';
+ ///测试包文件夹
+ static String get apkDevDir =>
+ '/users/zhangmeng/team/bee/app/aku_community/dev';
+
+ ///正式包文件夹
+ static String get apkDir =>
+ '/users/zhangmeng/team/bee/app/aku_community/release';
}
diff --git a/tool/grind.dart b/tool/grind.dart
index 7520c7d8..4a42c3fe 100644
--- a/tool/grind.dart
+++ b/tool/grind.dart
@@ -1,4 +1,5 @@
import 'dart:io';
+
import 'package:common_utils/common_utils.dart';
import 'package:grinder/grinder.dart';
import 'package:path/path.dart';
@@ -43,6 +44,21 @@ void addVersionPatch() async {
await File(yamlPath).writeAsString(result);
}
+@Task('add major version number')
+void addVersionMajor() async {
+ String projectPath = Directory('.').absolute.path;
+ String yamlPath = join(projectPath, 'pubspec.yaml');
+ String yamlContent = await File(yamlPath).readAsString();
+ dynamic content = loadYaml(yamlContent);
+ String version = content['version'];
+ //rename version
+
+ Version resultVersion = VersionTool.fromText(version).nextMajorTag('dev');
+
+ String result = yamlContent.replaceFirst(version, resultVersion.toString());
+ await File(yamlPath).writeAsString(result);
+}
+
@Task()
Future getVersion() async {
String projectPath = Directory('.').absolute.path;
@@ -51,4 +67,4 @@ Future getVersion() async {
dynamic content = loadYaml(yamlContent);
String version = content['version'];
return version;
-}
\ No newline at end of file
+}