Showing
13 changed files
with
572 additions
and
282 deletions
assets/arrow_down_sim.png
0 → 100644
1.05 KB
| @@ -26,6 +26,7 @@ class User { | @@ -26,6 +26,7 @@ class User { | ||
| 26 | String edate; //店铺过期日期 | 26 | String edate; //店铺过期日期 |
| 27 | 27 | ||
| 28 | String tokenLoginOut; //信鸽token | 28 | String tokenLoginOut; //信鸽token |
| 29 | + String sellerVersion; //版本 | ||
| 29 | 30 | ||
| 30 | User( | 31 | User( |
| 31 | this.openid, | 32 | this.openid, |
| @@ -48,7 +49,8 @@ class User { | @@ -48,7 +49,8 @@ class User { | ||
| 48 | this.token, | 49 | this.token, |
| 49 | this.nickName, | 50 | this.nickName, |
| 50 | this.edate, | 51 | this.edate, |
| 51 | - this.tokenLoginOut); | 52 | + this.tokenLoginOut, |
| 53 | + this.sellerVersion); | ||
| 52 | 54 | ||
| 53 | factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json); | 55 | factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json); |
| 54 | 56 | ||
| @@ -56,6 +58,6 @@ class User { | @@ -56,6 +58,6 @@ class User { | ||
| 56 | 58 | ||
| 57 | @override | 59 | @override |
| 58 | String toString() { | 60 | String toString() { |
| 59 | - return 'User{openid: $openid, account: $account, role_name: $role_name, sellerid: $sellerid, sellercode: $sellercode, sellername: $sellername,sellerimage:$sellerimage, sellerphone: $sellerphone, sellerAddr: $sellerAddr, scatter: $scatter, room: $room, cassette: $cassette, morning: $morning, noon: $noon, night: $night ,userphone:$userphone,userphoneMyPage:$userphoneMyPage,token:$token,nickName:$nickName,edate:$edate},tokenLoginOut:$tokenLoginOut}'; | 61 | + return 'User{openid: $openid, account: $account, role_name: $role_name, sellerid: $sellerid, sellercode: $sellercode, sellername: $sellername,sellerimage:$sellerimage, sellerphone: $sellerphone, sellerAddr: $sellerAddr, scatter: $scatter, room: $room, cassette: $cassette, morning: $morning, noon: $noon, night: $night ,userphone:$userphone,userphoneMyPage:$userphoneMyPage,token:$token,nickName:$nickName,edate:$edate,tokenLoginOut:$tokenLoginOut,sellerVersion:$sellerVersion}'; |
| 60 | } | 62 | } |
| 61 | } | 63 | } |
| @@ -28,7 +28,9 @@ User _$UserFromJson(Map<String, dynamic> json) { | @@ -28,7 +28,9 @@ User _$UserFromJson(Map<String, dynamic> json) { | ||
| 28 | json['token'] as String, | 28 | json['token'] as String, |
| 29 | json['nickname'] as String, | 29 | json['nickname'] as String, |
| 30 | json['edate'] as String, | 30 | json['edate'] as String, |
| 31 | - json['tokenLoginOut'] as String | 31 | + json['tokenLoginOut'] as String, |
| 32 | + json['sellerVersion'] as String, | ||
| 33 | + | ||
| 32 | ); | 34 | ); |
| 33 | } | 35 | } |
| 34 | 36 | ||
| @@ -53,5 +55,6 @@ Map<String, dynamic> _$UserToJson(User instance) => <String, dynamic>{ | @@ -53,5 +55,6 @@ Map<String, dynamic> _$UserToJson(User instance) => <String, dynamic>{ | ||
| 53 | 'token': instance.token, | 55 | 'token': instance.token, |
| 54 | 'nickname': instance.nickName, | 56 | 'nickname': instance.nickName, |
| 55 | 'edate': instance.edate, | 57 | 'edate': instance.edate, |
| 56 | - 'tokenLoginOut':instance.tokenLoginOut | 58 | + 'tokenLoginOut':instance.tokenLoginOut, |
| 59 | + 'sellerVersion':instance.sellerVersion | ||
| 57 | }; | 60 | }; |
| @@ -299,56 +299,63 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | @@ -299,56 +299,63 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver { | ||
| 299 | 299 | ||
| 300 | getSellerVersion() async { | 300 | getSellerVersion() async { |
| 301 | await collectStoreProvider.getSellerVersion(context); | 301 | await collectStoreProvider.getSellerVersion(context); |
| 302 | - if (collectStoreProvider.sellerVersionList != null && | ||
| 303 | - collectStoreProvider.sellerVersionList.length > 0) { | 302 | + if (collectStoreProvider.sellerSimple) { |
| 303 | + //极速版 | ||
| 304 | + App.sp.remove('sellerEdate'); | ||
| 305 | + NavigatorUtil.goHomePageSim(context); //跳转到极速版 页面 | ||
| 306 | + } else { | ||
| 307 | + if (collectStoreProvider.sellerVersionList != null && | ||
| 308 | + collectStoreProvider.sellerVersionList.length > 0) { | ||
| 304 | //获取到店铺过期时间 | 309 | //获取到店铺过期时间 |
| 305 | - //店铺过期提醒 | ||
| 306 | - // 计算时间差 | ||
| 307 | - //店铺过期日期 | ||
| 308 | - List<SellerVersionSunModel> showData = []; | ||
| 309 | - // App.sp.remove('sellerEdateModule'); | ||
| 310 | - if (App.sp.containsKey('sellerEdateModule')) { | ||
| 311 | - dataSp = json.decode(App.sp.getString('sellerEdateModule')); | ||
| 312 | - } | ||
| 313 | - | ||
| 314 | - collectStoreProvider.sellerVersionList.forEach((element) { | ||
| 315 | - _edateSellerModuleShow(showData, element, dataSp); | ||
| 316 | - }); | ||
| 317 | - print(showData); | ||
| 318 | - print(dataSp); | ||
| 319 | - if (dataSp.length > 0) { | ||
| 320 | - App.sp.setString("sellerEdateModule", json.encode(dataSp)); | ||
| 321 | - // var data = json.decode(App.sp.getString('sellerEdateModule')); | ||
| 322 | - // var str = App.sp.getString('sellerEdateModule'); | ||
| 323 | - // print(str); | ||
| 324 | - // print(data); | ||
| 325 | - } | 310 | + //店铺过期提醒 |
| 311 | + // 计算时间差 | ||
| 312 | + //店铺过期日期 | ||
| 313 | + List<SellerVersionSunModel> showData = []; | ||
| 314 | + // App.sp.remove('sellerEdateModule'); | ||
| 315 | + if (App.sp.containsKey('sellerEdateModule')) { | ||
| 316 | + dataSp = json.decode(App.sp.getString('sellerEdateModule')); | ||
| 317 | + } | ||
| 326 | 318 | ||
| 327 | - if (showData != null && showData.length > 0) { | ||
| 328 | - DialogUtil.showSellerVersionEdateDialog(context, showData, (object) {}); | ||
| 329 | - } | ||
| 330 | - //通过showdata 弹窗 | 319 | + collectStoreProvider.sellerVersionList.forEach((element) { |
| 320 | + _edateSellerModuleShow(showData, element, dataSp); | ||
| 321 | + }); | ||
| 322 | + print(showData); | ||
| 323 | + print(dataSp); | ||
| 324 | + if (dataSp.length > 0) { | ||
| 325 | + App.sp.setString("sellerEdateModule", json.encode(dataSp)); | ||
| 326 | + // var data = json.decode(App.sp.getString('sellerEdateModule')); | ||
| 327 | + // var str = App.sp.getString('sellerEdateModule'); | ||
| 328 | + // print(str); | ||
| 329 | + // print(data); | ||
| 330 | + } | ||
| 331 | 331 | ||
| 332 | - // timerSellerModuleEdate = Timer.periodic(Duration(days: 1), (_) { | ||
| 333 | - // //店铺过期提醒 | ||
| 334 | - // // 计算时间差 | ||
| 335 | - // //店铺过期日期 | ||
| 336 | - // _edateShow(); | ||
| 337 | - // }); | ||
| 338 | - return true; | ||
| 339 | - } else { | ||
| 340 | - if (_currIndex != 4) { | ||
| 341 | - if (App.sp.containsKey('sellerEdate')) { | ||
| 342 | - List<String> data = App.sp.getStringList('sellerEdate'); | ||
| 343 | - if (data.contains('-1')) { | ||
| 344 | - //已经弹过过期弹窗,默认我的 | ||
| 345 | - _currIndex = 4; | 332 | + if (showData != null && showData.length > 0) { |
| 333 | + DialogUtil.showSellerVersionEdateDialog( | ||
| 334 | + context, showData, (object) {}); | ||
| 335 | + } | ||
| 336 | + //通过showdata 弹窗 | ||
| 337 | + | ||
| 338 | + // timerSellerModuleEdate = Timer.periodic(Duration(days: 1), (_) { | ||
| 339 | + // //店铺过期提醒 | ||
| 340 | + // // 计算时间差 | ||
| 341 | + // //店铺过期日期 | ||
| 342 | + // _edateShow(); | ||
| 343 | + // }); | ||
| 344 | + return true; | ||
| 345 | + } else { | ||
| 346 | + if (_currIndex != 4) { | ||
| 347 | + if (App.sp.containsKey('sellerEdate')) { | ||
| 348 | + List<String> data = App.sp.getStringList('sellerEdate'); | ||
| 349 | + if (data.contains('-1')) { | ||
| 350 | + //已经弹过过期弹窗,默认我的 | ||
| 351 | + _currIndex = 4; | ||
| 352 | + } | ||
| 346 | } | 353 | } |
| 354 | + NavigatorUtil.goHomePage(context, initialIndex: _currIndex); | ||
| 347 | } | 355 | } |
| 348 | - NavigatorUtil.goHomePage(context, initialIndex: _currIndex); | ||
| 349 | - } | ||
| 350 | 356 | ||
| 351 | - return false; | 357 | + return false; |
| 358 | + } | ||
| 352 | } | 359 | } |
| 353 | } | 360 | } |
| 354 | 361 |
| @@ -143,7 +143,9 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { | @@ -143,7 +143,9 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { | ||
| 143 | if (App.sp.getBool("isLogin") ?? false) { | 143 | if (App.sp.getBool("isLogin") ?? false) { |
| 144 | Future.delayed(Duration(milliseconds: 200), () { | 144 | Future.delayed(Duration(milliseconds: 200), () { |
| 145 | // NavigatorUtil.goHomePage(context); | 145 | // NavigatorUtil.goHomePage(context); |
| 146 | - if (Constant.simpleApp) { | 146 | + //获取登陆接口返回的vid 如果是14 极速版,则跳转至极速版 |
| 147 | + // if (user['sellerVersion'] == '14') { | ||
| 148 | + if (Provider.of<UserModel>(context,listen: false).user.sellerVersion == '14') { | ||
| 147 | NavigatorUtil.goHomePageSim(context); | 149 | NavigatorUtil.goHomePageSim(context); |
| 148 | } else { | 150 | } else { |
| 149 | NavigatorUtil.goHomePage(context); | 151 | NavigatorUtil.goHomePage(context); |
| @@ -177,7 +177,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -177,7 +177,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 177 | 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid, | 177 | 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid, |
| 178 | 'year': DateTime.now().year.toString(), | 178 | 'year': DateTime.now().year.toString(), |
| 179 | 'month': DateTime.now().month.toString(), | 179 | 'month': DateTime.now().month.toString(), |
| 180 | - 'uid': Provider.of<UserModel>(context ,listen: false).user.openid | 180 | + 'uid': Provider.of<UserModel>(context, listen: false).user.openid |
| 181 | }; | 181 | }; |
| 182 | 182 | ||
| 183 | await customerProvider.getSellerCountsListByMonth(context, params, | 183 | await customerProvider.getSellerCountsListByMonth(context, params, |
| @@ -231,40 +231,47 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -231,40 +231,47 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 231 | 231 | ||
| 232 | getSellerVersion() async { | 232 | getSellerVersion() async { |
| 233 | await collectStoreProvider.getSellerVersion(context); | 233 | await collectStoreProvider.getSellerVersion(context); |
| 234 | - if (collectStoreProvider.sellerNormal) { | ||
| 235 | - if (collectStoreProvider.sellerNormalEdate != null) { | ||
| 236 | - //店铺过期提醒 | ||
| 237 | - // 计算时间差 | ||
| 238 | - //店铺过期日期 | ||
| 239 | - edate = DateTime.fromMillisecondsSinceEpoch( | ||
| 240 | - int.parse(collectStoreProvider.sellerNormalEdate) * 1000); | ||
| 241 | 234 | ||
| 242 | - String from = | ||
| 243 | - DateUtil.formatDate(DateTime.now(), format: DateFormats.y_mo_d) + | ||
| 244 | - ' 00:00:00'; | ||
| 245 | - DateTime datenow = DateUtil.getDateTime(from); | 235 | + if (collectStoreProvider.sellerSimple) { |
| 236 | + //极速版 | ||
| 237 | + App.sp.remove('sellerEdate'); | ||
| 238 | + NavigatorUtil.goHomePageSim(context, initialIndex: 3); //跳转到极速版 我的 页面 | ||
| 239 | + } else { | ||
| 240 | + if (collectStoreProvider.sellerNormal) { | ||
| 241 | + if (collectStoreProvider.sellerNormalEdate != null) { | ||
| 242 | + //店铺过期提醒 | ||
| 243 | + // 计算时间差 | ||
| 244 | + //店铺过期日期 | ||
| 245 | + edate = DateTime.fromMillisecondsSinceEpoch( | ||
| 246 | + int.parse(collectStoreProvider.sellerNormalEdate) * 1000); | ||
| 246 | 247 | ||
| 247 | - //比较相差的天数 | ||
| 248 | - int difference = edate.difference(datenow).inDays; | 248 | + String from = |
| 249 | + DateUtil.formatDate(DateTime.now(), format: DateFormats.y_mo_d) + | ||
| 250 | + ' 00:00:00'; | ||
| 251 | + DateTime datenow = DateUtil.getDateTime(from); | ||
| 249 | 252 | ||
| 250 | - int differenceSeconds = edate.difference(datenow).inSeconds; | 253 | + //比较相差的天数 |
| 254 | + int difference = edate.difference(datenow).inDays; | ||
| 251 | 255 | ||
| 252 | - if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) { | ||
| 253 | - //过期 | ||
| 254 | - outDay = '0'; | 256 | + int differenceSeconds = edate.difference(datenow).inSeconds; |
| 257 | + | ||
| 258 | + if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) { | ||
| 259 | + //过期 | ||
| 260 | + outDay = '0'; | ||
| 261 | + } else { | ||
| 262 | + outDay = difference.toString(); | ||
| 263 | + } | ||
| 264 | + | ||
| 265 | + // print(outDay); | ||
| 255 | } else { | 266 | } else { |
| 256 | - outDay = difference.toString(); | 267 | + outDay = '0'; |
| 257 | } | 268 | } |
| 258 | - | ||
| 259 | - // print(outDay); | 269 | + setState(() {}); |
| 260 | } else { | 270 | } else { |
| 261 | outDay = '0'; | 271 | outDay = '0'; |
| 262 | } | 272 | } |
| 263 | setState(() {}); | 273 | setState(() {}); |
| 264 | - } else { | ||
| 265 | - outDay = '0'; | ||
| 266 | } | 274 | } |
| 267 | - setState(() {}); | ||
| 268 | } | 275 | } |
| 269 | 276 | ||
| 270 | Widget _item(String name, String title, {bool isRowLow = false}) { | 277 | Widget _item(String name, String title, {bool isRowLow = false}) { |
| @@ -162,6 +162,11 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | @@ -162,6 +162,11 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | ||
| 162 | if (!Utils.getAuthority(context, '桌位')) { | 162 | if (!Utils.getAuthority(context, '桌位')) { |
| 163 | _currIndex = 1; | 163 | _currIndex = 1; |
| 164 | } | 164 | } |
| 165 | + | ||
| 166 | + // if (App.sp.getBool("sellerEdate") ?? false) { | ||
| 167 | + // //已经弹过过期弹窗,默认我的 | ||
| 168 | + // _currIndex = 3; | ||
| 169 | + // } | ||
| 165 | if (App.sp.containsKey('sellerEdate')) { | 170 | if (App.sp.containsKey('sellerEdate')) { |
| 166 | List<String> data = App.sp.getStringList('sellerEdate'); | 171 | List<String> data = App.sp.getStringList('sellerEdate'); |
| 167 | if (data.contains('-1')) { | 172 | if (data.contains('-1')) { |
| @@ -300,8 +305,7 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | @@ -300,8 +305,7 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | ||
| 300 | 305 | ||
| 301 | getSellerVersion() async { | 306 | getSellerVersion() async { |
| 302 | await collectStoreProvider.getSellerVersion(context); | 307 | await collectStoreProvider.getSellerVersion(context); |
| 303 | - if (collectStoreProvider.sellerVersionList != null && | ||
| 304 | - collectStoreProvider.sellerVersionList.length > 0) { | 308 | + if (collectStoreProvider.sellerSimple) { |
| 305 | //获取到店铺过期时间 | 309 | //获取到店铺过期时间 |
| 306 | //店铺过期提醒 | 310 | //店铺过期提醒 |
| 307 | // 计算时间差 | 311 | // 计算时间差 |
| @@ -313,7 +317,9 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | @@ -313,7 +317,9 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | ||
| 313 | } | 317 | } |
| 314 | 318 | ||
| 315 | collectStoreProvider.sellerVersionList.forEach((element) { | 319 | collectStoreProvider.sellerVersionList.forEach((element) { |
| 316 | - _edateSellerModuleShow(showData, element, dataSp); | 320 | + if (element.vid == '14') { |
| 321 | + _edateSellerModuleShow(showData, element, dataSp); | ||
| 322 | + } | ||
| 317 | }); | 323 | }); |
| 318 | print(showData); | 324 | print(showData); |
| 319 | print(dataSp); | 325 | print(dataSp); |
| @@ -353,6 +359,84 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | @@ -353,6 +359,84 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | ||
| 353 | } | 359 | } |
| 354 | } | 360 | } |
| 355 | 361 | ||
| 362 | +// getSellerVersion() async { | ||
| 363 | +// await collectStoreProvider.getSellerVersion(context); | ||
| 364 | +// if (collectStoreProvider.sellerSimple) { | ||
| 365 | +// //极速版,处理过期逻辑 | ||
| 366 | + | ||
| 367 | +// //获取到店铺过期时间 | ||
| 368 | +// //店铺过期提醒 | ||
| 369 | +// // 计算时间差 | ||
| 370 | +// //店铺过期日期 | ||
| 371 | + | ||
| 372 | +// List<SellerVersionSunModel> temp = collectStoreProvider.sellerVersionList | ||
| 373 | +// .where((element) => element.vid == '14') | ||
| 374 | +// .toList(); | ||
| 375 | + | ||
| 376 | +// //店铺过期提醒 | ||
| 377 | +// // 计算时间差 | ||
| 378 | +// //店铺过期日期 | ||
| 379 | +// DateTime edate = | ||
| 380 | +// DateTime.fromMillisecondsSinceEpoch(int.parse(temp[0].edate) * 1000); | ||
| 381 | + | ||
| 382 | +// //当前日期 | ||
| 383 | +// final datenow = DateTime.now(); | ||
| 384 | + | ||
| 385 | +// //比较相差的天数 | ||
| 386 | +// int difference = edate.difference(datenow).inDays; | ||
| 387 | + | ||
| 388 | +// int differenceSeconds = edate.difference(datenow).inSeconds; | ||
| 389 | + | ||
| 390 | +// if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) { | ||
| 391 | +// //已到期 | ||
| 392 | +// // _showSellerAlert('-1', edate); | ||
| 393 | + | ||
| 394 | +// //提示到期 | ||
| 395 | + | ||
| 396 | +// App.sp.setBool("sellerEdate", true); | ||
| 397 | + | ||
| 398 | +// DialogUtil.cupertinoAlertSellerHasEdateDialogSim( | ||
| 399 | +// context, | ||
| 400 | +// title: '温馨提示', | ||
| 401 | +// isBold: true, | ||
| 402 | +// lCallback: () { | ||
| 403 | +// NavigatorUtil.goHomePageSim(context, initialIndex: 3); | ||
| 404 | +// }, | ||
| 405 | +// rCallback: () { | ||
| 406 | +// //立即续费 | ||
| 407 | +// }, | ||
| 408 | +// ); | ||
| 409 | +// } | ||
| 410 | + | ||
| 411 | +// return true; | ||
| 412 | +// } else { | ||
| 413 | +// if (collectStoreProvider.sellerVersionList != null && | ||
| 414 | +// collectStoreProvider.sellerVersionList.length > 0) { | ||
| 415 | +// App.sp.remove('sellerEdate'); | ||
| 416 | +// NavigatorUtil.goHomePage(context); //跳转至正常版本 | ||
| 417 | +// } else { | ||
| 418 | +// //过期提醒 | ||
| 419 | +// if (_currIndex != 3) { | ||
| 420 | +// App.sp.setBool("sellerEdate", true); | ||
| 421 | + | ||
| 422 | +// DialogUtil.cupertinoAlertSellerHasEdateDialogSim( | ||
| 423 | +// context, | ||
| 424 | +// title: '温馨提示', | ||
| 425 | +// isBold: true, | ||
| 426 | +// lCallback: () { | ||
| 427 | +// NavigatorUtil.goHomePageSim(context, initialIndex: 3); | ||
| 428 | +// }, | ||
| 429 | +// rCallback: () { | ||
| 430 | +// //立即续费 | ||
| 431 | +// }, | ||
| 432 | +// ); | ||
| 433 | +// } | ||
| 434 | + | ||
| 435 | +// return false; | ||
| 436 | +// } | ||
| 437 | +// } | ||
| 438 | +// } | ||
| 439 | + | ||
| 356 | _getTableList() async { | 440 | _getTableList() async { |
| 357 | TableManagerModel tableManagerModel = | 441 | TableManagerModel tableManagerModel = |
| 358 | Provider.of<TableManagerModel>(context, listen: false); | 442 | Provider.of<TableManagerModel>(context, listen: false); |
| @@ -618,72 +702,72 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | @@ -618,72 +702,72 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | ||
| 618 | } | 702 | } |
| 619 | } | 703 | } |
| 620 | 704 | ||
| 621 | - _showSellerAlert(String day, DateTime edate) { | ||
| 622 | - if (App.sp.containsKey('sellerEdate')) { | ||
| 623 | - //已经存进去过数据 | ||
| 624 | - List<String> data = App.sp.getStringList('sellerEdate'); | ||
| 625 | - if (!data.contains(day)) { | ||
| 626 | - data.add(day); | ||
| 627 | - App.sp.setStringList("sellerEdate", data); | ||
| 628 | - //过期差ji天,提醒一次s | ||
| 629 | - if (day == '-1') { | ||
| 630 | - DialogUtil.cupertinoAlertSellerHasEdateDialog( | ||
| 631 | - context, | ||
| 632 | - title: '温馨提示', | ||
| 633 | - isBold: true, | ||
| 634 | - lCallback: () { | ||
| 635 | - NavigatorUtil.goHomePageSim(context, initialIndex: 3); | ||
| 636 | - }, | ||
| 637 | - rCallback: () { | ||
| 638 | - //立即续费 | ||
| 639 | - }, | ||
| 640 | - ); | ||
| 641 | - } else { | ||
| 642 | - DialogUtil.cupertinoAlertSellerEdateDialog( | ||
| 643 | - context, | ||
| 644 | - title: '温馨提示', | ||
| 645 | - isBold: true, | ||
| 646 | - content: DateUtil.formatDate( | ||
| 647 | - edate, | ||
| 648 | - format: DateFormats.full, | ||
| 649 | - ), | ||
| 650 | - rCallback: () { | ||
| 651 | - //立即续费 | ||
| 652 | - }, | ||
| 653 | - ); | ||
| 654 | - } | ||
| 655 | - } | ||
| 656 | - } else { | ||
| 657 | - App.sp.setStringList("sellerEdate", [day]); | ||
| 658 | - //过期差ji天,提醒一次s | ||
| 659 | - if (day == '-1') { | ||
| 660 | - DialogUtil.cupertinoAlertSellerHasEdateDialog( | ||
| 661 | - context, | ||
| 662 | - title: '温馨提示', | ||
| 663 | - isBold: true, | ||
| 664 | - lCallback: () { | ||
| 665 | - NavigatorUtil.goHomePageSim(context, initialIndex: 3); | ||
| 666 | - }, | ||
| 667 | - rCallback: () { | ||
| 668 | - //立即续费 | ||
| 669 | - }, | ||
| 670 | - ); | ||
| 671 | - } else { | ||
| 672 | - DialogUtil.cupertinoAlertSellerEdateDialog( | ||
| 673 | - context, | ||
| 674 | - title: '温馨提示', | ||
| 675 | - isBold: true, | ||
| 676 | - content: DateUtil.formatDate( | ||
| 677 | - edate, | ||
| 678 | - format: DateFormats.full, | ||
| 679 | - ), | ||
| 680 | - rCallback: () { | ||
| 681 | - //立即续费 | ||
| 682 | - }, | ||
| 683 | - ); | ||
| 684 | - } | ||
| 685 | - } | ||
| 686 | - } | 705 | + // _showSellerAlert(String day, DateTime edate) { |
| 706 | + // if (App.sp.containsKey('sellerEdate')) { | ||
| 707 | + // //已经存进去过数据 | ||
| 708 | + // List<String> data = App.sp.getStringList('sellerEdate'); | ||
| 709 | + // if (!data.contains(day)) { | ||
| 710 | + // data.add(day); | ||
| 711 | + // App.sp.setStringList("sellerEdate", data); | ||
| 712 | + // //过期差ji天,提醒一次s | ||
| 713 | + // if (day == '-1') { | ||
| 714 | + // DialogUtil.cupertinoAlertSellerHasEdateDialog( | ||
| 715 | + // context, | ||
| 716 | + // title: '温馨提示', | ||
| 717 | + // isBold: true, | ||
| 718 | + // lCallback: () { | ||
| 719 | + // NavigatorUtil.goHomePageSim(context, initialIndex: 3); | ||
| 720 | + // }, | ||
| 721 | + // rCallback: () { | ||
| 722 | + // //立即续费 | ||
| 723 | + // }, | ||
| 724 | + // ); | ||
| 725 | + // } else { | ||
| 726 | + // DialogUtil.cupertinoAlertSellerEdateDialog( | ||
| 727 | + // context, | ||
| 728 | + // title: '温馨提示', | ||
| 729 | + // isBold: true, | ||
| 730 | + // content: DateUtil.formatDate( | ||
| 731 | + // edate, | ||
| 732 | + // format: DateFormats.full, | ||
| 733 | + // ), | ||
| 734 | + // rCallback: () { | ||
| 735 | + // //立即续费 | ||
| 736 | + // }, | ||
| 737 | + // ); | ||
| 738 | + // } | ||
| 739 | + // } | ||
| 740 | + // } else { | ||
| 741 | + // App.sp.setStringList("sellerEdate", [day]); | ||
| 742 | + // //过期差ji天,提醒一次s | ||
| 743 | + // if (day == '-1') { | ||
| 744 | + // DialogUtil.cupertinoAlertSellerHasEdateDialog( | ||
| 745 | + // context, | ||
| 746 | + // title: '温馨提示', | ||
| 747 | + // isBold: true, | ||
| 748 | + // lCallback: () { | ||
| 749 | + // NavigatorUtil.goHomePageSim(context, initialIndex: 3); | ||
| 750 | + // }, | ||
| 751 | + // rCallback: () { | ||
| 752 | + // //立即续费 | ||
| 753 | + // }, | ||
| 754 | + // ); | ||
| 755 | + // } else { | ||
| 756 | + // DialogUtil.cupertinoAlertSellerEdateDialog( | ||
| 757 | + // context, | ||
| 758 | + // title: '温馨提示', | ||
| 759 | + // isBold: true, | ||
| 760 | + // content: DateUtil.formatDate( | ||
| 761 | + // edate, | ||
| 762 | + // format: DateFormats.full, | ||
| 763 | + // ), | ||
| 764 | + // rCallback: () { | ||
| 765 | + // //立即续费 | ||
| 766 | + // }, | ||
| 767 | + // ); | ||
| 768 | + // } | ||
| 769 | + // } | ||
| 770 | + // } | ||
| 687 | 771 | ||
| 688 | _getCustomerActivityBaseinfo() async { | 772 | _getCustomerActivityBaseinfo() async { |
| 689 | Map<String, String> params = { | 773 | Map<String, String> params = { |
| @@ -1735,7 +1819,7 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | @@ -1735,7 +1819,7 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | ||
| 1735 | currentIndex: _currIndex, | 1819 | currentIndex: _currIndex, |
| 1736 | onTap: (int index) { | 1820 | onTap: (int index) { |
| 1737 | if (_currIndex != index) { | 1821 | if (_currIndex != index) { |
| 1738 | - if (App.sp.containsKey('sellerEdate')) { | 1822 | + if (App.sp.containsKey('sellerEdate')) { |
| 1739 | List<String> data = App.sp.getStringList('sellerEdate'); | 1823 | List<String> data = App.sp.getStringList('sellerEdate'); |
| 1740 | if (data.contains('-1')) { | 1824 | if (data.contains('-1')) { |
| 1741 | DialogUtil.cupertinoAlertSellerHasEdateDialog( | 1825 | DialogUtil.cupertinoAlertSellerHasEdateDialog( |
| @@ -1752,6 +1836,21 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | @@ -1752,6 +1836,21 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | ||
| 1752 | return; | 1836 | return; |
| 1753 | } | 1837 | } |
| 1754 | } | 1838 | } |
| 1839 | + // if (App.sp.getBool("sellerEdate") ?? false) { | ||
| 1840 | + // DialogUtil.cupertinoAlertSellerHasEdateDialogSim( | ||
| 1841 | + // context, | ||
| 1842 | + // title: '温馨提示', | ||
| 1843 | + // isBold: true, | ||
| 1844 | + // lCallback: () { | ||
| 1845 | + // NavigatorUtil.goHomePageSim(context, initialIndex: 3); | ||
| 1846 | + // }, | ||
| 1847 | + // rCallback: () { | ||
| 1848 | + // //立即续费 | ||
| 1849 | + // }, | ||
| 1850 | + // ); | ||
| 1851 | + // return; | ||
| 1852 | + // } | ||
| 1853 | + | ||
| 1755 | if (index == 0) { | 1854 | if (index == 0) { |
| 1756 | if (!Utils.getAuthority(context, '消息中心')) { | 1855 | if (!Utils.getAuthority(context, '消息中心')) { |
| 1757 | return; | 1856 | return; |
| @@ -1760,7 +1859,7 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | @@ -1760,7 +1859,7 @@ class HomePageSimState extends State<HomePageSim> with WidgetsBindingObserver { | ||
| 1760 | if (!Utils.getAuthority(context, '桌位')) { | 1859 | if (!Utils.getAuthority(context, '桌位')) { |
| 1761 | return; | 1860 | return; |
| 1762 | } | 1861 | } |
| 1763 | - } | 1862 | + } |
| 1764 | // else if (index == 3) { | 1863 | // else if (index == 3) { |
| 1765 | // //宴会 | 1864 | // //宴会 |
| 1766 | // if (!collectStoreProvider.sellerFeast) { | 1865 | // if (!collectStoreProvider.sellerFeast) { |
| @@ -730,8 +730,8 @@ class _MyCustomerDetailEditPageSimState extends State<MyCustomerDetailEditPageSi | @@ -730,8 +730,8 @@ class _MyCustomerDetailEditPageSimState extends State<MyCustomerDetailEditPageSi | ||
| 730 | _textMulLine( | 730 | _textMulLine( |
| 731 | '喜好', '点这里输入客户喜好的东西,请用逗号隔开。', xhController), | 731 | '喜好', '点这里输入客户喜好的东西,请用逗号隔开。', xhController), |
| 732 | VEmptyView(30), | 732 | VEmptyView(30), |
| 733 | - _textMulLine('服务', '点这里输入客户需要的服务,如安静的包间、远离厕所等,请用逗号隔开。', | ||
| 734 | - fwController), | 733 | + // _textMulLine('服务', '点这里输入客户需要的服务,如安静的包间、远离厕所等,请用逗号隔开。', |
| 734 | + // fwController), | ||
| 735 | ], | 735 | ], |
| 736 | ))), | 736 | ))), |
| 737 | RoundButton( | 737 | RoundButton( |
| @@ -30,6 +30,7 @@ import 'package:provider/provider.dart'; | @@ -30,6 +30,7 @@ import 'package:provider/provider.dart'; | ||
| 30 | import '../../app.dart'; | 30 | import '../../app.dart'; |
| 31 | 31 | ||
| 32 | import '../../models/get_seller_info_model.dart'; | 32 | import '../../models/get_seller_info_model.dart'; |
| 33 | +import '../../models/seller_version_model.dart'; | ||
| 33 | import '../../provider/collect_store_provider.dart'; | 34 | import '../../provider/collect_store_provider.dart'; |
| 34 | import '../../provider/customer_provider.dart'; | 35 | import '../../provider/customer_provider.dart'; |
| 35 | import '../../provider/store_base_info_provider.dart'; | 36 | import '../../provider/store_base_info_provider.dart'; |
| @@ -231,39 +232,47 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { | @@ -231,39 +232,47 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { | ||
| 231 | 232 | ||
| 232 | getSellerVersion() async { | 233 | getSellerVersion() async { |
| 233 | await collectStoreProvider.getSellerVersion(context); | 234 | await collectStoreProvider.getSellerVersion(context); |
| 234 | - if (collectStoreProvider.sellerNormal) { | ||
| 235 | - if (collectStoreProvider.sellerNormalEdate != null) { | ||
| 236 | - //店铺过期提醒 | ||
| 237 | - // 计算时间差 | ||
| 238 | - //店铺过期日期 | ||
| 239 | - edate = DateTime.fromMillisecondsSinceEpoch( | ||
| 240 | - int.parse(collectStoreProvider.sellerNormalEdate) * 1000); | ||
| 241 | 235 | ||
| 242 | - String from = | ||
| 243 | - DateUtil.formatDate(DateTime.now(), format: DateFormats.y_mo_d) + | ||
| 244 | - ' 00:00:00'; | ||
| 245 | - DateTime datenow = DateUtil.getDateTime(from); | 236 | + if (collectStoreProvider.sellerSimple) { |
| 237 | + //极速版 | ||
| 238 | + //店铺过期提醒 | ||
| 239 | + // 计算时间差 | ||
| 240 | + //店铺过期日期 | ||
| 241 | + List<SellerVersionSunModel> temp = collectStoreProvider.sellerVersionList | ||
| 242 | + .where((element) => element.vid == '14') | ||
| 243 | + .toList(); | ||
| 244 | + edate = | ||
| 245 | + DateTime.fromMillisecondsSinceEpoch(int.parse(temp[0].edate) * 1000); | ||
| 246 | 246 | ||
| 247 | - //比较相差的天数 | ||
| 248 | - int difference = edate.difference(datenow).inDays; | 247 | + String from = |
| 248 | + DateUtil.formatDate(DateTime.now(), format: DateFormats.y_mo_d) + | ||
| 249 | + ' 00:00:00'; | ||
| 250 | + DateTime datenow = DateUtil.getDateTime(from); | ||
| 249 | 251 | ||
| 250 | - int differenceSeconds = edate.difference(datenow).inSeconds; | 252 | + //比较相差的天数 |
| 253 | + int difference = edate.difference(datenow).inDays; | ||
| 251 | 254 | ||
| 252 | - if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) { | ||
| 253 | - //过期 | ||
| 254 | - outDay = '0'; | ||
| 255 | - } else { | ||
| 256 | - outDay = difference.toString(); | ||
| 257 | - } | 255 | + int differenceSeconds = edate.difference(datenow).inSeconds; |
| 258 | 256 | ||
| 259 | - // print(outDay); | ||
| 260 | - } else { | 257 | + if (difference < 0 || (difference == 0 && differenceSeconds <= 0)) { |
| 258 | + //过期 | ||
| 261 | outDay = '0'; | 259 | outDay = '0'; |
| 260 | + } else { | ||
| 261 | + outDay = difference.toString(); | ||
| 262 | } | 262 | } |
| 263 | - setState(() {}); | ||
| 264 | } else { | 263 | } else { |
| 265 | - outDay = '0'; | 264 | + if (collectStoreProvider.sellerVersionList != null && |
| 265 | + collectStoreProvider.sellerVersionList.length > 0) { | ||
| 266 | + App.sp.remove("sellerEdate"); | ||
| 267 | + NavigatorUtil.goHomePage(context); //跳转至正常版本 | ||
| 268 | + } else { | ||
| 269 | + //过期提醒 | ||
| 270 | + outDay = '0'; | ||
| 271 | + } | ||
| 266 | } | 272 | } |
| 273 | + | ||
| 274 | + | ||
| 275 | + | ||
| 267 | setState(() {}); | 276 | setState(() {}); |
| 268 | } | 277 | } |
| 269 | 278 | ||
| @@ -735,7 +744,7 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { | @@ -735,7 +744,7 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { | ||
| 735 | Utils.getAuthority(context, '有效期')) { | 744 | Utils.getAuthority(context, '有效期')) { |
| 736 | if (outDay == '0') { | 745 | if (outDay == '0') { |
| 737 | DialogUtil | 746 | DialogUtil |
| 738 | - .cupertinoAlertSellerHasEdateDialog( | 747 | + .cupertinoAlertSellerHasEdateDialogSim( |
| 739 | context, | 748 | context, |
| 740 | title: '温馨提示', | 749 | title: '温馨提示', |
| 741 | isBold: true, | 750 | isBold: true, |
| @@ -827,7 +836,7 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { | @@ -827,7 +836,7 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { | ||
| 827 | context, '有效期')) { | 836 | context, '有效期')) { |
| 828 | if (outDay == '0') { | 837 | if (outDay == '0') { |
| 829 | DialogUtil | 838 | DialogUtil |
| 830 | - .cupertinoAlertSellerHasEdateDialog( | 839 | + .cupertinoAlertSellerHasEdateDialogSim( |
| 831 | context, | 840 | context, |
| 832 | title: '温馨提示', | 841 | title: '温馨提示', |
| 833 | isBold: true, | 842 | isBold: true, |
| @@ -836,7 +845,7 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { | @@ -836,7 +845,7 @@ class MyPageSimState extends State<MyPageSim> with WidgetsBindingObserver { | ||
| 836 | .goHomePageSim( | 845 | .goHomePageSim( |
| 837 | context, | 846 | context, |
| 838 | initialIndex: | 847 | initialIndex: |
| 839 | - 4); | 848 | + 3); |
| 840 | }, | 849 | }, |
| 841 | rCallback: () { | 850 | rCallback: () { |
| 842 | //立即续费 | 851 | //立即续费 |
| @@ -35,7 +35,8 @@ class _PersonnelManagePageSimState extends State<PersonnelManagePageSim> { | @@ -35,7 +35,8 @@ class _PersonnelManagePageSimState extends State<PersonnelManagePageSim> { | ||
| 35 | void initState() { | 35 | void initState() { |
| 36 | // TODO: implement initState | 36 | // TODO: implement initState |
| 37 | super.initState(); | 37 | super.initState(); |
| 38 | - titleList = ['管理员', '店长', '客户经理', '收银员', '服务员', '前台', '迎宾']; | 38 | + // titleList = ['管理员', '店长', '客户经理', '收银员', '服务员', '前台', '迎宾']; |
| 39 | + titleList = ['管理员', '客户经理', '服务员', '前台']; | ||
| 39 | WidgetsBinding.instance.addPostFrameCallback((timeStamp) { | 40 | WidgetsBinding.instance.addPostFrameCallback((timeStamp) { |
| 40 | _getAuthUserLists(showLoading: false); | 41 | _getAuthUserLists(showLoading: false); |
| 41 | }); | 42 | }); |
| @@ -23,6 +23,7 @@ class CollectStoreProvider with ChangeNotifier { | @@ -23,6 +23,7 @@ class CollectStoreProvider with ChangeNotifier { | ||
| 23 | bool sellerPreserve = false; //客情维护 | 23 | bool sellerPreserve = false; //客情维护 |
| 24 | bool sellerMarketing = false; //客情营销 | 24 | bool sellerMarketing = false; //客情营销 |
| 25 | bool sellerNormal = false; //超能或者标准 | 25 | bool sellerNormal = false; //超能或者标准 |
| 26 | + bool sellerSimple = false; //极速版 | ||
| 26 | 27 | ||
| 27 | String sellerNormalEdate = ''; | 28 | String sellerNormalEdate = ''; |
| 28 | 29 | ||
| @@ -53,8 +54,7 @@ class CollectStoreProvider with ChangeNotifier { | @@ -53,8 +54,7 @@ class CollectStoreProvider with ChangeNotifier { | ||
| 53 | } | 54 | } |
| 54 | } | 55 | } |
| 55 | 56 | ||
| 56 | - | ||
| 57 | - /// 发送意向店铺通知短信 | 57 | + /// 发送意向店铺通知短信 |
| 58 | Future<dynamic> sendIntention( | 58 | Future<dynamic> sendIntention( |
| 59 | BuildContext context, Map<String, String> params, | 59 | BuildContext context, Map<String, String> params, |
| 60 | {isShowLoading = true}) async { | 60 | {isShowLoading = true}) async { |
| @@ -103,75 +103,85 @@ class CollectStoreProvider with ChangeNotifier { | @@ -103,75 +103,85 @@ class CollectStoreProvider with ChangeNotifier { | ||
| 103 | sellerVersionList.forEach((element) { | 103 | sellerVersionList.forEach((element) { |
| 104 | versionCodeList.add(element.vid); | 104 | versionCodeList.add(element.vid); |
| 105 | }); | 105 | }); |
| 106 | - sellerCoupon = versionCodeList.any((element) => | ||
| 107 | - element == '1' || | ||
| 108 | - element == '2' || | ||
| 109 | - element == '3' || | ||
| 110 | - element == '8'); | 106 | + sellerSimple = versionCodeList.any((element) => element == '14'); |
| 111 | 107 | ||
| 112 | - sellerRecharge = versionCodeList.any((element) => | ||
| 113 | - element == '1' || | ||
| 114 | - element == '2' || | ||
| 115 | - element == '3' || | ||
| 116 | - element == '9'); | 108 | + if (sellerSimple) { |
| 109 | + //极速版 | ||
| 110 | + if (App.sp.containsKey("sellerEdate")) { | ||
| 111 | + App.sp.remove("sellerEdate"); | ||
| 112 | + } | ||
| 113 | + } else { | ||
| 114 | + sellerCoupon = versionCodeList.any((element) => | ||
| 115 | + element == '1' || | ||
| 116 | + element == '2' || | ||
| 117 | + element == '3' || | ||
| 118 | + element == '8'); | ||
| 117 | 119 | ||
| 118 | - sellerWine = versionCodeList.any((element) => | ||
| 119 | - element == '1' || | ||
| 120 | - element == '2' || | ||
| 121 | - element == '3' || | ||
| 122 | - element == '7'); | 120 | + sellerRecharge = versionCodeList.any((element) => |
| 121 | + element == '1' || | ||
| 122 | + element == '2' || | ||
| 123 | + element == '3' || | ||
| 124 | + element == '9'); | ||
| 123 | 125 | ||
| 124 | - sellerOrderCustomer = versionCodeList.any((element) => | ||
| 125 | - element == '1' || | ||
| 126 | - element == '2' || | ||
| 127 | - element == '3' || | ||
| 128 | - element == '6'); | ||
| 129 | - sellerOrderManager = versionCodeList.any((element) => | ||
| 130 | - element == '1' || | ||
| 131 | - element == '2' || | ||
| 132 | - element == '3' || | ||
| 133 | - element == '5'); | ||
| 134 | - sellerFeast = versionCodeList.any((element) => | ||
| 135 | - element == '1' || | ||
| 136 | - element == '2' || | ||
| 137 | - element == '3' || | ||
| 138 | - element == '12'); | ||
| 139 | - sellerPreserve = versionCodeList.any((element) => | ||
| 140 | - element == '1' || | ||
| 141 | - element == '2' || | ||
| 142 | - element == '3' || | ||
| 143 | - element == '10'); | ||
| 144 | - sellerMarketing = versionCodeList.any((element) => | ||
| 145 | - element == '1' || | ||
| 146 | - element == '2' || | ||
| 147 | - element == '3' || | ||
| 148 | - element == '11'); | 126 | + sellerWine = versionCodeList.any((element) => |
| 127 | + element == '1' || | ||
| 128 | + element == '2' || | ||
| 129 | + element == '3' || | ||
| 130 | + element == '7'); | ||
| 149 | 131 | ||
| 150 | - sellerNormal = versionCodeList.any((element) => | ||
| 151 | - element == '1' || | ||
| 152 | - element == '2' || | ||
| 153 | - element == '3' || | ||
| 154 | - element == '4' || | ||
| 155 | - element == '13'); | ||
| 156 | - sellerVersionList.forEach((element) { | ||
| 157 | - if (element.vid == '1' || | ||
| 158 | - element.vid == '2' || | ||
| 159 | - element.vid == '3' || | ||
| 160 | - element.vid == '4' || | ||
| 161 | - element.vid == '13') { | ||
| 162 | - sellerNormalEdate = element.edate; | ||
| 163 | - } | ||
| 164 | - }); | ||
| 165 | - if (!sellerNormal) { | ||
| 166 | - //超能版或者标准版过期 | ||
| 167 | - App.sp.setStringList("sellerEdate", ['-1']); | ||
| 168 | - } else { | ||
| 169 | - if (App.sp.containsKey("sellerEdate")) { | ||
| 170 | - App.sp.remove("sellerEdate"); | 132 | + sellerOrderCustomer = versionCodeList.any((element) => |
| 133 | + element == '1' || | ||
| 134 | + element == '2' || | ||
| 135 | + element == '3' || | ||
| 136 | + element == '6'); | ||
| 137 | + sellerOrderManager = versionCodeList.any((element) => | ||
| 138 | + element == '1' || | ||
| 139 | + element == '2' || | ||
| 140 | + element == '3' || | ||
| 141 | + element == '5'); | ||
| 142 | + sellerFeast = versionCodeList.any((element) => | ||
| 143 | + element == '1' || | ||
| 144 | + element == '2' || | ||
| 145 | + element == '3' || | ||
| 146 | + element == '12'); | ||
| 147 | + sellerPreserve = versionCodeList.any((element) => | ||
| 148 | + element == '1' || | ||
| 149 | + element == '2' || | ||
| 150 | + element == '3' || | ||
| 151 | + element == '10'); | ||
| 152 | + sellerMarketing = versionCodeList.any((element) => | ||
| 153 | + element == '1' || | ||
| 154 | + element == '2' || | ||
| 155 | + element == '3' || | ||
| 156 | + element == '11'); | ||
| 157 | + | ||
| 158 | + sellerNormal = versionCodeList.any((element) => | ||
| 159 | + element == '1' || | ||
| 160 | + element == '2' || | ||
| 161 | + element == '3' || | ||
| 162 | + element == '4' || | ||
| 163 | + element == '13'); | ||
| 164 | + sellerVersionList.forEach((element) { | ||
| 165 | + if (element.vid == '1' || | ||
| 166 | + element.vid == '2' || | ||
| 167 | + element.vid == '3' || | ||
| 168 | + element.vid == '4' || | ||
| 169 | + element.vid == '13') { | ||
| 170 | + sellerNormalEdate = element.edate; | ||
| 171 | + } | ||
| 172 | + }); | ||
| 173 | + | ||
| 174 | + if (!sellerNormal) { | ||
| 175 | + //超能版或者标准版过期 | ||
| 176 | + App.sp.setStringList("sellerEdate", ['-1']); | ||
| 177 | + } else { | ||
| 178 | + if (App.sp.containsKey("sellerEdate")) { | ||
| 179 | + App.sp.remove("sellerEdate"); | ||
| 180 | + } | ||
| 171 | } | 181 | } |
| 172 | } | 182 | } |
| 173 | } else { | 183 | } else { |
| 174 | - //超能版或者标准版过期 | 184 | + //超能版或者标准版过期 && 极速版也没有 |
| 175 | App.sp.setStringList("sellerEdate", ['-1']); | 185 | App.sp.setStringList("sellerEdate", ['-1']); |
| 176 | } | 186 | } |
| 177 | 187 |
| @@ -91,6 +91,8 @@ class UserModel with ChangeNotifier { | @@ -91,6 +91,8 @@ class UserModel with ChangeNotifier { | ||
| 91 | } | 91 | } |
| 92 | Map<String, dynamic> seller = baseResp.data[0]["seller"]; | 92 | Map<String, dynamic> seller = baseResp.data[0]["seller"]; |
| 93 | Map<String, dynamic> user = baseResp.data[0]["user"]; | 93 | Map<String, dynamic> user = baseResp.data[0]["user"]; |
| 94 | + String sellerVersion = baseResp.data[0]["sellerVersion"]; | ||
| 95 | + | ||
| 94 | Map<String, dynamic> userMap = { | 96 | Map<String, dynamic> userMap = { |
| 95 | "openid": user['id'], | 97 | "openid": user['id'], |
| 96 | "account": user['account'], | 98 | "account": user['account'], |
| @@ -110,7 +112,8 @@ class UserModel with ChangeNotifier { | @@ -110,7 +112,8 @@ class UserModel with ChangeNotifier { | ||
| 110 | 'userphone': user['phone'], | 112 | 'userphone': user['phone'], |
| 111 | 'token': baseResp.data[0]["token"]['token'], | 113 | 'token': baseResp.data[0]["token"]['token'], |
| 112 | 'nickname': user['nick_name'], | 114 | 'nickname': user['nick_name'], |
| 113 | - 'edate': seller['edate'] | 115 | + 'edate': seller['edate'], |
| 116 | + 'sellerVersion':sellerVersion | ||
| 114 | }; | 117 | }; |
| 115 | await saveUserInfo(User.fromJson(userMap)); | 118 | await saveUserInfo(User.fromJson(userMap)); |
| 116 | 119 | ||
| @@ -213,11 +216,12 @@ class UserModel with ChangeNotifier { | @@ -213,11 +216,12 @@ class UserModel with ChangeNotifier { | ||
| 213 | App.sp.setBool("isLogin", true); | 216 | App.sp.setBool("isLogin", true); |
| 214 | App.sp.setString("is_call_tel", seller['is_call_tel'].toString()); | 217 | App.sp.setString("is_call_tel", seller['is_call_tel'].toString()); |
| 215 | pullMarketingByUid(context); | 218 | pullMarketingByUid(context); |
| 216 | - if (Constant.simpleApp) { | ||
| 217 | - NavigatorUtil.goHomePageSim(context); | ||
| 218 | - } else { | ||
| 219 | - NavigatorUtil.goHomePage(context); | ||
| 220 | - } | 219 | + //获取登陆接口返回的vid 如果是14 极速版,则跳转至极速版 |
| 220 | + if (user['sellerVersion'] == '14') { | ||
| 221 | + NavigatorUtil.goHomePageSim(context); | ||
| 222 | + } else { | ||
| 223 | + NavigatorUtil.goHomePage(context); | ||
| 224 | + } | ||
| 221 | return null; | 225 | return null; |
| 222 | } | 226 | } |
| 223 | } | 227 | } |
| @@ -1756,41 +1756,41 @@ class DialogUtil { | @@ -1756,41 +1756,41 @@ class DialogUtil { | ||
| 1756 | HEmptyView(32), | 1756 | HEmptyView(32), |
| 1757 | InkWell( | 1757 | InkWell( |
| 1758 | onTap: () { | 1758 | onTap: () { |
| 1759 | - List<String> list = []; | ||
| 1760 | - for (FilterBtnModel item | ||
| 1761 | - in managerList) { | ||
| 1762 | - list.add(item.title); | ||
| 1763 | - } | ||
| 1764 | - DialogUtil.showSelectCusmanDialog( | ||
| 1765 | - context, list, (value) async { | ||
| 1766 | - if (value != null) { | ||
| 1767 | - currentIndex = value.first; | ||
| 1768 | - manager = list[value.first]; | ||
| 1769 | - state(() {}); | ||
| 1770 | - // detailModel | ||
| 1771 | - // .notifyListeners(); | ||
| 1772 | - // setState(() { | ||
| 1773 | - // selectPnum = value.first; | ||
| 1774 | - // pnum = pnumlist[value.first]; | ||
| 1775 | - // }); | ||
| 1776 | - // bool sucess = | ||
| 1777 | - // await detailModel.upReserveInfo( | ||
| 1778 | - // context, widget.rid, | ||
| 1779 | - // actualPum: | ||
| 1780 | - // detailModel.selectNum); | ||
| 1781 | - | ||
| 1782 | - // if (sucess) { | ||
| 1783 | - // EventBus().emit( | ||
| 1784 | - // "refresh_tablemanager"); //刷新桌位 | ||
| 1785 | - // await _getReserveDetail( | ||
| 1786 | - // showCicle: false); | ||
| 1787 | - // } | ||
| 1788 | - } | ||
| 1789 | - }, | ||
| 1790 | - selecteds: currentIndex == null | ||
| 1791 | - ? [] | ||
| 1792 | - : [currentIndex]) | ||
| 1793 | - .then((value) {}); | 1759 | + // List<String> list = []; |
| 1760 | + // for (FilterBtnModel item | ||
| 1761 | + // in managerList) { | ||
| 1762 | + // list.add(item.title); | ||
| 1763 | + // } | ||
| 1764 | + // DialogUtil.showSelectCusmanDialog( | ||
| 1765 | + // context, list, (value) async { | ||
| 1766 | + // if (value != null) { | ||
| 1767 | + // currentIndex = value.first; | ||
| 1768 | + // manager = list[value.first]; | ||
| 1769 | + // state(() {}); | ||
| 1770 | + // // detailModel | ||
| 1771 | + // // .notifyListeners(); | ||
| 1772 | + // // setState(() { | ||
| 1773 | + // // selectPnum = value.first; | ||
| 1774 | + // // pnum = pnumlist[value.first]; | ||
| 1775 | + // // }); | ||
| 1776 | + // // bool sucess = | ||
| 1777 | + // // await detailModel.upReserveInfo( | ||
| 1778 | + // // context, widget.rid, | ||
| 1779 | + // // actualPum: | ||
| 1780 | + // // detailModel.selectNum); | ||
| 1781 | + | ||
| 1782 | + // // if (sucess) { | ||
| 1783 | + // // EventBus().emit( | ||
| 1784 | + // // "refresh_tablemanager"); //刷新桌位 | ||
| 1785 | + // // await _getReserveDetail( | ||
| 1786 | + // // showCicle: false); | ||
| 1787 | + // // } | ||
| 1788 | + // } | ||
| 1789 | + // }, | ||
| 1790 | + // selecteds: currentIndex == null | ||
| 1791 | + // ? [] | ||
| 1792 | + // : [currentIndex]) | ||
| 1793 | + // .then((value) {}); | ||
| 1794 | }, | 1794 | }, |
| 1795 | child: Container( | 1795 | child: Container( |
| 1796 | padding: EdgeInsets.symmetric( | 1796 | padding: EdgeInsets.symmetric( |
| @@ -1803,7 +1803,7 @@ class DialogUtil { | @@ -1803,7 +1803,7 @@ class DialogUtil { | ||
| 1803 | borderRadius: BorderRadius.circular( | 1803 | borderRadius: BorderRadius.circular( |
| 1804 | ScreenUtil().setWidth(20)), | 1804 | ScreenUtil().setWidth(20)), |
| 1805 | border: Border.all( | 1805 | border: Border.all( |
| 1806 | - color: MyColours.color_438E93, | 1806 | + color: MyColours.color_999999, |
| 1807 | width: | 1807 | width: |
| 1808 | ScreenUtil().setWidth(2))), | 1808 | ScreenUtil().setWidth(2))), |
| 1809 | child: Row( | 1809 | child: Row( |
| @@ -1819,12 +1819,12 @@ class DialogUtil { | @@ -1819,12 +1819,12 @@ class DialogUtil { | ||
| 1819 | fontSize: | 1819 | fontSize: |
| 1820 | ScreenUtil().setSp(28), | 1820 | ScreenUtil().setSp(28), |
| 1821 | color: | 1821 | color: |
| 1822 | - MyColours.color_438E93), | 1822 | + MyColours.color_999999), |
| 1823 | )), | 1823 | )), |
| 1824 | HEmptyView(14), | 1824 | HEmptyView(14), |
| 1825 | Image.asset( | 1825 | Image.asset( |
| 1826 | Utils.getImgPath( | 1826 | Utils.getImgPath( |
| 1827 | - 'c_arrow_down'), | 1827 | + 'arrow_down_sim'), |
| 1828 | width: | 1828 | width: |
| 1829 | ScreenUtil().setWidth(40)), | 1829 | ScreenUtil().setWidth(40)), |
| 1830 | ], | 1830 | ], |
| @@ -8550,6 +8550,152 @@ class DialogUtil { | @@ -8550,6 +8550,152 @@ class DialogUtil { | ||
| 8550 | } | 8550 | } |
| 8551 | 8551 | ||
| 8552 | ///店铺临近过期弹窗 | 8552 | ///店铺临近过期弹窗 |
| 8553 | + static cupertinoAlertSellerHasEdateDialogSim(BuildContext context, | ||
| 8554 | + {String title = "", | ||
| 8555 | + String content = "内容", | ||
| 8556 | + String lTitle = "关闭", | ||
| 8557 | + String rTitle = "立即续费", | ||
| 8558 | + Color rColor = MyColours.color_438E93, | ||
| 8559 | + bool isBold = false, | ||
| 8560 | + bool isBoldContent = false, | ||
| 8561 | + Color contentColor = MyColours.color_99000000, | ||
| 8562 | + VoidCallback lCallback, | ||
| 8563 | + VoidCallback rCallback}) async { | ||
| 8564 | + // bool isRed = content != '' ? false : true; | ||
| 8565 | + final action = await showDialog( | ||
| 8566 | + context: context, | ||
| 8567 | + barrierDismissible: false, | ||
| 8568 | + builder: (BuildContext context) { | ||
| 8569 | + return StatefulBuilder(builder: (context, state) { | ||
| 8570 | + return Scaffold( | ||
| 8571 | + backgroundColor: Colors.transparent, | ||
| 8572 | + body: Center( | ||
| 8573 | + child: Container( | ||
| 8574 | + padding: EdgeInsets.symmetric( | ||
| 8575 | + horizontal: ScreenUtil().setWidth(50)), | ||
| 8576 | + // height: ScreenUtil().setWidth(421 * 2), | ||
| 8577 | + decoration: BoxDecoration( | ||
| 8578 | + borderRadius: | ||
| 8579 | + BorderRadius.circular(ScreenUtil().setWidth(16))), | ||
| 8580 | + child: SingleChildScrollView( | ||
| 8581 | + child: Card( | ||
| 8582 | + shape: RoundedRectangleBorder( | ||
| 8583 | + borderRadius: BorderRadius.all( | ||
| 8584 | + Radius.circular(ScreenUtil().setWidth(10)))), //设置圆角 | ||
| 8585 | + child: Container( | ||
| 8586 | + // padding: EdgeInsets.symmetric(horizontal: w(20)), | ||
| 8587 | + child: Column( | ||
| 8588 | + mainAxisSize: MainAxisSize.min, | ||
| 8589 | + children: [ | ||
| 8590 | + VEmptyView(64), | ||
| 8591 | + Container( | ||
| 8592 | + alignment: Alignment.center, | ||
| 8593 | + child: Text(title, | ||
| 8594 | + style: TextStyle( | ||
| 8595 | + fontWeight: FontWeight.bold, | ||
| 8596 | + fontSize: ScreenUtil().setSp(32), | ||
| 8597 | + color: MyColours.color_E5000000)), | ||
| 8598 | + ), | ||
| 8599 | + VEmptyView(16), | ||
| 8600 | + Text( | ||
| 8601 | + '您的店铺已过期', | ||
| 8602 | + style: TextStyle( | ||
| 8603 | + fontSize: ScreenUtil().setSp(32), | ||
| 8604 | + color: MyColours.color_E34D59), | ||
| 8605 | + ), | ||
| 8606 | + VEmptyView(24), | ||
| 8607 | + Text( | ||
| 8608 | + '请及时续费或联系您的服务商', | ||
| 8609 | + style: TextStyle( | ||
| 8610 | + fontSize: ScreenUtil().setSp(32), | ||
| 8611 | + color: MyColours.color_515151), | ||
| 8612 | + ), | ||
| 8613 | + // VEmptyView(24), | ||
| 8614 | + // Text( | ||
| 8615 | + // '以免影响您的正常使用', | ||
| 8616 | + // style: TextStyle( | ||
| 8617 | + // fontSize: ScreenUtil().setSp(32), | ||
| 8618 | + // color: MyColours.color_515151), | ||
| 8619 | + // ), | ||
| 8620 | + // VEmptyView(24), | ||
| 8621 | + // Text( | ||
| 8622 | + // '以免影响您的正常使用', | ||
| 8623 | + // style: TextStyle( | ||
| 8624 | + // fontSize: ScreenUtil().setSp(32), | ||
| 8625 | + // color: MyColours.color_515151), | ||
| 8626 | + // ), | ||
| 8627 | + VEmptyView(66), | ||
| 8628 | + MyDivider(double.infinity, ScreenUtil().setWidth(2), | ||
| 8629 | + color: MyColours.color_f3f3f3), | ||
| 8630 | + // RoundButton( | ||
| 8631 | + // text: lTitle, | ||
| 8632 | + // width: (ScreenUtil().screenWidth - | ||
| 8633 | + // ScreenUtil().setWidth(62) * 2), | ||
| 8634 | + // height: ScreenUtil().setWidth(112), | ||
| 8635 | + // // radius: ScreenUtil().setWidth(10), | ||
| 8636 | + // gradientStart: Colors.transparent, | ||
| 8637 | + // gradientEnd: Colors.transparent, | ||
| 8638 | + // textColor: MyColours.color_E6000000, | ||
| 8639 | + // isBold: false, | ||
| 8640 | + // fontSize: 32, | ||
| 8641 | + // onPressed: () { | ||
| 8642 | + // Navigator.pop(context); | ||
| 8643 | + // lCallback(); | ||
| 8644 | + // }), | ||
| 8645 | + Row( | ||
| 8646 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 8647 | + children: [ | ||
| 8648 | + RoundButton( | ||
| 8649 | + text: lTitle, | ||
| 8650 | + width: (ScreenUtil().screenWidth - | ||
| 8651 | + ScreenUtil().setWidth(62) * 2) / | ||
| 8652 | + 2, | ||
| 8653 | + height: ScreenUtil().setWidth(112), | ||
| 8654 | + // radius: ScreenUtil().setWidth(10), | ||
| 8655 | + gradientStart: Colors.transparent, | ||
| 8656 | + gradientEnd: Colors.transparent, | ||
| 8657 | + textColor: MyColours.color_E6000000, | ||
| 8658 | + isBold: false, | ||
| 8659 | + fontSize: 32, | ||
| 8660 | + onPressed: () { | ||
| 8661 | + Navigator.pop(context); | ||
| 8662 | + lCallback(); | ||
| 8663 | + }), | ||
| 8664 | + MyDivider(ScreenUtil().setWidth(2), | ||
| 8665 | + ScreenUtil().setWidth(112), | ||
| 8666 | + color: MyColours.color_f3f3f3), | ||
| 8667 | + RoundButton( | ||
| 8668 | + text: rTitle, | ||
| 8669 | + width: (ScreenUtil().screenWidth - | ||
| 8670 | + ScreenUtil().setWidth(62) * 2) / | ||
| 8671 | + 2, | ||
| 8672 | + height: ScreenUtil().setWidth(112), | ||
| 8673 | + // radius: ScreenUtil().setWidth(10), | ||
| 8674 | + gradientStart: Colors.transparent, | ||
| 8675 | + gradientEnd: Colors.transparent, | ||
| 8676 | + textColor: MyColours.color_438E93, | ||
| 8677 | + fontSize: 32, | ||
| 8678 | + onPressed: () { | ||
| 8679 | + rCallback(); | ||
| 8680 | + Navigator.pop( | ||
| 8681 | + context, | ||
| 8682 | + ); | ||
| 8683 | + }), | ||
| 8684 | + ], | ||
| 8685 | + ) | ||
| 8686 | + ], | ||
| 8687 | + ), | ||
| 8688 | + ), | ||
| 8689 | + )), | ||
| 8690 | + ), | ||
| 8691 | + )); | ||
| 8692 | + }); | ||
| 8693 | + }, | ||
| 8694 | + ); | ||
| 8695 | + } | ||
| 8696 | + | ||
| 8697 | + | ||
| 8698 | + ///店铺临近过期弹窗 | ||
| 8553 | static cupertinoAlertSellerHasEdateDialog(BuildContext context, | 8699 | static cupertinoAlertSellerHasEdateDialog(BuildContext context, |
| 8554 | {String title = "", | 8700 | {String title = "", |
| 8555 | String content = "内容", | 8701 | String content = "内容", |
-
Please register or login to post a comment