修改打包命令

修复ios支付问题
hmxc
张萌 3 years ago
parent 39a57b9534
commit af4c1f22b8

@ -1,76 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>小蜜蜂智慧小区</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>10.0</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>小蜜蜂智慧小区</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>alipay</string>
<key>CFBundleURLSchemes</key>
<array>
<string>akuCommunity</string>
</array>
</dict>
<key>NSAppleMusicUsageDescription</key>
<string>请允许访问,否则无法在小蜜蜂社区中发送及保存照片.</string>
<key>NSCalendarsUsageDescription</key>
<string>请允许访问,否则无法查看您每日的浏览记录.</string>
<key>NSCameraUsageDescription</key>
<string>我们需要访问您的相机,用于上传报修情况等相关功能</string>
<key>NSContactsUsageDescription</key>
<string>我们需要访问您的通讯录,获取通讯录信息.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>请允许访问,否则无法在小蜜蜂社区中使用商家服务、本都生活、发送地理位置等定位相关功能.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>获取定位权限: 小蜜蜂社区会在一键报警,查看物流等服务中使用您的位置信息.</string>
<key>NSMotionUsageDescription</key>
<string>同步健康数据到App.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>我们需要访问您的照片,用于上传报修状况等相关功能</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>请允许访问,否则无法将语音消息转换为文字.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>无需使用蓝牙</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>无需使用蓝牙</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>io.flutter.embedded_views_preview</key>
<true/>
<key>UIStatusBarHidden</key>
</array>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>alipays</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>10.0</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</plist>
<key>NSAppleMusicUsageDescription</key>
<string>请允许访问,否则无法在小蜜蜂社区中发送及保存照片.</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>无需使用蓝牙</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>无需使用蓝牙</string>
<key>NSCalendarsUsageDescription</key>
<string>请允许访问,否则无法查看您每日的浏览记录.</string>
<key>NSCameraUsageDescription</key>
<string>我们需要访问您的相机,用于上传报修情况等相关功能</string>
<key>NSContactsUsageDescription</key>
<string>我们需要访问您的通讯录,获取通讯录信息.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>请允许访问,否则无法在小蜜蜂社区中使用商家服务、本都生活、发送地理位置等定位相关功能.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>获取定位权限: 小蜜蜂社区会在一键报警,查看物流等服务中使用您的位置信息.</string>
<key>NSMotionUsageDescription</key>
<string>同步健康数据到App.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>我们需要访问您的照片,用于上传报修状况等相关功能</string>
<key>NSSpeechRecognitionUsageDescription</key>
<string>请允许访问,否则无法将语音消息转换为文字.</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>io.flutter.embedded_views_preview</key>
<true/>
</dict>
</plist>

@ -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<bool> callAliPay(String order, String apiPath) async {
Map<dynamic, dynamic> result = await aliPay(order);
var install = await isAliPayInstalled();
if (!install) {
BotToast.showText(text: '未安装支付宝!');
return false;
}
Map<dynamic, dynamic> result = {};
try {
result = await aliPay(order);
} catch (e) {
print(e.toString());
}
_resultStatus = result['resultStatus'];
if (_resultStatus == '9000') {
String _res = result['result'];

@ -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<FixedDetailPage> {
.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<FixedDetailPage> {
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),

@ -233,7 +233,7 @@ class _GoodsDetailPageState extends State<GoodsDetailPage> {
color: kPrimaryColor,
height: 80.w,
onPressed: () async {
Get.off(GoodsOrderDetailPage(
Get.off(() => GoodsOrderDetailPage(
model: _goodsModel,
name: _nameController.text,
phone: _phoneController.text));

@ -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<GoodsOrderDetailPage> {
@override
void dispose() {
_refreshController.dispose();
BotToast.closeAllLoading();
super.dispose();
}
@ -105,7 +104,7 @@ class _GoodsOrderDetailPageState extends State<GoodsOrderDetailPage> {
bool result = await PayUtil()
.callAliPay(baseModel.message!, API.pay.shoppingCheck);
if (result) {
Get.off(PayFinishPage());
Get.off(() => PayFinishPage());
}
} else {
BotToast.showText(text: baseModel.message!);

@ -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"

@ -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'
]);
}

@ -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';
}

@ -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<String> getVersion() async {
String projectPath = Directory('.').absolute.path;
@ -51,4 +67,4 @@ Future<String> getVersion() async {
dynamic content = loadYaml(yamlContent);
String version = content['version'];
return version;
}
}

Loading…
Cancel
Save