修复我的借还物品显示错误

问卷调查已结束问卷改为不可点击查看详情
部分页面添加自动刷新
hmxc
张萌 4 years ago
parent d879ce5816
commit 67fb556104

@ -30,7 +30,7 @@ class VotingDetailPage extends StatefulWidget {
class _VotingDetailPageState extends State<VotingDetailPage> {
VotingDetailModel _model = VotingDetailModel();
EasyRefreshController? _refreshController;
late EasyRefreshController _refreshController;
bool _isOnload = true;
// List<int> _select = [];
int? _selectId;
@ -50,7 +50,7 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
@override
void dispose() {
_refreshController?.dispose();
_refreshController.dispose();
super.dispose();
}
@ -183,6 +183,7 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
child: '取消'.text.black.size(34.sp).isIntrinsic.make(),
onPressed: () {
Get.back();
Get.back();
},
),
CupertinoDialogAction(
@ -195,6 +196,7 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
.make(),
onPressed: () {
Get.back();
_refreshController.callRefresh();
},
)
],

@ -34,7 +34,6 @@ class _GoodsDetoPageState extends State<GoodsDetoPage> {
bool _canSkew(int? state) {
switch (state) {
case 1:
return false;
case 2:
case 3:
@ -123,11 +122,14 @@ class _GoodsDetoPageState extends State<GoodsDetoPage> {
_select.clear();
_refreshController.callRefresh();
}
: () {
userProvider.isLogin
? Get.to(() => DetoCreatePage())
: BotToast.showText(text: '请先登录!');
},
: userProvider.isLogin
? () async {
await Get.to(() => DetoCreatePage());
_refreshController.callRefresh();
}
: () {
BotToast.showText(text: '请先登录!');
},
child: _isEdit
? '删除'.text.size(32.sp).bold.make()
: '新增'.text.size(32.sp).bold.make(),

@ -19,7 +19,7 @@ class MineGoodsPage extends StatefulWidget {
}
class _MineGoodsPageState extends State<MineGoodsPage> {
EasyRefreshController? _controller;
late EasyRefreshController _controller;
@override
void initState() {
@ -30,13 +30,14 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
@override
void dispose() {
super.dispose();
_controller!.dispose();
_controller.dispose();
}
InkWell _frmLoss(int? id) {
return InkWell(
onTap: () async {
await ManagerFunc.fromLoss(id);
_controller.callRefresh();
},
child: Container(
width: 120.w,
@ -95,16 +96,16 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
color: Color(0xff4a4b51),
),
),
Container(
margin: EdgeInsets.only(top: 16.w),
child: Text(
'借还数量10个',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff333333),
),
),
),
// Container(
// margin: EdgeInsets.only(top: 16.w),
// child: Text(
// '借还数量10个',
// style: TextStyle(
// fontSize: 24.sp,
// color: Color(0xff333333),
// ),
// ),
// ),
Container(
margin: EdgeInsets.only(top: 16.w),
child: Text(
@ -131,7 +132,7 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'借用状态: ${BeeMap.borrowStatus}',
'借用状态: ${BeeMap.borrowStatus[model.borrowStatus]}',
style: TextStyle(
fontSize: 24.sp,
color: Color(0xff999999),
@ -167,26 +168,6 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
Widget build(BuildContext context) {
return BeeScaffold(
title: '我的借还物品',
// body: RefreshConfiguration(
// child: SmartRefresher(
// controller: _refreshController,
// header: WaterDropHeader(),
// footer: ClassicFooter(),
// onRefresh: _onRefresh,
// onLoading: _onLoading,
// enablePullUp: true,
// child: ListView.builder(
// itemBuilder: (BuildContext context, int index) => _goodsCard(
// _listGoods[index]['title'],
// _listGoods[index]['borrowTime'],
// _listGoods[index]['timeLength'],
// _listGoods[index]['status'],
// _listGoods[index]['goodsNum'],
// ),
// itemCount: _listGoods.length,
// ),
// ),
// ),
body: BeeListView<MineGoodsModel>(
path: API.manager.articleBorrowMylist,
controller: _controller,

@ -130,9 +130,11 @@ class _QuestionnairePageState extends State<QuestionnairePage> {
// EdgeInsets.symmetric(horizontal: 30.w, vertical: 8.w),
elevation: 0,
onPressed: () {
Get.to(() => QuestionnaireDetailPage(
id: model.id,
));
if (model.status == 2) {
Get.to(() => QuestionnaireDetailPage(
id: model.id,
));
}
},
child: (_getButtonText(model.status))
.text

Loading…
Cancel
Save