Showing
5 changed files
with
72 additions
and
18 deletions
| @@ -472,10 +472,10 @@ | @@ -472,10 +472,10 @@ | ||
| 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 = 251; | 475 | + CURRENT_PROJECT_VERSION = 250; |
| 476 | DEVELOPMENT_TEAM = 8J59HM8B82; | 476 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 477 | ENABLE_BITCODE = NO; | 477 | ENABLE_BITCODE = NO; |
| 478 | - FLUTTER_BUILD_MODE = debug; | 478 | + FLUTTER_BUILD_MODE = release; |
| 479 | FRAMEWORK_SEARCH_PATHS = ( | 479 | FRAMEWORK_SEARCH_PATHS = ( |
| 480 | "$(inherited)", | 480 | "$(inherited)", |
| 481 | "$(PROJECT_DIR)/Flutter", | 481 | "$(PROJECT_DIR)/Flutter", |
| @@ -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.6.0; | 490 | + MARKETING_VERSION = 2.6.2; |
| 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,10 +616,10 @@ | @@ -616,10 +616,10 @@ | ||
| 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 = 251; | 619 | + CURRENT_PROJECT_VERSION = 250; |
| 620 | DEVELOPMENT_TEAM = 8J59HM8B82; | 620 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 621 | ENABLE_BITCODE = NO; | 621 | ENABLE_BITCODE = NO; |
| 622 | - FLUTTER_BUILD_MODE = debug; | 622 | + FLUTTER_BUILD_MODE = release; |
| 623 | FRAMEWORK_SEARCH_PATHS = ( | 623 | FRAMEWORK_SEARCH_PATHS = ( |
| 624 | "$(inherited)", | 624 | "$(inherited)", |
| 625 | "$(PROJECT_DIR)/Flutter", | 625 | "$(PROJECT_DIR)/Flutter", |
| @@ -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.6.0; | 634 | + MARKETING_VERSION = 2.6.2; |
| 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,10 +651,10 @@ | @@ -651,10 +651,10 @@ | ||
| 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 = 251; | 654 | + CURRENT_PROJECT_VERSION = 250; |
| 655 | DEVELOPMENT_TEAM = 8J59HM8B82; | 655 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 656 | ENABLE_BITCODE = NO; | 656 | ENABLE_BITCODE = NO; |
| 657 | - FLUTTER_BUILD_MODE = debug; | 657 | + FLUTTER_BUILD_MODE = release; |
| 658 | FRAMEWORK_SEARCH_PATHS = ( | 658 | FRAMEWORK_SEARCH_PATHS = ( |
| 659 | "$(inherited)", | 659 | "$(inherited)", |
| 660 | "$(PROJECT_DIR)/Flutter", | 660 | "$(PROJECT_DIR)/Flutter", |
| @@ -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.6.0; | 669 | + MARKETING_VERSION = 2.6.2; |
| 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 = ""; |
| @@ -31,18 +31,49 @@ class IfNeedCreateStore extends StatefulWidget { | @@ -31,18 +31,49 @@ class IfNeedCreateStore extends StatefulWidget { | ||
| 31 | _IfNeedCreateStoreState createState() => _IfNeedCreateStoreState(); | 31 | _IfNeedCreateStoreState createState() => _IfNeedCreateStoreState(); |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | -class _IfNeedCreateStoreState extends State<IfNeedCreateStore> { | 34 | +class _IfNeedCreateStoreState extends State<IfNeedCreateStore> |
| 35 | + with WidgetsBindingObserver { | ||
| 35 | ScrollController _controller = ScrollController(); | 36 | ScrollController _controller = ScrollController(); |
| 36 | OtherLoginProvider otherLoginProvider; | 37 | OtherLoginProvider otherLoginProvider; |
| 37 | 38 | ||
| 38 | @override | 39 | @override |
| 39 | void initState() { | 40 | void initState() { |
| 40 | super.initState(); | 41 | super.initState(); |
| 42 | + WidgetsBinding.instance.addObserver(this); | ||
| 41 | WidgetsBinding.instance.addPostFrameCallback((_) { | 43 | WidgetsBinding.instance.addPostFrameCallback((_) { |
| 42 | _checkSellerAcc(); | 44 | _checkSellerAcc(); |
| 43 | }); | 45 | }); |
| 44 | } | 46 | } |
| 45 | 47 | ||
| 48 | + @override | ||
| 49 | + void dispose() { | ||
| 50 | + super.dispose(); | ||
| 51 | + WidgetsBinding.instance.removeObserver(this); //销毁观察者 | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @override | ||
| 55 | + void didChangeAppLifecycleState(AppLifecycleState state) { | ||
| 56 | + super.didChangeAppLifecycleState(state); | ||
| 57 | + print(state.toString()); | ||
| 58 | + switch (state) { | ||
| 59 | + case AppLifecycleState.inactive: // 处于这种状态的应用程序应该假设它们可能在任何时候暂停。 | ||
| 60 | + break; | ||
| 61 | + case AppLifecycleState.resumed: // 应用程序可见,前台 | ||
| 62 | + print('11111'); | ||
| 63 | + _checkSellerAcc(); | ||
| 64 | + break; | ||
| 65 | + case AppLifecycleState.paused: // 应用程序不可见,后台 | ||
| 66 | + print('eeeee '); | ||
| 67 | + break; | ||
| 68 | + case AppLifecycleState.detached: | ||
| 69 | + print('detached'); | ||
| 70 | + break; | ||
| 71 | + | ||
| 72 | + default: | ||
| 73 | + break; | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + | ||
| 46 | ///获取是否有店 | 77 | ///获取是否有店 |
| 47 | _checkSellerAcc({showLoading = false}) async { | 78 | _checkSellerAcc({showLoading = false}) async { |
| 48 | CreateStoreModel createStoreModel = | 79 | CreateStoreModel createStoreModel = |
| @@ -125,8 +156,15 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> { | @@ -125,8 +156,15 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> { | ||
| 125 | VEmptyView(172), | 156 | VEmptyView(172), |
| 126 | InkWell( | 157 | InkWell( |
| 127 | onTap: () { | 158 | onTap: () { |
| 128 | - //跳转至新建店铺流程 | ||
| 129 | - NavigatorUtil.goEnterStoreNamePage(context); | 159 | + if (!App.sp.containsKey('openid') || |
| 160 | + App.sp.get("openid") == null || | ||
| 161 | + App.sp.get("openid") == '') { | ||
| 162 | + //跳转小程序 | ||
| 163 | + Utils.goMiniProgramCreatePage(context); | ||
| 164 | + } else { | ||
| 165 | + //跳转至新建店铺流程 | ||
| 166 | + NavigatorUtil.goEnterStoreNamePage(context); | ||
| 167 | + } | ||
| 130 | }, | 168 | }, |
| 131 | child: Container( | 169 | child: Container( |
| 132 | width: double.infinity, | 170 | width: double.infinity, |
| @@ -194,9 +232,16 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> { | @@ -194,9 +232,16 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> { | ||
| 194 | if (index == model.sellerList.length) { | 232 | if (index == model.sellerList.length) { |
| 195 | return InkWell( | 233 | return InkWell( |
| 196 | onTap: () { | 234 | onTap: () { |
| 197 | - //跳转至新建店铺流程 | ||
| 198 | - NavigatorUtil.goEnterStoreNamePage( | ||
| 199 | - context); | 235 | + if (!App.sp.containsKey('openid') || |
| 236 | + App.sp.get("openid") == null || | ||
| 237 | + App.sp.get("openid") == '') { | ||
| 238 | + //跳转小程序 | ||
| 239 | + Utils.goMiniProgramCreatePage(context); | ||
| 240 | + } else { | ||
| 241 | + //跳转至新建店铺流程 | ||
| 242 | + NavigatorUtil.goEnterStoreNamePage( | ||
| 243 | + context); | ||
| 244 | + } | ||
| 200 | }, | 245 | }, |
| 201 | child: DottedBorder( | 246 | child: DottedBorder( |
| 202 | dashPattern: [5, 5, 5, 5], | 247 | dashPattern: [5, 5, 5, 5], |
| @@ -277,6 +277,15 @@ class Utils { | @@ -277,6 +277,15 @@ class Utils { | ||
| 277 | miniProgramType: WXMiniProgramType.RELEASE); | 277 | miniProgramType: WXMiniProgramType.RELEASE); |
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | + //跳转小程序新建店铺页面 | ||
| 281 | + static goMiniProgramCreatePage(BuildContext context) { | ||
| 282 | + // UserModel model = Provider.of<UserModel>(context, listen: false); | ||
| 283 | + launchWeChatMiniProgram( | ||
| 284 | + username: "gh_1007de739c65", | ||
| 285 | + path: "pages/login/l_info", | ||
| 286 | + miniProgramType: WXMiniProgramType.RELEASE); | ||
| 287 | + } | ||
| 288 | + | ||
| 280 | //分享已点菜品 | 289 | //分享已点菜品 |
| 281 | static goShareOrderFoodToWeChat(BuildContext context, | 290 | static goShareOrderFoodToWeChat(BuildContext context, |
| 282 | {String title, String rid, String img}) async { | 291 | {String title, String rid, String img}) async { |
| @@ -231,7 +231,7 @@ packages: | @@ -231,7 +231,7 @@ packages: | ||
| 231 | name: contacts_service | 231 | name: contacts_service |
| 232 | url: "https://pub.flutter-io.cn" | 232 | url: "https://pub.flutter-io.cn" |
| 233 | source: hosted | 233 | source: hosted |
| 234 | - version: "0.6.1" | 234 | + version: "0.4.6" |
| 235 | convert: | 235 | convert: |
| 236 | dependency: transitive | 236 | dependency: transitive |
| 237 | description: | 237 | description: |
| @@ -785,7 +785,7 @@ packages: | @@ -785,7 +785,7 @@ packages: | ||
| 785 | name: quiver | 785 | name: quiver |
| 786 | url: "https://pub.flutter-io.cn" | 786 | url: "https://pub.flutter-io.cn" |
| 787 | source: hosted | 787 | source: hosted |
| 788 | - version: "3.0.1" | 788 | + version: "2.1.5" |
| 789 | rational: | 789 | rational: |
| 790 | dependency: transitive | 790 | dependency: transitive |
| 791 | description: | 791 | description: |
| @@ -87,7 +87,7 @@ dependencies: | @@ -87,7 +87,7 @@ dependencies: | ||
| 87 | # webview | 87 | # webview |
| 88 | webview_flutter: ^0.3.22+1 | 88 | webview_flutter: ^0.3.22+1 |
| 89 | # 获取通讯录 | 89 | # 获取通讯录 |
| 90 | - contacts_service: ^0.6.1 | 90 | + contacts_service: ^0.4.6 |
| 91 | common_utils: ^1.1.3 | 91 | common_utils: ^1.1.3 |
| 92 | easy_contact_picker: ^0.0.2 | 92 | easy_contact_picker: ^0.0.2 |
| 93 | flutter_app_badger: ^1.1.2 | 93 | flutter_app_badger: ^1.1.2 |
-
Please register or login to post a comment