|
@@ -16,8 +16,16 @@ import 'package:one_key/models/checkbind_phone_model.dart'; |
|
@@ -16,8 +16,16 @@ import 'package:one_key/models/checkbind_phone_model.dart'; |
|
16
|
import 'package:one_key/models/store_info.dart';
|
16
|
import 'package:one_key/models/store_info.dart';
|
|
17
|
import 'package:one_key/net/dio_util.dart';
|
17
|
import 'package:one_key/net/dio_util.dart';
|
|
18
|
import 'package:one_key/net/http_url.dart';
|
18
|
import 'package:one_key/net/http_url.dart';
|
|
|
|
19
|
+import 'package:one_key/provider/coupon_provider.dart';
|
|
19
|
import 'package:one_key/provider/create_store_model.dart';
|
20
|
import 'package:one_key/provider/create_store_model.dart';
|
|
|
|
21
|
+import 'package:one_key/provider/customer_making_provider.dart';
|
|
|
|
22
|
+import 'package:one_key/provider/message_dialog_model.dart';
|
|
|
|
23
|
+import 'package:one_key/provider/message_model.dart';
|
|
|
|
24
|
+import 'package:one_key/provider/notebook_detail_model.dart';
|
|
|
|
25
|
+import 'package:one_key/provider/order_food_provider.dart';
|
|
20
|
import 'package:one_key/provider/other_login_provider.dart';
|
26
|
import 'package:one_key/provider/other_login_provider.dart';
|
|
|
|
27
|
+import 'package:one_key/provider/remark_manager_model.dart';
|
|
|
|
28
|
+import 'package:one_key/provider/upload_img_provider.dart';
|
|
21
|
import 'package:one_key/provider/user_model.dart';
|
29
|
import 'package:one_key/provider/user_model.dart';
|
|
22
|
import 'package:one_key/res/colors.dart';
|
30
|
import 'package:one_key/res/colors.dart';
|
|
23
|
import 'package:one_key/route/navigate_service.dart';
|
31
|
import 'package:one_key/route/navigate_service.dart';
|
|
@@ -67,8 +75,6 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { |
|
@@ -67,8 +75,6 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { |
|
67
|
// TODO: implement initState
|
75
|
// TODO: implement initState
|
|
68
|
super.initState();
|
76
|
super.initState();
|
|
69
|
|
77
|
|
|
70
|
- _initFluwx();
|
|
|
|
71
|
-
|
|
|
|
72
|
// _initFluwx();
|
78
|
// _initFluwx();
|
|
73
|
isLogin();
|
79
|
isLogin();
|
|
74
|
|
80
|
|
|
@@ -167,18 +173,15 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { |
|
@@ -167,18 +173,15 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { |
|
167
|
NavigatorUtil.goHomePage(context);
|
173
|
NavigatorUtil.goHomePage(context);
|
|
168
|
});
|
174
|
});
|
|
169
|
} else {
|
175
|
} else {
|
|
170
|
- _getWxCode();
|
176
|
+ _checkWechat();
|
|
|
|
177
|
+ _getWxCode();
|
|
171
|
}
|
178
|
}
|
|
172
|
}
|
179
|
}
|
|
173
|
|
180
|
|
|
174
|
///微信登陆
|
181
|
///微信登陆
|
|
175
|
|
182
|
|
|
176
|
_wxLogin() async {
|
183
|
_wxLogin() async {
|
|
177
|
- await initializeDateFormatting();
|
|
|
|
178
|
sendWeChatAuth(scope: "snsapi_userinfo");
|
184
|
sendWeChatAuth(scope: "snsapi_userinfo");
|
|
179
|
- await AmapService.instance.init(
|
|
|
|
180
|
- iosKey: 'e373581528f8fd901c01dfbda236159e',
|
|
|
|
181
|
- androidKey: 'dbced781d0acd36184d5b4b54da7188d');
|
|
|
|
182
|
}
|
185
|
}
|
|
183
|
|
186
|
|
|
184
|
///获取微信登录code
|
187
|
///获取微信登录code
|
|
@@ -264,16 +267,6 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { |
|
@@ -264,16 +267,6 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { |
|
264
|
// }
|
267
|
// }
|
|
265
|
// }
|
268
|
// }
|
|
266
|
|
269
|
|
|
267
|
- initDio() {
|
|
|
|
268
|
- _checkWechat();
|
|
|
|
269
|
- DioUtil.openDebug();
|
|
|
|
270
|
- BaseOptions options = DioUtil.getDefOptions();
|
|
|
|
271
|
- options.baseUrl = HttpUrl.server_address;
|
|
|
|
272
|
- HttpConfig config = new HttpConfig(
|
|
|
|
273
|
- options: options, status: "ret", code: "ret", msg: "msg", data: "data");
|
|
|
|
274
|
- DioUtil().setConfig(config);
|
|
|
|
275
|
- }
|
|
|
|
276
|
-
|
|
|
|
277
|
/*
|
270
|
/*
|
|
278
|
苹果登录获取用户信息
|
271
|
苹果登录获取用户信息
|
|
279
|
*/
|
272
|
*/
|
|
@@ -420,510 +413,510 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { |
|
@@ -420,510 +413,510 @@ class LoginState extends State<LoginPage> with WidgetsBindingObserver { |
|
420
|
final double prefixIconWidth = ScreenUtil().setWidth(24);
|
413
|
final double prefixIconWidth = ScreenUtil().setWidth(24);
|
|
421
|
|
414
|
|
|
422
|
return Scaffold(
|
415
|
return Scaffold(
|
|
423
|
- backgroundColor: MyColours.color_ffffff,
|
|
|
|
424
|
- body: Container(
|
|
|
|
425
|
- width: double.infinity,
|
|
|
|
426
|
- height: double.infinity,
|
|
|
|
427
|
- child: SingleChildScrollView(
|
|
|
|
428
|
- controller: _scrollController,
|
|
|
|
429
|
- child: Column(
|
|
|
|
430
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
431
|
- children: <Widget>[
|
|
|
|
432
|
- // VEmptyView(218 - App.statusBarHeight),
|
|
|
|
433
|
- VEmptyView(80 + App.statusBarHeight),
|
|
|
|
434
|
- Padding(
|
|
|
|
435
|
- padding: EdgeInsets.symmetric(
|
|
|
|
436
|
- horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
437
|
- child: Row(
|
|
|
|
438
|
- mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
439
|
- children: [
|
|
|
|
440
|
- Image.asset(
|
|
|
|
441
|
- "assets/logo.png",
|
|
|
|
442
|
- width: ScreenUtil().setWidth(40 * 2),
|
|
|
|
443
|
- height: ScreenUtil().setWidth(40 * 2),
|
|
|
|
444
|
- )
|
|
|
|
445
|
- ],
|
|
|
|
446
|
- )),
|
|
|
|
447
|
- VEmptyView(120),
|
|
|
|
448
|
- Image.asset(
|
|
|
|
449
|
- Utils.getImgPath('login_bg'),
|
|
|
|
450
|
- ),
|
|
|
|
451
|
- // Container(
|
|
|
|
452
|
- // height: ScreenUtil().setHeight(84),
|
|
|
|
453
|
- // width: ScreenUtil().setWidth(611),
|
|
|
|
454
|
- // padding: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
|
|
|
|
455
|
- // alignment: Alignment.center,
|
|
|
|
456
|
- // decoration: BoxDecoration(
|
|
|
|
457
|
- // border: Border.all(
|
|
|
|
458
|
- // color: MyColours.color_bff6f7,
|
|
|
|
459
|
- // width: ScreenUtil().setWidth(2)),
|
|
|
|
460
|
- // borderRadius:
|
|
|
|
461
|
- // BorderRadius.circular(ScreenUtil().setWidth(8))),
|
|
|
|
462
|
- // child: Row(
|
|
|
|
463
|
- // crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
464
|
- // children: <Widget>[
|
|
|
|
465
|
- // Image.asset(
|
|
|
|
466
|
- // "assets/icon_sellercode.png",
|
|
|
|
467
|
- // width: prefixIconWidth,
|
|
|
|
468
|
- // ),
|
|
|
|
469
|
- // HEmptyView(26),
|
|
|
|
470
|
- // Center(
|
|
|
|
471
|
- // child: Text(
|
|
|
|
472
|
- // "商户编号",
|
|
|
|
473
|
- // style: TextStyle(
|
|
|
|
474
|
- // color: MyColours.color_353535,
|
|
|
|
475
|
- // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
476
|
- // )),
|
|
|
|
477
|
- // Expanded(
|
|
|
|
478
|
- // child: Container(
|
|
|
|
479
|
- // height: ScreenUtil().setHeight(84),
|
|
|
|
480
|
- // padding: EdgeInsets.only(
|
|
|
|
481
|
- // left: ScreenUtil().setWidth(20),
|
|
|
|
482
|
- // right: ScreenUtil().setWidth(20),
|
|
|
|
483
|
- // top: ScreenUtil().setWidth(8)),
|
|
|
|
484
|
- // child: TextField(
|
|
|
|
485
|
- // controller: _sellerCodeController,
|
|
|
|
486
|
- // focusNode: _sellerCodeFocusNode,
|
|
|
|
487
|
- // // autofocus: _sellerCodeController.text.isEmpty,
|
|
|
|
488
|
- // style: TextStyle(
|
|
|
|
489
|
- // color: MyColours.color_353535,
|
|
|
|
490
|
- // fontSize: ScreenUtil().setSp(28),
|
|
|
|
491
|
- // textBaseline: TextBaseline.alphabetic),
|
|
|
|
492
|
- // // textAlignVertical: TextAlignVertical.center,
|
|
|
|
493
|
- // decoration: InputDecoration(
|
|
|
|
494
|
- // hintText: "请输入6位商户编码",
|
|
|
|
495
|
- // hintStyle: TextStyle(
|
|
|
|
496
|
- // color: MyColours.color_c1c1c1,
|
|
|
|
497
|
- // fontSize: ScreenUtil().setSp(28),
|
|
|
|
498
|
- // ),
|
|
|
|
499
|
- // border: OutlineInputBorder(
|
|
|
|
500
|
- // borderSide: BorderSide.none),
|
|
|
|
501
|
- // contentPadding: EdgeInsets.zero,
|
|
|
|
502
|
- // ),
|
|
|
|
503
|
- // onChanged: (_) {
|
|
|
|
504
|
- // setActivate();
|
|
|
|
505
|
- // },
|
|
|
|
506
|
- // keyboardType: TextInputType.number,
|
|
|
|
507
|
- // )),
|
|
|
|
508
|
- // )
|
|
|
|
509
|
- // ],
|
|
|
|
510
|
- // )),
|
|
|
|
511
|
-
|
|
|
|
512
|
- // Container(
|
|
|
|
513
|
- // height: ScreenUtil().setHeight(84),
|
|
|
|
514
|
- // width: ScreenUtil().setWidth(611),
|
|
|
|
515
|
- // padding: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
|
|
|
|
516
|
- // margin: EdgeInsets.only(top: ScreenUtil().setHeight(8)),
|
|
|
|
517
|
- // alignment: Alignment.center,
|
|
|
|
518
|
- // decoration: BoxDecoration(
|
|
|
|
519
|
- // border: Border.all(
|
|
|
|
520
|
- // color: MyColours.color_bff6f7,
|
|
|
|
521
|
- // width: ScreenUtil().setWidth(2)),
|
|
|
|
522
|
- // borderRadius:
|
|
|
|
523
|
- // BorderRadius.circular(ScreenUtil().setWidth(8))),
|
|
|
|
524
|
- // child: Row(
|
|
|
|
525
|
- // crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
526
|
- // children: <Widget>[
|
|
|
|
527
|
- // Image.asset(
|
|
|
|
528
|
- // "assets/icon_account.png",
|
|
|
|
529
|
- // width: prefixIconWidth,
|
|
|
|
530
|
- // ),
|
|
|
|
531
|
- // HEmptyView(26),
|
|
|
|
532
|
- // Text(
|
|
|
|
533
|
- // "工 号",
|
|
|
|
534
|
- // style: TextStyle(
|
|
|
|
535
|
- // color: MyColours.color_353535,
|
|
|
|
536
|
- // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
537
|
- // ),
|
|
|
|
538
|
- // Expanded(
|
|
|
|
539
|
- // child: Container(
|
|
|
|
540
|
- // height: ScreenUtil().setHeight(84),
|
|
|
|
541
|
- // padding: EdgeInsets.only(
|
|
|
|
542
|
- // left: ScreenUtil().setWidth(20),
|
|
|
|
543
|
- // right: ScreenUtil().setWidth(20),
|
|
|
|
544
|
- // top: ScreenUtil().setWidth(8)),
|
|
|
|
545
|
- // child: TextField(
|
|
|
|
546
|
- // controller: _accountController,
|
|
|
|
547
|
- // focusNode: _accountFocusNode,
|
|
|
|
548
|
- // style: TextStyle(
|
|
|
|
549
|
- // color: MyColours.color_353535,
|
|
|
|
550
|
- // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
551
|
- // decoration: InputDecoration(
|
|
|
|
552
|
- // hintText: "请输入4位工号",
|
|
|
|
553
|
- // hintStyle: TextStyle(
|
|
|
|
554
|
- // color: MyColours.color_c1c1c1,
|
|
|
|
555
|
- // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
556
|
- // border: OutlineInputBorder(
|
|
|
|
557
|
- // borderSide: BorderSide.none),
|
|
|
|
558
|
- // contentPadding: EdgeInsets.zero,
|
|
|
|
559
|
- // ),
|
|
|
|
560
|
- // onChanged: (_) {
|
|
|
|
561
|
- // setActivate();
|
|
|
|
562
|
- // },
|
|
|
|
563
|
- // keyboardType: TextInputType.number,
|
|
|
|
564
|
- // ),
|
|
|
|
565
|
- // ))
|
|
|
|
566
|
- // ],
|
|
|
|
567
|
- // )),
|
|
|
|
568
|
- // Container(
|
|
|
|
569
|
- // height: ScreenUtil().setHeight(84),
|
|
|
|
570
|
- // width: ScreenUtil().setWidth(611),
|
|
|
|
571
|
- // padding: EdgeInsets.only(
|
|
|
|
572
|
- // left: ScreenUtil().setWidth(20),
|
|
|
|
573
|
- // right: ScreenUtil().setWidth(27)),
|
|
|
|
574
|
- // margin: EdgeInsets.only(top: ScreenUtil().setHeight(8)),
|
|
|
|
575
|
- // alignment: Alignment.center,
|
|
|
|
576
|
- // decoration: BoxDecoration(
|
|
|
|
577
|
- // border: Border.all(
|
|
|
|
578
|
- // color: MyColours.color_bff6f7,
|
|
|
|
579
|
- // width: ScreenUtil().setWidth(2)),
|
|
|
|
580
|
- // borderRadius:
|
|
|
|
581
|
- // BorderRadius.circular(ScreenUtil().setWidth(8))),
|
|
|
|
582
|
- // child: Row(
|
|
|
|
583
|
- // crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
584
|
- // children: <Widget>[
|
|
|
|
585
|
- // Image.asset(
|
|
|
|
586
|
- // "assets/icon_pwd.png",
|
|
|
|
587
|
- // width: prefixIconWidth,
|
|
|
|
588
|
- // ),
|
|
|
|
589
|
- // HEmptyView(26),
|
|
|
|
590
|
- // Text(
|
|
|
|
591
|
- // "密 码",
|
|
|
|
592
|
- // style: TextStyle(
|
|
|
|
593
|
- // color: MyColours.color_353535,
|
|
|
|
594
|
- // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
595
|
- // ),
|
|
|
|
596
|
- // Expanded(
|
|
|
|
597
|
- // child: Container(
|
|
|
|
598
|
- // height: ScreenUtil().setHeight(84),
|
|
|
|
599
|
- // padding: EdgeInsets.only(
|
|
|
|
600
|
- // left: ScreenUtil().setWidth(20),
|
|
|
|
601
|
- // right: ScreenUtil().setWidth(20),
|
|
|
|
602
|
- // top: ScreenUtil().setWidth(8)),
|
|
|
|
603
|
- // child: TextField(
|
|
|
|
604
|
- // controller: _pwdController,
|
|
|
|
605
|
- // focusNode: _pwdFocusNode,
|
|
|
|
606
|
- // // autofocus: _sellerCodeController.text.isNotEmpty &&
|
|
|
|
607
|
- // // _accountController.text.isNotEmpty &&
|
|
|
|
608
|
- // // _pwdController.text.isEmpty,
|
|
|
|
609
|
- // style: TextStyle(
|
|
|
|
610
|
- // color: MyColours.color_353535,
|
|
|
|
611
|
- // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
612
|
- // decoration: InputDecoration(
|
|
|
|
613
|
- // hintText: "请输入密码",
|
|
|
|
614
|
- // hintStyle: TextStyle(
|
|
|
|
615
|
- // color: MyColours.color_c1c1c1,
|
|
|
|
616
|
- // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
617
|
- // border: OutlineInputBorder(
|
|
|
|
618
|
- // borderSide: BorderSide.none),
|
|
|
|
619
|
- // contentPadding: EdgeInsets.zero,
|
|
|
|
620
|
- // ),
|
|
|
|
621
|
- // onChanged: (_) {
|
|
|
|
622
|
- // setActivate();
|
|
|
|
623
|
- // },
|
|
|
|
624
|
- // obscureText: obscureText,
|
|
|
|
625
|
- // keyboardType: TextInputType.text,
|
|
|
|
626
|
- // )),
|
|
|
|
627
|
- // ),
|
|
|
|
628
|
- // GestureDetector(
|
|
|
|
629
|
- // child: Padding(
|
|
|
|
630
|
- // padding: EdgeInsets.all(ScreenUtil().setWidth(10)),
|
|
|
|
631
|
- // child: Image.asset(
|
|
|
|
632
|
- // obscureText
|
|
|
|
633
|
- // ? "assets/icon_pwd_show.png"
|
|
|
|
634
|
- // : "assets/icon_pwd_hide.png",
|
|
|
|
635
|
- // width: ScreenUtil().setWidth(35),
|
|
|
|
636
|
- // height: ScreenUtil().setHeight(24),
|
|
|
|
637
|
- // ),
|
|
|
|
638
|
- // ),
|
|
|
|
639
|
- // onTap: () {
|
|
|
|
640
|
- // setState(() {
|
|
|
|
641
|
- // obscureText = !obscureText;
|
|
|
|
642
|
- // });
|
|
|
|
643
|
- // },
|
|
|
|
644
|
- // )
|
|
|
|
645
|
- // ],
|
|
|
|
646
|
- // )),
|
|
|
|
647
|
-
|
|
|
|
648
|
- // Container(
|
|
|
|
649
|
- // width: ScreenUtil().setWidth(611),
|
|
|
|
650
|
- // margin: EdgeInsets.only(top: ScreenUtil().setHeight(16)),
|
|
|
|
651
|
- // alignment: Alignment.centerLeft,
|
|
|
|
652
|
- // child: Text(
|
|
|
|
653
|
- // errorText,
|
|
|
|
654
|
- // // 'hfhfhf',
|
|
|
|
655
|
- // style: TextStyle(
|
|
|
|
656
|
- // color: MyColours.color_d93535,
|
|
|
|
657
|
- // fontSize: ScreenUtil().setSp(16)),
|
|
|
|
658
|
- // ),
|
|
|
|
659
|
- // ),
|
|
|
|
660
|
- VEmptyView(60),
|
|
|
|
661
|
- // Consumer<UserModel>(
|
|
|
|
662
|
- // builder:
|
|
|
|
663
|
- // (BuildContext context, UserModel value, Widget child) {
|
|
|
|
664
|
- // return GestureDetector(
|
|
|
|
665
|
- // onTap: () {
|
|
|
|
666
|
- // if (!isActivate) return;
|
|
|
|
667
|
- // if (!_check) {
|
|
|
|
668
|
- // Utils.showToast('请先仔细阅读并同意协议');
|
|
|
|
669
|
- // return;
|
|
|
|
670
|
- // }
|
|
|
|
671
|
- // if (App.sp.containsKey('unionid')) {
|
|
|
|
672
|
- // //微信登陆的时候,退出清空数据
|
|
|
|
673
|
- // App.sp.remove('openid');
|
|
|
|
674
|
- // App.sp.remove("unionid");
|
|
|
|
675
|
- // }
|
|
|
|
676
|
- // Map<String, String> params = {
|
|
|
|
677
|
- // "seller_code": "${_sellerCodeController.text}",
|
|
|
|
678
|
- // "alias": "ssahdahgdafgahjkhakjgh",
|
|
|
|
679
|
- // "account": "${_accountController.text}",
|
|
|
|
680
|
- // "password": "${_pwdController.text}"
|
|
|
|
681
|
- // };
|
|
|
|
682
|
- // value.login(context, params).then((value) {
|
|
|
|
683
|
- // setState(() {
|
|
|
|
684
|
- // errorText = value ?? "";
|
|
|
|
685
|
- // });
|
|
|
|
686
|
- // });
|
|
|
|
687
|
- // },
|
|
|
|
688
|
- // child: Container(
|
|
|
|
689
|
- // height: ScreenUtil().setWidth(84),
|
|
|
|
690
|
- // width: ScreenUtil().setWidth(611),
|
|
|
|
691
|
- // alignment: Alignment.center,
|
|
|
|
692
|
- // decoration: BoxDecoration(
|
|
|
|
693
|
- // color: isActivate
|
|
|
|
694
|
- // ? MyColours.color_2bb5b7
|
|
|
|
695
|
- // : MyColours.color_2bb5b7,
|
|
|
|
696
|
- // boxShadow: [
|
|
|
|
697
|
- // BoxShadow(
|
|
|
|
698
|
- // color: MyColours.color_26000000,
|
|
|
|
699
|
- // offset: Offset(0, ScreenUtil().setWidth(4)),
|
|
|
|
700
|
- // )
|
|
|
|
701
|
- // ],
|
|
|
|
702
|
- // borderRadius: BorderRadius.all(
|
|
|
|
703
|
- // Radius.circular(ScreenUtil().setWidth(8)))),
|
|
|
|
704
|
- // child: Text(
|
|
|
|
705
|
- // "登录",
|
|
|
|
706
|
- // style: TextStyle(
|
|
|
|
707
|
- // color: MyColours.color_ffffff,
|
|
|
|
708
|
- // fontSize: ScreenUtil().setSp(34)),
|
|
|
|
709
|
- // ),
|
|
|
|
710
|
- // ),
|
|
|
|
711
|
- // );
|
|
|
|
712
|
- // },
|
|
|
|
713
|
- // ),
|
|
|
|
714
|
-
|
|
|
|
715
|
- Row(
|
|
|
|
716
|
- // mainAxisSize: MainAxisSize.min,
|
|
|
|
717
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
416
|
+ backgroundColor: MyColours.color_ffffff,
|
|
|
|
417
|
+ body: Container(
|
|
|
|
418
|
+ width: double.infinity,
|
|
|
|
419
|
+ height: double.infinity,
|
|
|
|
420
|
+ child: SingleChildScrollView(
|
|
|
|
421
|
+ controller: _scrollController,
|
|
|
|
422
|
+ child: Column(
|
|
|
|
423
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
718
|
children: <Widget>[
|
424
|
children: <Widget>[
|
|
719
|
- InkWell(
|
|
|
|
720
|
- onTap: () {
|
|
|
|
721
|
- setState(() {
|
|
|
|
722
|
- _check = !_check;
|
|
|
|
723
|
- });
|
|
|
|
724
|
- if (_check) {
|
|
|
|
725
|
- initDio();
|
|
|
|
726
|
- }
|
|
|
|
727
|
- },
|
|
|
|
728
|
- child: Container(
|
|
|
|
729
|
- alignment: Alignment.topCenter,
|
|
|
|
730
|
- // color: Colors.red,
|
|
|
|
731
|
- height: ScreenUtil().setWidth(110),
|
|
|
|
732
|
- padding: EdgeInsets.only(
|
|
|
|
733
|
- right: ScreenUtil().setWidth(30),
|
|
|
|
734
|
- left: ScreenUtil().setWidth(102),
|
|
|
|
735
|
- bottom: ScreenUtil().setWidth(10)),
|
|
|
|
736
|
- child: Image.asset(
|
|
|
|
737
|
- _check
|
|
|
|
738
|
- ? "assets/mine_radio_sel.png"
|
|
|
|
739
|
- : "assets/mine_radio_nor.png",
|
|
|
|
740
|
- width: ScreenUtil().setWidth(26),
|
|
|
|
741
|
- height: ScreenUtil().setWidth(26)),
|
|
|
|
742
|
- )),
|
|
|
|
743
|
- // HEmptyView(30),
|
425
|
+ // VEmptyView(218 - App.statusBarHeight),
|
|
|
|
426
|
+ VEmptyView(80 + App.statusBarHeight),
|
|
744
|
Padding(
|
427
|
Padding(
|
|
745
|
- padding: EdgeInsets.only(top: ScreenUtil().setWidth(2)),
|
|
|
|
746
|
- child: Text(
|
|
|
|
747
|
- '已阅读并同意',
|
|
|
|
748
|
- style: TextStyle(
|
|
|
|
749
|
- fontSize: ScreenUtil().setSp(24),
|
|
|
|
750
|
- color: MyColours.color_999999),
|
|
|
|
751
|
- ),
|
428
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
429
|
+ horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
430
|
+ child: Row(
|
|
|
|
431
|
+ mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
432
|
+ children: [
|
|
|
|
433
|
+ Image.asset(
|
|
|
|
434
|
+ "assets/logo.png",
|
|
|
|
435
|
+ width: ScreenUtil().setWidth(40 * 2),
|
|
|
|
436
|
+ height: ScreenUtil().setWidth(40 * 2),
|
|
|
|
437
|
+ )
|
|
|
|
438
|
+ ],
|
|
|
|
439
|
+ )),
|
|
|
|
440
|
+ VEmptyView(120),
|
|
|
|
441
|
+ Image.asset(
|
|
|
|
442
|
+ Utils.getImgPath('login_bg'),
|
|
752
|
),
|
443
|
),
|
|
753
|
- InkWell(
|
|
|
|
754
|
- onTap: () {
|
|
|
|
755
|
- NavigatorUtil.goWebPage(context, '软件服务协议', "xy");
|
|
|
|
756
|
- },
|
|
|
|
757
|
- child: Padding(
|
444
|
+ // Container(
|
|
|
|
445
|
+ // height: ScreenUtil().setHeight(84),
|
|
|
|
446
|
+ // width: ScreenUtil().setWidth(611),
|
|
|
|
447
|
+ // padding: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
|
|
|
|
448
|
+ // alignment: Alignment.center,
|
|
|
|
449
|
+ // decoration: BoxDecoration(
|
|
|
|
450
|
+ // border: Border.all(
|
|
|
|
451
|
+ // color: MyColours.color_bff6f7,
|
|
|
|
452
|
+ // width: ScreenUtil().setWidth(2)),
|
|
|
|
453
|
+ // borderRadius:
|
|
|
|
454
|
+ // BorderRadius.circular(ScreenUtil().setWidth(8))),
|
|
|
|
455
|
+ // child: Row(
|
|
|
|
456
|
+ // crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
457
|
+ // children: <Widget>[
|
|
|
|
458
|
+ // Image.asset(
|
|
|
|
459
|
+ // "assets/icon_sellercode.png",
|
|
|
|
460
|
+ // width: prefixIconWidth,
|
|
|
|
461
|
+ // ),
|
|
|
|
462
|
+ // HEmptyView(26),
|
|
|
|
463
|
+ // Center(
|
|
|
|
464
|
+ // child: Text(
|
|
|
|
465
|
+ // "商户编号",
|
|
|
|
466
|
+ // style: TextStyle(
|
|
|
|
467
|
+ // color: MyColours.color_353535,
|
|
|
|
468
|
+ // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
469
|
+ // )),
|
|
|
|
470
|
+ // Expanded(
|
|
|
|
471
|
+ // child: Container(
|
|
|
|
472
|
+ // height: ScreenUtil().setHeight(84),
|
|
|
|
473
|
+ // padding: EdgeInsets.only(
|
|
|
|
474
|
+ // left: ScreenUtil().setWidth(20),
|
|
|
|
475
|
+ // right: ScreenUtil().setWidth(20),
|
|
|
|
476
|
+ // top: ScreenUtil().setWidth(8)),
|
|
|
|
477
|
+ // child: TextField(
|
|
|
|
478
|
+ // controller: _sellerCodeController,
|
|
|
|
479
|
+ // focusNode: _sellerCodeFocusNode,
|
|
|
|
480
|
+ // // autofocus: _sellerCodeController.text.isEmpty,
|
|
|
|
481
|
+ // style: TextStyle(
|
|
|
|
482
|
+ // color: MyColours.color_353535,
|
|
|
|
483
|
+ // fontSize: ScreenUtil().setSp(28),
|
|
|
|
484
|
+ // textBaseline: TextBaseline.alphabetic),
|
|
|
|
485
|
+ // // textAlignVertical: TextAlignVertical.center,
|
|
|
|
486
|
+ // decoration: InputDecoration(
|
|
|
|
487
|
+ // hintText: "请输入6位商户编码",
|
|
|
|
488
|
+ // hintStyle: TextStyle(
|
|
|
|
489
|
+ // color: MyColours.color_c1c1c1,
|
|
|
|
490
|
+ // fontSize: ScreenUtil().setSp(28),
|
|
|
|
491
|
+ // ),
|
|
|
|
492
|
+ // border: OutlineInputBorder(
|
|
|
|
493
|
+ // borderSide: BorderSide.none),
|
|
|
|
494
|
+ // contentPadding: EdgeInsets.zero,
|
|
|
|
495
|
+ // ),
|
|
|
|
496
|
+ // onChanged: (_) {
|
|
|
|
497
|
+ // setActivate();
|
|
|
|
498
|
+ // },
|
|
|
|
499
|
+ // keyboardType: TextInputType.number,
|
|
|
|
500
|
+ // )),
|
|
|
|
501
|
+ // )
|
|
|
|
502
|
+ // ],
|
|
|
|
503
|
+ // )),
|
|
|
|
504
|
+
|
|
|
|
505
|
+ // Container(
|
|
|
|
506
|
+ // height: ScreenUtil().setHeight(84),
|
|
|
|
507
|
+ // width: ScreenUtil().setWidth(611),
|
|
|
|
508
|
+ // padding: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
|
|
|
|
509
|
+ // margin: EdgeInsets.only(top: ScreenUtil().setHeight(8)),
|
|
|
|
510
|
+ // alignment: Alignment.center,
|
|
|
|
511
|
+ // decoration: BoxDecoration(
|
|
|
|
512
|
+ // border: Border.all(
|
|
|
|
513
|
+ // color: MyColours.color_bff6f7,
|
|
|
|
514
|
+ // width: ScreenUtil().setWidth(2)),
|
|
|
|
515
|
+ // borderRadius:
|
|
|
|
516
|
+ // BorderRadius.circular(ScreenUtil().setWidth(8))),
|
|
|
|
517
|
+ // child: Row(
|
|
|
|
518
|
+ // crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
519
|
+ // children: <Widget>[
|
|
|
|
520
|
+ // Image.asset(
|
|
|
|
521
|
+ // "assets/icon_account.png",
|
|
|
|
522
|
+ // width: prefixIconWidth,
|
|
|
|
523
|
+ // ),
|
|
|
|
524
|
+ // HEmptyView(26),
|
|
|
|
525
|
+ // Text(
|
|
|
|
526
|
+ // "工 号",
|
|
|
|
527
|
+ // style: TextStyle(
|
|
|
|
528
|
+ // color: MyColours.color_353535,
|
|
|
|
529
|
+ // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
530
|
+ // ),
|
|
|
|
531
|
+ // Expanded(
|
|
|
|
532
|
+ // child: Container(
|
|
|
|
533
|
+ // height: ScreenUtil().setHeight(84),
|
|
|
|
534
|
+ // padding: EdgeInsets.only(
|
|
|
|
535
|
+ // left: ScreenUtil().setWidth(20),
|
|
|
|
536
|
+ // right: ScreenUtil().setWidth(20),
|
|
|
|
537
|
+ // top: ScreenUtil().setWidth(8)),
|
|
|
|
538
|
+ // child: TextField(
|
|
|
|
539
|
+ // controller: _accountController,
|
|
|
|
540
|
+ // focusNode: _accountFocusNode,
|
|
|
|
541
|
+ // style: TextStyle(
|
|
|
|
542
|
+ // color: MyColours.color_353535,
|
|
|
|
543
|
+ // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
544
|
+ // decoration: InputDecoration(
|
|
|
|
545
|
+ // hintText: "请输入4位工号",
|
|
|
|
546
|
+ // hintStyle: TextStyle(
|
|
|
|
547
|
+ // color: MyColours.color_c1c1c1,
|
|
|
|
548
|
+ // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
549
|
+ // border: OutlineInputBorder(
|
|
|
|
550
|
+ // borderSide: BorderSide.none),
|
|
|
|
551
|
+ // contentPadding: EdgeInsets.zero,
|
|
|
|
552
|
+ // ),
|
|
|
|
553
|
+ // onChanged: (_) {
|
|
|
|
554
|
+ // setActivate();
|
|
|
|
555
|
+ // },
|
|
|
|
556
|
+ // keyboardType: TextInputType.number,
|
|
|
|
557
|
+ // ),
|
|
|
|
558
|
+ // ))
|
|
|
|
559
|
+ // ],
|
|
|
|
560
|
+ // )),
|
|
|
|
561
|
+ // Container(
|
|
|
|
562
|
+ // height: ScreenUtil().setHeight(84),
|
|
|
|
563
|
+ // width: ScreenUtil().setWidth(611),
|
|
|
|
564
|
+ // padding: EdgeInsets.only(
|
|
|
|
565
|
+ // left: ScreenUtil().setWidth(20),
|
|
|
|
566
|
+ // right: ScreenUtil().setWidth(27)),
|
|
|
|
567
|
+ // margin: EdgeInsets.only(top: ScreenUtil().setHeight(8)),
|
|
|
|
568
|
+ // alignment: Alignment.center,
|
|
|
|
569
|
+ // decoration: BoxDecoration(
|
|
|
|
570
|
+ // border: Border.all(
|
|
|
|
571
|
+ // color: MyColours.color_bff6f7,
|
|
|
|
572
|
+ // width: ScreenUtil().setWidth(2)),
|
|
|
|
573
|
+ // borderRadius:
|
|
|
|
574
|
+ // BorderRadius.circular(ScreenUtil().setWidth(8))),
|
|
|
|
575
|
+ // child: Row(
|
|
|
|
576
|
+ // crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
577
|
+ // children: <Widget>[
|
|
|
|
578
|
+ // Image.asset(
|
|
|
|
579
|
+ // "assets/icon_pwd.png",
|
|
|
|
580
|
+ // width: prefixIconWidth,
|
|
|
|
581
|
+ // ),
|
|
|
|
582
|
+ // HEmptyView(26),
|
|
|
|
583
|
+ // Text(
|
|
|
|
584
|
+ // "密 码",
|
|
|
|
585
|
+ // style: TextStyle(
|
|
|
|
586
|
+ // color: MyColours.color_353535,
|
|
|
|
587
|
+ // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
588
|
+ // ),
|
|
|
|
589
|
+ // Expanded(
|
|
|
|
590
|
+ // child: Container(
|
|
|
|
591
|
+ // height: ScreenUtil().setHeight(84),
|
|
|
|
592
|
+ // padding: EdgeInsets.only(
|
|
|
|
593
|
+ // left: ScreenUtil().setWidth(20),
|
|
|
|
594
|
+ // right: ScreenUtil().setWidth(20),
|
|
|
|
595
|
+ // top: ScreenUtil().setWidth(8)),
|
|
|
|
596
|
+ // child: TextField(
|
|
|
|
597
|
+ // controller: _pwdController,
|
|
|
|
598
|
+ // focusNode: _pwdFocusNode,
|
|
|
|
599
|
+ // // autofocus: _sellerCodeController.text.isNotEmpty &&
|
|
|
|
600
|
+ // // _accountController.text.isNotEmpty &&
|
|
|
|
601
|
+ // // _pwdController.text.isEmpty,
|
|
|
|
602
|
+ // style: TextStyle(
|
|
|
|
603
|
+ // color: MyColours.color_353535,
|
|
|
|
604
|
+ // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
605
|
+ // decoration: InputDecoration(
|
|
|
|
606
|
+ // hintText: "请输入密码",
|
|
|
|
607
|
+ // hintStyle: TextStyle(
|
|
|
|
608
|
+ // color: MyColours.color_c1c1c1,
|
|
|
|
609
|
+ // fontSize: ScreenUtil().setSp(28)),
|
|
|
|
610
|
+ // border: OutlineInputBorder(
|
|
|
|
611
|
+ // borderSide: BorderSide.none),
|
|
|
|
612
|
+ // contentPadding: EdgeInsets.zero,
|
|
|
|
613
|
+ // ),
|
|
|
|
614
|
+ // onChanged: (_) {
|
|
|
|
615
|
+ // setActivate();
|
|
|
|
616
|
+ // },
|
|
|
|
617
|
+ // obscureText: obscureText,
|
|
|
|
618
|
+ // keyboardType: TextInputType.text,
|
|
|
|
619
|
+ // )),
|
|
|
|
620
|
+ // ),
|
|
|
|
621
|
+ // GestureDetector(
|
|
|
|
622
|
+ // child: Padding(
|
|
|
|
623
|
+ // padding: EdgeInsets.all(ScreenUtil().setWidth(10)),
|
|
|
|
624
|
+ // child: Image.asset(
|
|
|
|
625
|
+ // obscureText
|
|
|
|
626
|
+ // ? "assets/icon_pwd_show.png"
|
|
|
|
627
|
+ // : "assets/icon_pwd_hide.png",
|
|
|
|
628
|
+ // width: ScreenUtil().setWidth(35),
|
|
|
|
629
|
+ // height: ScreenUtil().setHeight(24),
|
|
|
|
630
|
+ // ),
|
|
|
|
631
|
+ // ),
|
|
|
|
632
|
+ // onTap: () {
|
|
|
|
633
|
+ // setState(() {
|
|
|
|
634
|
+ // obscureText = !obscureText;
|
|
|
|
635
|
+ // });
|
|
|
|
636
|
+ // },
|
|
|
|
637
|
+ // )
|
|
|
|
638
|
+ // ],
|
|
|
|
639
|
+ // )),
|
|
|
|
640
|
+
|
|
|
|
641
|
+ // Container(
|
|
|
|
642
|
+ // width: ScreenUtil().setWidth(611),
|
|
|
|
643
|
+ // margin: EdgeInsets.only(top: ScreenUtil().setHeight(16)),
|
|
|
|
644
|
+ // alignment: Alignment.centerLeft,
|
|
|
|
645
|
+ // child: Text(
|
|
|
|
646
|
+ // errorText,
|
|
|
|
647
|
+ // // 'hfhfhf',
|
|
|
|
648
|
+ // style: TextStyle(
|
|
|
|
649
|
+ // color: MyColours.color_d93535,
|
|
|
|
650
|
+ // fontSize: ScreenUtil().setSp(16)),
|
|
|
|
651
|
+ // ),
|
|
|
|
652
|
+ // ),
|
|
|
|
653
|
+ VEmptyView(60),
|
|
|
|
654
|
+ // Consumer<UserModel>(
|
|
|
|
655
|
+ // builder:
|
|
|
|
656
|
+ // (BuildContext context, UserModel value, Widget child) {
|
|
|
|
657
|
+ // return GestureDetector(
|
|
|
|
658
|
+ // onTap: () {
|
|
|
|
659
|
+ // if (!isActivate) return;
|
|
|
|
660
|
+ // if (!_check) {
|
|
|
|
661
|
+ // Utils.showToast('请先仔细阅读并同意协议');
|
|
|
|
662
|
+ // return;
|
|
|
|
663
|
+ // }
|
|
|
|
664
|
+ // if (App.sp.containsKey('unionid')) {
|
|
|
|
665
|
+ // //微信登陆的时候,退出清空数据
|
|
|
|
666
|
+ // App.sp.remove('openid');
|
|
|
|
667
|
+ // App.sp.remove("unionid");
|
|
|
|
668
|
+ // }
|
|
|
|
669
|
+ // Map<String, String> params = {
|
|
|
|
670
|
+ // "seller_code": "${_sellerCodeController.text}",
|
|
|
|
671
|
+ // "alias": "ssahdahgdafgahjkhakjgh",
|
|
|
|
672
|
+ // "account": "${_accountController.text}",
|
|
|
|
673
|
+ // "password": "${_pwdController.text}"
|
|
|
|
674
|
+ // };
|
|
|
|
675
|
+ // value.login(context, params).then((value) {
|
|
|
|
676
|
+ // setState(() {
|
|
|
|
677
|
+ // errorText = value ?? "";
|
|
|
|
678
|
+ // });
|
|
|
|
679
|
+ // });
|
|
|
|
680
|
+ // },
|
|
|
|
681
|
+ // child: Container(
|
|
|
|
682
|
+ // height: ScreenUtil().setWidth(84),
|
|
|
|
683
|
+ // width: ScreenUtil().setWidth(611),
|
|
|
|
684
|
+ // alignment: Alignment.center,
|
|
|
|
685
|
+ // decoration: BoxDecoration(
|
|
|
|
686
|
+ // color: isActivate
|
|
|
|
687
|
+ // ? MyColours.color_2bb5b7
|
|
|
|
688
|
+ // : MyColours.color_2bb5b7,
|
|
|
|
689
|
+ // boxShadow: [
|
|
|
|
690
|
+ // BoxShadow(
|
|
|
|
691
|
+ // color: MyColours.color_26000000,
|
|
|
|
692
|
+ // offset: Offset(0, ScreenUtil().setWidth(4)),
|
|
|
|
693
|
+ // )
|
|
|
|
694
|
+ // ],
|
|
|
|
695
|
+ // borderRadius: BorderRadius.all(
|
|
|
|
696
|
+ // Radius.circular(ScreenUtil().setWidth(8)))),
|
|
|
|
697
|
+ // child: Text(
|
|
|
|
698
|
+ // "登录",
|
|
|
|
699
|
+ // style: TextStyle(
|
|
|
|
700
|
+ // color: MyColours.color_ffffff,
|
|
|
|
701
|
+ // fontSize: ScreenUtil().setSp(34)),
|
|
|
|
702
|
+ // ),
|
|
|
|
703
|
+ // ),
|
|
|
|
704
|
+ // );
|
|
|
|
705
|
+ // },
|
|
|
|
706
|
+ // ),
|
|
|
|
707
|
+
|
|
|
|
708
|
+ Row(
|
|
|
|
709
|
+ // mainAxisSize: MainAxisSize.min,
|
|
|
|
710
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
711
|
+ children: <Widget>[
|
|
|
|
712
|
+ InkWell(
|
|
|
|
713
|
+ onTap: () {
|
|
|
|
714
|
+ setState(() {
|
|
|
|
715
|
+ _check = !_check;
|
|
|
|
716
|
+ });
|
|
|
|
717
|
+ },
|
|
|
|
718
|
+ child: Container(
|
|
|
|
719
|
+ alignment: Alignment.topCenter,
|
|
|
|
720
|
+ // color: Colors.red,
|
|
|
|
721
|
+ height: ScreenUtil().setWidth(110),
|
|
|
|
722
|
+ padding: EdgeInsets.only(
|
|
|
|
723
|
+ right: ScreenUtil().setWidth(30),
|
|
|
|
724
|
+ left: ScreenUtil().setWidth(102),
|
|
|
|
725
|
+ bottom: ScreenUtil().setWidth(10)),
|
|
|
|
726
|
+ child: Image.asset(
|
|
|
|
727
|
+ _check
|
|
|
|
728
|
+ ? "assets/mine_radio_sel.png"
|
|
|
|
729
|
+ : "assets/mine_radio_nor.png",
|
|
|
|
730
|
+ width: ScreenUtil().setWidth(26),
|
|
|
|
731
|
+ height: ScreenUtil().setWidth(26)),
|
|
|
|
732
|
+ )),
|
|
|
|
733
|
+ // HEmptyView(30),
|
|
|
|
734
|
+ Padding(
|
|
758
|
padding:
|
735
|
padding:
|
|
759
|
EdgeInsets.only(top: ScreenUtil().setWidth(2)),
|
736
|
EdgeInsets.only(top: ScreenUtil().setWidth(2)),
|
|
760
|
child: Text(
|
737
|
child: Text(
|
|
761
|
- '《软件服务协议》',
|
738
|
+ '已阅读并同意',
|
|
762
|
style: TextStyle(
|
739
|
style: TextStyle(
|
|
763
|
fontSize: ScreenUtil().setSp(24),
|
740
|
fontSize: ScreenUtil().setSp(24),
|
|
764
|
- color: MyColours.color_333333),
|
|
|
|
765
|
- )),
|
741
|
+ color: MyColours.color_999999),
|
|
|
|
742
|
+ ),
|
|
|
|
743
|
+ ),
|
|
|
|
744
|
+ InkWell(
|
|
|
|
745
|
+ onTap: () {
|
|
|
|
746
|
+ NavigatorUtil.goWebPage(context, '软件服务协议', "xy");
|
|
|
|
747
|
+ },
|
|
|
|
748
|
+ child: Padding(
|
|
|
|
749
|
+ padding: EdgeInsets.only(
|
|
|
|
750
|
+ top: ScreenUtil().setWidth(2)),
|
|
|
|
751
|
+ child: Text(
|
|
|
|
752
|
+ '《软件服务协议》',
|
|
|
|
753
|
+ style: TextStyle(
|
|
|
|
754
|
+ fontSize: ScreenUtil().setSp(24),
|
|
|
|
755
|
+ color: MyColours.color_333333),
|
|
|
|
756
|
+ )),
|
|
|
|
757
|
+ ),
|
|
|
|
758
|
+ Padding(
|
|
|
|
759
|
+ padding:
|
|
|
|
760
|
+ EdgeInsets.only(top: ScreenUtil().setWidth(2)),
|
|
|
|
761
|
+ child: Text('及',
|
|
|
|
762
|
+ style: TextStyle(
|
|
|
|
763
|
+ fontSize: ScreenUtil().setSp(24),
|
|
|
|
764
|
+ color: MyColours.color_999999))),
|
|
|
|
765
|
+ InkWell(
|
|
|
|
766
|
+ onTap: () {
|
|
|
|
767
|
+ NavigatorUtil.goWebPage(context, '隐私政策', "zc");
|
|
|
|
768
|
+ },
|
|
|
|
769
|
+ child: Padding(
|
|
|
|
770
|
+ padding: EdgeInsets.only(
|
|
|
|
771
|
+ top: ScreenUtil().setWidth(2)),
|
|
|
|
772
|
+ child: Text('《隐私政策》',
|
|
|
|
773
|
+ style: TextStyle(
|
|
|
|
774
|
+ fontSize: ScreenUtil().setSp(24),
|
|
|
|
775
|
+ color: MyColours.color_333333))),
|
|
|
|
776
|
+ )
|
|
|
|
777
|
+ ],
|
|
766
|
),
|
778
|
),
|
|
767
|
- Padding(
|
|
|
|
768
|
- padding: EdgeInsets.only(top: ScreenUtil().setWidth(2)),
|
|
|
|
769
|
- child: Text('及',
|
|
|
|
770
|
- style: TextStyle(
|
|
|
|
771
|
- fontSize: ScreenUtil().setSp(24),
|
|
|
|
772
|
- color: MyColours.color_999999))),
|
|
|
|
773
|
- InkWell(
|
|
|
|
774
|
- onTap: () {
|
|
|
|
775
|
- NavigatorUtil.goWebPage(context, '隐私政策', "zc");
|
|
|
|
776
|
- },
|
|
|
|
777
|
- child: Padding(
|
|
|
|
778
|
- padding:
|
|
|
|
779
|
- EdgeInsets.only(top: ScreenUtil().setWidth(2)),
|
|
|
|
780
|
- child: Text('《隐私政策》',
|
|
|
|
781
|
- style: TextStyle(
|
|
|
|
782
|
- fontSize: ScreenUtil().setSp(24),
|
|
|
|
783
|
- color: MyColours.color_333333))),
|
|
|
|
784
|
- )
|
|
|
|
785
|
- ],
|
|
|
|
786
|
- ),
|
|
|
|
787
|
|
779
|
|
|
788
|
- //微信登录
|
|
|
|
789
|
- Offstage(
|
|
|
|
790
|
- offstage: !App.isInstallWx,
|
|
|
|
791
|
- child: InkWell(
|
|
|
|
792
|
- child: Container(
|
|
|
|
793
|
- width: double.infinity,
|
|
|
|
794
|
- height: ScreenUtil().setWidth(90),
|
|
|
|
795
|
- margin: EdgeInsets.only(
|
|
|
|
796
|
- bottom: ScreenUtil().setWidth(30),
|
|
|
|
797
|
- right: ScreenUtil().setWidth(80),
|
|
|
|
798
|
- left: ScreenUtil().setWidth(80)),
|
|
|
|
799
|
- decoration: BoxDecoration(
|
|
|
|
800
|
- color: MyColours.color_55AA67,
|
|
|
|
801
|
- borderRadius: BorderRadius.circular(
|
|
|
|
802
|
- ScreenUtil().setWidth(8))),
|
|
|
|
803
|
- child: Row(
|
|
|
|
804
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
805
|
- children: [
|
|
|
|
806
|
- Image.asset(Utils.getImgPath('icon_wechat_login'),
|
|
|
|
807
|
- width: ScreenUtil().setWidth(46)),
|
|
|
|
808
|
- HEmptyView(20),
|
|
|
|
809
|
- Text('微信登录',
|
|
|
|
810
|
- style: TextStyle(
|
|
|
|
811
|
- color: MyColours.color_ffffff,
|
|
|
|
812
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
813
|
- fontWeight: FontWeight.bold)),
|
|
|
|
814
|
- ],
|
|
|
|
815
|
- )),
|
|
|
|
816
|
- onTap: () {
|
|
|
|
817
|
- if (!_check) {
|
|
|
|
818
|
- DialogUtil.openAlertDialogLogin(context, 500,
|
|
|
|
819
|
- onTap: () {
|
|
|
|
820
|
- initDio();
|
|
|
|
821
|
- Navigator.pop(context);
|
780
|
+ //微信登录
|
|
|
|
781
|
+ Offstage(
|
|
|
|
782
|
+ offstage: !App.isInstallWx,
|
|
|
|
783
|
+ child: InkWell(
|
|
|
|
784
|
+ child: Container(
|
|
|
|
785
|
+ width: double.infinity,
|
|
|
|
786
|
+ height: ScreenUtil().setWidth(90),
|
|
|
|
787
|
+ margin: EdgeInsets.only(
|
|
|
|
788
|
+ bottom: ScreenUtil().setWidth(30),
|
|
|
|
789
|
+ right: ScreenUtil().setWidth(80),
|
|
|
|
790
|
+ left: ScreenUtil().setWidth(80)),
|
|
|
|
791
|
+ decoration: BoxDecoration(
|
|
|
|
792
|
+ color: MyColours.color_55AA67,
|
|
|
|
793
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
794
|
+ ScreenUtil().setWidth(8))),
|
|
|
|
795
|
+ child: Row(
|
|
|
|
796
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
797
|
+ children: [
|
|
|
|
798
|
+ Image.asset(
|
|
|
|
799
|
+ Utils.getImgPath('icon_wechat_login'),
|
|
|
|
800
|
+ width: ScreenUtil().setWidth(46)),
|
|
|
|
801
|
+ HEmptyView(20),
|
|
|
|
802
|
+ Text('微信登录',
|
|
|
|
803
|
+ style: TextStyle(
|
|
|
|
804
|
+ color: MyColours.color_ffffff,
|
|
|
|
805
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
806
|
+ fontWeight: FontWeight.bold)),
|
|
|
|
807
|
+ ],
|
|
|
|
808
|
+ )),
|
|
|
|
809
|
+ onTap: () {
|
|
|
|
810
|
+ if (!_check) {
|
|
|
|
811
|
+ DialogUtil.openAlertDialogLogin(context, 500,
|
|
|
|
812
|
+ onTap: () {
|
|
|
|
813
|
+ Navigator.pop(context);
|
|
|
|
814
|
+ _wxLogin();
|
|
|
|
815
|
+ });
|
|
|
|
816
|
+ return;
|
|
|
|
817
|
+ }
|
|
822
|
_wxLogin();
|
818
|
_wxLogin();
|
|
823
|
- });
|
|
|
|
824
|
- return;
|
|
|
|
825
|
- }
|
|
|
|
826
|
- _wxLogin();
|
|
|
|
827
|
- },
|
|
|
|
828
|
- )),
|
|
|
|
829
|
- //账号登录
|
|
|
|
830
|
- Consumer<UserModel>(builder:
|
|
|
|
831
|
- (BuildContext context, UserModel value, Widget child) {
|
|
|
|
832
|
- return InkWell(
|
|
|
|
833
|
- child: Container(
|
|
|
|
834
|
- width: double.infinity,
|
|
|
|
835
|
- height: ScreenUtil().setWidth(90),
|
|
|
|
836
|
- margin: EdgeInsets.only(
|
|
|
|
837
|
- bottom: ScreenUtil().setWidth(30),
|
|
|
|
838
|
- right: ScreenUtil().setWidth(80),
|
|
|
|
839
|
- left: ScreenUtil().setWidth(80)),
|
|
|
|
840
|
- decoration: BoxDecoration(
|
|
|
|
841
|
- color: MyColours.color_41444B,
|
|
|
|
842
|
- borderRadius: BorderRadius.circular(
|
|
|
|
843
|
- ScreenUtil().setWidth(8))),
|
|
|
|
844
|
- child: Row(
|
|
|
|
845
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
846
|
- children: [
|
|
|
|
847
|
- Text('一键订账号登录',
|
|
|
|
848
|
- style: TextStyle(
|
|
|
|
849
|
- color: MyColours.color_ffffff,
|
|
|
|
850
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
851
|
- fontWeight: FontWeight.bold)),
|
|
|
|
852
|
- ],
|
|
|
|
853
|
- )),
|
|
|
|
854
|
- onTap: () {
|
|
|
|
855
|
- if (!_check) {
|
|
|
|
856
|
- DialogUtil.openAlertDialogLogin(context, 500,
|
|
|
|
857
|
- onTap: () {
|
|
|
|
858
|
- initDio();
|
|
|
|
859
|
- Navigator.pop(context);
|
819
|
+ },
|
|
|
|
820
|
+ )),
|
|
|
|
821
|
+ //账号登录
|
|
|
|
822
|
+ Consumer<UserModel>(builder:
|
|
|
|
823
|
+ (BuildContext context, UserModel value, Widget child) {
|
|
|
|
824
|
+ return InkWell(
|
|
|
|
825
|
+ child: Container(
|
|
|
|
826
|
+ width: double.infinity,
|
|
|
|
827
|
+ height: ScreenUtil().setWidth(90),
|
|
|
|
828
|
+ margin: EdgeInsets.only(
|
|
|
|
829
|
+ bottom: ScreenUtil().setWidth(30),
|
|
|
|
830
|
+ right: ScreenUtil().setWidth(80),
|
|
|
|
831
|
+ left: ScreenUtil().setWidth(80)),
|
|
|
|
832
|
+ decoration: BoxDecoration(
|
|
|
|
833
|
+ color: MyColours.color_41444B,
|
|
|
|
834
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
835
|
+ ScreenUtil().setWidth(8))),
|
|
|
|
836
|
+ child: Row(
|
|
|
|
837
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
838
|
+ children: [
|
|
|
|
839
|
+ Text('一键订账号登录',
|
|
|
|
840
|
+ style: TextStyle(
|
|
|
|
841
|
+ color: MyColours.color_ffffff,
|
|
|
|
842
|
+ fontSize: ScreenUtil().setSp(28),
|
|
|
|
843
|
+ fontWeight: FontWeight.bold)),
|
|
|
|
844
|
+ ],
|
|
|
|
845
|
+ )),
|
|
|
|
846
|
+ onTap: () {
|
|
|
|
847
|
+ if (!_check) {
|
|
|
|
848
|
+ DialogUtil.openAlertDialogLogin(context, 500,
|
|
|
|
849
|
+ onTap: () {
|
|
|
|
850
|
+ Navigator.pop(context);
|
|
|
|
851
|
+ NavigatorUtil.goAccountLoginPage(context);
|
|
|
|
852
|
+ });
|
|
|
|
853
|
+ return;
|
|
|
|
854
|
+ }
|
|
860
|
NavigatorUtil.goAccountLoginPage(context);
|
855
|
NavigatorUtil.goAccountLoginPage(context);
|
|
861
|
});
|
856
|
});
|
|
862
|
- return;
|
|
|
|
863
|
- }
|
|
|
|
864
|
- NavigatorUtil.goAccountLoginPage(context);
|
|
|
|
865
|
- });
|
|
|
|
866
|
- }),
|
|
|
|
867
|
- // ios登录
|
|
|
|
868
|
- Platform.isAndroid
|
|
|
|
869
|
- ? Text('')
|
|
|
|
870
|
- : Consumer<UserModel>(builder:
|
|
|
|
871
|
- (BuildContext context, UserModel value, Widget child) {
|
|
|
|
872
|
- return InkWell(
|
|
|
|
873
|
- child: Container(
|
|
|
|
874
|
- width: double.infinity,
|
|
|
|
875
|
- height: ScreenUtil().setWidth(90),
|
|
|
|
876
|
- margin: EdgeInsets.only(
|
|
|
|
877
|
- bottom: ScreenUtil().setWidth(30),
|
|
|
|
878
|
- right: ScreenUtil().setWidth(80),
|
|
|
|
879
|
- left: ScreenUtil().setWidth(80)),
|
|
|
|
880
|
- decoration: BoxDecoration(
|
|
|
|
881
|
- color: MyColours.color_ffffff,
|
|
|
|
882
|
- border: Border.all(
|
|
|
|
883
|
- color: MyColours.color_E4E4E4,
|
|
|
|
884
|
- width: ScreenUtil().setWidth(2)),
|
|
|
|
885
|
- borderRadius: BorderRadius.circular(
|
|
|
|
886
|
- ScreenUtil().setWidth(8))),
|
|
|
|
887
|
- child: Row(
|
|
|
|
888
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
889
|
- children: [
|
|
|
|
890
|
- Image.asset(
|
|
|
|
891
|
- Utils.getImgPath('icon_apple_login'),
|
|
|
|
892
|
- width: ScreenUtil().setWidth(46)),
|
|
|
|
893
|
- HEmptyView(20),
|
|
|
|
894
|
- Text('通过 Apple 登录',
|
|
|
|
895
|
- style: TextStyle(
|
|
|
|
896
|
- color: MyColours.color_41444B,
|
|
|
|
897
|
- fontSize: ScreenUtil().setSp(28),
|
|
|
|
898
|
- fontWeight: FontWeight.bold)),
|
|
|
|
899
|
- ],
|
|
|
|
900
|
- )),
|
|
|
|
901
|
- onTap: () {
|
|
|
|
902
|
- if (!_check) {
|
|
|
|
903
|
- DialogUtil.openAlertDialogLogin(context, 500,
|
|
|
|
904
|
- onTap: () {
|
|
|
|
905
|
- initDio();
|
|
|
|
906
|
- Navigator.pop(context);
|
857
|
+ }),
|
|
|
|
858
|
+ // ios登录
|
|
|
|
859
|
+ Platform.isAndroid
|
|
|
|
860
|
+ ? Text('')
|
|
|
|
861
|
+ : Consumer<UserModel>(builder: (BuildContext context,
|
|
|
|
862
|
+ UserModel value, Widget child) {
|
|
|
|
863
|
+ return InkWell(
|
|
|
|
864
|
+ child: Container(
|
|
|
|
865
|
+ width: double.infinity,
|
|
|
|
866
|
+ height: ScreenUtil().setWidth(90),
|
|
|
|
867
|
+ margin: EdgeInsets.only(
|
|
|
|
868
|
+ bottom: ScreenUtil().setWidth(30),
|
|
|
|
869
|
+ right: ScreenUtil().setWidth(80),
|
|
|
|
870
|
+ left: ScreenUtil().setWidth(80)),
|
|
|
|
871
|
+ decoration: BoxDecoration(
|
|
|
|
872
|
+ color: MyColours.color_ffffff,
|
|
|
|
873
|
+ border: Border.all(
|
|
|
|
874
|
+ color: MyColours.color_E4E4E4,
|
|
|
|
875
|
+ width: ScreenUtil().setWidth(2)),
|
|
|
|
876
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
877
|
+ ScreenUtil().setWidth(8))),
|
|
|
|
878
|
+ child: Row(
|
|
|
|
879
|
+ mainAxisAlignment:
|
|
|
|
880
|
+ MainAxisAlignment.center,
|
|
|
|
881
|
+ children: [
|
|
|
|
882
|
+ Image.asset(
|
|
|
|
883
|
+ Utils.getImgPath(
|
|
|
|
884
|
+ 'icon_apple_login'),
|
|
|
|
885
|
+ width: ScreenUtil().setWidth(46)),
|
|
|
|
886
|
+ HEmptyView(20),
|
|
|
|
887
|
+ Text('通过 Apple 登录',
|
|
|
|
888
|
+ style: TextStyle(
|
|
|
|
889
|
+ color: MyColours.color_41444B,
|
|
|
|
890
|
+ fontSize:
|
|
|
|
891
|
+ ScreenUtil().setSp(28),
|
|
|
|
892
|
+ fontWeight: FontWeight.bold)),
|
|
|
|
893
|
+ ],
|
|
|
|
894
|
+ )),
|
|
|
|
895
|
+ onTap: () {
|
|
|
|
896
|
+ if (!_check) {
|
|
|
|
897
|
+ DialogUtil.openAlertDialogLogin(
|
|
|
|
898
|
+ context, 500, onTap: () {
|
|
|
|
899
|
+ Navigator.pop(context);
|
|
|
|
900
|
+ _iosLogin(value);
|
|
|
|
901
|
+ });
|
|
|
|
902
|
+ return;
|
|
|
|
903
|
+ }
|
|
907
|
_iosLogin(value);
|
904
|
_iosLogin(value);
|
|
908
|
});
|
905
|
});
|
|
909
|
- return;
|
|
|
|
910
|
- }
|
|
|
|
911
|
- _iosLogin(value);
|
|
|
|
912
|
- });
|
|
|
|
913
|
- }),
|
|
|
|
914
|
- InkWell(
|
|
|
|
915
|
- onTap: () {
|
|
|
|
916
|
- Utils.goPhone("400-000-9690");
|
|
|
|
917
|
- },
|
|
|
|
918
|
- child: Text('联系客服',
|
|
|
|
919
|
- style: TextStyle(
|
|
|
|
920
|
- color: MyColours.color_333333,
|
|
|
|
921
|
- fontWeight: FontWeight.bold,
|
|
|
|
922
|
- fontSize: ScreenUtil().setSp(26),
|
|
|
|
923
|
- decoration: TextDecoration.underline))),
|
|
|
|
924
|
- ],
|
|
|
|
925
|
- ),
|
|
|
|
926
|
- ),
|
|
|
|
927
|
- ));
|
906
|
+ }),
|
|
|
|
907
|
+ InkWell(
|
|
|
|
908
|
+ onTap: () {
|
|
|
|
909
|
+ Utils.goPhone("400-000-9690");
|
|
|
|
910
|
+ },
|
|
|
|
911
|
+ child: Text('联系客服',
|
|
|
|
912
|
+ style: TextStyle(
|
|
|
|
913
|
+ color: MyColours.color_333333,
|
|
|
|
914
|
+ fontWeight: FontWeight.bold,
|
|
|
|
915
|
+ fontSize: ScreenUtil().setSp(26),
|
|
|
|
916
|
+ decoration: TextDecoration.underline))),
|
|
|
|
917
|
+ ],
|
|
|
|
918
|
+ ),
|
|
|
|
919
|
+ ),
|
|
|
|
920
|
+ ));
|
|
928
|
}
|
921
|
}
|
|
929
|
} |
922
|
} |