更新城市选择
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
||||
import 'package:vbvs_app/common/pojo/city.dart';
|
||||
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/enum/APPPackageType.dart';
|
||||
@@ -48,6 +49,8 @@ class PersonController extends GetControllerEx<PersonModel> {
|
||||
RxString weight = "".obs;
|
||||
RxString height = "".obs;
|
||||
DateTime? dateTime = DateTime.now(); //选择时间
|
||||
CityModel? cityModel;
|
||||
|
||||
RxList diseaseList = [].obs;
|
||||
RxString update_person_mac = "".obs;
|
||||
var after_deveice;
|
||||
@@ -92,6 +95,10 @@ class PersonController extends GetControllerEx<PersonModel> {
|
||||
apiResponse.msg = "请输入身高".tr;
|
||||
return apiResponse;
|
||||
}
|
||||
if (cityModel == null || cityModel!.id == null) {
|
||||
apiResponse.msg = "请选择城市".tr;
|
||||
return apiResponse;
|
||||
}
|
||||
|
||||
var data = {
|
||||
"id": currentPersonId.value,
|
||||
@@ -103,6 +110,8 @@ class PersonController extends GetControllerEx<PersonModel> {
|
||||
"weight": weight!.value,
|
||||
"height": height.value,
|
||||
"disease": selectedDiseaseIds.value,
|
||||
"city_id": cityModel!.id,
|
||||
"UTC": cityModel!.UTC,
|
||||
};
|
||||
var response =
|
||||
await EasyDartModule.dio.put(queryUrl, data: jsonEncode(data));
|
||||
|
||||
Reference in New Issue
Block a user