pull/1/head
张萌 3 years ago
parent cdf8fed472
commit 73f96b379c

@ -148,7 +148,7 @@ class _OpeningCodePageState extends State<OpeningCodePage> {
// ), // ),
// 48.hb, // 48.hb,
Text( Text(
'2栋 1单元 1402室', '${UserTool.userProvider.defaultHouseString}',
style: TextStyle( style: TextStyle(
fontSize: 32.sp, fontSize: 32.sp,
color: Colors.black, color: Colors.black,

@ -1,3 +1,4 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/pages/sign/sign_func.dart'; import 'package:aku_new_community/pages/sign/sign_func.dart';
import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart'; import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
@ -75,6 +76,10 @@ class _SetNickNamePageState extends State<SetNickNamePage> {
}, },
maxLength: 20, maxLength: 20,
controller: _nickController, controller: _nickController,
style: TextStyle(
color: Colors.black.withOpacity(0.85),
),
cursorColor: kPrimaryColor,
decoration: InputDecoration( decoration: InputDecoration(
isDense: false, isDense: false,
contentPadding: contentPadding:

@ -1,6 +1,6 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
class PsdTextField extends StatefulWidget { class PsdTextField extends StatefulWidget {
@ -37,6 +37,10 @@ class _PsdTextFieldState extends State<PsdTextField> {
controller: widget.controller, controller: widget.controller,
obscureText: !visible, obscureText: !visible,
obscuringCharacter: '*', obscuringCharacter: '*',
style: TextStyle(
color: Colors.black.withOpacity(0.85),
),
cursorColor: kPrimaryColor,
decoration: InputDecoration( decoration: InputDecoration(
isDense: false, isDense: false,
contentPadding: contentPadding:

@ -1,13 +1,15 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
class TelTextField extends StatefulWidget { class TelTextField extends StatefulWidget {
final TextEditingController controller; final TextEditingController controller;
final Function(String) onChange; final Function(String) onChange;
const TelTextField({Key? key, required this.controller, required this.onChange}) : super(key: key); const TelTextField(
{Key? key, required this.controller, required this.onChange})
: super(key: key);
@override @override
_TelTextFieldState createState() => _TelTextFieldState(); _TelTextFieldState createState() => _TelTextFieldState();
@ -28,6 +30,10 @@ class _TelTextFieldState extends State<TelTextField> {
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
controller: widget.controller, controller: widget.controller,
onChanged: widget.onChange, onChanged: widget.onChange,
style: TextStyle(
color: Colors.black.withOpacity(0.85),
),
cursorColor: kPrimaryColor,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true, isDense: true,
border: InputBorder.none, border: InputBorder.none,

@ -111,6 +111,20 @@ class UserProvider extends ChangeNotifier {
MyHouseModel? get defaultHouse => _defaultHouse; MyHouseModel? get defaultHouse => _defaultHouse;
void updateDefaultHouse() => notifyListeners();
String get defaultHouseString {
if (_defaultHouse == null) {
return '暂无绑定房屋';
} else {
return _defaultHouse!.buildingName +
'' +
_defaultHouse!.unitName +
'单元' +
_defaultHouse!.estateName;
}
}
/// ///
Future setSex(int sex) async { Future setSex(int sex) async {
BaseModel baseModel = await NetUtil().get( BaseModel baseModel = await NetUtil().get(

@ -2,9 +2,11 @@ import 'dart:io';
import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/extensions/num_ext.dart'; import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/provider/user_provider.dart';
import 'package:aku_new_community/saas_model/work_order/work_order_type_model.dart'; import 'package:aku_new_community/saas_model/work_order/work_order_type_model.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_func.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/work_order_func.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_remark_page.dart'; import 'package:aku_new_community/ui/function_and_service/work_order/work_order_remark_page.dart';
import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart';
import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart'; import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_divider.dart';
@ -20,6 +22,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/src/extensions/string_ext.dart'; import 'package:velocity_x/src/extensions/string_ext.dart';
class PublishWorkOrderPage extends StatefulWidget { class PublishWorkOrderPage extends StatefulWidget {
@ -54,53 +57,61 @@ class _PublishWorkOrderPageState extends State<PublishWorkOrderPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
UserProvider userProvider = Provider.of<UserProvider>(context);
return BeeScaffold( return BeeScaffold(
title: '发布工单', title: '发布工单',
body: SafeArea( body: SafeArea(
child: ListView( child: ListView(
children: [ children: [
2.hb, 2.hb,
Container( GestureDetector(
width: double.infinity, onTap: () {
color: Colors.white, Get.to(MyHousePage());
height: 164.w, },
padding: EdgeInsets.all(32.w), child: Material(
child: Row( color: Colors.transparent,
crossAxisAlignment: CrossAxisAlignment.center, child: Container(
children: [ width: double.infinity,
ClipOval( color: Colors.white,
child: BeeImageNetwork( height: 164.w,
width: 100.w, padding: EdgeInsets.all(32.w),
height: 100.w, child: Row(
imgs: UserTool.userProvider.userInfoModel?.imgList ?? [], crossAxisAlignment: CrossAxisAlignment.center,
),
),
16.wb,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
'${UserTool.userProvider.userInfoModel!.nickName}' ClipOval(
.text child: BeeImageNetwork(
.size(28.sp) width: 100.w,
.color(Colors.black.withOpacity(0.85)) height: 100.w,
.make(), imgs: UserTool.userProvider.userInfoModel?.imgList ??
[],
),
),
16.wb,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'${UserTool.userProvider.userInfoModel!.nickName}'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.85))
.make(),
Spacer(),
'${userProvider.defaultHouseString}'
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
],
),
Spacer(), Spacer(),
'租户 | 绿城·碧桂园3栋14单元104室' Icon(
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
],
),
Spacer(),
GestureDetector(
onTap: () {},
child: Icon(
CupertinoIcons.chevron_right, CupertinoIcons.chevron_right,
color: Colors.black.withOpacity(0.25), color: Colors.black.withOpacity(0.25),
size: 32.w, size: 32.w,
)), ),
], ],
),
),
), ),
), ),
20.hb, 20.hb,

@ -348,7 +348,9 @@ class _AddHousePageState extends State<AddHousePage> {
'${_otherPickHouse == null ? '请选择楼层房号' : '${_otherPickHouse!.building!.name}-${_otherPickHouse!.unit!.name}-${_otherPickHouse!.floor!.name}-${_otherPickHouse!.house!.name}'}' '${_otherPickHouse == null ? '请选择楼层房号' : '${_otherPickHouse!.building!.name}-${_otherPickHouse!.unit!.name}-${_otherPickHouse!.floor!.name}-${_otherPickHouse!.house!.name}'}'
.text .text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(0.25)) .color(_otherPickHouse == null
? Colors.black.withOpacity(0.25)
: Colors.black.withOpacity(0.85))
.maxLines(2) .maxLines(2)
.make(), .make(),
), ),
@ -512,7 +514,7 @@ class _AddHousePageState extends State<AddHousePage> {
.text .text
.size(28.sp) .size(28.sp)
.color(model.house != null .color(model.house != null
? Colors.black.withOpacity(0.5) ? Colors.black.withOpacity(0.85)
: Colors.black.withOpacity(0.25)) : Colors.black.withOpacity(0.25))
.make(), .make(),
), ),

@ -98,6 +98,7 @@ class _MyHousePageState extends State<MyHousePage> {
params: {'estateId': model.id}); params: {'estateId': model.id});
if (base.success) { if (base.success) {
_refreshController.callRefresh(); _refreshController.callRefresh();
UserTool.userProvider.updateDefaultHouse();
} else { } else {
BotToast.showText(text: '切换默认房屋失败'); BotToast.showText(text: '切换默认房屋失败');
} }

Loading…
Cancel
Save