Commit f053b1e3501d673a082f0d35dab98c8d06bf0793

Authored by weixin_45529955
1 parent 808e5e85

我的页面 店铺首次微信登陆编辑个人昵称后显示null && 全店客情 分经理 请求接口页面清空转圈

class HttpUrl {
static const String qiniu_address = "http://rs.qiniuapi.com/"; //七牛云服务端请求地址
static const String server_address = "http://xt04.colorcun.com/"; //服务端请求地址
// static const String server_address = "http://192.168.5.90:8000/public/"; //服务端请求地址
static const String app_user_login =
"?service=Android.User.AppUserLogin"; //登录地址
static const String user_token_init =
... ...
... ... @@ -2580,7 +2580,7 @@ class InvicationPageState extends State<InvicationPage>
DialogUtil.showSelectCusmanDialog(
context, dailyList, (value) async {
if (value != null) {
if (value != null) {
ddateIndex = value.first;
ddateHm = dailyList[value.first];
setState(() {});
... ...
... ... @@ -275,6 +275,10 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
"morning": "",
"noon": "",
"night": "",
// 'userphone': user['phone'],
'nickname': nameStr,
};
UserModel userModel = Provider.of<UserModel>(context, listen: false);
userModel.saveUserInfo(User.fromJson(userMap));
... ...
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
... ... @@ -30,7 +29,8 @@ import '../month_item.dart';
class StoreCustomerHomeLeftPage extends StatefulWidget {
final CustomerProvider? customerProvider;
StoreCustomerHomeLeftPage({Key? key, this.customerProvider}) : super(key: key);
StoreCustomerHomeLeftPage({Key? key, this.customerProvider})
: super(key: key);
@override
_StoreCustomerHomeLeftPageState createState() =>
... ... @@ -74,9 +74,10 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
}
getSellerVersion() async {
await collectStoreProvider.getSellerVersion(context,showLoading:false);
setState(() {});
await collectStoreProvider.getSellerVersion(context, showLoading: false);
if (mounted) {
setState(() {});
}
}
///全店客情首页
... ... @@ -96,9 +97,11 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
bool temp = list.any((value) {
return value.finishedStatus == '0';
});
setState(() {
showWarning = temp;
});
if (mounted) {
setState(() {
showWarning = temp;
});
}
}
// await widget.customerProvider.searchData(widget.customerProvider.controller.text);
}
... ... @@ -111,7 +114,10 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
await widget.customerProvider!
.getSellerCountsList(context, params, isShowLoading: isShowLoading);
widget.customerProvider!.pageStateStoreHome = PageState.Success;
setState(() {});
if (mounted) {
setState(() {});
}
if ((widget.customerProvider!.homeStatisticsList == null ||
widget.customerProvider!.homeStatisticsList!.length == 0) &&
callback != null) {
... ... @@ -1131,8 +1137,8 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
widget.customerProvider!.storeSunmodel!
.sellerUser![index - 1]!.uid,
{
'object': widget
.customerProvider!.storeSunmodel!.sellerUser
'object': widget.customerProvider!
.storeSunmodel!.sellerUser
},
index: '0',
);
... ... @@ -1191,8 +1197,8 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
// _monthWidget(),
ListView.builder(
itemCount:
widget.customerProvider!.homeStatisticsList!.length,
itemCount: widget
.customerProvider!.homeStatisticsList!.length,
shrinkWrap: true,
controller: _controller,
padding: EdgeInsets.symmetric(horizontal: w(10)),
... ... @@ -1633,8 +1639,8 @@ class _StoreCustomerHomeLeftPageState extends State<StoreCustomerHomeLeftPage> {
onPressed: () {
NavigatorUtil.goMarketingRecordsPage(
context, FromPage.FromPageStoreCustomer, {
'object': widget
.customerProvider!.storeSunmodel!.sellerUser
'object': widget.customerProvider!
.storeSunmodel!.sellerUser
});
},
text: '历史营销记录',
... ...
... ... @@ -411,101 +411,106 @@ class _StoreCustomerHomeRightPageState
// Navigator.pop(context);
// }),
body: Column(children: [
Container(
color: MyColours.color_ffffff,
height: ScreenUtil().setWidth(70),
padding: EdgeInsets.only(bottom: w(12)),
margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
child: Row(
children: [
HEmptyView(48),
Expanded(
child: SizedBox(
// height: ScreenUtil().setWidth(30),
child: ListView.builder(
itemCount: menuTitle.length,
shrinkWrap: true,
controller: _controller,
scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext contxt, int index) {
return InkWell(
onTap: () {
for (MessageMenuModel item in menuTitle) {
item.select = false;
}
menuTitle[index].select = true;
setState(() {});
// _getMarketingByUid();
// _getSellerCountsList();
_getSellerCountsList(
isShowLoading: true, callback: () {});
// _couponNetworkData(isShowLoading: false);
_getGuestManageData(isShowLoading: false);
Consumer<CustomerProvider>(builder: (context, model, _) {
return Container(
color: MyColours.color_ffffff,
height: ScreenUtil().setWidth(70),
padding: EdgeInsets.only(bottom: w(12)),
margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(10)),
child: Row(
children: [
HEmptyView(48),
Expanded(
child: SizedBox(
// height: ScreenUtil().setWidth(30),
child: ListView.builder(
itemCount: menuTitle.length,
shrinkWrap: true,
controller: _controller,
scrollDirection: Axis.horizontal,
itemBuilder: (BuildContext contxt, int index) {
return InkWell(
onTap: () {
for (MessageMenuModel item in menuTitle) {
item.select = false;
}
menuTitle[index].select = true;
// offset = 0;
// 1提前点餐/2内部预订/10在线预订/15店内消息传/12在线买单
model.pageStateMyHome = PageState.Loading;
// if (index == 0) {
// typeid = '';
// } else if (index == 1) {
// //店内消息
// typeid = '15';
// } else if (index == 2) {
// //在线预订
// typeid = '10';
// } else if (index == 3) {
// //提前点餐
// typeid = '1';
// } else if (index == 4) {
// //在线买单
// typeid = '12';
// } else if (index == 5) {
// //会员充值
// typeid = '17';
// } else if (index == 6) {
// //存酒超期
// typeid = '18';
// }
// getMessage(typeid, showLoading: true);
},
child: Container(
// width: ScreenUtil().setWidth(104 * 2),
setState(() {});
// _getMarketingByUid();
// _getSellerCountsList();
_getSellerCountsList(
isShowLoading: false, callback: () {});
// _couponNetworkData(isShowLoading: false);
_getGuestManageData(isShowLoading: false);
margin: EdgeInsets.only(
right: ScreenUtil().setWidth(30),
),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10),
vertical: ScreenUtil().setWidth(4)),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
// color: menuTitle[index].select
// ? MyColours.color_438E93
// : MyColours.color_999999,
border: Border.all(
// offset = 0;
// 1提前点餐/2内部预订/10在线预订/15店内消息传/12在线买单
// if (index == 0) {
// typeid = '';
// } else if (index == 1) {
// //店内消息
// typeid = '15';
// } else if (index == 2) {
// //在线预订
// typeid = '10';
// } else if (index == 3) {
// //提前点餐
// typeid = '1';
// } else if (index == 4) {
// //在线买单
// typeid = '12';
// } else if (index == 5) {
// //会员充值
// typeid = '17';
// } else if (index == 6) {
// //存酒超期
// typeid = '18';
// }
// getMessage(typeid, showLoading: true);
},
child: Container(
// width: ScreenUtil().setWidth(104 * 2),
margin: EdgeInsets.only(
right: ScreenUtil().setWidth(30),
),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(10),
vertical: ScreenUtil().setWidth(4)),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10)),
// color: menuTitle[index].select
// ? MyColours.color_438E93
// : MyColours.color_999999,
border: Border.all(
color: menuTitle[index].select
? MyColours.color_438E93
: MyColours.color_999999,
width: ScreenUtil().setWidth(2))),
child: Text(
menuTitle[index].title!,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: menuTitle[index].select
? MyColours.color_438E93
: MyColours.color_999999,
width: ScreenUtil().setWidth(2))),
child: Text(
menuTitle[index].title!,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: menuTitle[index].select
? MyColours.color_438E93
: MyColours.color_999999,
fontSize: ScreenUtil().setSp(24),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
fontSize: ScreenUtil().setSp(24),
decoration: TextDecoration.none,
fontWeight: FontWeight.normal),
),
),
),
);
})))
],
),
),
);
})))
],
),
);
}),
Consumer<CustomerProvider>(builder: (context, model, _) {
if (model.pageStateMyHome != PageState.Success) {
if (model.pageStateMyHome == PageState.Loading) {
... ...