|
|
@ -1,25 +1,29 @@
|
|
|
|
import 'package:aku_community/base/base_style.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:aku_community/constants/api.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community/utils/network/base_model.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community/utils/network/net_util.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community/widget/bee_scaffold.dart';
|
|
|
|
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
import 'package:flustars/flustars.dart';
|
|
|
|
import 'package:flustars/flustars.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:aku_community/models/electronic_commerc/electronic_commerc_detail_model.dart';
|
|
|
|
|
|
|
|
import 'package:velocity_x/velocity_x.dart';
|
|
|
|
import 'package:velocity_x/velocity_x.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import 'package:aku_community/base/base_style.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community/constants/api.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community/models/electronic_commerc/electronic_commerc_detail_model.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community/utils/network/base_model.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community/utils/network/net_util.dart';
|
|
|
|
|
|
|
|
import 'package:aku_community/widget/bee_scaffold.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class ElectronicCommercDetailPage extends StatefulWidget {
|
|
|
|
class ElectronicCommercDetailPage extends StatefulWidget {
|
|
|
|
final int id;
|
|
|
|
final int id;
|
|
|
|
ElectronicCommercDetailPage({Key? key, required this.id}) : super(key: key);
|
|
|
|
ElectronicCommercDetailPage({Key? key, required this.id}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
_ElectronicCommercDetailPageState createState() => _ElectronicCommercDetailPageState();
|
|
|
|
_ElectronicCommercDetailPageState createState() =>
|
|
|
|
|
|
|
|
_ElectronicCommercDetailPageState();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _ElectronicCommercDetailPageState extends State<ElectronicCommercDetailPage> {
|
|
|
|
class _ElectronicCommercDetailPageState
|
|
|
|
|
|
|
|
extends State<ElectronicCommercDetailPage> {
|
|
|
|
late EasyRefreshController _easyRefreshController;
|
|
|
|
late EasyRefreshController _easyRefreshController;
|
|
|
|
bool _onload = true;
|
|
|
|
bool _onload = true;
|
|
|
|
late ElectronicCommercDetailModel _detailModel;
|
|
|
|
late ElectronicCommercDetailModel _detailModel;
|
|
|
@ -38,18 +42,19 @@ class _ElectronicCommercDetailPageState extends State<ElectronicCommercDetailPag
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return BeeScaffold(
|
|
|
|
return BeeScaffold(
|
|
|
|
title: _onload?'':_detailModel.electronicCommerceCategoryName,
|
|
|
|
title: _onload ? '' : _detailModel.electronicCommerceCategoryName,
|
|
|
|
bodyColor: Colors.white,
|
|
|
|
bodyColor: Colors.white,
|
|
|
|
body: EasyRefresh(
|
|
|
|
body: EasyRefresh(
|
|
|
|
firstRefresh: true,
|
|
|
|
firstRefresh: true,
|
|
|
|
header: MaterialHeader(),
|
|
|
|
header: MaterialHeader(),
|
|
|
|
onRefresh: () async {
|
|
|
|
onRefresh: () async {
|
|
|
|
BaseModel baseModel = await NetUtil()
|
|
|
|
BaseModel baseModel =
|
|
|
|
.get(API.manager.electronicCommercDetail, params: {
|
|
|
|
await NetUtil().get(API.manager.electronicCommercDetail, params: {
|
|
|
|
"electronicCommerceId": widget.id,
|
|
|
|
"electronicCommerceId": widget.id,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (baseModel.status! && baseModel.data != null) {
|
|
|
|
if (baseModel.status! && baseModel.data != null) {
|
|
|
|
_detailModel = ElectronicCommercDetailModel.fromJson(baseModel.data);
|
|
|
|
_detailModel =
|
|
|
|
|
|
|
|
ElectronicCommercDetailModel.fromJson(baseModel.data);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
BotToast.showText(text: '无法获取信息');
|
|
|
|
BotToast.showText(text: '无法获取信息');
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -102,4 +107,4 @@ class _ElectronicCommercDetailPageState extends State<ElectronicCommercDetailPag
|
|
|
|
Widget _emptyWidget() {
|
|
|
|
Widget _emptyWidget() {
|
|
|
|
return Container();
|
|
|
|
return Container();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|