|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
import 'package:aku_community/utils/network/base_model.dart';
|
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:dio/dio.dart';
|
|
|
|
@ -167,13 +169,13 @@ class _AdviceDetailPageState extends State<AdviceDetailPage> {
|
|
|
|
|
return BeeScaffold(
|
|
|
|
|
title: '查看详情',
|
|
|
|
|
systemStyle: SystemStyle.yellowBottomBar,
|
|
|
|
|
actions: [
|
|
|
|
|
TextButton(
|
|
|
|
|
onPressed: () =>
|
|
|
|
|
Get.to(() => AdviceEvaluatePage(id: widget.model!.id)),
|
|
|
|
|
child: '评价'.text.make(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
// actions: [
|
|
|
|
|
// TextButton(
|
|
|
|
|
// onPressed: () =>
|
|
|
|
|
// Get.to(() => AdviceEvaluatePage(id: widget.model!.id)),
|
|
|
|
|
// child: '评价'.text.make(),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
body: EasyRefresh(
|
|
|
|
|
firstRefresh: true,
|
|
|
|
|
child: _loading ? _buildShimmer() : _buildChild(),
|
|
|
|
@ -189,14 +191,43 @@ class _AdviceDetailPageState extends State<AdviceDetailPage> {
|
|
|
|
|
if (mounted) setState(() {});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
bottomNavi: BottomButton(
|
|
|
|
|
bottomNavi: _bottomButtons());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _bottomButtons() {
|
|
|
|
|
return Row(
|
|
|
|
|
children: [
|
|
|
|
|
widget.model?.status == 3
|
|
|
|
|
? SizedBox()
|
|
|
|
|
: SizedBox(
|
|
|
|
|
width: 290.w,
|
|
|
|
|
child: BottomButton(
|
|
|
|
|
bgColor: Colors.black,
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
bool result =
|
|
|
|
|
await (Get.to(() => AdviceAddCommentPage(id: widget.model!.id)));
|
|
|
|
|
bool result = await (Get.to(
|
|
|
|
|
() => AdviceAddCommentPage(id: widget.model!.id)));
|
|
|
|
|
if (result && mounted) _refreshController.callRefresh();
|
|
|
|
|
},
|
|
|
|
|
child: '继续提问'.text.bold.make(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: BottomButton(
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
BaseModel baseModel =
|
|
|
|
|
await NetUtil().get(API.manager.completeFeedBack, params: {
|
|
|
|
|
"adviceId": widget.model!.id,
|
|
|
|
|
});
|
|
|
|
|
if (baseModel.status ?? false) {
|
|
|
|
|
Get.to(() => AdviceEvaluatePage(id: widget.model!.id));
|
|
|
|
|
}
|
|
|
|
|
BotToast.showText(text: baseModel.message ?? '未知错误');
|
|
|
|
|
},
|
|
|
|
|
child: '完成沟通'.text.bold.make(),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|