|
|
@ -72,14 +72,14 @@ class _GoodsDetailPageState extends State<GoodsDetailPage> {
|
|
|
|
firstRefresh: true,
|
|
|
|
firstRefresh: true,
|
|
|
|
header: MaterialHeader(),
|
|
|
|
header: MaterialHeader(),
|
|
|
|
onRefresh: () async {
|
|
|
|
onRefresh: () async {
|
|
|
|
BaseModel baseModel = await NetUtil().get(API.market.goodsDetail,
|
|
|
|
BaseModel baseModel = await NetUtil().get(
|
|
|
|
params: {
|
|
|
|
API.market.goodsDetail,
|
|
|
|
"goodsId": widget.id,
|
|
|
|
params: {"goodsId": widget.id},
|
|
|
|
"id": userProvider.userDetailModel!.id
|
|
|
|
);
|
|
|
|
});
|
|
|
|
if (baseModel.status == true && baseModel.data != null) {
|
|
|
|
if (baseModel.status ?? false) {
|
|
|
|
|
|
|
|
_goodsModel = GoodsDetailModel.fromJson(baseModel.data);
|
|
|
|
_goodsModel = GoodsDetailModel.fromJson(baseModel.data);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
_goodsModel = GoodsDetailModel.fail();
|
|
|
|
BotToast.showText(text: baseModel.message ?? '未知错误');
|
|
|
|
BotToast.showText(text: baseModel.message ?? '未知错误');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
baseModel = await NetUtil().get(API.market.hotTop);
|
|
|
|
baseModel = await NetUtil().get(API.market.hotTop);
|
|
|
|