Browse Source

更改

ff_new
w-R 3 years ago
parent
commit
f94d241e93
  1. 32
      lib/community/community_course.dart
  2. 6
      lib/community/community_details.dart
  3. 6
      lib/community/community_view/class_details.dart
  4. 12
      lib/community/community_view/course_banner.dart
  5. 30
      lib/home/home_view/home_banner.dart
  6. 2
      lib/home/home_view/shortcut_operation.dart
  7. 8
      lib/home/huixiang_view/huixiang_banner.dart
  8. 27
      lib/home/points_mall_view/points_goods_view.dart
  9. 9
      lib/home/points_mall_view/points_mall_banner.dart
  10. 2
      lib/integral/integral_page.dart
  11. 81
      lib/integral_store/integral_store_details_page.dart
  12. 2
      lib/mine/coupons_page.dart
  13. 2
      lib/mine/mine_wallet_page.dart
  14. 4
      lib/mine/user_info_page.dart
  15. 295
      lib/order/exchange_order_page.dart
  16. 6
      lib/web/web_page.dart
  17. 6
      lib/web/web_view/comment_list.dart

32
lib/community/community_course.dart

@ -10,18 +10,15 @@ import 'package:huixiang/retrofit/data/brand.dart';
import 'package:huixiang/retrofit/data/brand_data.dart'; import 'package:huixiang/retrofit/data/brand_data.dart';
import 'package:huixiang/retrofit/data/category_select_list.dart'; import 'package:huixiang/retrofit/data/category_select_list.dart';
import 'package:huixiang/retrofit/data/collect_class_list.dart'; import 'package:huixiang/retrofit/data/collect_class_list.dart';
import 'package:huixiang/retrofit/data/course_details.dart';
import 'package:huixiang/retrofit/data/course_list.dart'; import 'package:huixiang/retrofit/data/course_list.dart';
import 'package:huixiang/retrofit/data/page.dart'; import 'package:huixiang/retrofit/data/page.dart';
import 'package:huixiang/retrofit/retrofit_api.dart'; import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/event_type.dart'; import 'package:huixiang/utils/event_type.dart';
import 'package:huixiang/view_widget/classic_header.dart'; import 'package:huixiang/view_widget/classic_header.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:huixiang/view_widget/store_title_tab.dart'; import 'package:huixiang/view_widget/store_title_tab.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'community_view/class_list_view.dart'; import 'community_view/class_list_view.dart';
import 'community_view/class_title_tab.dart'; import 'community_view/class_title_tab.dart';
import 'community_view/course_banner.dart'; import 'community_view/course_banner.dart';
@ -40,9 +37,8 @@ class _CommunityCourse extends State<CommunityCourse>
final RefreshController refreshController = RefreshController(); final RefreshController refreshController = RefreshController();
ApiService apiService; ApiService apiService;
List<Brand> brands = [];
BrandData brandData;
List<GlobalKey> globaKeys = []; List<GlobalKey> globaKeys = [];
List<Brand> brands = [];
List<BannerData> bannerData = []; List<BannerData> bannerData = [];
List<CategorySelectList> classSelectList = []; List<CategorySelectList> classSelectList = [];
List<CourseList> classList = []; List<CourseList> classList = [];
@ -68,15 +64,31 @@ class _CommunityCourse extends State<CommunityCourse>
///banner ///banner
queryCourseBanner() async { queryCourseBanner() async {
BaseData<PageInfo<BannerData>> banner = await apiService.queryBanner({ if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData<PageInfo<BannerData>> baseData =
await apiService.queryBanner({
"model": {"type": "COURSE_BANNER"}, "model": {"type": "COURSE_BANNER"},
}).catchError((error) { }).catchError((onError) {
refreshController.refreshFailed(); refreshController.refreshFailed();
}); });
bannerData.clear(); if (baseData != null && baseData.isSuccess) {
bannerData.addAll(banner.data.records); bannerData.clear();
bannerData.addAll(baseData.data.records);
refreshController.refreshCompleted();
} else {
refreshController.refreshFailed();
}
EasyLoading.dismiss();
} }
/// ///
classListAsync() async { classListAsync() async {
if (apiService == null) { if (apiService == null) {
@ -242,7 +254,7 @@ class _CommunityCourse extends State<CommunityCourse>
List<Widget> classChildItem() { List<Widget> classChildItem() {
var widgets = <Widget>[ var widgets = <Widget>[
///banner ///banner
CourseBanner(bannerData), CourseBanner(bannerData,),
SizedBox(height: 28), SizedBox(height: 28),

6
lib/community/community_details.dart

@ -138,10 +138,14 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
commentKey, commentKey,
comunity?.likes ?? comunity?.likes.toString() ?? 0, comunity?.likes ?? comunity?.likes.toString() ?? 0,
comunity.id, comunity.id,
1,
isKeyBoardShow, isKeyBoardShow,
_reply, _reply,
_delCommentTips, _delCommentTips,
12.sp, 12.sp,
requestApiFinish: (total){setState(() {
commentTotal = total;
});},
), ),
if (memberList == null || memberList.length == 0) if (memberList == null || memberList.length == 0)
Container( Container(
@ -186,7 +190,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
//// ////
_queryInformationLikes() async { _queryInformationLikes() async {
BaseData baseData = await apiService.informationLikes(comunity.id); BaseData baseData = await apiService.informationLikes(comunity.id).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
commentKey.currentState.setState(() {}); commentKey.currentState.setState(() {});
setState(() { setState(() {

6
lib/community/community_view/class_details.dart

@ -313,6 +313,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
commentKey, commentKey,
course?.likes ?? course?.likes?? 0, course?.likes ?? course?.likes?? 0,
widget.arguments["id"], widget.arguments["id"],
3,
isKeyBoardShow, isKeyBoardShow,
_reply, _reply,
_delCommentTips, _delCommentTips,
@ -528,7 +529,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
//// ////
_queryInformationLikes() async { _queryInformationLikes() async {
BaseData baseData = await apiService.informationLikes(widget.arguments["id"]); BaseData baseData = await apiService.informationLikes(widget.arguments["id"]).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
commentKey.currentState.setState(() {}); commentKey.currentState.setState(() {});
setState(() { setState(() {
@ -549,13 +550,14 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver{
"content": content, "content": content,
"parentId": parenId, "parentId": parenId,
"relationalId":widget.arguments["id"], "relationalId":widget.arguments["id"],
"relationalType": 1 "relationalType": 3
}).catchError((error) {}); }).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
CommentListState state = commentKey.currentState; CommentListState state = commentKey.currentState;
state.queryMemberCommentList(); state.queryMemberCommentList();
commentTextController.text = ""; commentTextController.text = "";
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
// _toComment();
} }
} }

12
lib/community/community_view/course_banner.dart

@ -71,7 +71,7 @@ class _CourseBanner extends State<CourseBanner> {
); );
} }
/// contentType 0123 /// contentType 0123,4:,5:
bannerClick(BannerData bannerData) async { bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) { switch (bannerData.contentType) {
case 1: case 1:
@ -101,14 +101,18 @@ class _CourseBanner extends State<CourseBanner> {
Navigator.of(context).pushNamed(router); Navigator.of(context).pushNamed(router);
} }
break; break;
case 5:
Navigator.of(context)
.pushNamed('/router/class_details', arguments: {
"id": bannerData.content,
});
break;
}
} }
} }
}

30
lib/home/home_view/home_banner.dart

@ -69,26 +69,24 @@ class _HomeBanner extends State<HomeBanner> {
); );
} }
/// contentType 0123 /// contentType 0123,4:,5:
bannerClick(BannerData bannerData) async { bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) { switch (bannerData.contentType) {
case 1: case 1:
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed('/router/integral_store_page',
'/router/integral_store_page', arguments: {"goodsId": bannerData.content});
arguments: {"goodsId": bannerData.content},
);
break; break;
case 2: case 2:
Navigator.of(context).pushNamed( Navigator.of(context)
'/router/web_page', .pushNamed('/router/web_page', arguments: {
arguments: {"activityId": bannerData.content}, "activityId": bannerData.content,
); });
break; break;
case 3: case 3:
Navigator.of(context).pushNamed( Navigator.of(context)
'/router/web_page', .pushNamed('/router/web_page', arguments: {
arguments: {"articleId": bannerData.content}, "articleId": bannerData.content,
); });
break; break;
case 4: case 4:
String router = bannerData.content; String router = bannerData.content;
@ -101,6 +99,12 @@ class _HomeBanner extends State<HomeBanner> {
Navigator.of(context).pushNamed(router); Navigator.of(context).pushNamed(router);
} }
break; break;
case 5:
Navigator.of(context)
.pushNamed('/router/class_details', arguments: {
"id": bannerData.content,
});
break;
} }
} }
} }

2
lib/home/home_view/shortcut_operation.dart

@ -80,7 +80,7 @@ class _ShortcutOperation extends State<ShortcutOperation> {
), ),
GestureDetector( GestureDetector(
onTap: (){ onTap: (){
Navigator.of(context).pushNamed('/router/recharge_page');
}, },
child: Container( child: Container(
width: 106, width: 106,

8
lib/home/huixiang_view/huixiang_banner.dart

@ -62,7 +62,7 @@ class _HuiXiangBanner extends State<HuiXiangBanner> {
); );
} }
/// contentType 0123 /// contentType 0123,4:,5:
bannerClick(BannerData bannerData) async { bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) { switch (bannerData.contentType) {
case 1: case 1:
@ -92,6 +92,12 @@ class _HuiXiangBanner extends State<HuiXiangBanner> {
Navigator.of(context).pushNamed(router); Navigator.of(context).pushNamed(router);
} }
break; break;
case 5:
Navigator.of(context)
.pushNamed('/router/class_details', arguments: {
"id": bannerData.content,
});
break;
} }
} }

27
lib/home/points_mall_view/points_goods_view.dart

@ -100,6 +100,7 @@ class _PointGoods extends State<PointGoods> {
Text( Text(
goods.name, goods.name,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle( style: TextStyle(
color: Color(0xff353535), color: Color(0xff353535),
fontWeight: MyFontWeight.medium, fontWeight: MyFontWeight.medium,
@ -109,17 +110,12 @@ class _PointGoods extends State<PointGoods> {
SizedBox( SizedBox(
height: 5.h, height: 5.h,
), ),
Container( Text(
height: 35.h * AppUtils.textScale(context), S.of(context).jifen_(goods.price),
child: Text( style: TextStyle(
goods.description, color: Color(0xFF32A060),
maxLines: 2, fontSize: 14.sp,
overflow: TextOverflow.ellipsis, fontWeight: MyFontWeight.semi_bold,
style: TextStyle(
color: Color(0xFF727272),
fontWeight: MyFontWeight.regular,
fontSize: 12.sp,
),
), ),
), ),
SizedBox( SizedBox(
@ -143,11 +139,12 @@ class _PointGoods extends State<PointGoods> {
flex: 1, flex: 1,
), ),
Text( Text(
S.of(context).jifen_(goods.price), "库存:${goods?.stock ?? goods?.stock ??""}",
style: TextStyle( style: TextStyle(
color: Color(0xFF32A060), color: Color(0xFF585858),
fontSize: 14.sp, decorationColor: Color(0xFF353535),
fontWeight: MyFontWeight.semi_bold, fontWeight: MyFontWeight.medium,
fontSize: 12.sp,
), ),
), ),
], ],

9
lib/home/points_mall_view/points_mall_banner.dart

@ -69,7 +69,7 @@ class _PointMallBanner extends State<PointMallBanner> {
); );
} }
/// contentType 0123 /// contentType 0123,4:,5:
bannerClick(BannerData bannerData) async { bannerClick(BannerData bannerData) async {
switch (bannerData.contentType) { switch (bannerData.contentType) {
case 1: case 1:
@ -99,10 +99,15 @@ class _PointMallBanner extends State<PointMallBanner> {
Navigator.of(context).pushNamed(router); Navigator.of(context).pushNamed(router);
} }
break; break;
case 5:
Navigator.of(context)
.pushNamed('/router/class_details', arguments: {
"id": bannerData.content,
});
break;
} }
} }
} }

2
lib/integral/integral_page.dart

@ -152,7 +152,7 @@ class _IntegralPage extends State<IntegralPage> {
return; return;
} }
EasyLoading.show(status: S.of(context).zhengzaijiazai); EasyLoading.show(status: S.of(context).zhengzaijiazai);
BaseData baseData = await apiService.signIn(); BaseData baseData = await apiService.signIn().catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() {}); setState(() {});
SmartDialog.show( SmartDialog.show(

81
lib/integral_store/integral_store_details_page.dart

@ -52,7 +52,7 @@ class _IntegralStoreDetailsPage extends State {
queryGoodsById() async { queryGoodsById() async {
BaseData<Goods> baseData = BaseData<Goods> baseData =
await apiService.creditGoodsById(arguments["goodsId"]); await apiService.creditGoodsById(arguments["goodsId"]).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() { setState(() {
goods = baseData.data; goods = baseData.data;
@ -63,13 +63,13 @@ class _IntegralStoreDetailsPage extends State {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: MyAppBar( // appBar: MyAppBar(
background: Color(0xFFFFFFFF), // background: Color(0xFFFFFFFF),
leadingColor: Colors.black, // leadingColor: Colors.black,
title: S.of(context).shangpinxiangqing, // title: S.of(context).shangpinxiangqing,
titleColor: Colors.black, // titleColor: Colors.black,
titleSize: 16.sp, // titleSize: 16.sp,
), // ),
body: Container( body: Container(
child: Column( child: Column(
children: [ children: [
@ -213,7 +213,7 @@ class _IntegralStoreDetailsPage extends State {
width: 10.w, width: 10.w,
), ),
Expanded(child: Text( Expanded(child: Text(
S.of(context).yuan_(goods.worth), S.of(context).yuan_(goods?.worth??goods?.worth??""),
style: TextStyle( style: TextStyle(
color: Color(0xFF585858), color: Color(0xFF585858),
decoration: TextDecoration.lineThrough, decoration: TextDecoration.lineThrough,
@ -223,7 +223,7 @@ class _IntegralStoreDetailsPage extends State {
), ),
),), ),),
Text( Text(
"库存:${goods.stock}", "库存:${goods?.stock ?? goods?.stock ??""}",
style: TextStyle( style: TextStyle(
color: Color(0xFF585858), color: Color(0xFF585858),
decorationColor: Color(0xFF353535), decorationColor: Color(0xFF353535),
@ -268,28 +268,47 @@ class _IntegralStoreDetailsPage extends State {
return Container( return Container(
child: AspectRatio( child: AspectRatio(
aspectRatio: 1.3698, aspectRatio: 1.3698,
child: Swiper( child: Stack(
pagination: SwiperPagination( children: [
alignment: Alignment.bottomCenter, Swiper(
builder: DotSwiperPaginationBuilder( pagination: SwiperPagination(
size: 8, alignment: Alignment.bottomCenter,
activeSize: 8, builder: DotSwiperPaginationBuilder(
space: 5, size: 8,
activeColor: Colors.black, activeSize: 8,
color: Colors.black.withAlpha(76), space: 5,
activeColor: Colors.black,
color: Colors.black.withAlpha(76),
),
),
itemBuilder: (context, position) {
return goods == null
? Container()
: Image.network(
goods.viceImgPaths.elementAt(position),
fit: BoxFit.cover,
);
},
itemCount: (goods == null || goods.viceImgPaths == null)
? 1
: goods.viceImgPaths.length,
), ),
), GestureDetector(
itemBuilder: (context, position) { onTap: (){
return goods == null Navigator.of(context).pop();
? Container() },
: Image.network( child: Container(
goods.viceImgPaths.elementAt(position), margin: EdgeInsets.only(left: 16,top: 52),
fit: BoxFit.cover, padding:EdgeInsets.all(5),
); child:Image.asset(
}, "assets/image/integral_return.png",
itemCount: (goods == null || goods.viceImgPaths == null) // alignment: Alignment.center,
? 1 width: 24,
: goods.viceImgPaths.length, height: 24,
),
),
),
],
), ),
), ),
); );

2
lib/mine/coupons_page.dart

@ -211,7 +211,7 @@ class _CouponsPage extends State<CouponsPage> {
} }
receiveCoupon(couponId) async { receiveCoupon(couponId) async {
BaseData baseData = await apiService.receiveCoupon(couponId); BaseData baseData = await apiService.receiveCoupon(couponId).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
_onRefresh(); _onRefresh();
showAlertDialog(); showAlertDialog();

2
lib/mine/mine_wallet_page.dart

@ -57,7 +57,7 @@ class _MineWalletPage extends State<MineWalletPage> {
} }
queryUserBalance() async { queryUserBalance() async {
BaseData<UserInfo> baseData = await apiService.queryInfo(); BaseData<UserInfo> baseData = await apiService.queryInfo().catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
userInfo = baseData.data; userInfo = baseData.data;
mBalance = double.tryParse(userInfo.money); mBalance = double.tryParse(userInfo.money);

4
lib/mine/user_info_page.dart

@ -344,7 +344,7 @@ class _UserInfoPage extends State<UserInfoPage> {
/// ///
modifyInfos() async { modifyInfos() async {
var info = await apiService.editInfo(modifyInfo); var info = await apiService.editInfo(modifyInfo).catchError((onError) {});
if (info.isSuccess) { if (info.isSuccess) {
setState(() { setState(() {
SmartDialog.showToast("用户信息修改成功", alignment: Alignment.center); SmartDialog.showToast("用户信息修改成功", alignment: Alignment.center);
@ -355,7 +355,7 @@ class _UserInfoPage extends State<UserInfoPage> {
/// ///
fileUpload() async { fileUpload() async {
if (filePath != null && filePath != "" && await File(filePath).exists()) { if (filePath != null && filePath != "" && await File(filePath).exists()) {
BaseData<UploadResult> baseData = await apiService.upload(File(filePath), 123123123); BaseData<UploadResult> baseData = await apiService.upload(File(filePath), 123123123).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
UploadResult uploadResult = baseData.data; UploadResult uploadResult = baseData.data;
modifyInfo["headimg"] = uploadResult.url; modifyInfo["headimg"] = uploadResult.url;

295
lib/order/exchange_order_page.dart

@ -13,6 +13,7 @@ import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart'; import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/utils/min.dart'; import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/my_appbar.dart'; import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -226,6 +227,85 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
], ],
), ),
), ),
Container(
margin:
EdgeInsets.only(left: 16, right: 16, top: 26, bottom: 8),
padding: EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.all(Radius.circular(8)),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Image.asset(
"assets/image/icon_order_exchange_info.png",
width: 24,
height: 24,
),
SizedBox(width: 4),
Text(
S.of(context).duihuanxinxi,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
color: Color(0xFF353535)),
),
],
),
SizedBox(
height: 18.h,
),
Row(
children: [
Text(
S.of(context).lingqufangshi,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
SizedBox(
width: 12.w,
),
Text(
widget.arguments["useTyped"] == 1
? S.of(context).ziti
: widget.arguments["useTyped"] == 2
? S.of(context).peisong
: S.of(context).xianshangfafang,
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
],
),
SizedBox(
height: 12.h,
),
Text(
"非实物商品兑换后领取到卡包即可使用!",
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF32A060),
fontWeight: MyFontWeight.medium
),
),
],
),
),
Container( Container(
margin: margin:
EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 16), EdgeInsets.only(left: 16, right: 16, top: 8, bottom: 16),
@ -318,38 +398,62 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
SizedBox( SizedBox(
height: 12.h, height: 12.h,
), ),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Text(
// "商品积分",
// style:
// TextStyle(fontSize: 14, color: Color(0xFF353535)),
// ),
// SizedBox(
// width: 12,
// ),
// Text(
// S.of(context).jifen_(widget.arguments["price"]),
// style: TextStyle(
// fontSize: 12,
// color: Colors.black,
// ),
// ),
// ],
// ),
// SizedBox(
// height: 12,
// ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
"实付积分", "应付数额",
style:
TextStyle(fontSize: 14, color: Color(0xFF353535),fontWeight: MyFontWeight.regular),
),
SizedBox(
width: 12,
),
Text(
S.of(context).jifen_(widget.arguments["price"]),
style: TextStyle(
fontSize: 12,
color: Colors.black,
),
),
],
),
SizedBox(
height: 12,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"现金抵扣积分",
style:
TextStyle(fontSize: 14, color: Color(0xFF353535),fontWeight: MyFontWeight.regular),
),
SizedBox(
width: 12,
),
Text(
S.of(context).jifen_(widget.arguments["price"]),
style: TextStyle(
fontSize: 12,
color: Colors.black,
),
),
],
),
SizedBox(
height: 12,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"合计",
style: TextStyle( style: TextStyle(
fontSize: 14.sp, color: Color(0xFF353535)), fontSize: 14.sp, color: Color(0xFF353535),fontWeight: MyFontWeight.regular),
), ),
SizedBox( SizedBox(
width: 12.w, width: 12.w,
@ -432,7 +536,7 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
left: 16.w, left: 16.w,
right: 16.w, right: 16.w,
top: 12.h, top: 12.h,
bottom:5.h, bottom:20.h,
), ),
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 16.w, left: 16.w,
@ -577,28 +681,123 @@ class _ExchangeOrderPage extends State<ExchangeOrderPage> {
], ],
), ),
), ),
GestureDetector( // GestureDetector(
onTap: () { // onTap: () {
if (!storeIsSelected) return; // if (!storeIsSelected) return;
creditOrder(); // creditOrder();
}, // },
child: Container( // child: Container(
padding: EdgeInsets.only(top: 16, bottom: 16), // padding: EdgeInsets.only(top: 16, bottom: 16),
decoration: BoxDecoration( // decoration: BoxDecoration(
color: MaterialStateColor.resolveWith((states) => // color: MaterialStateColor.resolveWith((states) =>
storeIsSelected ? Color(0xFF32A060) : Color(0xFFD8D8D8)), // storeIsSelected ? Color(0xFF32A060) : Color(0xFFD8D8D8)),
borderRadius: BorderRadius.only( // borderRadius: BorderRadius.only(
topLeft: Radius.circular(4), // topLeft: Radius.circular(4),
topRight: Radius.circular(4))), // topRight: Radius.circular(4))),
alignment: Alignment.center, // alignment: Alignment.center,
child: Text( // child: Text(
S.of(context).querenduihuan, // S.of(context).querenduihuan,
style: TextStyle( // style: TextStyle(
// fontSize: 16.sp,
// color: MaterialStateColor.resolveWith((states) =>
// storeIsSelected ? Colors.white : Color(0xFFA0A0A0)),
// fontWeight: FontWeight.bold),
// ),
// ),
// ),
Container(
height: 54.h,
color: Colors.white,
child: Row(
children: [
Spacer(),
Padding(padding: EdgeInsets.only(top: 7,right: 16),
child:Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
S.of(context).heji,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
),
Text(
"¥0.0",
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
),
],
)),
GestureDetector(
onTap: () {
},
child: RoundButton(
width: 103.w,
height: 54.h,
text: S.current.jiesuan,
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
radius: 0,
fontSize: 16.sp,
padding: EdgeInsets.symmetric(vertical: 5.h),
),
),
],
),
),
Container(
height: 54.h,
color: Colors.white,
child: Row(
children: [
Spacer(),
Padding(padding: EdgeInsets.only(top: 7,right: 16),
child:Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
S.of(context).heji,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Colors.black,
),
),
Text(
S.of(context).jifen_(widget.arguments["price"]),
style: TextStyle(
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
),
],
)),
GestureDetector(
onTap: () {
if (!storeIsSelected) return;
creditOrder();
},
child: RoundButton(
width: 103.w,
height: 54.h,
text: S.current.duihuan,
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),
radius: 0,
fontSize: 16.sp, fontSize: 16.sp,
color: MaterialStateColor.resolveWith((states) => padding: EdgeInsets.symmetric(vertical: 5.h),
storeIsSelected ? Colors.white : Color(0xFFA0A0A0)), ),
fontWeight: FontWeight.bold), ),
), ],
), ),
), ),
], ],

6
lib/web/web_page.dart

@ -190,7 +190,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
/// ///
_queryInformationLikes() async { _queryInformationLikes() async {
BaseData baseData = await apiService.informationLikes( BaseData baseData = await apiService.informationLikes(
widget.arguments["activityId"] ?? widget.arguments["articleId"]); widget.arguments["activityId"] ?? widget.arguments["articleId"]).catchError((onError) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
if (article != null) { if (article != null) {
if (article.liked) { if (article.liked) {
@ -273,10 +273,14 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
commentKey, commentKey,
article?.likes ?? activity?.likes ?? 0, article?.likes ?? activity?.likes ?? 0,
widget.arguments["activityId"] ?? widget.arguments["articleId"], widget.arguments["activityId"] ?? widget.arguments["articleId"],
1,
isKeyBoardShow, isKeyBoardShow,
_reply, _reply,
_delCommentTips, _delCommentTips,
12.sp, 12.sp,
requestApiFinish: (total){setState(() {
commentTotal = total;
});},
), ),
], ],
), ),

6
lib/web/web_view/comment_list.dart

@ -22,10 +22,11 @@ class CommentList extends StatefulWidget {
final Function delCommentTips; final Function delCommentTips;
final double fontSize; final double fontSize;
final String relationalId; final String relationalId;
final int relationalType;
final int like; final int like;
final Function requestApiFinish; final Function requestApiFinish;
CommentList(Key key, this.like, this.relationalId, CommentList(Key key, this.like, this.relationalId,this.relationalType,
this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize,{this.requestApiFinish}) this.isKeyBoardShow, this.reply, this.delCommentTips, this.fontSize,{this.requestApiFinish})
: super(key: key); : super(key: key);
@ -213,10 +214,11 @@ class CommentListState extends State<CommentList> {
"pageNum": 1, "pageNum": 1,
"pageSize": 100, "pageSize": 100,
"relationalId": widget.relationalId, "relationalId": widget.relationalId,
"relationalType": 1, "relationalType": widget.relationalType,
}).catchError((error) {}); }).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
setState(() { setState(() {
memberList.clear();
commentTotal = baseData.data.size; commentTotal = baseData.data.size;
widget.requestApiFinish(commentTotal); widget.requestApiFinish(commentTotal);
memberList.addAll(baseData.data.list); memberList.addAll(baseData.data.list);

Loading…
Cancel
Save