地址接口的视线

This commit is contained in:
czz
2025-06-21 08:55:52 +08:00
parent d94a0c8a6c
commit 41adcedad7
38 changed files with 2399 additions and 2223 deletions

View File

@@ -15,9 +15,9 @@ class AddressListPage extends GetView<AddressListController> {
final scaffoldKey = GlobalKey<ScaffoldState>();
BoxConstraints? bodysize;
// AddressListPage() {
// controller.getAddressList();
// }
AddressListPage() {
controller.getAddressList();
}
@override
Widget build(BuildContext context) {
@@ -65,6 +65,7 @@ class AddressListPage extends GetView<AddressListController> {
centerTitle: false,
),
body: Container(
margin: EdgeInsets.only(top: 30.rpx),
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
@@ -80,49 +81,24 @@ class AddressListPage extends GetView<AddressListController> {
child: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
decoration: BoxDecoration(
color: Color(0xFFF6F6F6),
),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Align(
alignment: AlignmentDirectional(-1, 0),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
31, 27, 0, 26),
child: Text(
'我的地址',
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: AppFontsize.title_size,
letterSpacing: 0,
fontWeight: FontWeight.w600,
),
),
),
),
Expanded(
child: Obx(() => ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: (controller.model.addressList!
.asMap()
.entries
.map((e) => AddressModuleWidget(
index: e.key,
addressListController:
controller,
))
.toList() as List<Widget>)
.divide(const SizedBox(height: 10))
.addToEnd(const SizedBox(
height: AppConstants
.list_end_height)),
)),
),
],
),
decoration: BoxDecoration(),
child: Obx(() => ListView(
shrinkWrap: true,
scrollDirection: Axis.vertical,
children: (controller.model.addressList!
.asMap()
.entries
.map((e) => AddressModuleWidget(
index: e.key,
addressListController:
controller,
))
.toList() as List<Widget>)
.divide(const SizedBox(height: 10))
.addToEnd(const SizedBox(
height:
AppConstants.list_end_height)),
)),
),
);
}
@@ -143,7 +119,7 @@ class AddressListPage extends GetView<AddressListController> {
),
child: TextButton(
onPressed: () {
controller.model.address = {'isChecked': false};
controller.model.address = {'default': 0};
controller.model.type = 1;
Get.toNamed("/editAddressPage");
},
@@ -167,20 +143,7 @@ class AddressListPage extends GetView<AddressListController> {
width: 42.rpx,
height: 42.rpx,
),
// Text(
// '+',
// style: FlutterFlowTheme.of(context)
// .titleSmall
// .override(
// fontFamily: 'Readex Pro',
// color: Color(0xFF85F5FF),
// fontSize:
// AppFontsize.normal_text_size +
// 12, // 让加号比文字稍大
// letterSpacing: 0,
// ),
// ),
//),
SizedBox(width: 10), // 加号和文字间距
Text(
'添加新地址',