更新界面布局
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.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/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/component/tool/SelectableTagButton.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
@@ -107,6 +110,8 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
||||
ApiResponse apiRespons =
|
||||
await personController.savePersonData();
|
||||
if (apiRespons.code == HttpStatusCodes.ok) {
|
||||
updateDeviceBindStatus(
|
||||
personController.update_person_mac.value);
|
||||
TopSlideNotification.show(context,
|
||||
text: apiRespons.msg!);
|
||||
} else {
|
||||
@@ -775,10 +780,16 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0, 8.rpx, 0, 0),
|
||||
child: Icon(
|
||||
Icons.arrow_back,
|
||||
color: themeController.currentColor.sc4,
|
||||
size: 24.rpx,
|
||||
child: Container(
|
||||
width: 23.rpx,
|
||||
height: 23.rpx,
|
||||
// width: double.infinity,
|
||||
decoration: BoxDecoration(),
|
||||
child: SvgPicture.asset(
|
||||
'assets/img/icon/tips.svg',
|
||||
fit: BoxFit.cover,
|
||||
color: themeController.currentColor.sc4,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
@@ -857,4 +868,38 @@ class _UpdatePageState extends State<UpdatePersonPage> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void updateDeviceBindStatus(String mac) {
|
||||
String serviceAddress = ServiceConstant.service_address;
|
||||
String serviceName = ServiceConstant.server_service;
|
||||
String serviceApi = ServiceConstant.user_setting;
|
||||
String type = "device_bind_status_$mac";
|
||||
String queryUrl =
|
||||
"${serviceAddress}${serviceName}${serviceApi}?type=${type}";
|
||||
requestWithLog(
|
||||
logTitle: "查询绑定流程",
|
||||
method: MyHttpMethod.get,
|
||||
queryUrl: queryUrl,
|
||||
onSuccess: (res) {
|
||||
print(res);
|
||||
Map<String, dynamic> data = {
|
||||
"type": type,
|
||||
"mac": mac,
|
||||
"wifi": res.data['wifi'],
|
||||
"celibration": res.data['celibration'],
|
||||
"person_info": true,
|
||||
"time": DateTime.now().millisecondsSinceEpoch,
|
||||
};
|
||||
requestWithLog(
|
||||
logTitle: "更新绑定流程",
|
||||
method: MyHttpMethod.put,
|
||||
queryUrl: queryUrl,
|
||||
data: data,
|
||||
onSuccess: (res) {},
|
||||
onFailure: (res) {},
|
||||
);
|
||||
},
|
||||
onFailure: (res) {},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user