设备 预约接口
This commit is contained in:
@@ -68,13 +68,13 @@ class BookInfoController extends GetControllerEx<BookInfoModel> {
|
||||
}
|
||||
|
||||
submitData(id) {
|
||||
String tel = userInfoController.model?.user?.tel ?? "";
|
||||
if (tel.isEmpty) {
|
||||
String phone = userInfoController.model?.user?.phone ?? "";
|
||||
if (phone.isEmpty) {
|
||||
showToast("用户未存在手机号");
|
||||
return;
|
||||
}
|
||||
return ApiService.reservation.post("/agent/userBook/submitBook", data: {
|
||||
"extUserId": tel,
|
||||
"extUserId": phone,
|
||||
"storeId": id,
|
||||
"realName": model.userName,
|
||||
"userPhone": model.userPhone,
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
|
||||
|
||||
part 'people_info_controller.g.dart'; // 由json_serializable自动生成的部分
|
||||
|
||||
class PeopleInfoModel {
|
||||
List<PeopleInfoPojo> peopleList = [PeopleInfoPojo(), PeopleInfoPojo()];
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class PeopleInfoPojo {
|
||||
String? name;
|
||||
@@ -15,8 +13,8 @@ class PeopleInfoPojo {
|
||||
String? height;
|
||||
String? weight;
|
||||
DateTime? birthday;
|
||||
String? tel;
|
||||
String? emergencyContact;
|
||||
String? phone;
|
||||
String? contact;
|
||||
|
||||
PeopleInfoPojo();
|
||||
|
||||
@@ -35,9 +33,9 @@ class PeopleInfoPojo {
|
||||
Map<String, dynamic> toJson() => _$PeopleInfoPojoToJson(this);
|
||||
}
|
||||
|
||||
class PeopleInfoController extends GetControllerEx<PeopleInfoModel> {
|
||||
class PeopleInfoController extends GetControllerEx<PeopleInfoPojo> {
|
||||
PeopleInfoController() {
|
||||
attr = GetModel(PeopleInfoModel()).obs;
|
||||
attr = GetModel(PeopleInfoPojo()).obs;
|
||||
}
|
||||
|
||||
GlobalController get glcontroller => Get.find<GlobalController>();
|
||||
|
||||
@@ -15,8 +15,8 @@ PeopleInfoPojo _$PeopleInfoPojoFromJson(Map<String, dynamic> json) =>
|
||||
..birthday = json['birthday'] == null
|
||||
? null
|
||||
: DateTime.parse(json['birthday'] as String)
|
||||
..tel = json['tel'] as String?
|
||||
..emergencyContact = json['emergencyContact'] as String?;
|
||||
..phone = json['tel'] as String?
|
||||
..contact = json['emergencyContact'] as String?;
|
||||
|
||||
Map<String, dynamic> _$PeopleInfoPojoToJson(PeopleInfoPojo instance) =>
|
||||
<String, dynamic>{
|
||||
@@ -25,6 +25,6 @@ Map<String, dynamic> _$PeopleInfoPojoToJson(PeopleInfoPojo instance) =>
|
||||
'height': instance.height,
|
||||
'weight': instance.weight,
|
||||
'birthday': instance.birthday?.toIso8601String(),
|
||||
'tel': instance.tel,
|
||||
'emergencyContact': instance.emergencyContact,
|
||||
'tel': instance.phone,
|
||||
'emergencyContact': instance.contact,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user