Commit a541d07bd17b0f3222a7435f9eebb48da0fa604d

Authored by wdn127929
1 parent c37f87db

新建分支2.3

@@ -11,14 +11,14 @@ if (flutterRoot == null) { @@ -11,14 +11,14 @@ if (flutterRoot == null) {
11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 } 12 }
13 13
14 -def flutterVersionCode = "225" 14 +def flutterVersionCode = "226"
15 if (flutterVersionCode == null) { 15 if (flutterVersionCode == null) {
16 - flutterVersionCode = '225' 16 + flutterVersionCode = '226'
17 } 17 }
18 18
19 -def flutterVersionName = "2.2.5" 19 +def flutterVersionName = "2.2.6"
20 if (flutterVersionName == null) { 20 if (flutterVersionName == null) {
21 - flutterVersionName = '2.2.5' 21 + flutterVersionName = '2.2.6'
22 } 22 }
23 23
24 apply plugin: 'com.android.application' 24 apply plugin: 'com.android.application'
@@ -472,7 +472,7 @@ @@ -472,7 +472,7 @@
472 CODE_SIGN_IDENTITY = "iPhone Developer"; 472 CODE_SIGN_IDENTITY = "iPhone Developer";
473 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 473 "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
474 CODE_SIGN_STYLE = Automatic; 474 CODE_SIGN_STYLE = Automatic;
475 - CURRENT_PROJECT_VERSION = 225; 475 + CURRENT_PROJECT_VERSION = 220;
476 DEVELOPMENT_TEAM = 8J59HM8B82; 476 DEVELOPMENT_TEAM = 8J59HM8B82;
477 ENABLE_BITCODE = NO; 477 ENABLE_BITCODE = NO;
478 FLUTTER_BUILD_MODE = release; 478 FLUTTER_BUILD_MODE = release;
@@ -487,7 +487,7 @@ @@ -487,7 +487,7 @@
487 "$(inherited)", 487 "$(inherited)",
488 "$(PROJECT_DIR)/Flutter", 488 "$(PROJECT_DIR)/Flutter",
489 ); 489 );
490 - MARKETING_VERSION = 2.2.5; 490 + MARKETING_VERSION = 2.2.6;
491 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 491 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
492 PRODUCT_NAME = Runner; 492 PRODUCT_NAME = Runner;
493 PROVISIONING_PROFILE_SPECIFIER = ""; 493 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -616,7 +616,7 @@ @@ -616,7 +616,7 @@
616 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 616 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
617 CODE_SIGN_IDENTITY = "iPhone Developer"; 617 CODE_SIGN_IDENTITY = "iPhone Developer";
618 CODE_SIGN_STYLE = Automatic; 618 CODE_SIGN_STYLE = Automatic;
619 - CURRENT_PROJECT_VERSION = 225; 619 + CURRENT_PROJECT_VERSION = 220;
620 DEVELOPMENT_TEAM = 8J59HM8B82; 620 DEVELOPMENT_TEAM = 8J59HM8B82;
621 ENABLE_BITCODE = NO; 621 ENABLE_BITCODE = NO;
622 FLUTTER_BUILD_MODE = release; 622 FLUTTER_BUILD_MODE = release;
@@ -631,7 +631,7 @@ @@ -631,7 +631,7 @@
631 "$(inherited)", 631 "$(inherited)",
632 "$(PROJECT_DIR)/Flutter", 632 "$(PROJECT_DIR)/Flutter",
633 ); 633 );
634 - MARKETING_VERSION = 2.2.5; 634 + MARKETING_VERSION = 2.2.6;
635 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 635 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
636 PRODUCT_NAME = Runner; 636 PRODUCT_NAME = Runner;
637 PROVISIONING_PROFILE_SPECIFIER = ""; 637 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -651,7 +651,7 @@ @@ -651,7 +651,7 @@
651 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 651 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
652 CODE_SIGN_IDENTITY = "iPhone Developer"; 652 CODE_SIGN_IDENTITY = "iPhone Developer";
653 CODE_SIGN_STYLE = Automatic; 653 CODE_SIGN_STYLE = Automatic;
654 - CURRENT_PROJECT_VERSION = 225; 654 + CURRENT_PROJECT_VERSION = 220;
655 DEVELOPMENT_TEAM = 8J59HM8B82; 655 DEVELOPMENT_TEAM = 8J59HM8B82;
656 ENABLE_BITCODE = NO; 656 ENABLE_BITCODE = NO;
657 FLUTTER_BUILD_MODE = release; 657 FLUTTER_BUILD_MODE = release;
@@ -666,7 +666,7 @@ @@ -666,7 +666,7 @@
666 "$(inherited)", 666 "$(inherited)",
667 "$(PROJECT_DIR)/Flutter", 667 "$(PROJECT_DIR)/Flutter",
668 ); 668 );
669 - MARKETING_VERSION = 2.2.5; 669 + MARKETING_VERSION = 2.2.6;
670 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 670 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
671 PRODUCT_NAME = Runner; 671 PRODUCT_NAME = Runner;
672 PROVISIONING_PROFILE_SPECIFIER = ""; 672 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 <key>NSContactsUsageDescription</key> 61 <key>NSContactsUsageDescription</key>
62 <string>允许访问您的通讯录来一键录入联系人</string> 62 <string>允许访问您的通讯录来一键录入联系人</string>
63 <key>NSLocationWhenInUseUsageDescription</key> 63 <key>NSLocationWhenInUseUsageDescription</key>
64 - <string>需要您的同意,APP才能在使用期间访问位置</string> 64 + <string>需要您的同意,APP才能在创建店铺时选择店铺位置</string>
65 <key>NSMotionUsageDescription</key> 65 <key>NSMotionUsageDescription</key>
66 <string>需要您的同意,APP才能访问运动与健身</string> 66 <string>需要您的同意,APP才能访问运动与健身</string>
67 <key>NSPhotoLibraryUsageDescription</key> 67 <key>NSPhotoLibraryUsageDescription</key>
@@ -93,9 +93,6 @@ Future<void> main() async { @@ -93,9 +93,6 @@ Future<void> main() async {
93 ChangeNotifierProvider<UploadImageProvider>( 93 ChangeNotifierProvider<UploadImageProvider>(
94 create: (_) => UploadImageProvider(), 94 create: (_) => UploadImageProvider(),
95 ), 95 ),
96 - ChangeNotifierProvider<BaseIndoProvider>(  
97 - create: (_) => BaseIndoProvider(),  
98 - ),  
99 ChangeNotifierProvider<CreateStoreModel>( 96 ChangeNotifierProvider<CreateStoreModel>(
100 create: (_) => CreateStoreModel(), 97 create: (_) => CreateStoreModel(),
101 ), 98 ),
@@ -5,6 +5,7 @@ import 'package:common_utils/common_utils.dart'; @@ -5,6 +5,7 @@ import 'package:common_utils/common_utils.dart';
5 import 'package:flutter/cupertino.dart'; 5 import 'package:flutter/cupertino.dart';
6 import 'package:flutter/material.dart'; 6 import 'package:flutter/material.dart';
7 import 'package:flutter_screenutil/flutter_screenutil.dart'; 7 import 'package:flutter_screenutil/flutter_screenutil.dart';
  8 +import 'package:one_key/app.dart';
8 9
9 import 'package:one_key/pages/message/message_page.dart'; 10 import 'package:one_key/pages/message/message_page.dart';
10 import 'package:one_key/pages/my/my_page.dart'; 11 import 'package:one_key/pages/my/my_page.dart';
@@ -290,7 +290,7 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { @@ -290,7 +290,7 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver {
290 } 290 }
291 291
292 ///苹果登陆 292 ///苹果登陆
293 - _iosLogin() async { 293 + _iosLogin(UserModel value) async {
294 String info = await Utils.getDeviceInfoSystem(); 294 String info = await Utils.getDeviceInfoSystem();
295 int systemInfo = info.compareTo('13'); 295 int systemInfo = info.compareTo('13');
296 if (systemInfo < 0) { 296 if (systemInfo < 0) {
@@ -311,8 +311,9 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { @@ -311,8 +311,9 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver {
311 ), 311 ),
312 ); 312 );
313 // _showLoading(context); 313 // _showLoading(context);
314 - print(credential.userIdentifier);  
315 - NavigatorUtil.goBindingPhonePage(context, wechat: false); 314 + // print(credential.userIdentifier);
  315 + _loginAppleData(value);
  316 + // NavigatorUtil.goBindingPhonePage(context, wechat: false);
316 // String mdString = Utils.generateMd5(credential.userIdentifier); 317 // String mdString = Utils.generateMd5(credential.userIdentifier);
317 // String temp = mdString.substring(8, mdString.length - 2); 318 // String temp = mdString.substring(8, mdString.length - 2);
318 // String openid = 'IOSID_$temp'; 319 // String openid = 'IOSID_$temp';
@@ -344,6 +345,25 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { @@ -344,6 +345,25 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver {
344 // } 345 // }
345 } 346 }
346 347
  348 + _loginAppleData(UserModel value) {
  349 + if (App.sp.containsKey('unionid')) {
  350 + //微信登陆的时候,退出清空数据
  351 + App.sp.remove('openid');
  352 + App.sp.remove("unionid");
  353 + }
  354 + Map<String, String> params = {
  355 + "seller_code": "001297",
  356 + "alias": "ssahdahgdafgahjkhakjgh",
  357 + "account": "0001",
  358 + "password": "123456"
  359 + };
  360 + value.login(context, params).then((value) {
  361 + // setState(() {
  362 + // // errorText = value ?? "";
  363 + // });
  364 + });
  365 + }
  366 +
347 @override 367 @override
348 Widget build(BuildContext context) { 368 Widget build(BuildContext context) {
349 ScreenUtil.init(context, width: 750, height: 1334); 369 ScreenUtil.init(context, width: 750, height: 1334);
@@ -700,16 +720,19 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { @@ -700,16 +720,19 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver {
700 children: <Widget>[ 720 children: <Widget>[
701 Platform.isAndroid 721 Platform.isAndroid
702 ? Text('') 722 ? Text('')
703 - : InkWell(  
704 - child: Image.asset(Utils.getImgPath('apple'),  
705 - width: ScreenUtil().setWidth(100)),  
706 - onTap: () {  
707 - if (!_check) {  
708 - Utils.showToast('请仔细阅读协议');  
709 - return;  
710 - }  
711 - _iosLogin();  
712 - }), 723 + : Consumer<UserModel>(builder: (BuildContext context,
  724 + UserModel value, Widget child) {
  725 + return InkWell(
  726 + child: Image.asset(Utils.getImgPath('apple'),
  727 + width: ScreenUtil().setWidth(100)),
  728 + onTap: () {
  729 + if (!_check) {
  730 + Utils.showToast('请仔细阅读协议');
  731 + return;
  732 + }
  733 + _iosLogin(value);
  734 + });
  735 + }),
713 Offstage( 736 Offstage(
714 offstage: !App.isInstallWx, 737 offstage: !App.isInstallWx,
715 child: InkWell( 738 child: InkWell(
@@ -103,6 +103,7 @@ class _BaseInfoPageState extends State<BaseInfoPage> { @@ -103,6 +103,7 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
103 } 103 }
104 bool isSuccess = 104 bool isSuccess =
105 await _baseIndoProvider.setCustomerActivityBaseinfo(context, params); 105 await _baseIndoProvider.setCustomerActivityBaseinfo(context, params);
  106 + // _baseIndoProvider.baseInfoSunModel = null;
106 if (isSuccess) { 107 if (isSuccess) {
107 _uploadImageProvider.touxiang.file = null; 108 _uploadImageProvider.touxiang.file = null;
108 _uploadImageProvider.erweima.file = null; 109 _uploadImageProvider.erweima.file = null;
@@ -81,17 +81,19 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -81,17 +81,19 @@ class NoteBookPageState extends State<NoteBookPage> {
81 userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning; 81 userModel.user.morning.isEmpty ? "00:00-00:00" : userModel.user.morning;
82 noon = userModel.user.noon.isEmpty ? "00:00-00:00" : userModel.user.noon; 82 noon = userModel.user.noon.isEmpty ? "00:00-00:00" : userModel.user.noon;
83 night = userModel.user.night.isEmpty ? "00:00-00:00" : userModel.user.night; 83 night = userModel.user.night.isEmpty ? "00:00-00:00" : userModel.user.night;
84 - if (dateTime.isBefore(DateTime.parse(dateTime.year.toString() +  
85 - "-" +  
86 - Utils.addZeroNumber(dateTime.month) +  
87 - "-" +  
88 - Utils.addZeroNumber(dateTime.day) +  
89 - " " +  
90 - morning.split("-")[1] +  
91 - ":00"))) { 84 + if (morning != '' &&
  85 + dateTime.isBefore(DateTime.parse(dateTime.year.toString() +
  86 + "-" +
  87 + Utils.addZeroNumber(dateTime.month) +
  88 + "-" +
  89 + Utils.addZeroNumber(dateTime.day) +
  90 + " " +
  91 + morning.split("-")[1] +
  92 + ":00"))) {
92 //未过早市 93 //未过早市
93 currTimeIndex = 1; 94 currTimeIndex = 1;
94 - } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() + 95 + } else if (noon != '' &&
  96 + dateTime.isAfter(DateTime.parse(dateTime.year.toString() +
95 "-" + 97 "-" +
96 Utils.addZeroNumber(dateTime.month) + 98 Utils.addZeroNumber(dateTime.month) +
97 "-" + 99 "-" +
@@ -109,7 +111,8 @@ class NoteBookPageState extends State<NoteBookPage> { @@ -109,7 +111,8 @@ class NoteBookPageState extends State<NoteBookPage> {
109 ":00"))) { 111 ":00"))) {
110 //过了早市,未过午市 112 //过了早市,未过午市
111 currTimeIndex = 2; 113 currTimeIndex = 2;
112 - } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() + 114 + } else if (night != '' &&
  115 + dateTime.isAfter(DateTime.parse(dateTime.year.toString() +
113 "-" + 116 "-" +
114 Utils.addZeroNumber(dateTime.month) + 117 Utils.addZeroNumber(dateTime.month) +
115 "-" + 118 "-" +
@@ -401,9 +401,14 @@ class TableManagerModel with ChangeNotifier { @@ -401,9 +401,14 @@ class TableManagerModel with ChangeNotifier {
401 area.count = count; 401 area.count = count;
402 areas.add(area); 402 areas.add(area);
403 } 403 }
404 - currentArea = areaTableMap.keys.first;  
405 - currentTables = areaTableMap[currentArea];  
406 - pageState = PageState.Success; 404 + if (areaTableMap.isNotEmpty) {
  405 + currentArea = areaTableMap.keys.first;
  406 + currentTables = areaTableMap[currentArea];
  407 + pageState = PageState.Success;
  408 + } else {
  409 + pageState = PageState.Empty;
  410 + }
  411 +
407 notifyListeners(); 412 notifyListeners();
408 } 413 }
409 414
@@ -71,7 +71,7 @@ class UserModel with ChangeNotifier { @@ -71,7 +71,7 @@ class UserModel with ChangeNotifier {
71 "noon": "", 71 "noon": "",
72 "night": "", 72 "night": "",
73 }; 73 };
74 - saveUserInfo(User.fromJson(userMap)); 74 + await saveUserInfo(User.fromJson(userMap));
75 return getSellerInfo( 75 return getSellerInfo(
76 context, 76 context,
77 {"seller_id": seller['id'], "seller_openid": seller['openid']}, 77 {"seller_id": seller['id'], "seller_openid": seller['openid']},
@@ -101,7 +101,7 @@ class UserModel with ChangeNotifier { @@ -101,7 +101,7 @@ class UserModel with ChangeNotifier {
101 user['morning'] = daily['morning']; 101 user['morning'] = daily['morning'];
102 user['noon'] = daily['noon']; 102 user['noon'] = daily['noon'];
103 user['night'] = daily['night']; 103 user['night'] = daily['night'];
104 - saveUserInfo(User.fromJson(user)); 104 + await saveUserInfo(User.fromJson(user));
105 App.sp.setBool("isLogin", true); 105 App.sp.setBool("isLogin", true);
106 App.sp.setString("is_call_tel", seller['is_call_tel'].toString()); 106 App.sp.setString("is_call_tel", seller['is_call_tel'].toString());
107 NavigatorUtil.goHomePage(context); 107 NavigatorUtil.goHomePage(context);
@@ -41,6 +41,7 @@ import 'package:one_key/pages/online_check/online_check_edit_page.dart'; @@ -41,6 +41,7 @@ import 'package:one_key/pages/online_check/online_check_edit_page.dart';
41 import 'package:one_key/pages/sms/sms_page.dart'; 41 import 'package:one_key/pages/sms/sms_page.dart';
42 import 'package:one_key/pages/table/select_table_page.dart'; 42 import 'package:one_key/pages/table/select_table_page.dart';
43 import 'package:one_key/pages/webview/webview_page.dart'; 43 import 'package:one_key/pages/webview/webview_page.dart';
  44 +import 'package:one_key/provider/base_info_provider.dart';
44 import 'package:one_key/provider/book_set_time_model.dart'; 45 import 'package:one_key/provider/book_set_time_model.dart';
45 import 'package:one_key/provider/choose_table_model.dart'; 46 import 'package:one_key/provider/choose_table_model.dart';
46 import 'package:one_key/provider/create_store_model.dart'; 47 import 'package:one_key/provider/create_store_model.dart';
@@ -131,7 +132,9 @@ var handleInvicationHandler = new Handler( @@ -131,7 +132,9 @@ var handleInvicationHandler = new Handler(
131 String ddateStr = 132 String ddateStr =
132 FluroConvertUtils.fluroCnParamsDecode(params["ddateStr"].first); 133 FluroConvertUtils.fluroCnParamsDecode(params["ddateStr"].first);
133 String phone = params["phone"].first; 134 String phone = params["phone"].first;
134 - return InvicationPage(rid, tableInfo, ddate, ddateStr, phone); 135 + return ChangeNotifierProvider<BaseIndoProvider>(
  136 + create: (_) => BaseIndoProvider(),
  137 + child: InvicationPage(rid, tableInfo, ddate, ddateStr, phone));
135 }); 138 });
136 139
137 // 发短信 140 // 发短信
@@ -285,8 +288,10 @@ var baseInfoPageHandler = new Handler( @@ -285,8 +288,10 @@ var baseInfoPageHandler = new Handler(
285 // CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode( 288 // CouponSunModel couponSunModel = CouponSunModel.fromJson(json.decode(
286 // FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first))); 289 // FluroConvertUtils.fluroCnParamsDecode(params["couponSunModel"].first)));
287 290
288 - return ChangeNotifierProvider<UploadImageProvider>(  
289 - create: (_) => UploadImageProvider(), child: BaseInfoPage()); 291 + return ChangeNotifierProvider<BaseIndoProvider>(
  292 + create: (_) => BaseIndoProvider(),
  293 + child: ChangeNotifierProvider<UploadImageProvider>(
  294 + create: (_) => UploadImageProvider(), child: BaseInfoPage()));
290 }); 295 });
291 296
292 ///绑定手机号码页面 297 ///绑定手机号码页面
@@ -904,7 +904,7 @@ packages: @@ -904,7 +904,7 @@ packages:
904 name: sign_in_with_apple 904 name: sign_in_with_apple
905 url: "https://pub.flutter-io.cn" 905 url: "https://pub.flutter-io.cn"
906 source: hosted 906 source: hosted
907 - version: "2.5.4" 907 + version: "3.0.0"
908 simple_gesture_detector: 908 simple_gesture_detector:
909 dependency: transitive 909 dependency: transitive
910 description: 910 description:
@@ -1159,4 +1159,4 @@ packages: @@ -1159,4 +1159,4 @@ packages:
1159 version: "2.2.1" 1159 version: "2.2.1"
1160 sdks: 1160 sdks:
1161 dart: ">=2.12.0 <3.0.0" 1161 dart: ">=2.12.0 <3.0.0"
1162 - flutter: ">=1.20.0" 1162 + flutter: ">=2.0.0"
@@ -99,7 +99,7 @@ dependencies: @@ -99,7 +99,7 @@ dependencies:
99 #多图选择 99 #多图选择
100 photo: ^0.4.8 100 photo: ^0.4.8
101 #苹果登陆 101 #苹果登陆
102 - sign_in_with_apple: ^2.5.1 102 + sign_in_with_apple: ^3.0.0
103 # sign_in_with_apple: ^3.0.0 103 # sign_in_with_apple: ^3.0.0
104 # video_thumbnail: ^0.2.5 104 # video_thumbnail: ^0.2.5
105 video_player: ^1.0.1 105 video_player: ^1.0.1