Browse Source

首页更改,课程更改;积分ui更改

ff_new
w-R 3 years ago
parent
commit
9a48477902
  1. BIN
      assets/image/2x/integral_return.png
  2. BIN
      assets/image/3x/integral_return.png
  3. BIN
      assets/image/integral_return.png
  4. 16
      lib/community/community_course.dart
  5. 407
      lib/community/community_view/class_details.dart
  6. 9
      lib/community/community_view/course_banner.dart
  7. 15
      lib/home/home_page.dart
  8. 3
      lib/home/home_view/home_integral_store.dart
  9. 6
      lib/home/home_view/shortcut_operation.dart
  10. 79
      lib/integral_store/integral_store_details_page.dart
  11. 6
      lib/main_page.dart
  12. 37
      lib/order/exchange_order_page.dart
  13. 12
      lib/retrofit/retrofit_api.dart
  14. 6
      lib/retrofit/retrofit_api.g.dart
  15. 16
      lib/web/web_view/comment_list.dart

BIN
assets/image/2x/integral_return.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/3x/integral_return.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/image/integral_return.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

16
lib/community/community_course.dart

@ -61,14 +61,24 @@ class _CommunityCourse extends State<CommunityCourse>
setState(() {});
}
});
queryCourseBanner();
classListAsync();
collectionList();
// courseDetails("1451753512101740544");
}
///banner
queryCourseBanner() async {
BaseData<PageInfo<BannerData>> banner = await apiService.queryBanner({
"model": {"type": "COURSE_BANNER"},
}).catchError((error) {
refreshController.refreshFailed();
});
bannerData.clear();
bannerData.addAll(banner.data.records);
}
///
classListAsync() async
{
classListAsync() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(

407
lib/community/community_view/class_details.dart

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:chewie/chewie.dart';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
@ -42,11 +44,9 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
var commentFocus = FocusNode();
String parenId = "0";
String hintText = S.current.liuxianinjingcaidepinglunba;
List<MemberCommentList> memberList = [];
final GlobalKey inputKey = GlobalKey();
final TextEditingController commentTextController = TextEditingController();
int commentTotal = 0;
double commentHeight = 60.h;
CourseDetails course;
List<Chapter> chapterList = [];
bool isShowImg = true;
@ -149,203 +149,212 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
Stack(
child:Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Column(
children: [
videoWidget(
MediaQuery.of(context).size.width,
videoPlayerController != null
? (MediaQuery.of(context).size.width) /
videoPlayerController.value.aspectRatio
: MediaQuery.of(context).size.width / 2,
chapterList.length>chapterIndex?chapterList[chapterIndex].content.coverImg:"",
Stack(
children: [
videoWidget(
MediaQuery.of(context).size.width,
videoPlayerController != null
? (MediaQuery.of(context).size.width) /
videoPlayerController.value.aspectRatio
: MediaQuery.of(context).size.width / 2,
chapterList.length>chapterIndex?chapterList[chapterIndex].content.coverImg:"",
),
Container(
margin: EdgeInsets.only(top: 40.h, left: 16.w, right: 16.w),
decoration: BoxDecoration(
color: Colors.transparent,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
child: Icon(
Icons.arrow_back_ios,
color: Colors.white,
size: 24,
),
onTap: () {
Navigator.of(context).pop();
},
),
],
),
),
],
),
Container(
margin: EdgeInsets.only(top: 40.h, left: 16.w, right: 16.w),
height: 123,
margin: EdgeInsets.only(bottom: 16.h),
padding: EdgeInsets.only(left: 16,top: 16,right: 10),
decoration: BoxDecoration(
color: Colors.transparent,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
child: Icon(
Icons.arrow_back_ios,
color: Colors.white,
size: 24,
),
onTap: () {
Navigator.of(context).pop();
},
),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
)
],
),
),
],
),
Container(
height: 123,
margin: EdgeInsets.only(bottom: 16.h),
padding: EdgeInsets.only(left: 16,top: 16,right: 10),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 2),
blurRadius: 14,
spreadRadius: 0,
)
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 22.h,
width: 40.w,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
border: Border.all(
width: 1,
color: Color(0xFFFF7A1A),
style: BorderStyle.solid,
Row(
children: [
Container(
height: 22.h,
width: 40.w,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
border: Border.all(
width: 1,
color: Color(0xFFFF7A1A),
style: BorderStyle.solid,
),
),
child: Text(
( course?.tags != null && course.tags.length > 0 )?course.tags[0] : "",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFFFF7A1A),
),
),
),
),
child: Text(
( course?.tags != null && course.tags.length > 0 )?course.tags[0] : "",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFFFF7A1A),
SizedBox(
width: 6.w,
),
),
Expanded(
child: Text(
course != null ?course.subject:"",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF1A1A1A),
),
),
flex: 1,
)
],
),
SizedBox(
width: 6.w,
height:10.h,
),
Expanded(
child: Text(
course != null ?course.subject:"",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF1A1A1A),
),
),
flex: 1,
)
],
),
SizedBox(
height:10.h,
),
Padding(padding: EdgeInsets.only(right: 16),
child: Row(
children: [
Expanded(
child: Text(
"讲师:${course !=null ? course.author.name :""}",
Padding(padding: EdgeInsets.only(right: 16),
child: Row(
children: [
Expanded(
child: Text(
"讲师:${course !=null ? course.author.name :""}",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
)),
Text(
"播放次数",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
color: Color(0xFF808080),
),
)),
Text(
"播放次数",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
),
SizedBox(
width:4,
),
Text(
course != null ? course.viewers.toString() :"",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
),
SizedBox(
width:4,
),
Text(
course != null ? course.viewers.toString() :"",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF808080),
),
),
],
),),
SizedBox(
height:10.h,
),
Text(
course != null ?course.introduce:"",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
],
),),
SizedBox(
height:10.h,
),
],
),
Text(
course != null ?course.introduce:"",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
anthology(),
CommentList(
commentKey,
course?.likes ?? course?.likes?? 0,
widget.arguments["id"],
isKeyBoardShow,
_reply,
_delCommentTips,
12.sp,
requestApiFinish: (total){setState(() {
commentTotal = total;
});},
),
if (commentTotal == 0)
Container(
width: double.infinity,
alignment: Alignment.topCenter,
margin: EdgeInsets.only(top: 40),
padding: EdgeInsets.all(22.h),
child: Text(
S
.of(context)
.zanwupinglun,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Color(0xFFA0A0A0),
),
),
),
],
),
),
anthology(),
CommentList(
commentKey,
course?.likes ?? course?.likes?? 0,
course?.id ?? course?.id ??"",
isKeyBoardShow,
_reply,
_delCommentTips,
12.sp,
),
if (memberList == null || memberList.length == 0)
Container(
width: double.infinity,
alignment: Alignment.topCenter,
margin: EdgeInsets.only(top: 40),
padding: EdgeInsets.all(22.h),
child: Text(
S
.of(context)
.zanwupinglun,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.bold,
color: Color(0xFFA0A0A0),
),
),
),
///
InputComment(
inputKey,
hintText,
isKeyBoardShow,
commentFocus,
commentTextController,
_toComment,
_queryMemberComment,
_queryInformationLikes,
isLike: false,
],
),
],
),
),
flex: 1,),
///
InputComment(
inputKey,
hintText,
isKeyBoardShow,
commentFocus,
commentTextController,
_toComment,
_queryMemberComment,
_queryInformationLikes,
isLike: false,
),
],
),
),
);
@ -517,25 +526,9 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
);
}
contentHeight() {
double contentHeight = MediaQuery
.of(context)
.size
.height -
kToolbarHeight -
MediaQuery
.of(context)
.padding
.top -
160.h;
if ((contentHeight - 60.h) > (128.h * memberList.length)) {
commentHeight = contentHeight - (128.h * memberList.length);
}
}
////
_queryInformationLikes() async {
BaseData baseData = await apiService.informationLikes("1455102859841372160");
BaseData baseData = await apiService.informationLikes(widget.arguments["id"]);
if (baseData != null && baseData.isSuccess) {
commentKey.currentState.setState(() {});
setState(() {
@ -555,7 +548,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
BaseData baseData = await apiService.memberComment({
"content": content,
"parentId": parenId,
"relationalId":course.id,
"relationalId":widget.arguments["id"],
"relationalType": 1
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
@ -563,32 +556,6 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
state.queryMemberCommentList();
commentTextController.text = "";
FocusScope.of(context).unfocus();
_queryMemberCommentList();
}
}
///
_queryMemberCommentList() async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(
Dio(),
context: context,
token: sharedPreferences.getString("token"),
showLoading: false,
);
BaseData<PageInfo<MemberCommentList>> baseData =
await apiService.memberCommentList({
"pageNum": 1,
"pageSize": 100,
"relationalId":course.id,
"relationalType": 1,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
commentTotal = baseData.data.size;
memberList = baseData.data.list;
contentHeight();
if (mounted) setState(() {});
}
}

9
lib/community/community_view/course_banner.dart

@ -4,7 +4,11 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/retrofit/data/banner.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
class CourseBanner extends StatefulWidget {
@ -20,6 +24,11 @@ class CourseBanner extends StatefulWidget {
}
class _CourseBanner extends State<CourseBanner> {
ApiService apiService;
final RefreshController refreshController = RefreshController();
List<BannerData> bannerData = [];
@override
Widget build(BuildContext context) {
return Container(

15
lib/home/home_page.dart

@ -35,21 +35,18 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'home_view/shortcut_operation.dart';
class HomePage extends StatefulWidget {
final GestureTapCallback callback;
final Function changeTab;
HomePage(this.callback);
HomePage(this.changeTab);
@override
State<StatefulWidget> createState() {
return _HomePage(callback);
return _HomePage();
}
}
class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
ApiService apiService;
final GestureTapCallback callback;
_HomePage(this.callback);
@override
void initState() {
@ -267,7 +264,9 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
HomeBanner(bannerData, controller),
///
ShortcutOperation(),
ShortcutOperation((){
widget.changeTab(1);
}),
///
SignView(isSigned,(value){setState(() {
@ -288,7 +287,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
// CouponView(),
///
HomeIntegralStore(gooods, callback),
HomeIntegralStore(gooods),
///
FeaturedActivity(),

3
lib/home/home_view/home_integral_store.dart

@ -9,10 +9,9 @@ import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class HomeIntegralStore extends StatefulWidget {
final GestureTapCallback callback;
final List<Goods> gooods;
HomeIntegralStore(this.gooods, this.callback);
HomeIntegralStore(this.gooods);
@override
State<StatefulWidget> createState() {

6
lib/home/home_view/shortcut_operation.dart

@ -12,6 +12,10 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shared_preferences/shared_preferences.dart';
class ShortcutOperation extends StatefulWidget {
final Function goToOrder;
ShortcutOperation(this.goToOrder);
@override
State<StatefulWidget> createState() {
return _ShortcutOperation();
@ -38,7 +42,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
children: [
GestureDetector(
onTap: (){
widget.goToOrder();
},
child: Container(
width: 106,

79
lib/integral_store/integral_store_details_page.dart

@ -194,62 +194,67 @@ class _IntegralStoreDetailsPage extends State {
Container(
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Text(
goods == null ? "" : goods.name,
overflow: TextOverflow.ellipsis,
Text(
goods == null ? "" : S.of(context).jifen_(goods.price),
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 18.sp,
color: Color(0xFF353535),
color: Color(0xFF32A060),
),
),
flex: 1,
SizedBox(
width: 10.w,
),
Text(
goods == null
? ""
: S.of(context).yiduihuanjian("${goods.sales}"),
Expanded(child: Text(
S.of(context).yuan_(goods.worth),
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFF585858),
decoration: TextDecoration.lineThrough,
decorationColor: Color(0xFF585858),
fontWeight: MyFontWeight.regular,
color: Color(0xFFA29E9E),
fontSize: 14.sp,
),
),),
Text(
"库存:${goods.stock}",
style: TextStyle(
color: Color(0xFF585858),
decorationColor: Color(0xFF353535),
fontWeight: MyFontWeight.medium,
fontSize: 12.sp,
),
),
],
),
SizedBox(
height: 8.h,
),
Text(
goods == null ? "" : goods.name,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
color: Color(0xFF353535),
),
),
SizedBox(
height: 11.h,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
goods == null ? "" : goods.description,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF727272),
),
),
flex: 1,
),
Text(
goods == null ? "" : S.of(context).jifen_(goods.price),
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 16.sp,
color: Color(0xFF32A060),
),
),
],
Text(
goods == null ? "" : goods.description,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF727272),
),
),
],
),

6
lib/main_page.dart

@ -78,7 +78,11 @@ class _MainPage extends State<MainPage> with WidgetsBindingObserver {
_widgetOptions = <Widget>[
// BrandPage(),
HomePage(() {}),
HomePage((index) {
setState(() {
pageController.jumpToPage(index);
});
}),
// MainHomePage(),
UnionPage(),
CommunityPage(),

37
lib/order/exchange_order_page.dart

@ -4,11 +4,14 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:dio/dio.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:fluwx/fluwx.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -662,10 +665,44 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
"goodsId": widget.arguments["goodsId"],
"number": 1,
"useTyped": widget.arguments["useTyped"],
"payChannel":checkIndex == 3?"1":"4",
if (widget.arguments["useTyped"] == 1) "storeId": storeId,
if (widget.arguments["useTyped"] == 2) "userAddressId": userAddressId,
});
if (baseDate.isSuccess) {
if(checkIndex == 3){
if (!(await Min.isInitialize())) {
// app的充值支付使用同一个WXPayEntryActivity回调
// getPackage空指针
//
await Min.initialize();
}
WxPay wxPay = WxPay.fromJson(baseDate.data);
await registerWxApi(
appId: wxPay.appId,
doOnAndroid: true,
universalLink: "https://hx.lotus-wallet.com/app/",
);
payWithWeChat(
appId: wxPay.appId,
partnerId: wxPay.partnerId,
prepayId: wxPay.prepayId,
packageValue: wxPay.packageValue,
nonceStr: wxPay.nonceStr,
timeStamp: int.tryParse(wxPay.timeStamp),
sign: wxPay.sign,
);
weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}");
Navigator.of(context).popAndPushNamed(
'/router/order_details',
arguments: {
"id": widget.arguments["goodsId"],
},
);
});
return;
}
await Navigator.of(context)
.pushNamed('/router/exchange_order_success_page', arguments: {
"price": widget.arguments["price"],

12
lib/retrofit/retrofit_api.dart

@ -45,15 +45,19 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.236:8766/app/"; ///
// const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/";
// const base_url = "http://192.168.10.130:8766/app/";///
// const baseUrl = "http://192.168.10.130:8766/app/";///
@RestApi(baseUrl: baseUrl)
abstract class ApiService {
factory ApiService(

6
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8766/app/';
baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
}
final Dio _dio;
@ -346,13 +346,15 @@ class _ApiService implements ApiService {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _headers = <String, dynamic>{};
_headers.addAll({"Environment":"app"});
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/create',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
headers: _headers,
extra: _extra,
baseUrl: baseUrl),
data: _data);

16
lib/web/web_view/comment_list.dart

@ -23,9 +23,10 @@ class CommentList extends StatefulWidget {
final double fontSize;
final String relationalId;
final int like;
final Function requestApiFinish;
CommentList(Key key, this.like, this.relationalId,
this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize)
this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize,{this.requestApiFinish})
: super(key: key);
@override
@ -197,6 +198,8 @@ class CommentListState extends State<CommentList> {
//
queryMemberCommentList() async {
if(widget?.relationalId == null || widget.relationalId.isEmpty)
return;
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (apiService == null)
apiService = ApiService(
@ -213,10 +216,13 @@ class CommentListState extends State<CommentList> {
"relationalType": 1,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
commentTotal = baseData.data.size;
memberList = baseData.data.list;
contentHeight();
setState(() {});
setState(() {
commentTotal = baseData.data.size;
widget.requestApiFinish(commentTotal);
memberList.addAll(baseData.data.list);
contentHeight();
setState(() {});
});
}
}

Loading…
Cancel
Save