|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
import 'package:aku_new_community/widget/bee_image_network.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
@ -133,11 +134,8 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
|
|
|
|
height: 150.w,
|
|
|
|
height: 150.w,
|
|
|
|
child: ClipRRect(
|
|
|
|
child: ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(4.w),
|
|
|
|
borderRadius: BorderRadius.circular(4.w),
|
|
|
|
child: FadeInImage.assetNetwork(
|
|
|
|
child: BeeImageNetwork(
|
|
|
|
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
|
|
|
imgs: model.imgUrls,
|
|
|
|
image: SAASAPI.image(
|
|
|
|
|
|
|
|
ImgModel.first(model.imgUrls),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -232,9 +230,8 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
|
|
|
|
44.w.heightBox,
|
|
|
|
44.w.heightBox,
|
|
|
|
ClipRRect(
|
|
|
|
ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(8.w),
|
|
|
|
borderRadius: BorderRadius.circular(8.w),
|
|
|
|
child: FadeInImage.assetNetwork(
|
|
|
|
child: BeeImageNetwork(
|
|
|
|
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
|
|
|
|
imgs: _model.imgUrls,
|
|
|
|
image: SAASAPI.image(ImgModel.first(_model.imgUrls)),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
44.w.heightBox,
|
|
|
|
44.w.heightBox,
|
|
|
@ -274,10 +271,12 @@ class _VotingDetailPageState extends State<VotingDetailPage> {
|
|
|
|
BotToast.showText(text: '投票未开始或已结束');
|
|
|
|
BotToast.showText(text: '投票未开始或已结束');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
: () async {
|
|
|
|
: () async {
|
|
|
|
if (_model.allowVote!) {
|
|
|
|
if (!_model.allowVote!) {
|
|
|
|
BotToast.showText(text: '投票失败');
|
|
|
|
BotToast.showText(text: '投票失败');
|
|
|
|
|
|
|
|
} else if (_model.vote!) {
|
|
|
|
|
|
|
|
BotToast.showText(text: '已投过票');
|
|
|
|
} else if (_selectId == null) {
|
|
|
|
} else if (_selectId == null) {
|
|
|
|
BotToast.showText(text: '请先选择候选人!');
|
|
|
|
BotToast.showText(text: '请先选票!');
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
BaseModel baseModel =
|
|
|
|
BaseModel baseModel =
|
|
|
|
await ManagerFunc.vote(widget.id, _selectId);
|
|
|
|
await ManagerFunc.vote(widget.id, _selectId);
|
|
|
|