导包冲突;通知公告完善

pull/1/head
戴余标 2 years ago
parent 259bc1844d
commit 8b937fae5a

@ -96,7 +96,7 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.amap.api:3dmap:latest.integration'
implementation 'com.amap.api:location:5.2.0'
// implementation 'com.amap.api:location:5.2.0'
implementation 'com.android.support:multidex:2.0.1'
}

@ -13,7 +13,7 @@ class MessageListModel extends Equatable {
final String content;
final String sendDate;
final int jumpId;
final int onlyId;
final int? onlyId;
DateTime? get sendDt => DateUtil.getDateTime(sendDate);

@ -15,5 +15,5 @@ MessageListModel _$MessageListModelFromJson(Map<String, dynamic> json) =>
content: json['content'] as String,
sendDate: json['sendDate'] as String,
jumpId: json['jumpId'] as int,
onlyId: json['onlyId'] as int,
onlyId: json['onlyId'] as int?,
);

@ -1,17 +1,12 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:common_utils/common_utils.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/models/home/home_announce_model.dart';
import 'package:aku_new_community/pages/message_center_page/announce/announce_view.dart';
import 'package:aku_new_community/ui/community/notice/notice_detail_page.dart';
import 'package:aku_new_community/widget/bee_image_network.dart';
import '../../../models/message/message_list_model.dart';
class AnnounceCard extends StatelessWidget {
@ -52,7 +47,7 @@ class AnnounceCard extends StatelessWidget {
);
}
Widget _card(HomeAnnounceModel model) {
Widget _card(MessageListModel model) {
return InkWell(
onTap: () {
Get.to(() => NoticeDetailPage(id: model.id));
@ -70,22 +65,22 @@ class AnnounceCard extends StatelessWidget {
children: [
'${DateUtil.formatDateStr(model.createDate, format: 'dd日 HH:mm')}'
'${DateUtil.formatDateStr(model.sendDate, format: 'dd日 HH:mm')}'
.text
.size(28.sp)
.color(ktextSubColor)
.make(),
32.w.heightBox,
Container(
width: double.infinity,
height: 258.w,
clipBehavior: Clip.antiAliasWithSaveLayer,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.w)),
child: BeeImageNetwork(
imgs: model.imgList,
),
),
32.w.heightBox,
// Container(
// width: double.infinity,
// height: 258.w,
// clipBehavior: Clip.antiAliasWithSaveLayer,
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.w)),
// child: BeeImageNetwork(
// imgs: model.imgList,
// ),
// ),
// 32.w.heightBox,
'${model.title}'.text.size(36.sp).black.bold.make(),
32.w.heightBox,

@ -1,5 +1,6 @@
import 'package:aku_new_community/models/home/home_announce_model.dart';
import 'package:aku_new_community/models/message/message_list_model.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -15,7 +16,7 @@ class ListDateModel {
final String month;
final int index;
final String year;
final List<HomeAnnounceModel> models;
final List<MessageListModel> models;
ListDateModel(this.month, this.models, this.index, this.year);
}
@ -34,10 +35,10 @@ class _AnnounceViewState extends State<AnnounceView> {
late AutoScrollController _autoScrollController;
List<ListDateModel> _modelLists = [];
List<HomeAnnounceModel> _innerModelList = [];
List<MessageListModel> _innerModelList = [];
String _headMonth = '';
void monthListDepart(List<HomeAnnounceModel> models) {
void monthListDepart(List<MessageListModel> models) {
for (var item in models) {
var index =
_modelLists.indexWhere((element) => element.month == item.month);
@ -115,12 +116,13 @@ class _AnnounceViewState extends State<AnnounceView> {
_page = 1;
_modelLists.clear();
_innerModelList.clear();
var base = await NetUtil().getList(SAASAPI.announce.list, params: {
var base = await NetUtil().getList(SAASAPI.message.list, params: {
'pageNum': _page,
'size': _size,
'type':5,
});
_innerModelList =
base.rows.map((e) => HomeAnnounceModel.fromJson(e)).toList();
base.rows.map((e) => MessageListModel.fromJson(e)).toList();
monthListDepart(_innerModelList);
if (_modelLists.isNotEmpty) {
_headMonth = _modelLists[0].month;
@ -130,13 +132,14 @@ class _AnnounceViewState extends State<AnnounceView> {
},
onLoad: () async {
_page++;
var base = await NetUtil().getList(SAASAPI.announce.list, params: {
var base = await NetUtil().getList(SAASAPI.message.list, params: {
'pageNum': _page,
'size': _size,
'type':5,
});
if (base.total > _modelLists.length) {
_innerModelList =
base.rows.map((e) => HomeAnnounceModel.fromJson(e)).toList();
base.rows.map((e) => MessageListModel.fromJson(e)).toList();
monthListDepart(_innerModelList);
setState(() {});
} else {

Loading…
Cancel
Save