diff --git a/lib/mock_models/decoration/decoration_model.dart b/lib/mock_models/decoration/decoration_model.dart new file mode 100644 index 0000000..c5d49c1 --- /dev/null +++ b/lib/mock_models/decoration/decoration_model.dart @@ -0,0 +1,53 @@ +enum DecorationType { + /// + WAIT_, + + ///已指派 + HAND_OUT, + + ///已执行 + DONE, +} + +enum CHECK_TYPE { + ELECTRIC, + WATER, + WALL, + DOOR_AND_WINDOWS, + SECURITY, +} + +class DecorationModel { + DateTime decorationDate; + DateTime startDate; + String checkCycle; + UserHomeModel userHomeModel; + DecorationTeamModel decorationTeamModel; + List checkTypes; +} + +///用户家庭信息 +class UserHomeModel { + String plot; + String detailAddr; + String userName; + String phone; + UserHomeModel({ + this.plot, + this.detailAddr, + this.userName, + this.phone, + }); +} + +///装修队伍信息 +class DecorationTeamModel { + String name; + String userName; + String phone; + DecorationTeamModel({ + this.name, + this.userName, + this.phone, + }); +} diff --git a/lib/mock_models/users/user_info_model.dart b/lib/mock_models/users/user_info_model.dart index ab7fb96..236e868 100644 --- a/lib/mock_models/users/user_info_model.dart +++ b/lib/mock_models/users/user_info_model.dart @@ -10,6 +10,9 @@ enum USER_ROLE { ///保安角色 SECURITY, + ///物业角色 + PROPERTY, + ///无角色 EMPTY, } @@ -66,4 +69,13 @@ class UserInfoModel { this.role = USER_ROLE.SECURITY, this.phone = '13918237877', }); + + ///师傅角色生成 + ///password 000003 + UserInfoModel.property({ + this.nickName = '刘物业', + this.avatar, + this.role = USER_ROLE.PROPERTY, + this.phone = '18965438676', + }); } diff --git a/lib/ui/login/login_sms_page.dart b/lib/ui/login/login_sms_page.dart index 7de3dda..9aaee9e 100644 --- a/lib/ui/login/login_sms_page.dart +++ b/lib/ui/login/login_sms_page.dart @@ -107,6 +107,9 @@ class _LoginSMSPageState extends State { } else if (text == '000002') { userProvider.setUserInfo(UserInfoModel.security()); Get.offAll(HomePage()); + } else if (text == '000003') { + userProvider.setUserInfo(UserInfoModel.property()); + Get.offAll(HomePage()); } else { if (text.length == 6) BotToast.showText(text: '验证码错误'); }