Commit 2777354c17a78a4535433fb65ee0be9516a547c2

Authored by wdn127929
1 parent feaca5e6

店铺列表后台进前台刷新列表

... ... @@ -472,10 +472,10 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 251;
CURRENT_PROJECT_VERSION = 250;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = debug;
FLUTTER_BUILD_MODE = release;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
... ... @@ -487,7 +487,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 2.6.0;
MARKETING_VERSION = 2.6.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -616,10 +616,10 @@
CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 251;
CURRENT_PROJECT_VERSION = 250;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = debug;
FLUTTER_BUILD_MODE = release;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
... ... @@ -631,7 +631,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 2.6.0;
MARKETING_VERSION = 2.6.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -651,10 +651,10 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 251;
CURRENT_PROJECT_VERSION = 250;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = debug;
FLUTTER_BUILD_MODE = release;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
... ... @@ -666,7 +666,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 2.6.0;
MARKETING_VERSION = 2.6.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -31,18 +31,49 @@ class IfNeedCreateStore extends StatefulWidget {
_IfNeedCreateStoreState createState() => _IfNeedCreateStoreState();
}
class _IfNeedCreateStoreState extends State<IfNeedCreateStore> {
class _IfNeedCreateStoreState extends State<IfNeedCreateStore>
with WidgetsBindingObserver {
ScrollController _controller = ScrollController();
OtherLoginProvider otherLoginProvider;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
WidgetsBinding.instance.addPostFrameCallback((_) {
_checkSellerAcc();
});
}
@override
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this); //销毁观察者
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
super.didChangeAppLifecycleState(state);
print(state.toString());
switch (state) {
case AppLifecycleState.inactive: // 处于这种状态的应用程序应该假设它们可能在任何时候暂停。
break;
case AppLifecycleState.resumed: // 应用程序可见,前台
print('11111');
_checkSellerAcc();
break;
case AppLifecycleState.paused: // 应用程序不可见,后台
print('eeeee ');
break;
case AppLifecycleState.detached:
print('detached');
break;
default:
break;
}
}
///获取是否有店
_checkSellerAcc({showLoading = false}) async {
CreateStoreModel createStoreModel =
... ... @@ -125,8 +156,15 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> {
VEmptyView(172),
InkWell(
onTap: () {
//跳转至新建店铺流程
NavigatorUtil.goEnterStoreNamePage(context);
if (!App.sp.containsKey('openid') ||
App.sp.get("openid") == null ||
App.sp.get("openid") == '') {
//跳转小程序
Utils.goMiniProgramCreatePage(context);
} else {
//跳转至新建店铺流程
NavigatorUtil.goEnterStoreNamePage(context);
}
},
child: Container(
width: double.infinity,
... ... @@ -194,9 +232,16 @@ class _IfNeedCreateStoreState extends State<IfNeedCreateStore> {
if (index == model.sellerList.length) {
return InkWell(
onTap: () {
//跳转至新建店铺流程
NavigatorUtil.goEnterStoreNamePage(
context);
if (!App.sp.containsKey('openid') ||
App.sp.get("openid") == null ||
App.sp.get("openid") == '') {
//跳转小程序
Utils.goMiniProgramCreatePage(context);
} else {
//跳转至新建店铺流程
NavigatorUtil.goEnterStoreNamePage(
context);
}
},
child: DottedBorder(
dashPattern: [5, 5, 5, 5],
... ...
... ... @@ -277,6 +277,15 @@ class Utils {
miniProgramType: WXMiniProgramType.RELEASE);
}
//跳转小程序新建店铺页面
static goMiniProgramCreatePage(BuildContext context) {
// UserModel model = Provider.of<UserModel>(context, listen: false);
launchWeChatMiniProgram(
username: "gh_1007de739c65",
path: "pages/login/l_info",
miniProgramType: WXMiniProgramType.RELEASE);
}
//分享已点菜品
static goShareOrderFoodToWeChat(BuildContext context,
{String title, String rid, String img}) async {
... ...
... ... @@ -231,7 +231,7 @@ packages:
name: contacts_service
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.1"
version: "0.4.6"
convert:
dependency: transitive
description:
... ... @@ -785,7 +785,7 @@ packages:
name: quiver
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1"
version: "2.1.5"
rational:
dependency: transitive
description:
... ...
... ... @@ -87,7 +87,7 @@ dependencies:
# webview
webview_flutter: ^0.3.22+1
# 获取通讯录
contacts_service: ^0.6.1
contacts_service: ^0.4.6
common_utils: ^1.1.3
easy_contact_picker: ^0.0.2
flutter_app_badger: ^1.1.2
... ...