pull/1/head
张萌 3 years ago
parent 59abb6e51c
commit 59f8aa50b3

@ -155,6 +155,9 @@ class _Community {
} }
class _Task { class _Task {
///
String get urgeService => '/app/user/taskRelease/urgeService';
///, ///,
String get cancel => '/app/user/taskRelease/cancel'; String get cancel => '/app/user/taskRelease/cancel';
@ -267,19 +270,19 @@ class _Pay {
String get createPrepaymentOrder => '/app/user/alipay/createPrepaymentOrder'; String get createPrepaymentOrder => '/app/user/alipay/createPrepaymentOrder';
/// ///
String get prepaymentOrderCheckAlipay => '/app/user/alipay/prepaymentOrderCheckAlipay'; String get prepaymentOrderCheckAlipay =>
'/app/user/alipay/prepaymentOrderCheckAlipay';
/// ///
String get createLivingExpensesOrder => '/app/user/alipay/createLivingExpensesOrder'; String get createLivingExpensesOrder =>
'/app/user/alipay/createLivingExpensesOrder';
/// ///
String get livingExpensesOrderCheckAlipay => '/app/user/alipay/livingExpensesOrderCheckAlipay'; String get livingExpensesOrderCheckAlipay =>
'/app/user/alipay/livingExpensesOrderCheckAlipay';
} }
class _LifePay {
class _LifePay{
/// ///
String get livingExpensesList => '/app/user/livingExpenses/list'; String get livingExpensesList => '/app/user/livingExpenses/list';
@ -288,6 +291,4 @@ class _LifePay{
/// ///
String get findEstateBalance => '/app/user/livingExpenses/findEstateBalance'; String get findEstateBalance => '/app/user/livingExpenses/findEstateBalance';
} }

@ -1,5 +1,6 @@
import 'package:aku_new_community/model/common/img_model.dart'; import 'package:aku_new_community/model/common/img_model.dart';
import 'package:aku_new_community/models/community/all_dynamic_list_model.dart'; import 'package:aku_new_community/models/community/all_dynamic_list_model.dart';
import 'package:common_utils/common_utils.dart';
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
part 'dynamic_my_list_body.g.dart'; part 'dynamic_my_list_body.g.dart';
@ -17,9 +18,12 @@ class DynamicMyListBody {
final List<ImgModel> dynamicImgList; final List<ImgModel> dynamicImgList;
final List<TopicTag> topicTags; final List<TopicTag> topicTags;
final bool isLike; final bool isLike;
factory DynamicMyListBody.fromJson(Map<String, dynamic> json) => factory DynamicMyListBody.fromJson(Map<String, dynamic> json) =>
_$DynamicMyListBodyFromJson(json); _$DynamicMyListBodyFromJson(json);
DateTime? get createDT => DateUtil.getDateTime(createDate);
const DynamicMyListBody({ const DynamicMyListBody({
required this.id, required this.id,
this.content, this.content,

@ -7,18 +7,17 @@
* ==================================================== * ====================================================
*/ */
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/model/user/adress_model.dart';
import 'package:aku_new_community/pages/personal/user_func.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/model/user/adress_model.dart';
import 'package:aku_new_community/pages/personal/user_func.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'address/new_address_page.dart'; import 'address/new_address_page.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
@ -196,9 +195,7 @@ class _MyAddressItemState extends State<MyAddressItem> {
if (result == true) { if (result == true) {
bool? result = bool? result =
await Userfunc.deleteAddress(widget.addressModel.id!); await Userfunc.deleteAddress(widget.addressModel.id!);
if (result != null) { if (result) widget.refreshController!.callRefresh();
if (result) widget.refreshController!.callRefresh();
}
} }
; ;
}, },

@ -63,7 +63,7 @@ class Userfunc {
/// ///
static Future<bool> deleteAddress(int addressId) async { static Future<bool> deleteAddress(int addressId) async {
BaseModel model = await NetUtil().post(SAASAPI.market.address.delete, BaseModel model = await NetUtil().get(SAASAPI.market.address.delete,
params: {'id': addressId}, showMessage: false); params: {'id': addressId}, showMessage: false);
if (model.success) { if (model.success) {
BotToast.showText(text: '删除成功'); BotToast.showText(text: '删除成功');

@ -1,7 +1,6 @@
import 'dart:math'; import 'dart:math';
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/model/common/img_model.dart'; import 'package:aku_new_community/model/common/img_model.dart';
import 'package:aku_new_community/models/community/all_dynamic_list_model.dart'; import 'package:aku_new_community/models/community/all_dynamic_list_model.dart';
@ -143,14 +142,21 @@ class _CommunityPageState extends State<CommunityPage>
EasyRefresh( EasyRefresh(
firstRefresh: true, firstRefresh: true,
header: MaterialHeader(), header: MaterialHeader(),
footer: MaterialFooter(),
controller: _easyRefreshController, controller: _easyRefreshController,
onRefresh: () async { onRefresh: () async {
_pageNum = 1;
await (getNewInfo()); await (getNewInfo());
_gambitModels = await CommunityFunc.getListGambit(); _gambitModels = await CommunityFunc.getListGambit();
_hotNewsModels = await CommunityFunc.getHotNews(); _hotNewsModels = await CommunityFunc.getHotNews();
_onload = false; _onload = false;
setState(() {}); setState(() {});
}, },
onLoad: () async {
_pageNum++;
await loadNewInfo();
setState(() {});
},
child: _onload child: _onload
? SizedBox() ? SizedBox()
: ListView( : ListView(
@ -191,15 +197,15 @@ class _CommunityPageState extends State<CommunityPage>
} }
Future loadNewInfo() async { Future loadNewInfo() async {
BaseListModel baseListModel = BaseListModel baseListModel = await NetUtil().getList(
await NetUtil().getList(API.market.hotTop, params: { SAASAPI.community.dynamicList,
"pageNum": _pageNum, params: {"pageNum": _pageNum, "size": _size, 'type': 1});
"size": _size, if (baseListModel.total > _newItems.length) {
});
if (baseListModel.rows.isNotEmpty) {
_newItems.addAll((baseListModel.rows) _newItems.addAll((baseListModel.rows)
.map((e) => AllDynamicListModel.fromJson(e)) .map((e) => AllDynamicListModel.fromJson(e))
.toList()); .toList());
} else {
_easyRefreshController.finishLoadCallBack!(noMore: true);
} }
} }

@ -8,8 +8,11 @@ import 'package:aku_new_community/pages/things_page/widget/bee_list_view.dart';
import 'package:aku_new_community/ui/community/community_views/widgets/my_event_card.dart'; import 'package:aku_new_community/ui/community/community_views/widgets/my_event_card.dart';
import 'package:aku_new_community/utils/headers.dart'; import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/login_util.dart'; import 'package:aku_new_community/utils/login_util.dart';
import 'package:aku_new_community/utils/network/base_list_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart'; import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_avatar_widget.dart';
import 'package:aku_new_community/widget/line/vertical_line_painter.dart'; import 'package:aku_new_community/widget/line/vertical_line_painter.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/picker/bee_image_preview.dart'; import 'package:aku_new_community/widget/picker/bee_image_preview.dart';
import 'package:aku_new_community/widget/views/bee_grid_image_view.dart'; import 'package:aku_new_community/widget/views/bee_grid_image_view.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -17,8 +20,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../community_func.dart';
class MyCommunityView extends StatefulWidget { class MyCommunityView extends StatefulWidget {
MyCommunityView({Key? key}) : super(key: key); MyCommunityView({Key? key}) : super(key: key);
@ -32,6 +33,8 @@ class MyCommunityViewState extends State<MyCommunityView>
bool _onload = true; bool _onload = true;
List<DynamicMyListBody> _myEventItems = []; List<DynamicMyListBody> _myEventItems = [];
DynamicMyListHead? _head; DynamicMyListHead? _head;
int _pageNum = 1;
int _size = 10;
refresh() { refresh() {
_refreshController.callRefresh(); _refreshController.callRefresh();
@ -53,10 +56,10 @@ class MyCommunityViewState extends State<MyCommunityView>
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
12.hb, 12.hb,
Image.asset( BeeAvatarWidget(
R.ASSETS_ICONS_ICON_LOGISTICS_PNG,
width: 132.w, width: 132.w,
height: 132.w, height: 132.w,
imgs: UserTool.userProvider.userInfoModel!.imgList,
), ),
32.hb, 32.hb,
'${_head?.createName}' '${_head?.createName}'
@ -132,7 +135,12 @@ class MyCommunityViewState extends State<MyCommunityView>
header: MaterialHeader(), header: MaterialHeader(),
controller: _refreshController, controller: _refreshController,
onRefresh: () async { onRefresh: () async {
_myEventItems = await CommunityFunc.getMyEventItem(); BaseListModel model = await NetUtil().getList(
SAASAPI.community.dynamicMyListL,
params: {'pageNum': _pageNum, 'size': _size},
);
_myEventItems =
model.rows.map((e) => DynamicMyListBody.fromJson(e)).toList();
var base = await NetUtil().get(SAASAPI.community.dynamicMyListH); var base = await NetUtil().get(SAASAPI.community.dynamicMyListH);
if (base.success) { if (base.success) {
_head = DynamicMyListHead.fromJson(base.data); _head = DynamicMyListHead.fromJson(base.data);
@ -140,6 +148,19 @@ class MyCommunityViewState extends State<MyCommunityView>
_onload = false; _onload = false;
setState(() {}); setState(() {});
}, },
onLoad: () async {
BaseListModel model = await NetUtil().getList(
SAASAPI.community.dynamicMyListL,
params: {'pageNum': _pageNum, 'size': _size},
);
if (model.total > _myEventItems.length) {
_myEventItems.addAll(
model.rows.map((e) => DynamicMyListBody.fromJson(e)).toList());
setState(() {});
} else {
_refreshController.finishLoadCallBack!(noMore: true);
}
},
child: _onload child: _onload
? SizedBox() ? SizedBox()
: ListView( : ListView(
@ -206,14 +227,14 @@ class MyCommunityViewState extends State<MyCommunityView>
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
'11.15' '${item.createDT?.month ?? ''}.${item.createDT?.day ?? ''}'
.text .text
.size(32.sp) .size(32.sp)
.color(Color(0xA6000000)) .color(Color(0xA6000000))
.bold .bold
.isIntrinsic .isIntrinsic
.make(), .make(),
'2021' '${item.createDT?.year ?? ''}'
.text .text
.size(24.sp) .size(24.sp)
.color(Color(0x73000000)) .color(Color(0x73000000))
@ -232,7 +253,7 @@ class MyCommunityViewState extends State<MyCommunityView>
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
'25.61' '${item.createDT?.hour ?? ''}.${item.createDT?.second ?? ''}'
.text .text
.size(28.sp) .size(28.sp)
.color(Color(0xA6000000)) .color(Color(0xA6000000))

@ -107,6 +107,8 @@ class _TopicDetailPageState extends State<TopicDetailPage> {
title: _detailModel?.title, title: _detailModel?.title,
imgPath: ImgModel.first(_detailModel?.imgList), imgPath: ImgModel.first(_detailModel?.imgList),
subTitle: _detailModel?.content, subTitle: _detailModel?.content,
dynamicNum: _detailModel?.dynamicNum,
commentNum: _detailModel?.commentNum,
), ),
pinned: true, pinned: true,
floating: true, floating: true,

@ -66,7 +66,7 @@ class _AddAppointmentAddressPageState extends State<AddAppointmentAddressPage> {
children: [ children: [
SizedBox( SizedBox(
width: 170.w, width: 170.w,
child: '标志建筑' child: '目标地点'
.text .text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(0.65)) .color(Colors.black.withOpacity(0.65))
@ -78,7 +78,7 @@ class _AddAppointmentAddressPageState extends State<AddAppointmentAddressPage> {
controller: _tagController, controller: _tagController,
decoration: InputDecoration( decoration: InputDecoration(
border: InputBorder.none, border: InputBorder.none,
hintText: '请输入标志建筑', hintText: '请输入目标地点',
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
isDense: true, isDense: true,
hintStyle: TextStyle( hintStyle: TextStyle(

@ -11,6 +11,7 @@ import 'hall_card.dart';
class HallView extends StatefulWidget { class HallView extends StatefulWidget {
final EasyRefreshController refreshController; final EasyRefreshController refreshController;
final int type; final int type;
const HallView( const HallView(
{Key? key, required this.refreshController, required this.type}) {Key? key, required this.refreshController, required this.type})
: super(key: key); : super(key: key);
@ -32,7 +33,7 @@ class _HallViewState extends State<HallView> {
controller: widget.refreshController, controller: widget.refreshController,
extraParams: { extraParams: {
'taskModel': 1, 'taskModel': 1,
'type': widget.type + 1, 'type': widget.type == 0 ? null : widget.type,
}, },
convert: (json) => convert: (json) =>
json.rows.map((e) => HallListModel.fromJson(e)).toList(), json.rows.map((e) => HallListModel.fromJson(e)).toList(),

@ -32,7 +32,7 @@ class _MyTakeTaskViewState extends State<MyTakeTaskView> {
controller: widget.refreshController, controller: widget.refreshController,
extraParams: { extraParams: {
'taskModel': 2, 'taskModel': 2,
'type': widget.type + 1, 'type': widget.type == 0 ? null : widget.type,
}, },
convert: (json) => convert: (json) =>
json.rows.map((e) => MyTakeTaskListModel.fromJson(e)).toList(), json.rows.map((e) => MyTakeTaskListModel.fromJson(e)).toList(),

@ -70,8 +70,8 @@ class MyTaskCard extends StatelessWidget {
], ],
); );
return GestureDetector( return GestureDetector(
onTap: () { onTap: () async {
Get.to(() => MyTaskDetailPage(model: model)); await Get.to(() => MyTaskDetailPage(model: model));
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,

@ -1,8 +1,10 @@
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/saas_model/task/my_task_list_model.dart'; import 'package:aku_new_community/saas_model/task/my_task_list_model.dart';
import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_cancel_dialog.dart'; import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_cancel_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_evaluation_dialog.dart'; import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_evaluation_dialog.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
@ -200,7 +202,13 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
); );
case 2: case 2:
return MaterialButton( return MaterialButton(
onPressed: () {}, onPressed: () async {
var base = await NetUtil().get(SAASAPI.task.urgeService,
params: {'taskId': widget.model.id}, showMessage: true);
if (base.success) {
Get.back();
}
},
minWidth: 330.w, minWidth: 330.w,
height: 80.w, height: 80.w,
elevation: 0, elevation: 0,

@ -32,7 +32,7 @@ class _MyTaskViewState extends State<MyTaskView> {
controller: widget.refreshController, controller: widget.refreshController,
extraParams: { extraParams: {
'taskModel': 2, 'taskModel': 2,
'type': widget.type + 1, 'type': widget.type == 0 ? null : widget.type,
}, },
convert: (json) => convert: (json) =>
json.rows.map((e) => MyTaskListModel.fromJson(e)).toList(), json.rows.map((e) => MyTaskListModel.fromJson(e)).toList(),

@ -77,7 +77,7 @@ class _TaskPageState extends State<TaskPage> with TickerProviderStateMixin {
Padding( Padding(
padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w), padding: EdgeInsets.symmetric(vertical: 24.w, horizontal: 32.w),
child: Row( child: Row(
children: TaskMap.taskType.values children: <String>['全部', ...TaskMap.taskType.values]
.mapIndexed((currentValue, index) => .mapIndexed((currentValue, index) =>
_typeBar(currentValue, index)) _typeBar(currentValue, index))
.toList(), .toList(),

@ -511,7 +511,9 @@ class _AddHousePageState extends State<AddHousePage> {
'${model.house == null ? '请选择楼层房号' : '${model.building!.name}-${model.unit!.name}-${model.floor!.name}-${model.house!.name}'}' '${model.house == null ? '请选择楼层房号' : '${model.building!.name}-${model.unit!.name}-${model.floor!.name}-${model.house!.name}'}'
.text .text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(0.25)) .color(model.house != null
? Colors.black.withOpacity(0.5)
: Colors.black.withOpacity(0.25))
.make(), .make(),
), ),
Icon( Icon(

Loading…
Cancel
Save