扫码结果处理
This commit is contained in:
@@ -421,7 +421,7 @@ class ReservationController extends GetxController with BaseControllerMixin {
|
||||
|
||||
var responseData = await HttpService.to.get("hydrogen/queryHydrogenSiteInfo");
|
||||
|
||||
if (responseData == null && responseData!.data == null) {
|
||||
if (responseData == null || responseData.data == null) {
|
||||
showToast('暂时无法获取站点信息');
|
||||
dismissLoading();
|
||||
return;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import 'package:dropdown_button2/dropdown_button2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:getx_scaffold/getx_scaffold.dart';
|
||||
import 'package:ln_jq_app/common/model/vehicle_info.dart';
|
||||
import 'package:ln_jq_app/pages/qr_code/view.dart';
|
||||
import 'package:ln_jq_app/storage_service.dart';
|
||||
|
||||
import 'controller.dart';
|
||||
|
||||
@@ -116,7 +117,7 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
children: [
|
||||
Text(value, style: const TextStyle(fontSize: 15, fontWeight: FontWeight.bold)),
|
||||
const SizedBox(height: 4),
|
||||
Text(label, style: const TextStyle(color: Colors.grey, fontSize: 11 )),
|
||||
Text(label, style: const TextStyle(color: Colors.grey, fontSize: 11)),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -142,11 +143,7 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Icon(
|
||||
Icons.propane_rounded,
|
||||
size: 50,
|
||||
color: Colors.blue.withOpacity(0.5),
|
||||
),
|
||||
Icon(Icons.propane_rounded, size: 50, color: Colors.blue.withOpacity(0.5)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -162,8 +159,18 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
const SizedBox(width: 8),
|
||||
isButton
|
||||
? GestureDetector(
|
||||
onTap: () {
|
||||
Get.to(() => const QrCodePage());
|
||||
onTap: () async {
|
||||
//判断是否绑定成功
|
||||
var scanResult = await Get.to(() => const QrCodePage());
|
||||
if (scanResult == true) {
|
||||
VehicleInfo? bean = StorageService.to.vehicleInfo;
|
||||
|
||||
if (bean != null) {
|
||||
showToast(
|
||||
"已绑定${bean.plateNumber}-${StorageService.to.hasVehicleInfo}",
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsetsGeometry.only(left: 10.w),
|
||||
@@ -181,7 +188,10 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
color: Colors.blue, fontSize: 11, fontWeight: FontWeight.w500),
|
||||
color: Colors.blue,
|
||||
fontSize: 11,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -411,13 +421,9 @@ class ReservationPage extends GetView<ReservationController> {
|
||||
),
|
||||
dropdownStyleData: DropdownStyleData(
|
||||
maxHeight: 200,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
menuItemStyleData: const MenuItemStyleData(
|
||||
height: 40,
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)),
|
||||
),
|
||||
menuItemStyleData: const MenuItemStyleData(height: 40),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user