Browse Source

safety

master
fmk 3 years ago
parent
commit
8246ce77ba
  1. 16
      lib/community/community_details.dart
  2. 4
      lib/community/community_view/community_dynamic.dart
  3. 2
      lib/home/home_view/coupon.dart
  4. 38
      lib/home/home_view/featured_acticvity.dart
  5. 46
      lib/home/home_view/home_integral_store.dart
  6. 4
      lib/mine/mine_page.dart
  7. 12
      lib/order/order_detail_page.dart
  8. 6
      lib/order/order_history_page.dart
  9. 11
      lib/order/order_utils.dart
  10. 10
      lib/retrofit/min_api.dart
  11. 2
      lib/retrofit/min_api.g.dart
  12. 10
      lib/retrofit/retrofit_api.dart
  13. 6
      lib/retrofit/retrofit_api.g.dart
  14. 6
      lib/settlement/settlement.dart
  15. 16
      lib/settlement/settlement_view/activity_coupon_remarks.dart
  16. 4
      lib/settlement/settlement_view/pay_method.dart
  17. 2
      lib/store/store_order.dart
  18. 34
      lib/store/store_view/shop_goods.dart
  19. 4
      lib/web/web_page.dart
  20. 2
      lib/web/web_view/comment_list.dart
  21. 100
      lib/web/web_view/web_content.dart

16
lib/community/community_details.dart

@ -197,7 +197,7 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
comunity.selfLike = !comunity.selfLike ?? false; comunity.selfLike = !comunity.selfLike ?? false;
}); });
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); // SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }
@ -210,7 +210,8 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
"relationalType": 1 "relationalType": 1
}).catchError((error) {}); }).catchError((error) {});
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
commentKey.currentState.initState(); CommentListState state = commentKey.currentState;
state.queryMemberCommentList();
commentTextController.text = ""; commentTextController.text = "";
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
_queryMemberCommentList(); _queryMemberCommentList();
@ -254,17 +255,18 @@ class _CommunityDetails extends State<CommunityDetails> with WidgetsBindingObser
} }
/// ///
_delCommentTips() { _delCommentTips(memberComment) {
SmartDialog.show(widget: Tips(() { SmartDialog.show(widget: Tips(() {
delComment(); delComment(memberComment);
})); }));
} }
/// ///
delComment() async { delComment(memberComment) async {
BaseData baseData = await apiService.delComment(""); BaseData baseData = await apiService.delComment(memberComment.id);
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
commentKey.currentState.initState(); CommentListState state = commentKey.currentState;
state.queryMemberCommentList();
} }
} }

4
lib/community/community_view/community_dynamic.dart

@ -120,7 +120,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
widget.exitFull(); widget.exitFull();
SmartDialog.showToast("关注成功", alignment: Alignment.center); SmartDialog.showToast("关注成功", alignment: Alignment.center);
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); // SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }
@ -131,7 +131,7 @@ class _CommunityDynamic extends State<CommunityDynamic> {
widget.exitFull(); widget.exitFull();
SmartDialog.showToast("删除成功", alignment: Alignment.center); SmartDialog.showToast("删除成功", alignment: Alignment.center);
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); // SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }

2
lib/home/home_view/coupon.dart

@ -59,7 +59,7 @@ class _CouponView extends State<CouponView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return (coupons == null || coupons.length == 0) ? Container(height: 20,) : Column(
children: [ children: [
SizedBox( SizedBox(
height: 20.h, height: 20.h,

38
lib/home/home_view/featured_acticvity.dart

@ -69,7 +69,12 @@ class _FeaturedActivity extends State<FeaturedActivity> {
child: Row( child: Row(
children: [ children: [
if (activityList != null && activityList.length > 0) if (activityList != null && activityList.length > 0)
Container( GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/web_page',
arguments: {"activityId": activityList[0].id});
},
child: Container(
child: stackItem(18.sp, activityList[0]), child: stackItem(18.sp, activityList[0]),
margin: EdgeInsets.symmetric(horizontal: 5.w), margin: EdgeInsets.symmetric(horizontal: 5.w),
width: (MediaQuery.of(context).size.width - 42) / 2, width: (MediaQuery.of(context).size.width - 42) / 2,
@ -85,12 +90,18 @@ class _FeaturedActivity extends State<FeaturedActivity> {
), ),
), ),
), ),
),
if (activityList != null && activityList.length > 1) if (activityList != null && activityList.length > 1)
Container( Container(
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
Container( GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/web_page',
arguments: {"activityId": activityList[1].id});
},
child: Container(
child: stackItem(12.sp, activityList[1]), child: stackItem(12.sp, activityList[1]),
margin: EdgeInsets.symmetric(horizontal: 5.w), margin: EdgeInsets.symmetric(horizontal: 5.w),
width: (MediaQuery.of(context).size.width - 42) / 2, width: (MediaQuery.of(context).size.width - 42) / 2,
@ -100,16 +111,22 @@ class _FeaturedActivity extends State<FeaturedActivity> {
color: Colors.green, color: Colors.green,
image: DecorationImage( image: DecorationImage(
image: NetworkImage( image: NetworkImage(
activityList[2].coverImg, activityList[1].coverImg,
), ),
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
), ),
),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Container( GestureDetector(
onTap: () {
Navigator.of(context).pushNamed('/router/web_page',
arguments: {"activityId": activityList[2].id});
},
child: Container(
child: stackItem(12.sp, activityList[2]), child: stackItem(12.sp, activityList[2]),
margin: EdgeInsets.symmetric(horizontal: 5.w), margin: EdgeInsets.symmetric(horizontal: 5.w),
width: (MediaQuery.of(context).size.width - 42) / 2, width: (MediaQuery.of(context).size.width - 42) / 2,
@ -124,7 +141,8 @@ class _FeaturedActivity extends State<FeaturedActivity> {
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
) ),
),
], ],
), ),
), ),
@ -184,13 +202,7 @@ class _FeaturedActivity extends State<FeaturedActivity> {
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
), ),
alignment: Alignment.center, alignment: Alignment.center,
child: child: Row(
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/web_page',
arguments: {"activityId": activity.id});
},
child:Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
@ -208,7 +220,7 @@ class _FeaturedActivity extends State<FeaturedActivity> {
size: 12, size: 12,
), ),
], ],
)), ),
), ),
], ],
); );

46
lib/home/home_view/home_integral_store.dart

@ -45,56 +45,12 @@ class _HomeIntegralStore extends State<HomeIntegralStore> {
), ),
child: Column( child: Column(
children: [ children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Expanded(
// flex: 1,
// child: ItemTitle(
// text: S.of(context).jifenshangcheng,
// imgPath: "assets/image/icon_points_mall.png",
// ),
// ),
// GestureDetector(
// onTap: widget.callback,
// child: Container(
// padding: EdgeInsets.symmetric(
// vertical: 3.h,
// horizontal: 8.w,
// ),
// margin: EdgeInsets.only(right: 16.w),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(11.5),
// color: Color(0xFF32A060),
// ),
// child: Row(
// children: [
// Text(
// "GO",
// style: TextStyle(
// fontSize: 14.sp,
// fontWeight: FontWeight.bold,
// color: Colors.white,
// ),
// ),
// Icon(
// Icons.chevron_right,
// color: Colors.white,
// size: 18,
// ),
// ],
// ),
// ),
// ),
// ],
// ),
ItemTitle( ItemTitle(
text: "大家都在兑换", text: "大家都在兑换",
imgPath: "assets/image/icon_points_mall.png", imgPath: "assets/image/icon_points_mall.png",
), ),
SizedBox( SizedBox(
height: 14.h, height: 10.h,
), ),
Divider( Divider(
thickness: 1, thickness: 1,

4
lib/mine/mine_page.dart

@ -331,7 +331,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
), ),
), ),
Text( Text(
"(" + (infoNumber != null ?infoNumber.follow.toString() :"()") +")", "(" + (infoNumber != null ?infoNumber.follow.toString() :"0") +")",
style: TextStyle( style: TextStyle(
color: Color(0xFF000000), color: Color(0xFF000000),
fontSize: 15.sp, fontSize: 15.sp,
@ -351,7 +351,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
), ),
), ),
Text( Text(
"(" + (infoNumber != null ?infoNumber.fans.toString() :"()") +")", "(" + (infoNumber != null ?infoNumber.fans.toString() :"0") +")",
style: TextStyle( style: TextStyle(
color: Color(0xFF000000), color: Color(0xFF000000),
fontSize: 15.sp, fontSize: 15.sp,

12
lib/order/order_detail_page.dart

@ -115,7 +115,9 @@ class _OrderDetailPage extends State<OrderDetailPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Container(
color: Colors.white,
child: Stack(
children: [ children: [
Positioned( Positioned(
top: 0, top: 0,
@ -193,6 +195,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
bottom: 0, bottom: 0,
), ),
], ],
),
); );
} }
@ -208,10 +211,15 @@ class _OrderDetailPage extends State<OrderDetailPage> {
}, },
); );
if (payChannel != null && payChannel > 0) { if (payChannel != null && payChannel > 0) {
OrderUtils.carryOnPay(payChannel, minService, orderInfo, queryDetails); OrderUtils.carryOnPay(payChannel, minService, orderInfo, payResult);
} }
} }
payResult(BaseData baseData) {
queryDetails();
SmartDialog.showToast("订单支付成功");
}
statusTitle() { statusTitle() {
if (isTakeOut == 0) { if (isTakeOut == 0) {
if (payStatus == 0) { if (payStatus == 0) {

6
lib/order/order_history_page.dart

@ -524,8 +524,12 @@ class _OrderHistoryList extends State<OrderHistoryList>
Future.delayed(Duration(seconds: 1), () { Future.delayed(Duration(seconds: 1), () {
_onRefresh(); _onRefresh();
}); });
}); },);
}
} }
payResult(BaseData baseData) {
} }
orderCancel(String orderId) async { orderCancel(String orderId) async {

11
lib/order/order_utils.dart

@ -1,6 +1,3 @@
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:fluwx/fluwx.dart'; import 'package:fluwx/fluwx.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/order_info.dart';
@ -8,7 +5,6 @@ import 'package:huixiang/retrofit/data/placeOrderFirst.dart';
import 'package:huixiang/retrofit/data/wx_pay.dart'; import 'package:huixiang/retrofit/data/wx_pay.dart';
import 'package:huixiang/retrofit/min_api.dart'; import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/utils/min.dart'; import 'package:huixiang/utils/min.dart';
import 'package:huixiang/view_widget/tips_dialog.dart';
class OrderUtils { class OrderUtils {
@ -75,12 +71,7 @@ class OrderUtils {
BaseData baseData = await minService BaseData baseData = await minService
.settlementApi(placeOrderFirst.toJson()) .settlementApi(placeOrderFirst.toJson())
.catchError((error) {}); .catchError((error) {});
// if (baseData != null && baseData.isSuccess) { queryDetails(baseData);
//
// } else {
queryDetails();
SmartDialog.show(widget: Tips((){}, text: "${baseData.msg}",));
// }
} }
} }

10
lib/retrofit/min_api.dart

@ -21,14 +21,12 @@ import 'data/shoppingCart.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// const base_url = "https://pos.api.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; /// const baseUrl = "https://pos.api.lotus-wallet.com/app/"; ///
const base_url = "http://192.168.10.236:8765/app/";
// const base_url = "http://192.168.10.236:8765/app/";
/// ///
const baseUrl = "http://192.168.10.236:8765/app/"; // const baseUrl = "http://192.168.10.236:8765/app/";
/// ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";

2
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService { class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) { _MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/'; baseUrl ??= 'https://pos.api.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;

10
lib/retrofit/retrofit_api.dart

@ -40,11 +40,11 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
// const base_url = "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 baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
const base_url = "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 baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";
@ -343,7 +343,7 @@ abstract class ApiService {
Future<BaseData> commentLike(@Path("id") String id); Future<BaseData> commentLike(@Path("id") String id);
/// ///
@GET("/memberComment/delete/{id}") @DELETE("/memberComment/{id}")
Future<BaseData> delComment(@Path("id") String id); Future<BaseData> delComment(@Path("id") String id);
/// ///

6
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService { class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) { _ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio'); ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8766/app/'; baseUrl ??= 'https://pos.platform.lotus-wallet.com/app/';
} }
final Dio _dio; final Dio _dio;
@ -1101,10 +1101,10 @@ class _ApiService implements ApiService {
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>(
'/memberComment/delete/$id', '/memberComment/$id',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'GET', method: 'DELETE',
headers: <String, dynamic>{}, headers: <String, dynamic>{},
extra: _extra, extra: _extra,
baseUrl: baseUrl), baseUrl: baseUrl),

6
lib/settlement/settlement.dart

@ -325,7 +325,9 @@ class _Settlement extends State<Settlement> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Container(
color: Colors.white,
child: Stack(
children: [ children: [
Positioned( Positioned(
top: 0, top: 0,
@ -390,6 +392,7 @@ class _Settlement extends State<Settlement> {
coupons, coupons,
promotions, promotions,
couponCount(), couponCount(),
placeOrder,
), ),
if (placeOrder) /// if (placeOrder) ///
@ -457,6 +460,7 @@ class _Settlement extends State<Settlement> {
bottom: 0, bottom: 0,
), ),
], ],
),
); );
} }

16
lib/settlement/settlement_view/activity_coupon_remarks.dart

@ -12,6 +12,7 @@ class ActivityCouponRemarks extends StatefulWidget {
final String promotions; final String promotions;
final SettleOrderInfo settleOrderInfo; final SettleOrderInfo settleOrderInfo;
final int couponCount; final int couponCount;
final bool placeOrder;
ActivityCouponRemarks( ActivityCouponRemarks(
this.couponCart, this.couponCart,
@ -20,6 +21,7 @@ class ActivityCouponRemarks extends StatefulWidget {
this.coupons, this.coupons,
this.promotions, this.promotions,
this.couponCount, this.couponCount,
this.placeOrder,
); );
@override @override
@ -29,6 +31,7 @@ class ActivityCouponRemarks extends StatefulWidget {
} }
class _ActivityCouponRemarks extends State<ActivityCouponRemarks> { class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -44,7 +47,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
], ],
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
), ),
height: 122.h, height: 122.h / (!widget.placeOrder ? 2 : 1),
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 16, left: 16,
right: 16, right: 16,
@ -60,6 +63,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
if (widget.placeOrder)
InkWell( InkWell(
onTap: () { onTap: () {
widget.activityCart(); widget.activityCart();
@ -95,9 +99,11 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
], ],
), ),
), ),
if (widget.placeOrder)
SizedBox( SizedBox(
height: 13, height: 13,
), ),
if (widget.placeOrder)
InkWell( InkWell(
onTap: () { onTap: () {
widget.couponCart(); widget.couponCart();
@ -133,10 +139,15 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
], ],
), ),
), ),
if (widget.placeOrder)
SizedBox( SizedBox(
height: 13, height: 13,
), ),
Row( InkWell(
onTap: () {
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
@ -166,6 +177,7 @@ class _ActivityCouponRemarks extends State<ActivityCouponRemarks> {
), ),
], ],
), ),
),
], ],
), ),
); );

4
lib/settlement/settlement_view/pay_method.dart

@ -84,7 +84,7 @@ class _PayMethod extends State<PayMethod> {
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
checkView(1), checkView(1),
Expanded( Expanded(
@ -125,7 +125,7 @@ class _PayMethod extends State<PayMethod> {
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
checkView(2), checkView(2),
Expanded( Expanded(

2
lib/store/store_order.dart

@ -710,7 +710,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
"productName": miNiDetail.productName, "productName": miNiDetail.productName,
"skuName": skuValue, "skuName": skuValue,
"storeId": storeInfo.id, "storeId": storeInfo.id,
"skuPrice": productSku.applyPrice, "skuPrice": productSku.skuPrice,
"skuStock": productSku.skuStock, "skuStock": productSku.skuStock,
"tableId": tableId, "tableId": tableId,
}, },

34
lib/store/store_view/shop_goods.dart

@ -81,9 +81,6 @@ class _ShopGoods extends State<ShopGoods> {
SizedBox( SizedBox(
height: 2, height: 2,
), ),
///{"id":"1442420413828169728","productId":"1432652566000304128","productName":"桂花乌龙茶","skuName":null,"buyNum":1,"skuStock":1000,"skuImg":"https://pos.upload.gznl.top/1177/2021/08/f855ffb8-d473-4f5f-93c9-5907b539b2fd.jpg",
///"skuPrice":"0.00","selected":1,"storeId":null,"groupId":"1426067376096411648","createTime":"2021-10-20 10:27:46","tableId":null,"platterList":null}
Row( Row(
children: [ children: [
Expanded( Expanded(
@ -110,9 +107,6 @@ class _ShopGoods extends State<ShopGoods> {
), ),
Row( Row(
children: [ children: [
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
Row( Row(
children: [ children: [
Text( Text(
@ -136,31 +130,6 @@ class _ShopGoods extends State<ShopGoods> {
), ),
], ],
), ),
// Row(
// children: [
// Text(
// S.of(context).yuanjia,
// style: TextStyle(
// color: Color(0xFFA29E9E),
// fontSize: 9.sp,
// fontWeight: MyFontWeight.regular,
// ),
// ),
// SizedBox(
// width: 4,
// ),
// Text(
// "¥${widget.isShopCart ? widget.shoppingCartSkuItemListBean.skuPrice : widget.productListBean.price}",
// style: TextStyle(
// color: Color(0xFFA29E9E),
// fontSize: 10.sp,
// fontWeight: MyFontWeight.regular,
// ),
// ),
// ],
// ),
// ],
// ),
Spacer(), Spacer(),
if (!widget.isShopCart) if (!widget.isShopCart)
Stack( Stack(
@ -181,7 +150,8 @@ class _ShopGoods extends State<ShopGoods> {
widget.productListBean != null widget.productListBean != null
? widget.productListBean.id ? widget.productListBean.id
: widget.shoppingCartSkuItemListBean : widget.shoppingCartSkuItemListBean
.productId); .productId,
);
}, },
), ),
), ),

4
lib/web/web_page.dart

@ -209,7 +209,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
} }
commentKey.currentState.setState(() {}); commentKey.currentState.setState(() {});
} else { } else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center); // SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
} }
} }
@ -272,7 +272,7 @@ class _WebPage extends State<WebPage> with WidgetsBindingObserver {
CommentList( CommentList(
commentKey, commentKey,
article?.likes ?? activity?.likes ?? 0, article?.likes ?? activity?.likes ?? 0,
article?.id ?? activity?.id, widget.arguments["activityId"] ?? widget.arguments["articleId"],
isKeyBoardShow, isKeyBoardShow,
_reply, _reply,
_delCommentTips, _delCommentTips,

2
lib/web/web_view/comment_list.dart

@ -233,7 +233,7 @@ class CommentListState extends State<CommentList> {
if (type == "huifu") { if (type == "huifu") {
widget.reply(memberComment); widget.reply(memberComment);
} else if (type == "shanchu") { } else if (type == "shanchu") {
widget.delCommentTips(); widget.delCommentTips(memberComment);
} }
}, },
isSelf: userId == value.getString("userId"), isSelf: userId == value.getString("userId"),

100
lib/web/web_view/web_content.dart

@ -53,58 +53,54 @@ class _WebContent extends State<WebContent> {
}, },
), ),
}, },
// customRender: { customRender: {
// "video": "video":
// (context, parsedChild) { (context, parsedChild) {
// var src = attributes['src']; var src = context.tree.element.attributes["src"];
// parsedChild.toString() return videoWidget(
// return videoWidget( double.tryParse(context.tree.element.attributes["width"] ?? ""),
// double.tryParse(attributes['width'] ?? ""), double.tryParse(
// double.tryParse( context.tree.element.attributes["height"] ?? ""),
// element.attributes['height'] ?? ""), (src != null &&
// (src != null && src != "" &&
// src != "" && src.endsWith(".mp4"))
// src.endsWith(".mp4")) ? src
// ? src : context.tree.children.first.attributes["src"],
// : element context.tree.attributes["sandbox"]);
// .children.first.attributes["src"], },
// element.attributes["sandbox"]); "iframe":
// }, (context, parsedChild) {
// "iframe": var src = context.tree.element.children.firstWhere((element) => element.localName == "source").attributes["src"];
// (context, parsedChild) { return videoWidget(
// var src = attributes['src']; double.tryParse(context.style.width ?? ""),
// return videoWidget( double.tryParse(context.style.height ?? ""),
// double.tryParse(attributes['width'] ?? ""), (src != null &&
// double.tryParse( src != "" &&
// element.attributes['height'] ?? ""), src.endsWith(".mp4"))
// (src != null && ? src
// src != "" && : context.tree.children.first.attributes["src"],
// src.endsWith(".mp4")) context.tree.attributes["sandbox"]);
// ? src },
// : element "audio":
// .children.first.attributes["src"], (context, parsedChild) {
// element.attributes["sandbox"]); final sources = <String>[
// }, if (context.tree.attributes['src'] != null)
// "audio": context.tree.attributes['src'],
// (context, parsedChild) { ];
// final sources = <String>[ if (sources == null ||
// if (element.attributes['src'] != null) sources.isEmpty ||
// element.attributes['src'], sources.first == null) {
// ]; return EmptyContentElement();
// if (sources == null || }
// sources.isEmpty || return audioWidget(
// sources.first == null) { context.tree.attributes['controls'] != null,
// return EmptyContentElement(); context.tree.attributes['loop'] != null,
// } context.tree.attributes['autoplay'] != null,
// return audioWidget( sources,
// attributes['controls'] != null, context.style.width ?? 300.w,
// attributes['loop'] != null, );
// attributes['autoplay'] != null, },
// sources, },
// context.style.width ?? 300.w,
// );
// },
// },
); );
} }

Loading…
Cancel
Save