|
...
|
...
|
@@ -93,13 +93,12 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { |
|
|
|
// ///获取短信余量
|
|
|
|
// _getSmsInfo(context);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///获取积分
|
|
|
|
// _getMyIntegral(context);
|
|
|
|
|
|
|
|
// _getSellerById();
|
|
|
|
getMyPageCountData();
|
|
|
|
getMyPageCountData();
|
|
|
|
|
|
|
|
///apk版本检测
|
|
|
|
checkUpdate();
|
|
|
|
});
|
|
...
|
...
|
@@ -175,19 +174,20 @@ getMyPageCountData(); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
getMyPageCountData()async{
|
|
|
|
Map<String, String> params = {
|
|
|
|
getMyPageCountData() async {
|
|
|
|
Map<String, String> params = {
|
|
|
|
'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
|
|
|
|
};
|
|
|
|
// if (Utils.getAuthority(context, '全店-月订单量')) {
|
|
|
|
|
|
|
|
// } else
|
|
|
|
|
|
|
|
// } else
|
|
|
|
if (Utils.getAuthority(context, '个人-月订单量')) {
|
|
|
|
params['uid'] = Provider.of<UserModel>(context,listen: false).user.openid ;
|
|
|
|
params['uid'] =
|
|
|
|
Provider.of<UserModel>(context, listen: false).user.openid;
|
|
|
|
}
|
|
|
|
|
|
|
|
await collectStoreProvider.getMyPageCountData(context,params,showLoading: false);
|
|
|
|
|
|
|
|
await collectStoreProvider.getMyPageCountData(context, params,
|
|
|
|
showLoading: false);
|
|
|
|
if (Constant.normalApp) {
|
|
|
|
if (collectStoreProvider.sellerNormal) {
|
|
|
|
if (collectStoreProvider.sellerNormalEdate != null) {
|
|
...
|
...
|
@@ -197,10 +197,14 @@ getMyPageCountData()async{ |
|
|
|
edate = DateTime.fromMillisecondsSinceEpoch(
|
|
|
|
int.parse(collectStoreProvider.sellerNormalEdate) * 1000);
|
|
|
|
|
|
|
|
String from =
|
|
|
|
DateUtil.formatDate(DateTime.now(), format: DateFormats.y_mo_d) +
|
|
|
|
' 00:00:00';
|
|
|
|
DateTime datenow = DateUtil.getDateTime(from);
|
|
|
|
// String from =
|
|
|
|
// DateUtil.formatDate(DateTime.now(), format: DateFormats.y_mo_d) +
|
|
|
|
// ' 00:00:00';
|
|
|
|
// DateTime datenow = DateUtil.getDateTime(from);
|
|
|
|
DateTime datenow = DateTime.now();
|
|
|
|
|
|
|
|
//当前日期
|
|
|
|
// final datenow = DateTime.now();
|
|
|
|
|
|
|
|
//比较相差的天数
|
|
|
|
int difference = edate.difference(datenow).inDays;
|
|
...
|
...
|
@@ -210,6 +214,8 @@ getMyPageCountData()async{ |
|
|
|
if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) {
|
|
|
|
//过期
|
|
|
|
outDay = '0';
|
|
|
|
} else if (difference == 0 && differenceSeconds > 0) {
|
|
|
|
outDay = '1';
|
|
|
|
} else {
|
|
|
|
outDay = difference.toString();
|
|
|
|
}
|
|
...
|
...
|
@@ -239,10 +245,8 @@ getMyPageCountData()async{ |
|
|
|
edate = DateTime.fromMillisecondsSinceEpoch(
|
|
|
|
int.parse(collectStoreProvider.sellerNormalEdate) * 1000);
|
|
|
|
|
|
|
|
String from = DateUtil.formatDate(DateTime.now(),
|
|
|
|
format: DateFormats.y_mo_d) +
|
|
|
|
' 00:00:00';
|
|
|
|
DateTime datenow = DateUtil.getDateTime(from);
|
|
|
|
|
|
|
|
DateTime datenow = DateTime.now();
|
|
|
|
|
|
|
|
//比较相差的天数
|
|
|
|
int difference = edate.difference(datenow).inDays;
|
|
...
|
...
|
@@ -252,6 +256,8 @@ getMyPageCountData()async{ |
|
|
|
if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) {
|
|
|
|
//过期
|
|
|
|
outDay = '0';
|
|
|
|
} else if (difference == 0 && differenceSeconds > 0) {
|
|
|
|
outDay = '1';
|
|
|
|
} else {
|
|
|
|
outDay = difference.toString();
|
|
|
|
}
|
|
...
|
...
|
@@ -267,8 +273,7 @@ getMyPageCountData()async{ |
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
_getSellerCountsListByMonth(
|
|
|
|
{isShowLoading = false, VoidCallback callback}) async {
|
|
...
|
...
|
@@ -295,7 +300,7 @@ getMyPageCountData()async{ |
|
|
|
///获取短信余量
|
|
|
|
_getSmsInfo(context) async {
|
|
|
|
myModel = Provider.of<MyModel>(context, listen: false);
|
|
|
|
SmsInfoData smsInfoData = await myModel.getSmsInfo(context);
|
|
|
|
SmsInfoData smsInfoData = await myModel.getSmsInfo(context);
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
if (smsInfoData != null) {
|
|
...
|
...
|
@@ -331,7 +336,7 @@ getMyPageCountData()async{ |
|
|
|
}
|
|
|
|
|
|
|
|
getSellerVersion() async {
|
|
|
|
await collectStoreProvider.getSellerVersion(context,showLoading: false);
|
|
|
|
await collectStoreProvider.getSellerVersion(context, showLoading: false);
|
|
|
|
|
|
|
|
if (Constant.normalApp) {
|
|
|
|
if (collectStoreProvider.sellerNormal) {
|
|
...
|
...
|
@@ -342,22 +347,24 @@ getMyPageCountData()async{ |
|
|
|
edate = DateTime.fromMillisecondsSinceEpoch(
|
|
|
|
int.parse(collectStoreProvider.sellerNormalEdate) * 1000);
|
|
|
|
|
|
|
|
String from =
|
|
|
|
DateUtil.formatDate(DateTime.now(), format: DateFormats.y_mo_d) +
|
|
|
|
' 00:00:00';
|
|
|
|
DateTime datenow = DateUtil.getDateTime(from);
|
|
|
|
// String from =
|
|
|
|
// DateUtil.formatDate(DateTime.now(), format: DateFormats.y_mo_d) +
|
|
|
|
// ' 00:00:00';
|
|
|
|
DateTime datenow = DateTime.now();
|
|
|
|
|
|
|
|
//比较相差的天数
|
|
|
|
int difference = edate.difference(datenow).inDays;
|
|
|
|
|
|
|
|
int differenceSeconds = edate.difference(datenow).inSeconds;
|
|
|
|
|
|
|
|
if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) {
|
|
|
|
//过期
|
|
|
|
outDay = '0';
|
|
|
|
} else {
|
|
|
|
outDay = difference.toString();
|
|
|
|
}
|
|
|
|
if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) {
|
|
|
|
//过期
|
|
|
|
outDay = '0';
|
|
|
|
} else if (difference == 0 && differenceSeconds > 0) {
|
|
|
|
outDay = '1';
|
|
|
|
} else {
|
|
|
|
outDay = difference.toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
// print(outDay);
|
|
|
|
} else {
|
|
...
|
...
|
@@ -384,19 +391,18 @@ getMyPageCountData()async{ |
|
|
|
edate = DateTime.fromMillisecondsSinceEpoch(
|
|
|
|
int.parse(collectStoreProvider.sellerNormalEdate) * 1000);
|
|
|
|
|
|
|
|
String from = DateUtil.formatDate(DateTime.now(),
|
|
|
|
format: DateFormats.y_mo_d) +
|
|
|
|
' 00:00:00';
|
|
|
|
DateTime datenow = DateUtil.getDateTime(from);
|
|
|
|
DateTime datenow = DateTime.now();
|
|
|
|
|
|
|
|
//比较相差的天数
|
|
|
|
int difference = edate.difference(datenow).inDays;
|
|
|
|
|
|
|
|
int differenceSeconds = edate.difference(datenow).inSeconds;
|
|
|
|
|
|
|
|
if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) {
|
|
|
|
if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) {
|
|
|
|
//过期
|
|
|
|
outDay = '0';
|
|
|
|
} else if (difference == 0 && differenceSeconds > 0) {
|
|
|
|
outDay = '1';
|
|
|
|
} else {
|
|
|
|
outDay = difference.toString();
|
|
|
|
}
|
|
...
|
...
|
@@ -574,7 +580,7 @@ getMyPageCountData()async{ |
|
|
|
'员工编号:' +
|
|
|
|
model.user.account +
|
|
|
|
" " +
|
|
|
|
(model.user.role_name_addition??'') ,
|
|
|
|
(model.user.role_name_addition ?? ''),
|
|
|
|
TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_ffffff,
|
|
...
|
...
|
@@ -751,7 +757,8 @@ getMyPageCountData()async{ |
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
collectStoreProvider.reserveTotal,
|
|
|
|
collectStoreProvider
|
|
|
|
.reserveTotal,
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color:
|
|
...
|
...
|
@@ -792,9 +799,7 @@ getMyPageCountData()async{ |
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (Utils.getAuthority(context, '充值短信')) {
|
|
|
|
NavigatorUtil.goSmsManagePage(context
|
|
|
|
);
|
|
|
|
|
|
|
|
NavigatorUtil.goSmsManagePage(context);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
child: Container(
|
|
...
|
...
|
@@ -807,7 +812,8 @@ getMyPageCountData()async{ |
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
collectStoreProvider.smsInfo.isNotEmpty
|
|
|
|
collectStoreProvider
|
|
|
|
.smsInfo.isNotEmpty
|
|
|
|
? '${collectStoreProvider.smsInfo}'
|
|
|
|
: '0',
|
|
|
|
style: TextStyle(
|
|
...
|
...
|
@@ -862,8 +868,8 @@ getMyPageCountData()async{ |
|
|
|
if (Utils.getAuthority(
|
|
|
|
context, '充值短信')) {
|
|
|
|
NavigatorUtil.goSmsManagePage(
|
|
|
|
context,
|
|
|
|
);
|
|
|
|
context,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
})
|
|
|
|
],
|
...
|
...
|
|