车辆图片动态
This commit is contained in:
@@ -66,6 +66,7 @@ void main() async {
|
||||
void initHttpSet() {
|
||||
AppTheme.test_service_url = StorageService.to.hostUrl ?? AppTheme.test_service_url;
|
||||
|
||||
HttpService.to.init(timeout: 15);
|
||||
HttpService.to.setBaseUrl(AppTheme.test_service_url);
|
||||
HttpService.to.dio.interceptors.add(TokenInterceptor(tokenKey: 'asoco-token'));
|
||||
HttpService.to.setOnResponseHandler((response) async {
|
||||
|
||||
@@ -539,6 +539,7 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
String workEfficiency = "0";
|
||||
String fillingWeight = "0";
|
||||
String fillingTimes = "0";
|
||||
String modeImage = "";
|
||||
String plateNumber = "";
|
||||
String vin = "";
|
||||
String leftHydrogen = "0";
|
||||
@@ -650,7 +651,7 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
try {
|
||||
HttpService.to.setBaseUrl(AppTheme.test_service_url);
|
||||
var responseData = await HttpService.to.get(
|
||||
'appointment/truck/history-filling-summary?vin=$vin',
|
||||
'appointment/truck/history-filling-summary?vin=$vin&plateNumber=$plateNumber',
|
||||
);
|
||||
if (responseData == null || responseData.data == null) {
|
||||
showToast('服务暂不可用,请稍后');
|
||||
@@ -664,6 +665,7 @@ class C_ReservationController extends GetxController with BaseControllerMixin {
|
||||
|
||||
fillingWeight = "$formatted${result.data["fillingWeightUnit"]}";
|
||||
fillingTimes = "${result.data["fillingTimes"]}${result.data["fillingTimesUnit"]}";
|
||||
modeImage = result.data["modeImage"].toString();
|
||||
|
||||
updateUi();
|
||||
} catch (e) {
|
||||
|
||||
@@ -148,9 +148,11 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () async {
|
||||
controller.stopAutoRefresh();
|
||||
var scanResult = await Get.to(() => const MessagePage());
|
||||
if (scanResult == null) {
|
||||
controller.msgNotice();
|
||||
controller.startAutoRefresh();
|
||||
}
|
||||
},
|
||||
icon: Badge(
|
||||
@@ -237,7 +239,20 @@ class ReservationPage extends GetView<C_ReservationController> {
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(flex: 4, child: LoginUtil.getAssImg('ic_car_bg@2x')),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Image.network(
|
||||
controller.modeImage,
|
||||
fit: BoxFit.cover,
|
||||
loadingBuilder: (context, child, loadingProgress) {
|
||||
if (loadingProgress == null) return child;
|
||||
return Center(child: CircularProgressIndicator());
|
||||
},
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
return Center(child: LoginUtil.getAssImg('ic_car_select@2x'));
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Expanded(
|
||||
flex: 6,
|
||||
|
||||
Reference in New Issue
Block a user