hudaqiang 4 年之前
父節點
當前提交
5a7f94fbe6

+ 8 - 2
ios/Podfile.lock

@@ -35,6 +35,8 @@ PODS:
   - image_cropper (0.0.4):
     - Flutter
     - TOCropViewController (~> 2.6.0)
+  - image_gallery_saver (1.5.0):
+    - Flutter
   - image_picker (0.0.1):
     - Flutter
   - install_plugin (0.0.1):
@@ -94,6 +96,7 @@ DEPENDENCIES:
   - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
   - fluwx (from `.symlinks/plugins/fluwx/ios`)
   - image_cropper (from `.symlinks/plugins/image_cropper/ios`)
+  - image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
   - image_picker (from `.symlinks/plugins/image_picker/ios`)
   - install_plugin (from `.symlinks/plugins/install_plugin/ios`)
   - launch_review (from `.symlinks/plugins/launch_review/ios`)
@@ -146,6 +149,8 @@ EXTERNAL SOURCES:
     :path: ".symlinks/plugins/fluwx/ios"
   image_cropper:
     :path: ".symlinks/plugins/image_cropper/ios"
+  image_gallery_saver:
+    :path: ".symlinks/plugins/image_gallery_saver/ios"
   image_picker:
     :path: ".symlinks/plugins/image_picker/ios"
   install_plugin:
@@ -188,10 +193,11 @@ SPEC CHECKSUMS:
   fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902
   FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
   image_cropper: f1668dd8d2cad2d357955caad15a40547856edcb
+  image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2
   image_picker: 50e7c7ff960e5f58faa4d1f4af84a771c671bc4a
   install_plugin: a13e7ddd2bab0c701b48cd359c26d0394125b6fb
   launch_review: 75d5a956ba8eaa493e9c9d4bf4c05e505e8d5ed0
-  libwebp: 3aa3dfd4b00d3caf4c12b4bbc17e9b7b2df3f6fb
+  libwebp: 6bac0a99ba5a6bb7449a951ff22c484201985f68
   Mantle: 4c0ed6ce47c96eccc4dc3bb071deb3def0e2c3be
   package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
   package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
@@ -210,4 +216,4 @@ SPEC CHECKSUMS:
 
 PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
 
-COCOAPODS: 1.10.0
+COCOAPODS: 1.10.1

+ 6 - 6
ios/Runner.xcodeproj/project.pbxproj

@@ -375,7 +375,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
-				CURRENT_PROJECT_VERSION = 25;
+				CURRENT_PROJECT_VERSION = 38;
 				DEVELOPMENT_TEAM = 4699C5C3US;
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -391,7 +391,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				MARKETING_VERSION = 1.1.03;
+				MARKETING_VERSION = 1.1.07;
 				PRODUCT_BUNDLE_IDENTIFIER = com.bh.bbyyy;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -514,7 +514,7 @@
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
-				CURRENT_PROJECT_VERSION = 25;
+				CURRENT_PROJECT_VERSION = 38;
 				DEVELOPMENT_TEAM = 4699C5C3US;
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -530,7 +530,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				MARKETING_VERSION = 1.1.03;
+				MARKETING_VERSION = 1.1.07;
 				PRODUCT_BUNDLE_IDENTIFIER = com.bh.bbyyy;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -547,7 +547,7 @@
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
-				CURRENT_PROJECT_VERSION = 25;
+				CURRENT_PROJECT_VERSION = 38;
 				DEVELOPMENT_TEAM = 4699C5C3US;
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -563,7 +563,7 @@
 					"$(inherited)",
 					"$(PROJECT_DIR)/Flutter",
 				);
-				MARKETING_VERSION = 1.1.03;
+				MARKETING_VERSION = 1.1.07;
 				PRODUCT_BUNDLE_IDENTIFIER = com.bh.bbyyy;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

+ 6 - 0
lib/beans/save_qr_code_bean_entity.dart

@@ -0,0 +1,6 @@
+import 'package:bbyyy/generated/json/base/json_convert_content.dart';
+
+class SaveQrCodeBeanEntity with JsonConvert<SaveQrCodeBeanEntity> {
+	String errorMessage;
+	bool isSuccess;
+}

+ 4 - 0
lib/beans/template_bean_entity.dart

@@ -1,5 +1,7 @@
 
 import 'package:bbyyy/generated/json/base/json_convert_content.dart';
+import 'package:bbyyy/generated/json/base/json_field.dart';
+
 
 class TemplateBeanEntity with JsonConvert<TemplateBeanEntity> {
 	List<TemplateBeanData> data;
@@ -9,6 +11,8 @@ class TemplateBeanEntity with JsonConvert<TemplateBeanEntity> {
 class TemplateBeanData with JsonConvert<TemplateBeanData> {
 	int id;
 	String template;
+	@JSONField(name: "owner_uid")
 	int ownerUid;
+	@JSONField(name: "shop_uid")
 	int shopUid;
 }

文件差異過大導致無法顯示
+ 398 - 458
lib/generated/json/base/json_convert_content.dart


+ 18 - 0
lib/generated/json/save_qr_code_bean_entity_helper.dart

@@ -0,0 +1,18 @@
+import 'package:bbyyy/beans/save_qr_code_bean_entity.dart';
+
+saveQrCodeBeanEntityFromJson(SaveQrCodeBeanEntity data, Map<String, dynamic> json) {
+	if (json['errorMessage'] != null) {
+		data.errorMessage = json['errorMessage'].toString();
+	}
+	if (json['isSuccess'] != null) {
+		data.isSuccess = json['isSuccess'];
+	}
+	return data;
+}
+
+Map<String, dynamic> saveQrCodeBeanEntityToJson(SaveQrCodeBeanEntity entity) {
+	final Map<String, dynamic> data = new Map<String, dynamic>();
+	data['errorMessage'] = entity.errorMessage;
+	data['isSuccess'] = entity.isSuccess;
+	return data;
+}

+ 10 - 10
lib/generated/json/template_bean_entity_helper.dart

@@ -26,15 +26,15 @@ templateBeanDataFromJson(TemplateBeanData data, Map<String, dynamic> json) {
 	if (json['template'] != null) {
 		data.template = json['template'].toString();
 	}
-	if (json['ownerUid'] != null) {
-		data.ownerUid = json['ownerUid'] is String
-				? int.tryParse(json['ownerUid'])
-				: json['ownerUid'].toInt();
+	if (json['owner_uid'] != null) {
+		data.ownerUid = json['owner_uid'] is String
+				? int.tryParse(json['owner_uid'])
+				: json['owner_uid'].toInt();
 	}
-	if (json['shopUid'] != null) {
-		data.shopUid = json['shopUid'] is String
-				? int.tryParse(json['shopUid'])
-				: json['shopUid'].toInt();
+	if (json['shop_uid'] != null) {
+		data.shopUid = json['shop_uid'] is String
+				? int.tryParse(json['shop_uid'])
+				: json['shop_uid'].toInt();
 	}
 	return data;
 }
@@ -43,7 +43,7 @@ Map<String, dynamic> templateBeanDataToJson(TemplateBeanData entity) {
 	final Map<String, dynamic> data = new Map<String, dynamic>();
 	data['id'] = entity.id;
 	data['template'] = entity.template;
-	data['ownerUid'] = entity.ownerUid;
-	data['shopUid'] = entity.shopUid;
+	data['owner_uid'] = entity.ownerUid;
+	data['shop_uid'] = entity.shopUid;
 	return data;
 }

+ 7 - 3
lib/my_tools/order_processing/order_processing.dart

@@ -115,18 +115,22 @@ class OrderProcessing {
         shops = entity.data.data;
         shops.removeWhere((element) => !element.privateShop);
         shops.removeWhere((element) => !element.innerTrade);
+        bool hasMatch = false;
         x:
         for (int i = 0; i < shops.length; i++) {
           shop = shops[i];
           matchTemplate();
           if (orderHash != '') {
+            hasMatch = true;
             showView();
             break x;
-          }else{
-              PopUpQueue().onShow = false;
-              PopUpQueue().showNext();
           }
         }
+        if(!hasMatch){
+          print('noMatch');
+          PopUpQueue().onShow = false;
+          PopUpQueue().showNext();
+        }
       } else {
         PopUpQueue().onShow = false;
         PopUpQueue().showNext();

+ 13 - 12
lib/paegs/chat_page/chat_page_view.dart

@@ -231,18 +231,19 @@ class ChatPageView {
         }
       },
     ));
-    // items.add(GestureDetector(
-    //   child: Container(
-    //     child: SvgPicture.asset(
-    //       'images/svg/发红包.svg',
-    //     ),
-    //   ),
-    //   behavior: HitTestBehavior.translucent,
-    //   onTap: () async {
-    //     MyTools()
-    //         .toPage(context, RedPacketPage(ChatData().chatWith), (then) {});
-    //   },
-    // ));
+    if(!MyCookie().underReview)
+    items.add(GestureDetector(
+      child: Container(
+        child: SvgPicture.asset(
+          'images/svg/发红包.svg',
+        ),
+      ),
+      behavior: HitTestBehavior.translucent,
+      onTap: () async {
+        MyTools()
+            .toPage(context, RedPacketPage(ChatData().chatWith), (then) {});
+      },
+    ));
     return items;
   }
 

+ 1 - 1
lib/paegs/gang_page/gang_in_page/gang_in_page.dart

@@ -265,7 +265,7 @@ class _GangInPageState extends State<GangInPage> {
                         ],
                       ),
                     ),
-                  if (MyCookie().getUID() == widget.data.ownerUid)
+                  if (MyCookie().getUID() == widget.data.ownerUid&&!widget.data.privateShop)
                     PopupMenuItem<String>(
                       value: '收款二维码',
                       child: Row(

+ 7 - 3
lib/paegs/gang_page/qr_code_for_store_payment_page/qr_code_for_store_payment_page.dart

@@ -4,7 +4,7 @@ import 'dart:typed_data';
 import 'dart:ui';
 
 import 'package:bbyyy/beans/my_shop_bean_entity.dart';
-import 'package:bbyyy/beans/save_image_bean_entity.dart';
+import 'package:bbyyy/beans/save_qr_code_bean_entity.dart';
 import 'package:bbyyy/my_tools/my_colors.dart';
 import 'package:bbyyy/my_tools/my_tools.dart';
 import 'package:flutter/material.dart';
@@ -208,8 +208,12 @@ class _QRCodeForStorePaymentPageState extends State<QRCodeForStorePaymentPage> {
       final result = await ImageGallerySaver.saveImage(pngBytes,
           name: 'bby_${DateTime.now()}');
       print('======================|\n$result\n|===========================');
-      bool isSuccess = result.toString().contains('isSuccess: true');
-      showToast(isSuccess ? '保存成功,请前往相册查看': '保存失败');
+      print('======================|\n${json.encode(result)}\n|===========================');
+      SaveQrCodeBeanEntity entity = SaveQrCodeBeanEntity().fromJson(json.decode(json.encode(result)));
+
+      // bool isSuccess = result.toString().contains('isSuccess: true');
+      bool isSuccess = entity.isSuccess;
+      showToast(isSuccess ? '保存成功,请前往相册查看': '保存失败,请打开相应权限,或截图保存');
       return pngBytes;
     } catch (e) {
       print(e);

+ 1 - 1
pubspec.yaml

@@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
 # Read more about iOS versioning at
 # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 1.1.06+1
+version: 1.1.07+1
 
 environment:
   sdk: ">=2.7.0 <3.0.0"

部分文件因文件數量過多而無法顯示