Commit 0d0b5e08d3390fa1f358c9f23ed921e93cbbfb83
Merge branch 'v5.0.2+' of http://123.56.79.57/xt/Flutter-ReserveApp into v5.0.2+
Showing
25 changed files
with
1702 additions
and
511 deletions
assets/comments.png
0 → 100644
3.55 KB
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | archiveVersion = 1; | 3 | archiveVersion = 1; |
| 4 | classes = { | 4 | classes = { |
| 5 | }; | 5 | }; |
| 6 | - objectVersion = 46; | 6 | + objectVersion = 50; |
| 7 | objects = { | 7 | objects = { |
| 8 | 8 | ||
| 9 | /* Begin PBXBuildFile section */ | 9 | /* Begin PBXBuildFile section */ |
| @@ -525,7 +525,7 @@ | @@ -525,7 +525,7 @@ | ||
| 525 | "$(inherited)", | 525 | "$(inherited)", |
| 526 | "$(PROJECT_DIR)/Flutter", | 526 | "$(PROJECT_DIR)/Flutter", |
| 527 | ); | 527 | ); |
| 528 | - MARKETING_VERSION = 5.0.0; | 528 | + MARKETING_VERSION = 5.0.2; |
| 529 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 529 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 530 | PRODUCT_NAME = Runner; | 530 | PRODUCT_NAME = Runner; |
| 531 | PROVISIONING_PROFILE_SPECIFIER = ""; | 531 | PROVISIONING_PROFILE_SPECIFIER = ""; |
| @@ -671,7 +671,7 @@ | @@ -671,7 +671,7 @@ | ||
| 671 | "$(inherited)", | 671 | "$(inherited)", |
| 672 | "$(PROJECT_DIR)/Flutter", | 672 | "$(PROJECT_DIR)/Flutter", |
| 673 | ); | 673 | ); |
| 674 | - MARKETING_VERSION = 5.0.0; | 674 | + MARKETING_VERSION = 5.0.2; |
| 675 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 675 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 676 | PRODUCT_NAME = Runner; | 676 | PRODUCT_NAME = Runner; |
| 677 | PROVISIONING_PROFILE_SPECIFIER = ""; | 677 | PROVISIONING_PROFILE_SPECIFIER = ""; |
| @@ -707,7 +707,7 @@ | @@ -707,7 +707,7 @@ | ||
| 707 | "$(inherited)", | 707 | "$(inherited)", |
| 708 | "$(PROJECT_DIR)/Flutter", | 708 | "$(PROJECT_DIR)/Flutter", |
| 709 | ); | 709 | ); |
| 710 | - MARKETING_VERSION = 5.0.0; | 710 | + MARKETING_VERSION = 5.0.2; |
| 711 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 711 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 712 | PRODUCT_NAME = Runner; | 712 | PRODUCT_NAME = Runner; |
| 713 | PROVISIONING_PROFILE_SPECIFIER = ""; | 713 | PROVISIONING_PROFILE_SPECIFIER = ""; |
| @@ -47,6 +47,10 @@ class CommentsSunModel { | @@ -47,6 +47,10 @@ class CommentsSunModel { | ||
| 47 | String isnoshow; | 47 | String isnoshow; |
| 48 | Reply reply; | 48 | Reply reply; |
| 49 | 49 | ||
| 50 | + String ddate; | ||
| 51 | + String ddateSolt; | ||
| 52 | + String tableinfo; | ||
| 53 | + | ||
| 50 | String get createTimeStr { | 54 | String get createTimeStr { |
| 51 | DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( | 55 | DateTime dateTime = DateTime.fromMillisecondsSinceEpoch( |
| 52 | int.parse(createTime.toString()) * 1000); | 56 | int.parse(createTime.toString()) * 1000); |
| @@ -67,7 +71,10 @@ class CommentsSunModel { | @@ -67,7 +71,10 @@ class CommentsSunModel { | ||
| 67 | this.createTime, | 71 | this.createTime, |
| 68 | this.enclosure, | 72 | this.enclosure, |
| 69 | this.isnoshow, | 73 | this.isnoshow, |
| 70 | - this.reply}); | 74 | + this.reply, |
| 75 | + this.ddate, | ||
| 76 | + this.ddateSolt, | ||
| 77 | + this.tableinfo}); | ||
| 71 | 78 | ||
| 72 | CommentsSunModel.fromJson(Map<String, dynamic> json) { | 79 | CommentsSunModel.fromJson(Map<String, dynamic> json) { |
| 73 | id = json['id']; | 80 | id = json['id']; |
| @@ -93,6 +100,10 @@ class CommentsSunModel { | @@ -93,6 +100,10 @@ class CommentsSunModel { | ||
| 93 | 100 | ||
| 94 | isnoshow = json['isnoshow']; | 101 | isnoshow = json['isnoshow']; |
| 95 | reply = json['reply'] != null ? new Reply.fromJson(json['reply']) : null; | 102 | reply = json['reply'] != null ? new Reply.fromJson(json['reply']) : null; |
| 103 | + | ||
| 104 | + ddate = json['ddate']; | ||
| 105 | + ddateSolt = json['ddate_solt']; | ||
| 106 | + tableinfo = json['tableinfo']; | ||
| 96 | } | 107 | } |
| 97 | 108 | ||
| 98 | Map<String, dynamic> toJson() { | 109 | Map<String, dynamic> toJson() { |
| @@ -116,6 +127,10 @@ class CommentsSunModel { | @@ -116,6 +127,10 @@ class CommentsSunModel { | ||
| 116 | if (this.enclosure != null) { | 127 | if (this.enclosure != null) { |
| 117 | data['enclosure'] = jsonEncode(this.enclosure); | 128 | data['enclosure'] = jsonEncode(this.enclosure); |
| 118 | } | 129 | } |
| 130 | + | ||
| 131 | + data['ddate'] = this.ddate; | ||
| 132 | + data['ddate_solt'] = this.ddateSolt; | ||
| 133 | + data['tableinfo'] = this.tableinfo; | ||
| 119 | return data; | 134 | return data; |
| 120 | } | 135 | } |
| 121 | } | 136 | } |
| @@ -194,6 +209,7 @@ class CommentsImageModel { | @@ -194,6 +209,7 @@ class CommentsImageModel { | ||
| 194 | ImageInfo imageInfo; | 209 | ImageInfo imageInfo; |
| 195 | ImageAve imageAve; | 210 | ImageAve imageAve; |
| 196 | String url; | 211 | String url; |
| 212 | + String avinfo; | ||
| 197 | 213 | ||
| 198 | CommentsImageModel( | 214 | CommentsImageModel( |
| 199 | {this.key, | 215 | {this.key, |
| @@ -203,7 +219,8 @@ class CommentsImageModel { | @@ -203,7 +219,8 @@ class CommentsImageModel { | ||
| 203 | this.exif, | 219 | this.exif, |
| 204 | this.imageInfo, | 220 | this.imageInfo, |
| 205 | this.imageAve, | 221 | this.imageAve, |
| 206 | - this.url}); | 222 | + this.url, |
| 223 | + this.avinfo}); | ||
| 207 | 224 | ||
| 208 | CommentsImageModel.fromJson(Map<String, dynamic> json) { | 225 | CommentsImageModel.fromJson(Map<String, dynamic> json) { |
| 209 | key = json['key']; | 226 | key = json['key']; |
| @@ -218,6 +235,7 @@ class CommentsImageModel { | @@ -218,6 +235,7 @@ class CommentsImageModel { | ||
| 218 | ? new ImageAve.fromJson(json['imageAve']) | 235 | ? new ImageAve.fromJson(json['imageAve']) |
| 219 | : null; | 236 | : null; |
| 220 | url = json['url']; | 237 | url = json['url']; |
| 238 | + avinfo =json['avinfo'] == null ? null : jsonEncode(json['avinfo']); | ||
| 221 | } | 239 | } |
| 222 | 240 | ||
| 223 | Map<String, dynamic> toJson() { | 241 | Map<String, dynamic> toJson() { |
| @@ -234,6 +252,8 @@ class CommentsImageModel { | @@ -234,6 +252,8 @@ class CommentsImageModel { | ||
| 234 | data['imageAve'] = this.imageAve.toJson(); | 252 | data['imageAve'] = this.imageAve.toJson(); |
| 235 | } | 253 | } |
| 236 | data['url'] = this.url; | 254 | data['url'] = this.url; |
| 255 | + | ||
| 256 | + data['avinfo'] = this.avinfo; | ||
| 237 | return data; | 257 | return data; |
| 238 | } | 258 | } |
| 239 | } | 259 | } |
| @@ -319,6 +319,10 @@ class MarkMarketingModel { | @@ -319,6 +319,10 @@ class MarkMarketingModel { | ||
| 319 | 319 | ||
| 320 | List<CouponSunModel> couponDataList; | 320 | List<CouponSunModel> couponDataList; |
| 321 | 321 | ||
| 322 | + String isComments; | ||
| 323 | + String isCommentsCoupon; | ||
| 324 | + List<CouponSunModel> couponDataListComments; | ||
| 325 | + | ||
| 322 | MarkMarketingModel( | 326 | MarkMarketingModel( |
| 323 | {this.isArrival, | 327 | {this.isArrival, |
| 324 | this.isLink, | 328 | this.isLink, |
| @@ -328,7 +332,12 @@ class MarkMarketingModel { | @@ -328,7 +332,12 @@ class MarkMarketingModel { | ||
| 328 | this.logo, | 332 | this.logo, |
| 329 | this.wecomle, | 333 | this.wecomle, |
| 330 | this.isCoupon, | 334 | this.isCoupon, |
| 331 | - this.isRecharge}); | 335 | + this.isRecharge, |
| 336 | + this.rechargeData, | ||
| 337 | + this.couponDataList, | ||
| 338 | + this.isComments, | ||
| 339 | + this.isCommentsCoupon, | ||
| 340 | + this.couponDataListComments}); | ||
| 332 | 341 | ||
| 333 | MarkMarketingModel.fromJson(Map<String, dynamic> json) { | 342 | MarkMarketingModel.fromJson(Map<String, dynamic> json) { |
| 334 | isTranspond = json['is_transpond']; | 343 | isTranspond = json['is_transpond']; |
| @@ -365,6 +374,32 @@ class MarkMarketingModel { | @@ -365,6 +374,32 @@ class MarkMarketingModel { | ||
| 365 | } | 374 | } |
| 366 | } | 375 | } |
| 367 | } | 376 | } |
| 377 | + isComments = json['is_comments']; | ||
| 378 | + | ||
| 379 | + isCommentsCoupon = json['is_comments_coupon']; | ||
| 380 | + if (json['coupon_data_comments'] != null) { | ||
| 381 | + couponDataListComments = <CouponSunModel>[]; | ||
| 382 | + if (json['coupon_data_comments'] is Map) { | ||
| 383 | + //旧数据map | ||
| 384 | + couponDataListComments | ||
| 385 | + .add(CouponSunModel.fromJson(json['coupon_data_comments'])); | ||
| 386 | + } else { | ||
| 387 | + var couponData = convert.jsonDecode(json['coupon_data_comments']); | ||
| 388 | + if (couponData is List) { | ||
| 389 | + couponData.forEach((v) { | ||
| 390 | + couponDataListComments.add(CouponSunModel.fromJson(v)); | ||
| 391 | + }); | ||
| 392 | + } else if (couponData is Map) { | ||
| 393 | + // json['coupon_data'].forEach((v) { | ||
| 394 | + couponDataListComments.add(CouponSunModel.fromJson(couponData)); | ||
| 395 | + // }); | ||
| 396 | + } else { | ||
| 397 | + couponData.forEach((v) { | ||
| 398 | + couponDataListComments.add(v); | ||
| 399 | + }); | ||
| 400 | + } | ||
| 401 | + } | ||
| 402 | + } | ||
| 368 | } | 403 | } |
| 369 | 404 | ||
| 370 | Map<String, dynamic> toJson() { | 405 | Map<String, dynamic> toJson() { |
| @@ -380,6 +415,9 @@ class MarkMarketingModel { | @@ -380,6 +415,9 @@ class MarkMarketingModel { | ||
| 380 | data['is_recharge'] = this.isRecharge; | 415 | data['is_recharge'] = this.isRecharge; |
| 381 | data['recharge_data'] = this.rechargeData; | 416 | data['recharge_data'] = this.rechargeData; |
| 382 | data['coupon_data'] = this.couponDataList; | 417 | data['coupon_data'] = this.couponDataList; |
| 418 | + data['is_comments'] = this.isComments; | ||
| 419 | + data['is_comments_coupon'] = this.isCommentsCoupon; | ||
| 420 | + data['coupon_data_comments'] = this.couponDataListComments; | ||
| 383 | 421 | ||
| 384 | return data; | 422 | return data; |
| 385 | } | 423 | } |
| @@ -48,6 +48,9 @@ class _CouponSettingPageState extends State<CouponSettingPage> { | @@ -48,6 +48,9 @@ class _CouponSettingPageState extends State<CouponSettingPage> { | ||
| 48 | String rechargeContent = ''; | 48 | String rechargeContent = ''; |
| 49 | 49 | ||
| 50 | List<CouponSunModel> couponDataList = []; | 50 | List<CouponSunModel> couponDataList = []; |
| 51 | + bool isComments = false; //启用评价设置 | ||
| 52 | + bool isCommentsCoupon = false; //启用评价送券 | ||
| 53 | + List<CouponSunModel> couponDataListComments = []; | ||
| 51 | @override | 54 | @override |
| 52 | void initState() { | 55 | void initState() { |
| 53 | super.initState(); | 56 | super.initState(); |
| @@ -93,7 +96,18 @@ class _CouponSettingPageState extends State<CouponSettingPage> { | @@ -93,7 +96,18 @@ class _CouponSettingPageState extends State<CouponSettingPage> { | ||
| 93 | marketingCenterProvider.markDataModel.marketing.rechargeData; | 96 | marketingCenterProvider.markDataModel.marketing.rechargeData; |
| 94 | couponDataList = | 97 | couponDataList = |
| 95 | marketingCenterProvider.markDataModel.marketing.couponDataList ?? []; | 98 | marketingCenterProvider.markDataModel.marketing.couponDataList ?? []; |
| 96 | - | 99 | + couponDataListComments = marketingCenterProvider |
| 100 | + .markDataModel.marketing.couponDataListComments ?? | ||
| 101 | + []; | ||
| 102 | + isComments = | ||
| 103 | + marketingCenterProvider.markDataModel.marketing.isComments == '1' | ||
| 104 | + ? true | ||
| 105 | + : false; | ||
| 106 | + isCommentsCoupon = | ||
| 107 | + marketingCenterProvider.markDataModel.marketing.isCommentsCoupon == | ||
| 108 | + '1' | ||
| 109 | + ? true | ||
| 110 | + : false; | ||
| 97 | qiniuUrl = marketingCenterProvider.markDataModel.marketing.logo ?? null; | 111 | qiniuUrl = marketingCenterProvider.markDataModel.marketing.logo ?? null; |
| 98 | 112 | ||
| 99 | welcome = marketingCenterProvider.markDataModel.marketing.wecomle; | 113 | welcome = marketingCenterProvider.markDataModel.marketing.wecomle; |
| @@ -118,7 +132,10 @@ class _CouponSettingPageState extends State<CouponSettingPage> { | @@ -118,7 +132,10 @@ class _CouponSettingPageState extends State<CouponSettingPage> { | ||
| 118 | 'wecomle': welcome ?? '', | 132 | 'wecomle': welcome ?? '', |
| 119 | 'logo': qiniuUrl, | 133 | 'logo': qiniuUrl, |
| 120 | 'recharge_data': rechargeData, | 134 | 'recharge_data': rechargeData, |
| 121 | - 'coupon_data': json.encode(couponDataList) | 135 | + 'coupon_data': json.encode(couponDataList), |
| 136 | + 'is_comments': isComments ? '1' : '0', | ||
| 137 | + 'is_comments_coupon': isCommentsCoupon ? '1' : '0', | ||
| 138 | + 'coupon_data_comments': json.encode(couponDataListComments), | ||
| 122 | }; | 139 | }; |
| 123 | Map<String, String> params = { | 140 | Map<String, String> params = { |
| 124 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | 141 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, |
| @@ -421,7 +438,7 @@ class _CouponSettingPageState extends State<CouponSettingPage> { | @@ -421,7 +438,7 @@ class _CouponSettingPageState extends State<CouponSettingPage> { | ||
| 421 | Map temp = | 438 | Map temp = |
| 422 | await NavigatorUtil.goMarkingCouponSelectPage( | 439 | await NavigatorUtil.goMarkingCouponSelectPage( |
| 423 | context, {'object': couponDataList}); | 440 | context, {'object': couponDataList}); |
| 424 | - if (temp['coupon'] != null) { | 441 | + if (temp != null && temp['coupon'] != null) { |
| 425 | couponDataList = temp['coupon']; | 442 | couponDataList = temp['coupon']; |
| 426 | 443 | ||
| 427 | setState(() {}); | 444 | setState(() {}); |
| 1 | +import 'dart:ui'; | ||
| 2 | + | ||
| 1 | import 'package:cached_network_image/cached_network_image.dart'; | 3 | import 'package:cached_network_image/cached_network_image.dart'; |
| 4 | +import 'package:fijkplayer/fijkplayer.dart'; | ||
| 2 | import 'package:flutter/material.dart'; | 5 | import 'package:flutter/material.dart'; |
| 3 | import 'package:flutter/rendering.dart'; | 6 | import 'package:flutter/rendering.dart'; |
| 4 | import 'package:one_key/models/comments_label_model.dart'; | 7 | import 'package:one_key/models/comments_label_model.dart'; |
| 5 | import 'package:one_key/models/comments_model.dart'; | 8 | import 'package:one_key/models/comments_model.dart'; |
| 9 | +import 'package:one_key/pages/my/comment_manage/input_buttom_widget.dart'; | ||
| 10 | +import 'package:one_key/pages/my/comment_manage/pop_route.dart'; | ||
| 11 | +import 'package:one_key/pages/my/comment_manage/video_page.dart'; | ||
| 6 | import 'package:one_key/provider/user_model.dart'; | 12 | import 'package:one_key/provider/user_model.dart'; |
| 7 | import 'package:one_key/res/colors.dart'; | 13 | import 'package:one_key/res/colors.dart'; |
| 8 | import 'package:one_key/utils/dialog_util.dart'; | 14 | import 'package:one_key/utils/dialog_util.dart'; |
| @@ -11,6 +17,7 @@ import 'package:one_key/widgets/round_button.dart'; | @@ -11,6 +17,7 @@ import 'package:one_key/widgets/round_button.dart'; | ||
| 11 | import 'package:one_key/widgets/system_app_bar.dart'; | 17 | import 'package:one_key/widgets/system_app_bar.dart'; |
| 12 | import 'package:one_key/widgets/v_empty_view.dart'; | 18 | import 'package:one_key/widgets/v_empty_view.dart'; |
| 13 | import 'package:provider/provider.dart'; | 19 | import 'package:provider/provider.dart'; |
| 20 | +import 'package:video_player/video_player.dart'; | ||
| 14 | 21 | ||
| 15 | import '../../../constant/state.dart'; | 22 | import '../../../constant/state.dart'; |
| 16 | import '../../../provider/comment_manage_provider.dart'; | 23 | import '../../../provider/comment_manage_provider.dart'; |
| @@ -19,7 +26,10 @@ import '../../../utils/screen_util.dart'; | @@ -19,7 +26,10 @@ import '../../../utils/screen_util.dart'; | ||
| 19 | import '../../../utils/utils.dart'; | 26 | import '../../../utils/utils.dart'; |
| 20 | import '../../../widgets/page_exception.dart'; | 27 | import '../../../widgets/page_exception.dart'; |
| 21 | import '../../online_check/photo_view_wiget.dart'; | 28 | import '../../online_check/photo_view_wiget.dart'; |
| 22 | -import 'package:sliding_up_panel2/sliding_up_panel2.dart'; | 29 | +// import 'package:chewie/chewie.dart'; |
| 30 | +// import 'package:fijkplayer/fijkplayer.dart'; | ||
| 31 | +// import 'package:video_thumbnail/video_thumbnail.dart'; | ||
| 32 | +import 'package:cached_video_player/cached_video_player.dart'; | ||
| 23 | 33 | ||
| 24 | /** | 34 | /** |
| 25 | * 评价管理 | 35 | * 评价管理 |
| @@ -36,7 +46,15 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -36,7 +46,15 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 36 | Map<String, String> starTextMap = {}; | 46 | Map<String, String> starTextMap = {}; |
| 37 | bool allSelect = true; | 47 | bool allSelect = true; |
| 38 | String label = ''; | 48 | String label = ''; |
| 39 | - bool showInput = false; | 49 | + |
| 50 | + TextEditingController replyController = TextEditingController(); | ||
| 51 | + // 声明控制器(两个) | ||
| 52 | + CachedVideoPlayerController videoPlayerController; | ||
| 53 | + // ChewieController chewieController; | ||
| 54 | + // final FijkPlayer player = FijkPlayer(); | ||
| 55 | + // VideoPlayerController _controller; | ||
| 56 | + Future _initializeVideoPlayerFuture; | ||
| 57 | + | ||
| 40 | @override | 58 | @override |
| 41 | void initState() { | 59 | void initState() { |
| 42 | super.initState(); | 60 | super.initState(); |
| @@ -45,7 +63,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -45,7 +63,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 45 | 63 | ||
| 46 | WidgetsBinding.instance.addPostFrameCallback((_) { | 64 | WidgetsBinding.instance.addPostFrameCallback((_) { |
| 47 | _getSellerComments(isShowLoading: false); | 65 | _getSellerComments(isShowLoading: false); |
| 48 | - _getCountCommentLabel(isShowLoading: false); | 66 | + // _getCountCommentLabel(isShowLoading: false); |
| 49 | }); | 67 | }); |
| 50 | } | 68 | } |
| 51 | 69 | ||
| @@ -53,18 +71,20 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -53,18 +71,20 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 53 | void dispose() { | 71 | void dispose() { |
| 54 | bus.emit('changeStatusColor'); | 72 | bus.emit('changeStatusColor'); |
| 55 | 73 | ||
| 74 | + // videoPlayerController.dispose(); | ||
| 75 | + | ||
| 56 | super.dispose(); | 76 | super.dispose(); |
| 57 | } | 77 | } |
| 58 | 78 | ||
| 59 | ///评价标签 | 79 | ///评价标签 |
| 60 | - _getCountCommentLabel({bool isShowLoading = true}) async { | ||
| 61 | - Map<String, String> pramas = { | ||
| 62 | - 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 63 | - }; | ||
| 64 | - // label | ||
| 65 | - await commentManageProvider.getCountCommentLabel(context, pramas, | ||
| 66 | - isShowLoading: isShowLoading); | ||
| 67 | - } | 80 | + // _getCountCommentLabel({bool isShowLoading = true}) async { |
| 81 | + // Map<String, String> pramas = { | ||
| 82 | + // 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 83 | + // }; | ||
| 84 | + // // label | ||
| 85 | + // await commentManageProvider.getCountCommentLabel(context, pramas, | ||
| 86 | + // isShowLoading: isShowLoading); | ||
| 87 | + // } | ||
| 68 | 88 | ||
| 69 | ///评价列表 | 89 | ///评价列表 |
| 70 | _getSellerComments({bool isShowLoading = true}) async { | 90 | _getSellerComments({bool isShowLoading = true}) async { |
| @@ -73,78 +93,97 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -73,78 +93,97 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 73 | 'scene': '3', | 93 | 'scene': '3', |
| 74 | 'status': '1' | 94 | 'status': '1' |
| 75 | }; | 95 | }; |
| 76 | - if (label != '') { | ||
| 77 | - pramas['label'] = label; | ||
| 78 | - } | 96 | + // if (label != '') { |
| 97 | + // pramas['label'] = label; | ||
| 98 | + // } | ||
| 79 | 99 | ||
| 80 | await commentManageProvider.getSellerComments(context, pramas, | 100 | await commentManageProvider.getSellerComments(context, pramas, |
| 81 | isShowLoading: isShowLoading); | 101 | isShowLoading: isShowLoading); |
| 82 | } | 102 | } |
| 83 | 103 | ||
| 84 | - List<Widget> _labelWidget() { | ||
| 85 | - List<Widget> data = []; | ||
| 86 | - data.add(InkWell( | ||
| 87 | - onTap: () { | ||
| 88 | - allSelect = true; | ||
| 89 | - commentManageProvider.commentsLabeldata.forEach((element) { | ||
| 90 | - element.select = false; | ||
| 91 | - }); | ||
| 92 | - setState(() {}); | ||
| 93 | - label = ''; | ||
| 94 | - _getSellerComments(isShowLoading: true); | ||
| 95 | - }, | ||
| 96 | - child: Container( | ||
| 97 | - padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)), | ||
| 98 | - decoration: BoxDecoration( | ||
| 99 | - borderRadius: BorderRadius.circular(r(10)), | ||
| 100 | - color: allSelect | ||
| 101 | - ? MyColours.color_33438E93 | ||
| 102 | - : MyColours.color_F8F7F3), | ||
| 103 | - child: Text( | ||
| 104 | - '全部', | ||
| 105 | - style: TextStyle( | ||
| 106 | - fontSize: font(14), | ||
| 107 | - color: allSelect | ||
| 108 | - ? MyColours.color_438E93 | ||
| 109 | - : MyColours.color_515151), | ||
| 110 | - ), | ||
| 111 | - ))); | ||
| 112 | - for (int i = 0; i < commentManageProvider.commentsLabeldata.length; i++) { | ||
| 113 | - CommentsLabelSunModel sunModel = | ||
| 114 | - commentManageProvider.commentsLabeldata[i]; | ||
| 115 | - data.add(InkWell( | ||
| 116 | - onTap: () { | ||
| 117 | - commentManageProvider.commentsLabeldata.forEach((element) { | ||
| 118 | - element.select = false; | ||
| 119 | - }); | ||
| 120 | - allSelect = false; | ||
| 121 | - sunModel.select = true; | ||
| 122 | - setState(() {}); | ||
| 123 | - label = sunModel.name; | ||
| 124 | - _getSellerComments(isShowLoading: true); | ||
| 125 | - }, | ||
| 126 | - child: Container( | ||
| 127 | - padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)), | ||
| 128 | - decoration: BoxDecoration( | ||
| 129 | - borderRadius: BorderRadius.circular(r(10)), | ||
| 130 | - color: sunModel.select | ||
| 131 | - ? MyColours.color_33438E93 | ||
| 132 | - : MyColours.color_F8F7F3), | ||
| 133 | - child: Text( | ||
| 134 | - sunModel.name, | ||
| 135 | - style: TextStyle( | ||
| 136 | - fontSize: font(14), | ||
| 137 | - color: sunModel.select | ||
| 138 | - ? MyColours.color_438E93 | ||
| 139 | - : MyColours.color_515151), | ||
| 140 | - ), | ||
| 141 | - ))); | 104 | + _setComment(String pid, String rid, String text, |
| 105 | + {bool isShowLoading = true}) async { | ||
| 106 | + Map<String, String> pramas = { | ||
| 107 | + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 108 | + 'identity': '0', | ||
| 109 | + 'pid': pid, | ||
| 110 | + 'rid': rid, | ||
| 111 | + 'text': text, | ||
| 112 | + }; | ||
| 113 | + | ||
| 114 | + bool success = await commentManageProvider.setComment(context, pramas, | ||
| 115 | + isShowLoading: isShowLoading); | ||
| 116 | + if (success) { | ||
| 117 | + //成功 刷新列表 | ||
| 118 | + _getSellerComments(isShowLoading: false); | ||
| 142 | } | 119 | } |
| 143 | - return data; | ||
| 144 | } | 120 | } |
| 145 | 121 | ||
| 122 | + // List<Widget> _labelWidget() { | ||
| 123 | + // List<Widget> data = []; | ||
| 124 | + // data.add(InkWell( | ||
| 125 | + // onTap: () { | ||
| 126 | + // allSelect = true; | ||
| 127 | + // commentManageProvider.commentsLabeldata.forEach((element) { | ||
| 128 | + // element.select = false; | ||
| 129 | + // }); | ||
| 130 | + // setState(() {}); | ||
| 131 | + // label = ''; | ||
| 132 | + // _getSellerComments(isShowLoading: true); | ||
| 133 | + // }, | ||
| 134 | + // child: Container( | ||
| 135 | + // padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)), | ||
| 136 | + // decoration: BoxDecoration( | ||
| 137 | + // borderRadius: BorderRadius.circular(r(10)), | ||
| 138 | + // color: allSelect | ||
| 139 | + // ? MyColours.color_33438E93 | ||
| 140 | + // : MyColours.color_F8F7F3), | ||
| 141 | + // child: Text( | ||
| 142 | + // '全部', | ||
| 143 | + // style: TextStyle( | ||
| 144 | + // fontSize: font(14), | ||
| 145 | + // color: allSelect | ||
| 146 | + // ? MyColours.color_438E93 | ||
| 147 | + // : MyColours.color_515151), | ||
| 148 | + // ), | ||
| 149 | + // ))); | ||
| 150 | + // for (int i = 0; i < commentManageProvider.commentsLabeldata.length; i++) { | ||
| 151 | + // CommentsLabelSunModel sunModel = | ||
| 152 | + // commentManageProvider.commentsLabeldata[i]; | ||
| 153 | + // data.add(InkWell( | ||
| 154 | + // onTap: () { | ||
| 155 | + // commentManageProvider.commentsLabeldata.forEach((element) { | ||
| 156 | + // element.select = false; | ||
| 157 | + // }); | ||
| 158 | + // allSelect = false; | ||
| 159 | + // sunModel.select = true; | ||
| 160 | + // setState(() {}); | ||
| 161 | + // label = sunModel.name; | ||
| 162 | + // _getSellerComments(isShowLoading: true); | ||
| 163 | + // }, | ||
| 164 | + // child: Container( | ||
| 165 | + // padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)), | ||
| 166 | + // decoration: BoxDecoration( | ||
| 167 | + // borderRadius: BorderRadius.circular(r(10)), | ||
| 168 | + // color: sunModel.select | ||
| 169 | + // ? MyColours.color_33438E93 | ||
| 170 | + // : MyColours.color_F8F7F3), | ||
| 171 | + // child: Text( | ||
| 172 | + // sunModel.name, | ||
| 173 | + // style: TextStyle( | ||
| 174 | + // fontSize: font(14), | ||
| 175 | + // color: sunModel.select | ||
| 176 | + // ? MyColours.color_438E93 | ||
| 177 | + // : MyColours.color_515151), | ||
| 178 | + // ), | ||
| 179 | + // ))); | ||
| 180 | + // } | ||
| 181 | + // return data; | ||
| 182 | + // } | ||
| 183 | + | ||
| 146 | /// 九宫格 | 184 | /// 九宫格 |
| 147 | Widget _getGridImg(List<CommentsImageModel> imags) { | 185 | Widget _getGridImg(List<CommentsImageModel> imags) { |
| 186 | + imags.removeWhere((element) => element.url == null || element.url == ''); | ||
| 148 | return GridView.builder( | 187 | return GridView.builder( |
| 149 | controller: controller, | 188 | controller: controller, |
| 150 | padding: EdgeInsets.symmetric(vertical: w(7)), | 189 | padding: EdgeInsets.symmetric(vertical: w(7)), |
| @@ -162,9 +201,63 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -162,9 +201,63 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 162 | //子组件宽高长度比例 | 201 | //子组件宽高长度比例 |
| 163 | childAspectRatio: 1.0), | 202 | childAspectRatio: 1.0), |
| 164 | itemBuilder: (BuildContext context, int index) { | 203 | itemBuilder: (BuildContext context, int index) { |
| 204 | + if (imags[index].avinfo != null) { | ||
| 205 | + videoPlayerController = | ||
| 206 | + CachedVideoPlayerController.network(imags[index].url); | ||
| 207 | + videoPlayerController.setLooping(false); | ||
| 208 | + _initializeVideoPlayerFuture = videoPlayerController.initialize(); | ||
| 209 | + | ||
| 210 | + //视频 | ||
| 211 | + return InkWell( | ||
| 212 | + onTap: () { | ||
| 213 | + Navigator.push( | ||
| 214 | + context, | ||
| 215 | + PopRoute( | ||
| 216 | + child: VideoPage( | ||
| 217 | + url: imags[index].url, | ||
| 218 | + ))); | ||
| 219 | + }, | ||
| 220 | + child: Stack(alignment: Alignment.center, children: [ | ||
| 221 | + ClipRRect( | ||
| 222 | + borderRadius: BorderRadius.circular(r(8)), | ||
| 223 | + child: FutureBuilder( | ||
| 224 | + //显示缩略图 | ||
| 225 | + future: _initializeVideoPlayerFuture, | ||
| 226 | + builder: (context, snapshot) { | ||
| 227 | + print(snapshot.connectionState); | ||
| 228 | + if (snapshot.hasError) print(snapshot.error); | ||
| 229 | + if (snapshot.connectionState == | ||
| 230 | + ConnectionState.done) { | ||
| 231 | + return AspectRatio( | ||
| 232 | + aspectRatio: 1 / 1, | ||
| 233 | + // aspectRatio: _controller.value.aspectRatio, | ||
| 234 | + // child: VideoPlayer(videoPlayerController), | ||
| 235 | + child: | ||
| 236 | + CachedVideoPlayer(videoPlayerController)); | ||
| 237 | + } else { | ||
| 238 | + return Center( | ||
| 239 | + child: CircularProgressIndicator(), | ||
| 240 | + ); | ||
| 241 | + } | ||
| 242 | + }, | ||
| 243 | + )), | ||
| 244 | + Positioned( | ||
| 245 | + child: Image.asset( | ||
| 246 | + Utils.getImgPath('play'), | ||
| 247 | + width: w(20), | ||
| 248 | + )) | ||
| 249 | + ])); | ||
| 250 | + } | ||
| 251 | + | ||
| 165 | return InkWell( | 252 | return InkWell( |
| 166 | onTap: () { | 253 | onTap: () { |
| 167 | - List<String> images = imags.map((e) => e.url).toList(); | 254 | + List<String> images = []; |
| 255 | + imags.forEach((element) { | ||
| 256 | + if (!element.mimeType.startsWith('video')) { | ||
| 257 | + images.add(element.url); | ||
| 258 | + } | ||
| 259 | + }); | ||
| 260 | + | ||
| 168 | _showPhotoView(context, index, images); | 261 | _showPhotoView(context, index, images); |
| 169 | }, | 262 | }, |
| 170 | child: ClipRRect( | 263 | child: ClipRRect( |
| @@ -224,7 +317,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -224,7 +317,7 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 224 | return ExceptionPage( | 317 | return ExceptionPage( |
| 225 | pageState: model.pageState, | 318 | pageState: model.pageState, |
| 226 | callback: () async { | 319 | callback: () async { |
| 227 | - _getCountCommentLabel(); | 320 | + // _getCountCommentLabel(); |
| 228 | _getSellerComments(); | 321 | _getSellerComments(); |
| 229 | }, | 322 | }, |
| 230 | emptyMsg: "暂时没有评论列表信息哦", | 323 | emptyMsg: "暂时没有评论列表信息哦", |
| @@ -237,13 +330,13 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -237,13 +330,13 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 237 | padding: EdgeInsets.symmetric(horizontal: w(20)), | 330 | padding: EdgeInsets.symmetric(horizontal: w(20)), |
| 238 | child: Column( | 331 | child: Column( |
| 239 | children: [ | 332 | children: [ |
| 240 | - Container( | ||
| 241 | - child: Wrap( | ||
| 242 | - runSpacing: w(10), | ||
| 243 | - spacing: w(10), | ||
| 244 | - children: _labelWidget()), | ||
| 245 | - ), | ||
| 246 | - VEmptyView(10), | 333 | + // Container( |
| 334 | + // child: Wrap( | ||
| 335 | + // runSpacing: w(10), | ||
| 336 | + // spacing: w(10), | ||
| 337 | + // children: _labelWidget()), | ||
| 338 | + // ), | ||
| 339 | + // VEmptyView(10), | ||
| 247 | Expanded( | 340 | Expanded( |
| 248 | child: ListView.builder( | 341 | child: ListView.builder( |
| 249 | itemCount: | 342 | itemCount: |
| @@ -253,287 +346,295 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | @@ -253,287 +346,295 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { | ||
| 253 | itemBuilder: (context, index) { | 346 | itemBuilder: (context, index) { |
| 254 | CommentsSunModel sunModel = | 347 | CommentsSunModel sunModel = |
| 255 | commentManageProvider.commentsData[index]; | 348 | commentManageProvider.commentsData[index]; |
| 256 | - return Container( | ||
| 257 | - margin: EdgeInsets.only(top: w(10)), | ||
| 258 | - decoration: BoxDecoration( | ||
| 259 | - border: Border( | ||
| 260 | - bottom: BorderSide( | ||
| 261 | - width: w(0.5), | ||
| 262 | - color: MyColours.color_DBDBDB))), | ||
| 263 | - child: Row( | ||
| 264 | - crossAxisAlignment: CrossAxisAlignment.start, | ||
| 265 | - children: [ | ||
| 266 | - Container( | ||
| 267 | - width: w(50), | ||
| 268 | - height: w(50), | ||
| 269 | - margin: EdgeInsets.only( | ||
| 270 | - left: w(8), | ||
| 271 | - right: w(8), | ||
| 272 | - top: w(20)), | ||
| 273 | - child: ClipRRect( | ||
| 274 | - borderRadius: | ||
| 275 | - BorderRadius.circular(w(50)), | ||
| 276 | - child: sunModel.authorImage != | ||
| 277 | - null && | ||
| 278 | - sunModel.authorImage != '' | ||
| 279 | - ? CachedNetworkImage( | ||
| 280 | - imageUrl: | ||
| 281 | - sunModel.authorImage, | ||
| 282 | - width: w(50), | ||
| 283 | - height: w(50), | ||
| 284 | - ) | ||
| 285 | - : Container( | ||
| 286 | - width: w(50), | ||
| 287 | - height: w(50), | ||
| 288 | - decoration: BoxDecoration( | ||
| 289 | - color: MyColours | ||
| 290 | - .color_d9d9d9, | ||
| 291 | - borderRadius: | ||
| 292 | - BorderRadius | ||
| 293 | - .circular( | ||
| 294 | - r(50))), | ||
| 295 | - ))), | ||
| 296 | - HEmptyView(34), | ||
| 297 | - Expanded( | ||
| 298 | - child: Padding( | ||
| 299 | - padding: EdgeInsets.symmetric( | ||
| 300 | - vertical: w(4)), | ||
| 301 | - child: Column( | ||
| 302 | - crossAxisAlignment: | ||
| 303 | - CrossAxisAlignment.start, | ||
| 304 | - children: [ | ||
| 305 | - Row( | ||
| 306 | - children: [ | 349 | + return Stack(children: [ |
| 350 | + Container( | ||
| 351 | + margin: EdgeInsets.only(top: w(10)), | ||
| 352 | + decoration: BoxDecoration( | ||
| 353 | + border: Border( | ||
| 354 | + bottom: BorderSide( | ||
| 355 | + width: w(0.5), | ||
| 356 | + color: MyColours.color_DBDBDB))), | ||
| 357 | + child: Row( | ||
| 358 | + crossAxisAlignment: | ||
| 359 | + CrossAxisAlignment.start, | ||
| 360 | + children: [ | ||
| 361 | + Container( | ||
| 362 | + width: w(50), | ||
| 363 | + height: w(50), | ||
| 364 | + margin: EdgeInsets.only( | ||
| 365 | + left: w(8), | ||
| 366 | + right: w(8), | ||
| 367 | + top: w(20)), | ||
| 368 | + child: ClipRRect( | ||
| 369 | + borderRadius: | ||
| 370 | + BorderRadius.circular(w(50)), | ||
| 371 | + child: sunModel.authorImage != | ||
| 372 | + null && | ||
| 373 | + sunModel.authorImage != '' | ||
| 374 | + ? CachedNetworkImage( | ||
| 375 | + imageUrl: | ||
| 376 | + sunModel.authorImage, | ||
| 377 | + width: w(50), | ||
| 378 | + height: w(50), | ||
| 379 | + ) | ||
| 380 | + : Container( | ||
| 381 | + width: w(50), | ||
| 382 | + height: w(50), | ||
| 383 | + decoration: BoxDecoration( | ||
| 384 | + color: MyColours | ||
| 385 | + .color_d9d9d9, | ||
| 386 | + borderRadius: | ||
| 387 | + BorderRadius | ||
| 388 | + .circular( | ||
| 389 | + r(50))), | ||
| 390 | + ))), | ||
| 391 | + HEmptyView(34), | ||
| 392 | + Expanded( | ||
| 393 | + child: Padding( | ||
| 394 | + padding: EdgeInsets.symmetric( | ||
| 395 | + vertical: w(4)), | ||
| 396 | + child: Column( | ||
| 397 | + crossAxisAlignment: | ||
| 398 | + CrossAxisAlignment.start, | ||
| 399 | + children: [ | ||
| 400 | + Row( | ||
| 401 | + children: [ | ||
| 402 | + Container( | ||
| 403 | + padding: EdgeInsets | ||
| 404 | + .symmetric( | ||
| 405 | + vertical: | ||
| 406 | + w(4)), | ||
| 407 | + constraints: | ||
| 408 | + BoxConstraints( | ||
| 409 | + maxWidth: | ||
| 410 | + w(120)), | ||
| 411 | + child: Text( | ||
| 412 | + sunModel.author ?? | ||
| 413 | + '', | ||
| 414 | + maxLines: 10, | ||
| 415 | + overflow: | ||
| 416 | + TextOverflow | ||
| 417 | + .ellipsis, | ||
| 418 | + style: TextStyle( | ||
| 419 | + fontSize: | ||
| 420 | + font(14), | ||
| 421 | + fontWeight: | ||
| 422 | + FontWeight | ||
| 423 | + .bold, | ||
| 424 | + color: MyColours | ||
| 425 | + .color_515151), | ||
| 426 | + )), | ||
| 427 | + // Spacer(), | ||
| 428 | + // Container( | ||
| 429 | + // width: w(75), | ||
| 430 | + // height: w(24), | ||
| 431 | + // child: ListView | ||
| 432 | + // .builder( | ||
| 433 | + // itemCount: | ||
| 434 | + // 5, | ||
| 435 | + // shrinkWrap: | ||
| 436 | + // true, | ||
| 437 | + // scrollDirection: | ||
| 438 | + // Axis | ||
| 439 | + // .horizontal, | ||
| 440 | + // itemBuilder: | ||
| 441 | + // (context, | ||
| 442 | + // index) { | ||
| 443 | + // return CachedNetworkImage( | ||
| 444 | + // imageUrl: index <= | ||
| 445 | + // int.parse(sunModel.grade) - 1 | ||
| 446 | + // ? 'http://nosqn.colorcun.com/pinglun/p%20%283%29.png' | ||
| 447 | + // : 'http://nosqn.colorcun.com/pinglun/p%20%284%29.png', | ||
| 448 | + // width: w( | ||
| 449 | + // 15), | ||
| 450 | + // ); | ||
| 451 | + // })), | ||
| 452 | + // HEmptyView(3), | ||
| 453 | + // Container( | ||
| 454 | + // padding: EdgeInsets | ||
| 455 | + // .symmetric( | ||
| 456 | + // vertical: | ||
| 457 | + // w(4)), | ||
| 458 | + // child: Text( | ||
| 459 | + // starTextMap[ | ||
| 460 | + // '${sunModel.grade}'] ?? | ||
| 461 | + // '', | ||
| 462 | + // maxLines: 2, | ||
| 463 | + // overflow: | ||
| 464 | + // TextOverflow | ||
| 465 | + // .ellipsis, | ||
| 466 | + // style: TextStyle( | ||
| 467 | + // fontSize: | ||
| 468 | + // font(12), | ||
| 469 | + // color: MyColours | ||
| 470 | + // .color_999999), | ||
| 471 | + // )), | ||
| 472 | + ], | ||
| 473 | + ), | ||
| 474 | + VEmptyView(8), | ||
| 475 | + Container( | ||
| 476 | + padding: EdgeInsets | ||
| 477 | + .symmetric( | ||
| 478 | + vertical: w(4)), | ||
| 479 | + child: Text( | ||
| 480 | + '就餐于 ${sunModel.ddate ?? ''} ${sunModel.ddateSolt ?? ""} ${sunModel.tableinfo ?? ''}', | ||
| 481 | + maxLines: 10, | ||
| 482 | + overflow: TextOverflow | ||
| 483 | + .ellipsis, | ||
| 484 | + style: TextStyle( | ||
| 485 | + fontSize: | ||
| 486 | + font(12), | ||
| 487 | + color: MyColours | ||
| 488 | + .color_999999), | ||
| 489 | + )), | ||
| 490 | + Container( | ||
| 491 | + padding: EdgeInsets | ||
| 492 | + .symmetric( | ||
| 493 | + vertical: w(4)), | ||
| 494 | + child: Text( | ||
| 495 | + '发表于 ${sunModel.createTimeStr}', | ||
| 496 | + maxLines: 10, | ||
| 497 | + overflow: TextOverflow | ||
| 498 | + .ellipsis, | ||
| 499 | + style: TextStyle( | ||
| 500 | + fontSize: | ||
| 501 | + font(12), | ||
| 502 | + color: MyColours | ||
| 503 | + .color_999999), | ||
| 504 | + )), | ||
| 505 | + VEmptyView(8), | ||
| 506 | + if (sunModel.text != null && | ||
| 507 | + sunModel.text.length > | ||
| 508 | + 0) | ||
| 307 | Container( | 509 | Container( |
| 308 | padding: EdgeInsets | 510 | padding: EdgeInsets |
| 309 | .symmetric( | 511 | .symmetric( |
| 310 | vertical: | 512 | vertical: |
| 311 | w(4)), | 513 | w(4)), |
| 312 | - constraints: | ||
| 313 | - BoxConstraints( | ||
| 314 | - maxWidth: | ||
| 315 | - w(120)), | ||
| 316 | child: Text( | 514 | child: Text( |
| 317 | - sunModel.author ?? | ||
| 318 | - '', | ||
| 319 | - maxLines: 10, | ||
| 320 | - overflow: | ||
| 321 | - TextOverflow | ||
| 322 | - .ellipsis, | 515 | + sunModel.text ?? '', |
| 323 | style: TextStyle( | 516 | style: TextStyle( |
| 517 | + height: 1.8, | ||
| 324 | fontSize: | 518 | fontSize: |
| 325 | - font(14), | ||
| 326 | - fontWeight: | ||
| 327 | - FontWeight | ||
| 328 | - .bold, | 519 | + font(12), |
| 329 | color: MyColours | 520 | color: MyColours |
| 330 | .color_515151), | 521 | .color_515151), |
| 331 | )), | 522 | )), |
| 332 | - Spacer(), | ||
| 333 | - Container( | ||
| 334 | - width: w(75), | ||
| 335 | - height: w(24), | ||
| 336 | - child: | ||
| 337 | - ListView.builder( | ||
| 338 | - itemCount: 5, | ||
| 339 | - shrinkWrap: | ||
| 340 | - true, | ||
| 341 | - scrollDirection: | ||
| 342 | - Axis | ||
| 343 | - .horizontal, | ||
| 344 | - itemBuilder: | ||
| 345 | - (context, | ||
| 346 | - index) { | ||
| 347 | - return Image | ||
| 348 | - .asset( | ||
| 349 | - Utils.getImgPath(index <= | ||
| 350 | - int.parse(sunModel.grade) - 1 | ||
| 351 | - ? 'zwzp' | ||
| 352 | - : 'apple'), | ||
| 353 | - width: | ||
| 354 | - w(15), | ||
| 355 | - ); | ||
| 356 | - })), | ||
| 357 | - Container( | ||
| 358 | - padding: EdgeInsets | ||
| 359 | - .symmetric( | ||
| 360 | - vertical: | ||
| 361 | - w(4)), | ||
| 362 | - child: Text( | ||
| 363 | - starTextMap[ | ||
| 364 | - '${sunModel.grade}'] ?? | ||
| 365 | - '', | ||
| 366 | - maxLines: 2, | ||
| 367 | - overflow: | ||
| 368 | - TextOverflow | ||
| 369 | - .ellipsis, | ||
| 370 | - style: TextStyle( | ||
| 371 | - fontSize: | ||
| 372 | - font(12), | 523 | + // Container( |
| 524 | + // padding: EdgeInsets | ||
| 525 | + // .symmetric( | ||
| 526 | + // vertical: w(4)), | ||
| 527 | + // child: Text( | ||
| 528 | + // '#${sunModel.evalLabel ?? ''}', | ||
| 529 | + // style: TextStyle( | ||
| 530 | + // height: 1.8, | ||
| 531 | + // fontSize: | ||
| 532 | + // font(12), | ||
| 533 | + // color: MyColours | ||
| 534 | + // .color_438E93), | ||
| 535 | + // )), | ||
| 536 | + if (sunModel | ||
| 537 | + .enclosure.length > | ||
| 538 | + 0) | ||
| 539 | + _getGridImg( | ||
| 540 | + sunModel.enclosure), | ||
| 541 | + VEmptyView(8), | ||
| 542 | + sunModel.reply != null | ||
| 543 | + ? Container( | ||
| 544 | + width: | ||
| 545 | + double.infinity, | ||
| 546 | + padding: | ||
| 547 | + EdgeInsets.all( | ||
| 548 | + w(4)), | ||
| 549 | + decoration: BoxDecoration( | ||
| 373 | color: MyColours | 550 | color: MyColours |
| 374 | - .color_999999), | ||
| 375 | - )), | ||
| 376 | - ], | ||
| 377 | - ), | ||
| 378 | - VEmptyView(8), | ||
| 379 | - Container( | ||
| 380 | - padding: | ||
| 381 | - EdgeInsets.symmetric( | ||
| 382 | - vertical: w(4)), | ||
| 383 | - child: Text( | ||
| 384 | - '就餐于 2023-8-24 午餐 二楼205', | ||
| 385 | - maxLines: 10, | ||
| 386 | - overflow: TextOverflow | ||
| 387 | - .ellipsis, | ||
| 388 | - style: TextStyle( | ||
| 389 | - fontSize: font(12), | ||
| 390 | - color: MyColours | ||
| 391 | - .color_999999), | ||
| 392 | - )), | ||
| 393 | - Container( | ||
| 394 | - padding: | ||
| 395 | - EdgeInsets.symmetric( | ||
| 396 | - vertical: w(4)), | ||
| 397 | - child: Text( | ||
| 398 | - '发表于 ${sunModel.createTimeStr}', | ||
| 399 | - maxLines: 10, | ||
| 400 | - overflow: TextOverflow | ||
| 401 | - .ellipsis, | ||
| 402 | - style: TextStyle( | ||
| 403 | - fontSize: font(12), | ||
| 404 | - color: MyColours | ||
| 405 | - .color_999999), | ||
| 406 | - )), | ||
| 407 | - VEmptyView(8), | ||
| 408 | - if (sunModel.text != null && | ||
| 409 | - sunModel.text.length > 0) | ||
| 410 | - Container( | ||
| 411 | - padding: EdgeInsets | ||
| 412 | - .symmetric( | ||
| 413 | - vertical: w(4)), | ||
| 414 | - child: Text( | ||
| 415 | - sunModel.text ?? '', | ||
| 416 | - style: TextStyle( | ||
| 417 | - height: 1.8, | ||
| 418 | - fontSize: | ||
| 419 | - font(12), | ||
| 420 | - color: MyColours | ||
| 421 | - .color_515151), | ||
| 422 | - )), | ||
| 423 | - Container( | ||
| 424 | - padding: | ||
| 425 | - EdgeInsets.symmetric( | ||
| 426 | - vertical: w(4)), | ||
| 427 | - child: Text( | ||
| 428 | - '#${sunModel.evalLabel ?? ''}', | ||
| 429 | - style: TextStyle( | ||
| 430 | - height: 1.8, | ||
| 431 | - fontSize: font(12), | ||
| 432 | - color: MyColours | ||
| 433 | - .color_438E93), | ||
| 434 | - )), | ||
| 435 | - if (sunModel | ||
| 436 | - .enclosure.length > | ||
| 437 | - 0) | ||
| 438 | - _getGridImg( | ||
| 439 | - sunModel.enclosure), | ||
| 440 | - VEmptyView(8), | ||
| 441 | - sunModel.reply != null | ||
| 442 | - ? Container( | ||
| 443 | - width: | ||
| 444 | - double.infinity, | ||
| 445 | - padding: | ||
| 446 | - EdgeInsets.all( | ||
| 447 | - w(4)), | ||
| 448 | - decoration: BoxDecoration( | ||
| 449 | - color: MyColours | ||
| 450 | - .color_33438E93, | ||
| 451 | - borderRadius: | ||
| 452 | - BorderRadius | ||
| 453 | - .circular( | ||
| 454 | - r(8))), | ||
| 455 | - child: Column( | ||
| 456 | - crossAxisAlignment: | ||
| 457 | - CrossAxisAlignment | ||
| 458 | - .start, | ||
| 459 | - children: [ | ||
| 460 | - Text( | ||
| 461 | - '回复内容', | ||
| 462 | - style: TextStyle( | ||
| 463 | - color: MyColours | ||
| 464 | - .color_515151, | ||
| 465 | - fontWeight: | ||
| 466 | - FontWeight | ||
| 467 | - .bold, | ||
| 468 | - fontSize: | ||
| 469 | - font( | ||
| 470 | - 12)), | ||
| 471 | - ), | ||
| 472 | - VEmptyView(6), | ||
| 473 | - Container( | ||
| 474 | - padding: EdgeInsets | ||
| 475 | - .symmetric( | ||
| 476 | - vertical: | ||
| 477 | - w(4)), | ||
| 478 | - child: Text( | ||
| 479 | - sunModel.reply | ||
| 480 | - .text ?? | ||
| 481 | - "", | ||
| 482 | - style: TextStyle( | ||
| 483 | - height: | ||
| 484 | - 1.8, | ||
| 485 | - fontSize: | ||
| 486 | - font( | ||
| 487 | - 12), | ||
| 488 | - color: MyColours | ||
| 489 | - .color_515151), | ||
| 490 | - )), | ||
| 491 | - ], | ||
| 492 | - ), | ||
| 493 | - ) | ||
| 494 | - : | ||
| 495 | - // showInput | ||
| 496 | - // ? SlidingUpPanel( | ||
| 497 | - // panel: Center( | ||
| 498 | - // child: Text( | ||
| 499 | - // "This is the sliding Widget"), | ||
| 500 | - // ), | ||
| 501 | - // ) | ||
| 502 | - // : | ||
| 503 | - Align( | ||
| 504 | - alignment: Alignment | ||
| 505 | - .centerRight, | ||
| 506 | - child: RoundButton( | ||
| 507 | - text: '回复', | ||
| 508 | - width: w(54), | ||
| 509 | - height: w(24), | ||
| 510 | - gradientStart: | ||
| 511 | - MyColours | ||
| 512 | - .color_ffffff, | ||
| 513 | - gradientEnd: MyColours | ||
| 514 | - .color_ffffff, | ||
| 515 | - textColor: MyColours | ||
| 516 | - .color_000000, | ||
| 517 | - fontSize: 24, | ||
| 518 | - borderColor: MyColours | ||
| 519 | - .color_999999, | ||
| 520 | - radius: r(15), | ||
| 521 | - onPressed: () { | ||
| 522 | - setState(() { | ||
| 523 | - showInput = | ||
| 524 | - !showInput; | ||
| 525 | - }); | ||
| 526 | - DialogUtil | ||
| 527 | - .openCommentsModalBottomSheet( | ||
| 528 | - context); | ||
| 529 | - }, | 551 | + .color_33438E93, |
| 552 | + borderRadius: | ||
| 553 | + BorderRadius | ||
| 554 | + .circular( | ||
| 555 | + r(8))), | ||
| 556 | + child: Column( | ||
| 557 | + crossAxisAlignment: | ||
| 558 | + CrossAxisAlignment | ||
| 559 | + .start, | ||
| 560 | + children: [ | ||
| 561 | + Text( | ||
| 562 | + '回复内容', | ||
| 563 | + style: TextStyle( | ||
| 564 | + color: MyColours | ||
| 565 | + .color_515151, | ||
| 566 | + fontWeight: | ||
| 567 | + FontWeight | ||
| 568 | + .bold, | ||
| 569 | + fontSize: | ||
| 570 | + font( | ||
| 571 | + 12)), | ||
| 572 | + ), | ||
| 573 | + VEmptyView(6), | ||
| 574 | + Container( | ||
| 575 | + padding: EdgeInsets.symmetric( | ||
| 576 | + vertical: | ||
| 577 | + w(4)), | ||
| 578 | + child: Text( | ||
| 579 | + sunModel.reply | ||
| 580 | + .text ?? | ||
| 581 | + "", | ||
| 582 | + style: TextStyle( | ||
| 583 | + height: | ||
| 584 | + 1.8, | ||
| 585 | + fontSize: font( | ||
| 586 | + 12), | ||
| 587 | + color: | ||
| 588 | + MyColours.color_515151), | ||
| 589 | + )), | ||
| 590 | + ], | ||
| 591 | + ), | ||
| 592 | + ) | ||
| 593 | + : Align( | ||
| 594 | + alignment: Alignment | ||
| 595 | + .centerRight, | ||
| 596 | + child: RoundButton( | ||
| 597 | + text: '回复', | ||
| 598 | + width: w(54), | ||
| 599 | + height: w(24), | ||
| 600 | + gradientStart: | ||
| 601 | + MyColours | ||
| 602 | + .color_ffffff, | ||
| 603 | + gradientEnd: MyColours | ||
| 604 | + .color_ffffff, | ||
| 605 | + textColor: MyColours | ||
| 606 | + .color_000000, | ||
| 607 | + fontSize: 24, | ||
| 608 | + borderColor: MyColours | ||
| 609 | + .color_999999, | ||
| 610 | + radius: r(15), | ||
| 611 | + onPressed: () { | ||
| 612 | + Navigator.push( | ||
| 613 | + context, | ||
| 614 | + PopRoute(child: | ||
| 615 | + InputButtomWidget( | ||
| 616 | + onEditingCompleteText: | ||
| 617 | + (text) { | ||
| 618 | + print( | ||
| 619 | + '点击发送 ---$text'); | ||
| 620 | + _setComment( | ||
| 621 | + sunModel | ||
| 622 | + .id, | ||
| 623 | + sunModel | ||
| 624 | + .rid, | ||
| 625 | + text, | ||
| 626 | + ); | ||
| 627 | + }, | ||
| 628 | + ))); | ||
| 629 | + }, | ||
| 630 | + ), | ||
| 530 | ), | 631 | ), |
| 531 | - ), | ||
| 532 | - VEmptyView(26), | ||
| 533 | - ]))), | ||
| 534 | - ], | 632 | + VEmptyView(26), |
| 633 | + ]))), | ||
| 634 | + ], | ||
| 635 | + ), | ||
| 535 | ), | 636 | ), |
| 536 | - ); | 637 | + ]); |
| 537 | })) | 638 | })) |
| 538 | ], | 639 | ], |
| 539 | )); | 640 | )); |
| 1 | +import 'package:flutter/material.dart'; | ||
| 2 | + | ||
| 3 | +import '../../../res/colors.dart'; | ||
| 4 | +import '../../../utils/screen_util.dart'; | ||
| 5 | +import '../../../widgets/h_empty_view.dart'; | ||
| 6 | +import '../../../widgets/round_button.dart'; | ||
| 7 | + | ||
| 8 | +class InputButtomWidget extends StatefulWidget { | ||
| 9 | + final ValueChanged onEditingCompleteText; | ||
| 10 | + | ||
| 11 | + InputButtomWidget({Key key, this.onEditingCompleteText}) : super(key: key); | ||
| 12 | + | ||
| 13 | + @override | ||
| 14 | + _InputButtomWidgetState createState() => _InputButtomWidgetState(); | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +class _InputButtomWidgetState extends State<InputButtomWidget> { | ||
| 18 | + final TextEditingController controller = TextEditingController(); | ||
| 19 | + @override | ||
| 20 | + Widget build(BuildContext context) { | ||
| 21 | + return new Scaffold( | ||
| 22 | + backgroundColor: Colors.transparent, | ||
| 23 | + body: new Column( | ||
| 24 | + children: <Widget>[ | ||
| 25 | + Expanded( | ||
| 26 | + child: new GestureDetector( | ||
| 27 | + child: new Container( | ||
| 28 | + color: Colors.transparent, | ||
| 29 | + ), | ||
| 30 | + onTap: () { | ||
| 31 | + Navigator.pop(context); | ||
| 32 | + }, | ||
| 33 | + )), | ||
| 34 | + new Container( | ||
| 35 | + color: Color(0xFFF4F4F4), | ||
| 36 | + padding: EdgeInsets.only(left: 16, top: 8, bottom: 8, right: 16), | ||
| 37 | + child: Row(children: [ | ||
| 38 | + // Container( | ||
| 39 | + // decoration: BoxDecoration(color: Colors.white), | ||
| 40 | + // child: TextField( | ||
| 41 | + // controller: controller, | ||
| 42 | + // autofocus: true, | ||
| 43 | + // style: TextStyle(fontSize: 16), | ||
| 44 | + // //设置键盘按钮为发送 | ||
| 45 | + // textInputAction: TextInputAction.send, | ||
| 46 | + // keyboardType: TextInputType.multiline, | ||
| 47 | + // onEditingComplete: () { | ||
| 48 | + // //点击发送调用 | ||
| 49 | + // print('onEditingComplete'); | ||
| 50 | + // onEditingCompleteText(controller.text); | ||
| 51 | + // Navigator.pop(context); | ||
| 52 | + // }, | ||
| 53 | + // decoration: InputDecoration( | ||
| 54 | + // hintText: '评论', | ||
| 55 | + // isDense: true, | ||
| 56 | + // contentPadding: EdgeInsets.only( | ||
| 57 | + // left: 10, top: 5, bottom: 5, right: 10), | ||
| 58 | + // border: const OutlineInputBorder( | ||
| 59 | + // gapPadding: 0, | ||
| 60 | + // borderSide: BorderSide( | ||
| 61 | + // width: 0, | ||
| 62 | + // style: BorderStyle.none, | ||
| 63 | + // ), | ||
| 64 | + // ), | ||
| 65 | + // ), | ||
| 66 | + | ||
| 67 | + // minLines: 1, | ||
| 68 | + // maxLines: 5, | ||
| 69 | + // ), | ||
| 70 | + // ), | ||
| 71 | + Expanded( | ||
| 72 | + child: Container( | ||
| 73 | + decoration: BoxDecoration( | ||
| 74 | + color: MyColours.color_ffffff, | ||
| 75 | + borderRadius: BorderRadius.circular(r(8))), | ||
| 76 | + padding: | ||
| 77 | + EdgeInsets.symmetric(horizontal: w(4), vertical: 0), | ||
| 78 | + child: TextField( | ||
| 79 | + controller: controller, | ||
| 80 | + minLines: 1, | ||
| 81 | + maxLines: 5, | ||
| 82 | + autofocus: true, | ||
| 83 | + | ||
| 84 | + // //光标颜色 | ||
| 85 | + // cursorColor: | ||
| 86 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 87 | + //输入文本的样式 | ||
| 88 | + // inputFormatters: lenghtLimit | ||
| 89 | + // ? [ | ||
| 90 | + // LengthLimitingTextInputFormatter(10), | ||
| 91 | + // ] | ||
| 92 | + // : [], | ||
| 93 | + // textAlignVertical: TextAlignVertical.center, | ||
| 94 | + textAlign: TextAlign.left, | ||
| 95 | + style: TextStyle( | ||
| 96 | + fontSize: font(14), | ||
| 97 | + ), | ||
| 98 | + | ||
| 99 | + decoration: InputDecoration( | ||
| 100 | + contentPadding: EdgeInsets.zero, | ||
| 101 | + border: | ||
| 102 | + OutlineInputBorder(borderSide: BorderSide.none), | ||
| 103 | + hintText: '评论', | ||
| 104 | + hintStyle: TextStyle( | ||
| 105 | + color: MyColours.color_999999, | ||
| 106 | + fontSize: font(14), | ||
| 107 | + ), | ||
| 108 | + enabledBorder: new UnderlineInputBorder( | ||
| 109 | + borderSide: BorderSide.none, | ||
| 110 | + ), | ||
| 111 | + focusedBorder: new UnderlineInputBorder( | ||
| 112 | + borderSide: BorderSide.none, | ||
| 113 | + ), | ||
| 114 | + ), | ||
| 115 | + onChanged: (value) { | ||
| 116 | + // name = value; | ||
| 117 | + setState(() {}); | ||
| 118 | + }, | ||
| 119 | + //设置键盘按钮为发送 | ||
| 120 | + // textInputAction: TextInputAction.send, | ||
| 121 | + keyboardType: TextInputType.multiline, | ||
| 122 | + | ||
| 123 | + onEditingComplete: () { | ||
| 124 | + //点击发送调用 | ||
| 125 | + // print('onEditingComplete'); | ||
| 126 | + // onEditingCompleteText(controller.text); | ||
| 127 | + // Navigator.pop(context); | ||
| 128 | + }, | ||
| 129 | + ))), | ||
| 130 | + HEmptyView(20), | ||
| 131 | + RoundButton( | ||
| 132 | + text: '发送', | ||
| 133 | + width: w(54), | ||
| 134 | + height: w(28), | ||
| 135 | + gradientStart: controller.text.trim().length > 0 | ||
| 136 | + ? MyColours.color_438E93 | ||
| 137 | + : MyColours.color_ffffff, | ||
| 138 | + gradientEnd: controller.text.trim().length > 0 | ||
| 139 | + ? MyColours.color_438E93 | ||
| 140 | + : MyColours.color_ffffff, | ||
| 141 | + textColor: controller.text.trim().length > 0 | ||
| 142 | + ? MyColours.color_F8F9FD | ||
| 143 | + : MyColours.color_999999, | ||
| 144 | + fontSize: 24, | ||
| 145 | + borderColor: controller.text.trim().length > 0 | ||
| 146 | + ? MyColours.color_438E93 | ||
| 147 | + : MyColours.color_999999, | ||
| 148 | + radius: r(15), | ||
| 149 | + onPressed: () { | ||
| 150 | + if (controller.text.trim().length == 0) { | ||
| 151 | + return; | ||
| 152 | + } | ||
| 153 | + print('onEditingComplete'); | ||
| 154 | + widget.onEditingCompleteText(controller.text); | ||
| 155 | + Navigator.pop(context); | ||
| 156 | + }, | ||
| 157 | + ), | ||
| 158 | + ])) | ||
| 159 | + ], | ||
| 160 | + ), | ||
| 161 | + ); | ||
| 162 | + } | ||
| 163 | +} |
lib/pages/my/comment_manage/pop_route.dart
0 → 100644
| 1 | +//过度路由 | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | + | ||
| 4 | +class PopRoute extends PopupRoute{ | ||
| 5 | + final Duration _duration = Duration(milliseconds: 300); | ||
| 6 | + Widget child; | ||
| 7 | + | ||
| 8 | + PopRoute({@required this.child}); | ||
| 9 | + | ||
| 10 | + @override | ||
| 11 | + Color get barrierColor => null; | ||
| 12 | + | ||
| 13 | + @override | ||
| 14 | + bool get barrierDismissible => true; | ||
| 15 | + | ||
| 16 | + @override | ||
| 17 | + String get barrierLabel => null; | ||
| 18 | + | ||
| 19 | + @override | ||
| 20 | + Widget buildPage(BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation) { | ||
| 21 | + return child; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + @override | ||
| 25 | + Duration get transitionDuration => _duration; | ||
| 26 | + | ||
| 27 | +} | ||
| 28 | + |
lib/pages/my/comment_manage/video_page.dart
0 → 100644
| 1 | +import 'package:fijkplayer/fijkplayer.dart'; | ||
| 2 | +import 'package:flutter/material.dart'; | ||
| 3 | +import 'package:one_key/res/colors.dart'; | ||
| 4 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 5 | + | ||
| 6 | +// import 'custom_ui.dart'; | ||
| 7 | + | ||
| 8 | +class VideoPage extends StatefulWidget { | ||
| 9 | + final String url; | ||
| 10 | + | ||
| 11 | + VideoPage({this.url}); | ||
| 12 | + | ||
| 13 | + @override | ||
| 14 | + _VideoPageState createState() => _VideoPageState(); | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +class _VideoPageState extends State<VideoPage> { | ||
| 18 | + final FijkPlayer player = FijkPlayer(); | ||
| 19 | + | ||
| 20 | + _VideoPageState(); | ||
| 21 | + | ||
| 22 | + @override | ||
| 23 | + void initState() { | ||
| 24 | + super.initState(); | ||
| 25 | + player.setOption(FijkOption.hostCategory, "enable-snapshot", 1); | ||
| 26 | + player.setOption(FijkOption.playerCategory, "mediacodec-all-videos", 1); | ||
| 27 | + startPlay(); | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + void startPlay() async { | ||
| 31 | + await player.setOption(FijkOption.hostCategory, "request-screen-on", 1); | ||
| 32 | + await player.setOption(FijkOption.hostCategory, "request-audio-focus", 1); | ||
| 33 | + await player.setDataSource(widget.url, autoPlay: true).catchError((e) { | ||
| 34 | + print("setDataSource error: $e"); | ||
| 35 | + }); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @override | ||
| 39 | + Widget build(BuildContext context) { | ||
| 40 | + return Scaffold( | ||
| 41 | + appBar: SystemAppBar("评价管理"), | ||
| 42 | + body: Container( | ||
| 43 | + child: Center( | ||
| 44 | + child: FijkView( | ||
| 45 | + color: MyColours.color_000000, | ||
| 46 | + player: player, | ||
| 47 | + panelBuilder: fijkPanel2Builder(snapShot: true), | ||
| 48 | + fsFit: FijkFit.fill, | ||
| 49 | + // panelBuilder: simplestUI, | ||
| 50 | + // panelBuilder: (FijkPlayer player, BuildContext context, | ||
| 51 | + // Size viewSize, Rect texturePos) { | ||
| 52 | + // return CustomFijkPanel( | ||
| 53 | + // player: player, | ||
| 54 | + // buildContext: context, | ||
| 55 | + // viewSize: viewSize, | ||
| 56 | + // texturePos: texturePos); | ||
| 57 | + // }, | ||
| 58 | + ), | ||
| 59 | + ), | ||
| 60 | + ), | ||
| 61 | + ); | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + @override | ||
| 65 | + void dispose() { | ||
| 66 | + super.dispose(); | ||
| 67 | + player.release(); | ||
| 68 | + } | ||
| 69 | +} |
| @@ -31,7 +31,10 @@ import '../../../../models/coupon_model.dart'; | @@ -31,7 +31,10 @@ import '../../../../models/coupon_model.dart'; | ||
| 31 | */ | 31 | */ |
| 32 | class MarkingCouponSelectPage extends StatefulWidget { | 32 | class MarkingCouponSelectPage extends StatefulWidget { |
| 33 | final List<CouponSunModel> couponList; | 33 | final List<CouponSunModel> couponList; |
| 34 | - MarkingCouponSelectPage({Key key, this.couponList}) : super(key: key); | 34 | + |
| 35 | + final bool mulSelect; | ||
| 36 | + MarkingCouponSelectPage({Key key, this.couponList, this.mulSelect = true}) | ||
| 37 | + : super(key: key); | ||
| 35 | 38 | ||
| 36 | @override | 39 | @override |
| 37 | _MarkingCouponSelectPageState createState() => | 40 | _MarkingCouponSelectPageState createState() => |
| @@ -92,7 +95,6 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> { | @@ -92,7 +95,6 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> { | ||
| 92 | 95 | ||
| 93 | @override | 96 | @override |
| 94 | void dispose() { | 97 | void dispose() { |
| 95 | - | ||
| 96 | super.dispose(); | 98 | super.dispose(); |
| 97 | } | 99 | } |
| 98 | 100 | ||
| @@ -140,23 +142,28 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> { | @@ -140,23 +142,28 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> { | ||
| 140 | return InkWell( | 142 | return InkWell( |
| 141 | onTap: () { | 143 | onTap: () { |
| 142 | //改这里 ******8 | 144 | //改这里 ******8 |
| 143 | - // couponProvider.couponListSelect | ||
| 144 | - // .forEach((element) { | ||
| 145 | - // element.isCheck = false; | ||
| 146 | - // }); | ||
| 147 | - | ||
| 148 | - // couponProvider.couponListSelect[index].isCheck = | ||
| 149 | - // true; | ||
| 150 | - couponProvider.couponListSelect[index].isCheck = | ||
| 151 | - !couponProvider | ||
| 152 | - .couponListSelect[index].isCheck; | ||
| 153 | - if (couponProvider | ||
| 154 | - .couponListSelect[index].isCheck) { | ||
| 155 | - selectDataList.add( | ||
| 156 | - couponProvider.couponListSelect[index]); | 145 | + if (widget.mulSelect) { |
| 146 | + couponProvider.couponListSelect[index].isCheck = | ||
| 147 | + !couponProvider | ||
| 148 | + .couponListSelect[index].isCheck; | ||
| 149 | + if (couponProvider | ||
| 150 | + .couponListSelect[index].isCheck) { | ||
| 151 | + selectDataList.add( | ||
| 152 | + couponProvider.couponListSelect[index]); | ||
| 153 | + } else { | ||
| 154 | + selectDataList.remove( | ||
| 155 | + couponProvider.couponListSelect[index]); | ||
| 156 | + } | ||
| 157 | } else { | 157 | } else { |
| 158 | - selectDataList.remove( | 158 | + couponProvider.couponListSelect |
| 159 | + .forEach((element) { | ||
| 160 | + element.isCheck = false; | ||
| 161 | + }); | ||
| 162 | + selectDataList = []; | ||
| 163 | + selectDataList.add( | ||
| 159 | couponProvider.couponListSelect[index]); | 164 | couponProvider.couponListSelect[index]); |
| 165 | + couponProvider.couponListSelect[index].isCheck = | ||
| 166 | + true; | ||
| 160 | } | 167 | } |
| 161 | 168 | ||
| 162 | setState(() {}); | 169 | setState(() {}); |
| @@ -188,21 +195,30 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> { | @@ -188,21 +195,30 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> { | ||
| 188 | // bool old = couponProvider | 195 | // bool old = couponProvider |
| 189 | // .couponListSelect[index].isCheck; | 196 | // .couponListSelect[index].isCheck; |
| 190 | //改这里 ******8 | 197 | //改这里 ******8 |
| 191 | - couponProvider | ||
| 192 | - .couponListSelect[index].isCheck = | ||
| 193 | - !couponProvider | ||
| 194 | - .couponListSelect[index].isCheck; | ||
| 195 | - if (couponProvider | ||
| 196 | - .couponListSelect[index].isCheck) { | ||
| 197 | - selectDataList.add( | ||
| 198 | - couponProvider.couponListSelect[index]); | 198 | + if (widget.mulSelect) { |
| 199 | + couponProvider | ||
| 200 | + .couponListSelect[index].isCheck = | ||
| 201 | + !couponProvider | ||
| 202 | + .couponListSelect[index].isCheck; | ||
| 203 | + if (couponProvider | ||
| 204 | + .couponListSelect[index].isCheck) { | ||
| 205 | + selectDataList.add(couponProvider | ||
| 206 | + .couponListSelect[index]); | ||
| 207 | + } else { | ||
| 208 | + selectDataList.remove(couponProvider | ||
| 209 | + .couponListSelect[index]); | ||
| 210 | + } | ||
| 199 | } else { | 211 | } else { |
| 200 | - selectDataList.remove( | 212 | + couponProvider.couponListSelect |
| 213 | + .forEach((element) { | ||
| 214 | + element.isCheck = false; | ||
| 215 | + }); | ||
| 216 | + selectDataList = []; | ||
| 217 | + selectDataList.add( | ||
| 201 | couponProvider.couponListSelect[index]); | 218 | couponProvider.couponListSelect[index]); |
| 219 | + couponProvider | ||
| 220 | + .couponListSelect[index].isCheck = true; | ||
| 202 | } | 221 | } |
| 203 | - | ||
| 204 | - // couponProvider | ||
| 205 | - // .couponListSelect[index].isCheck = !old; | ||
| 206 | setState(() {}); | 222 | setState(() {}); |
| 207 | })); | 223 | })); |
| 208 | }, childCount: couponProvider.couponListSelect.length), | 224 | }, childCount: couponProvider.couponListSelect.length), |
| @@ -58,6 +58,9 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { | @@ -58,6 +58,9 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { | ||
| 58 | String rechargeContent = ''; | 58 | String rechargeContent = ''; |
| 59 | 59 | ||
| 60 | List<CouponSunModel> couponDataList = []; | 60 | List<CouponSunModel> couponDataList = []; |
| 61 | + bool isComments = false; //启用评价设置 | ||
| 62 | + bool isCommentsCoupon = false; //启用评价送券 | ||
| 63 | + List<CouponSunModel> couponDataListComments = []; | ||
| 61 | List<RechargeListSunModel> rechargeListCanUse = []; | 64 | List<RechargeListSunModel> rechargeListCanUse = []; |
| 62 | ScrollController controller = ScrollController(); | 65 | ScrollController controller = ScrollController(); |
| 63 | 66 | ||
| @@ -162,6 +165,18 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { | @@ -162,6 +165,18 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { | ||
| 162 | marketingCenterProvider.markDataModel.marketing.rechargeData; | 165 | marketingCenterProvider.markDataModel.marketing.rechargeData; |
| 163 | couponDataList = | 166 | couponDataList = |
| 164 | marketingCenterProvider.markDataModel.marketing.couponDataList ?? []; | 167 | marketingCenterProvider.markDataModel.marketing.couponDataList ?? []; |
| 168 | + couponDataListComments = marketingCenterProvider | ||
| 169 | + .markDataModel.marketing.couponDataListComments ?? | ||
| 170 | + []; | ||
| 171 | + isComments = | ||
| 172 | + marketingCenterProvider.markDataModel.marketing.isComments == '1' | ||
| 173 | + ? true | ||
| 174 | + : false; | ||
| 175 | + isCommentsCoupon = | ||
| 176 | + marketingCenterProvider.markDataModel.marketing.isCommentsCoupon == | ||
| 177 | + '1' | ||
| 178 | + ? true | ||
| 179 | + : false; | ||
| 165 | 180 | ||
| 166 | _uploadImageProvider.firstImage.qiniuUrl = | 181 | _uploadImageProvider.firstImage.qiniuUrl = |
| 167 | marketingCenterProvider.markDataModel.marketing.logo ?? null; | 182 | marketingCenterProvider.markDataModel.marketing.logo ?? null; |
| @@ -1122,7 +1137,10 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { | @@ -1122,7 +1137,10 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { | ||
| 1122 | 'wecomle': welcomeTextC.text ?? '', | 1137 | 'wecomle': welcomeTextC.text ?? '', |
| 1123 | 'logo': _uploadImageProvider.firstImage.qiniuUrl, | 1138 | 'logo': _uploadImageProvider.firstImage.qiniuUrl, |
| 1124 | 'recharge_data': rechargeData, | 1139 | 'recharge_data': rechargeData, |
| 1125 | - 'coupon_data': json.encode(couponDataList) | 1140 | + 'coupon_data': json.encode(couponDataList), |
| 1141 | + 'is_comments': isComments ? '1' : '0', | ||
| 1142 | + 'is_comments_coupon': isCommentsCoupon ? '1' : '0', | ||
| 1143 | + 'coupon_data_comments': json.encode(couponDataListComments), | ||
| 1126 | }; | 1144 | }; |
| 1127 | Map<String, String> params = { | 1145 | Map<String, String> params = { |
| 1128 | 'sid': Provider.of<UserModel>(context, listen: false) | 1146 | 'sid': Provider.of<UserModel>(context, listen: false) |
| @@ -451,13 +451,13 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> { | @@ -451,13 +451,13 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> { | ||
| 451 | margin: EdgeInsets.symmetric(horizontal: w(20)), | 451 | margin: EdgeInsets.symmetric(horizontal: w(20)), |
| 452 | padding: EdgeInsets.symmetric(horizontal: w(15), vertical: w(12)), | 452 | padding: EdgeInsets.symmetric(horizontal: w(15), vertical: w(12)), |
| 453 | decoration: BoxDecoration( | 453 | decoration: BoxDecoration( |
| 454 | - color: MyColours.color_d9d9d9, | 454 | + color: MyColours.color_F8F9FD, |
| 455 | borderRadius: BorderRadius.circular(r(5))), | 455 | borderRadius: BorderRadius.circular(r(5))), |
| 456 | child: Row( | 456 | child: Row( |
| 457 | children: [ | 457 | children: [ |
| 458 | Image.asset( | 458 | Image.asset( |
| 459 | Utils.getImgPath('location_blue'), | 459 | Utils.getImgPath('location_blue'), |
| 460 | - width: w(36), | 460 | + width: w(30), |
| 461 | ), | 461 | ), |
| 462 | HEmptyView(28), | 462 | HEmptyView(28), |
| 463 | Expanded( | 463 | Expanded( |
| @@ -1539,6 +1539,33 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> { | @@ -1539,6 +1539,33 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> { | ||
| 1539 | '1') | 1539 | '1') |
| 1540 | ? _rechargeWiddget() | 1540 | ? _rechargeWiddget() |
| 1541 | : SizedBox(), | 1541 | : SizedBox(), |
| 1542 | + _marketingCenterProvider.markDataModel.marketing != null && | ||
| 1543 | + (_marketingCenterProvider | ||
| 1544 | + .markDataModel.marketing.isComments == | ||
| 1545 | + '1') | ||
| 1546 | + ? Container( | ||
| 1547 | + padding: EdgeInsets.symmetric( | ||
| 1548 | + horizontal: w(20), vertical: w(8)), | ||
| 1549 | + child: Row( | ||
| 1550 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1551 | + children: [ | ||
| 1552 | + Text( | ||
| 1553 | + _marketingCenterProvider.markDataModel | ||
| 1554 | + .marketing.isCommentsCoupon == | ||
| 1555 | + '1' | ||
| 1556 | + ? '想吐槽?戳这里填写意见反馈赢好礼!-->' | ||
| 1557 | + : '想吐槽?戳这里填写意见!-->', | ||
| 1558 | + style: TextStyle( | ||
| 1559 | + color: MyColours.color_000000, | ||
| 1560 | + fontSize: font(14)), | ||
| 1561 | + ), | ||
| 1562 | + Image.asset( | ||
| 1563 | + Utils.getImgPath('comments'), | ||
| 1564 | + width: w(30), | ||
| 1565 | + ) | ||
| 1566 | + ], | ||
| 1567 | + )) | ||
| 1568 | + : SizedBox(), | ||
| 1542 | _marketingCenterProvider.markDataModel.marketing != null | 1569 | _marketingCenterProvider.markDataModel.marketing != null |
| 1543 | ? _logoWidget() | 1570 | ? _logoWidget() |
| 1544 | : SizedBox() | 1571 | : SizedBox() |
| 1 | +import 'dart:convert'; | ||
| 2 | + | ||
| 3 | +import 'package:flutter/material.dart'; | ||
| 4 | +import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
| 5 | +import 'package:one_key/widgets/system_app_bar.dart'; | ||
| 6 | +import 'package:provider/provider.dart'; | ||
| 7 | + | ||
| 8 | +import '../../../models/coupon_model.dart'; | ||
| 9 | +import '../../../models/recharge_list_model.dart'; | ||
| 10 | +import '../../../provider/coupon_provider.dart'; | ||
| 11 | +import '../../../provider/marketing_center_provider.dart'; | ||
| 12 | +import '../../../provider/user_model.dart'; | ||
| 13 | +import '../../../res/colors.dart'; | ||
| 14 | +import '../../../route/navigator_util.dart'; | ||
| 15 | +import '../../../utils/screen_util.dart'; | ||
| 16 | +import '../../../utils/utils.dart'; | ||
| 17 | +import '../../../widgets/h_empty_view.dart'; | ||
| 18 | +import '../../../widgets/round_button.dart'; | ||
| 19 | +import '../../../widgets/v_empty_view.dart'; | ||
| 20 | + | ||
| 21 | +/** | ||
| 22 | + * 优惠券设置页面 | ||
| 23 | + * */ | ||
| 24 | + | ||
| 25 | +class CommentsSettingPage extends StatefulWidget { | ||
| 26 | + CommentsSettingPage({Key key}) : super(key: key); | ||
| 27 | + | ||
| 28 | + @override | ||
| 29 | + _CommentsSettingPageState createState() => _CommentsSettingPageState(); | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +class _CommentsSettingPageState extends State<CommentsSettingPage> { | ||
| 33 | + ScrollController controller = ScrollController(); | ||
| 34 | + CouponProvider couponProvider; | ||
| 35 | + MarketingCenterProvider marketingCenterProvider; | ||
| 36 | + bool isTranspond = false; //转发邀请函 | ||
| 37 | + bool isArrival = false; //确认到店 | ||
| 38 | + bool isOnlineBook = false; //在线预订 | ||
| 39 | + bool isOrder = false; //提前点餐 | ||
| 40 | + bool isLink = false; //充值优惠活动链接 | ||
| 41 | + bool isCoupon = false; // 代金券 | ||
| 42 | + bool isRecharge = false; //充值券 | ||
| 43 | + String welcome = ''; | ||
| 44 | + String qiniuUrl = ''; | ||
| 45 | + | ||
| 46 | + RechargeListSunModel rechargeData; | ||
| 47 | + String rechargeContent = ''; | ||
| 48 | + | ||
| 49 | + List<CouponSunModel> couponDataList = []; | ||
| 50 | + bool isComments = false; //启用评价设置 | ||
| 51 | + bool isCommentsCoupon = false; //启用评价送券 | ||
| 52 | + List<CouponSunModel> couponDataListComments = []; | ||
| 53 | + @override | ||
| 54 | + void initState() { | ||
| 55 | + super.initState(); | ||
| 56 | + WidgetsBinding.instance.addPostFrameCallback((_) async { | ||
| 57 | + _couponNetworkData(); | ||
| 58 | + getSellerTemplateConf(); | ||
| 59 | + }); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + getSellerTemplateConf() async { | ||
| 63 | + bool success = await marketingCenterProvider.getSellerTemplateConf(context); | ||
| 64 | + if (success && marketingCenterProvider.markDataModel.marketing != null) { | ||
| 65 | + isTranspond = | ||
| 66 | + marketingCenterProvider.markDataModel.marketing.isTranspond == '1' | ||
| 67 | + ? true | ||
| 68 | + : false; | ||
| 69 | + | ||
| 70 | + isArrival = | ||
| 71 | + marketingCenterProvider.markDataModel.marketing.isArrival == '1' | ||
| 72 | + ? true | ||
| 73 | + : false; | ||
| 74 | + isOnlineBook = | ||
| 75 | + marketingCenterProvider.markDataModel.marketing.isOnlineBook == '1' | ||
| 76 | + ? true | ||
| 77 | + : false; | ||
| 78 | + isOrder = marketingCenterProvider.markDataModel.marketing.isOrder == '1' | ||
| 79 | + ? true | ||
| 80 | + : false; | ||
| 81 | + isLink = marketingCenterProvider.markDataModel.marketing.isLink == '1' | ||
| 82 | + ? true | ||
| 83 | + : false; | ||
| 84 | + | ||
| 85 | + isCoupon = marketingCenterProvider.markDataModel.marketing.isCoupon == '1' | ||
| 86 | + ? true | ||
| 87 | + : false; | ||
| 88 | + | ||
| 89 | + isRecharge = | ||
| 90 | + marketingCenterProvider.markDataModel.marketing.isRecharge == '1' | ||
| 91 | + ? true | ||
| 92 | + : false; | ||
| 93 | + | ||
| 94 | + rechargeData = | ||
| 95 | + marketingCenterProvider.markDataModel.marketing.rechargeData; | ||
| 96 | + couponDataList = | ||
| 97 | + marketingCenterProvider.markDataModel.marketing.couponDataList ?? []; | ||
| 98 | + | ||
| 99 | + couponDataListComments = marketingCenterProvider | ||
| 100 | + .markDataModel.marketing.couponDataListComments ?? | ||
| 101 | + []; | ||
| 102 | + | ||
| 103 | + isCommentsCoupon = | ||
| 104 | + marketingCenterProvider.markDataModel.marketing.isCommentsCoupon == | ||
| 105 | + '1' | ||
| 106 | + ? true | ||
| 107 | + : false; | ||
| 108 | + isComments = | ||
| 109 | + marketingCenterProvider.markDataModel.marketing.isComments == '1' | ||
| 110 | + ? true | ||
| 111 | + : false; | ||
| 112 | + | ||
| 113 | + qiniuUrl = marketingCenterProvider.markDataModel.marketing.logo ?? null; | ||
| 114 | + | ||
| 115 | + welcome = marketingCenterProvider.markDataModel.marketing.wecomle; | ||
| 116 | + | ||
| 117 | + setState(() {}); | ||
| 118 | + } | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + ///优惠券设置 | ||
| 122 | + | ||
| 123 | + _setCouponShow() async { | ||
| 124 | + //接口 | ||
| 125 | + Map marketingData = { | ||
| 126 | + // 'isTranspond': isTranspond ? '1' : '0', //转发同行客人 | ||
| 127 | + 'is_transpond': '1', //转发同行客人 | ||
| 128 | + 'is_arrival': isArrival ? '1' : '0', //确认到店 | ||
| 129 | + 'is_online_book': isOnlineBook ? '1' : '0', //在线预订 | ||
| 130 | + 'is_order': isOrder ? '1' : '0', //去点餐 | ||
| 131 | + 'is_coupon': isCoupon ? '1' : '0', //代金券暂时 | ||
| 132 | + 'is_recharge': isRecharge ? '1' : '0', //充值券暂时 | ||
| 133 | + 'is_link': isLink ? '1' : '0', | ||
| 134 | + 'wecomle': welcome ?? '', | ||
| 135 | + 'logo': qiniuUrl, | ||
| 136 | + 'recharge_data': rechargeData, | ||
| 137 | + 'coupon_data': json.encode(couponDataList), | ||
| 138 | + 'is_comments': isComments ? '1' : '0', | ||
| 139 | + 'is_comments_coupon': isCommentsCoupon ? '1' : '0', | ||
| 140 | + 'coupon_data_comments': json.encode(couponDataListComments), | ||
| 141 | + }; | ||
| 142 | + Map<String, String> params = { | ||
| 143 | + 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | ||
| 144 | + 'marketing': json.encode(marketingData) | ||
| 145 | + }; | ||
| 146 | + | ||
| 147 | + bool success = await marketingCenterProvider | ||
| 148 | + .setSellerTemplateConf(context, params, showLoading: true); | ||
| 149 | + if (success) { | ||
| 150 | + // bus.emit('refresh_coupon_list_f'); | ||
| 151 | + Utils.showToast('保存成功'); | ||
| 152 | + Navigator.pop(context); | ||
| 153 | + } | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + ///获取优惠券列表数据(status == 1) | ||
| 157 | + | ||
| 158 | + _couponNetworkData({bool isShowLoading = true}) async { | ||
| 159 | + Map<String, String> params = { | ||
| 160 | + "uid": Provider.of<UserModel>(context, listen: false).user.openid, | ||
| 161 | + }; | ||
| 162 | + params['status'] = '1'; | ||
| 163 | + | ||
| 164 | + await couponProvider.getCustomerSelectActivityMarking(context, params, | ||
| 165 | + isShowLoading: isShowLoading); | ||
| 166 | + if (couponDataListComments == null || couponDataListComments.length == 0) { | ||
| 167 | + if (couponProvider.couponListSelect != null && | ||
| 168 | + couponProvider.couponListSelect.length > 0) { | ||
| 169 | + couponDataListComments.add(couponProvider.couponListSelect[0]); | ||
| 170 | + } | ||
| 171 | + } | ||
| 172 | + setState(() {}); | ||
| 173 | + } | ||
| 174 | + | ||
| 175 | + ///标题 | ||
| 176 | + Widget _headItem(String title) { | ||
| 177 | + return Container( | ||
| 178 | + width: double.infinity, | ||
| 179 | + alignment: Alignment.centerLeft, | ||
| 180 | + decoration: BoxDecoration( | ||
| 181 | + border: Border( | ||
| 182 | + bottom: | ||
| 183 | + BorderSide(color: MyColours.color_E7E7E7, width: w(0.5)))), | ||
| 184 | + margin: EdgeInsets.only(left: w(16)), | ||
| 185 | + padding: EdgeInsets.only(top: w(12), bottom: w(12), right: w(16)), | ||
| 186 | + child: Text( | ||
| 187 | + title, | ||
| 188 | + style: TextStyle( | ||
| 189 | + color: MyColours.color_515151, fontSize: ScreenUtil().setWidth(32)), | ||
| 190 | + ), | ||
| 191 | + ); | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + ///优惠券 | ||
| 195 | + Widget _markingCupon({ | ||
| 196 | + VoidCallback onPressed, | ||
| 197 | + bool select = false, | ||
| 198 | + VoidCallback onPressedSelect, | ||
| 199 | + }) { | ||
| 200 | + return Container( | ||
| 201 | + margin: EdgeInsets.only(left: w(21), top: w(12), right: w(21)), | ||
| 202 | + child: Column( | ||
| 203 | + children: [ | ||
| 204 | + InkWell( | ||
| 205 | + onTap: onPressedSelect, | ||
| 206 | + child: Row( | ||
| 207 | + children: [ | ||
| 208 | + Image.asset( | ||
| 209 | + Utils.getImgPath(select ? 'f_select' : 'f_select_not'), | ||
| 210 | + width: w(20), | ||
| 211 | + ), | ||
| 212 | + HEmptyView(20), | ||
| 213 | + Text( | ||
| 214 | + '顾客点评后赠送优惠券', | ||
| 215 | + style: TextStyle( | ||
| 216 | + fontSize: font(14), color: MyColours.color_515151), | ||
| 217 | + ), | ||
| 218 | + Spacer(), | ||
| 219 | + RoundButton( | ||
| 220 | + text: '选择活动', | ||
| 221 | + width: w(72), | ||
| 222 | + height: w(22), | ||
| 223 | + gradientStart: MyColours.color_ffffff, | ||
| 224 | + gradientEnd: MyColours.color_ffffff, | ||
| 225 | + borderColor: MyColours.color_438E93, | ||
| 226 | + textColor: MyColours.color_438E93, | ||
| 227 | + radius: r(11), | ||
| 228 | + fontSize: 24, | ||
| 229 | + isBold: true, | ||
| 230 | + onPressed: onPressed, | ||
| 231 | + ) | ||
| 232 | + ], | ||
| 233 | + )), | ||
| 234 | + VEmptyView(20), | ||
| 235 | + ListView.builder( | ||
| 236 | + shrinkWrap: true, | ||
| 237 | + controller: controller, | ||
| 238 | + itemCount: couponDataListComments.length, | ||
| 239 | + itemBuilder: (BuildContext context, int index) { | ||
| 240 | + CouponSunModel couponData = couponDataListComments[index]; | ||
| 241 | + return _markingCuponItem( | ||
| 242 | + couponData.aname, | ||
| 243 | + _getCouponsDesc(couponData), | ||
| 244 | + couponData.price ?? '', | ||
| 245 | + couponData.use != null && couponData.use.isCash | ||
| 246 | + ? '${(double.parse(couponData.price) / double.parse(couponData.use.cash)) * 10}折' | ||
| 247 | + : '', | ||
| 248 | + '切换活动', | ||
| 249 | + select: isCommentsCoupon, onPressedSelect: () { | ||
| 250 | + setState(() { | ||
| 251 | + isCommentsCoupon = !isCommentsCoupon; | ||
| 252 | + }); | ||
| 253 | + }); | ||
| 254 | + }) | ||
| 255 | + ], | ||
| 256 | + ), | ||
| 257 | + ); | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | + String _getCouponsDesc(couponData) { | ||
| 261 | + String couponsDesc = ''; | ||
| 262 | + if (couponData != null) { | ||
| 263 | + if (couponData.expDate == null) { | ||
| 264 | + couponsDesc = couponData.desc; | ||
| 265 | + } else { | ||
| 266 | + if (couponData.expDate.isNone) { | ||
| 267 | + couponsDesc = '无限制,' + couponData.desc ?? ''; | ||
| 268 | + } else if (couponData.expDate.isBirthday) { | ||
| 269 | + couponsDesc = '会员生日当天可用,' + couponData.desc ?? ''; | ||
| 270 | + } else if (couponData.expDate.isWeek) { | ||
| 271 | + couponsDesc = | ||
| 272 | + '${couponData.expDate.weekShow},' + couponData.desc ?? ''; | ||
| 273 | + } | ||
| 274 | + } | ||
| 275 | + } | ||
| 276 | + return couponsDesc; | ||
| 277 | + } | ||
| 278 | + | ||
| 279 | + ///优惠券 | ||
| 280 | + Widget _markingCuponItem( | ||
| 281 | + String title, | ||
| 282 | + String content, | ||
| 283 | + String subtile, | ||
| 284 | + String discount, | ||
| 285 | + String btnTitle, { | ||
| 286 | + VoidCallback onPressed, | ||
| 287 | + bool select = false, | ||
| 288 | + VoidCallback onPressedSelect, | ||
| 289 | + }) { | ||
| 290 | + return Container( | ||
| 291 | + margin: EdgeInsets.only(left: w(21), top: w(12), right: w(21)), | ||
| 292 | + child: Container( | ||
| 293 | + padding: EdgeInsets.all(w(12)), | ||
| 294 | + decoration: BoxDecoration( | ||
| 295 | + borderRadius: BorderRadiusDirectional.circular(r(8)), | ||
| 296 | + border: Border.all(width: w(1), color: MyColours.color_DBDBDB)), | ||
| 297 | + child: Row( | ||
| 298 | + mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 299 | + children: [ | ||
| 300 | + Expanded( | ||
| 301 | + child: Column( | ||
| 302 | + crossAxisAlignment: CrossAxisAlignment.start, | ||
| 303 | + children: [ | ||
| 304 | + Row( | ||
| 305 | + children: [ | ||
| 306 | + Container( | ||
| 307 | + constraints: BoxConstraints(maxWidth: w(150)), | ||
| 308 | + child: Text( | ||
| 309 | + title, | ||
| 310 | + style: TextStyle( | ||
| 311 | + fontSize: font(14), | ||
| 312 | + fontWeight: FontWeight.bold, | ||
| 313 | + color: MyColours.color_515151), | ||
| 314 | + )), | ||
| 315 | + HEmptyView(20), | ||
| 316 | + subtile != '' | ||
| 317 | + ? Text( | ||
| 318 | + '¥${subtile}', | ||
| 319 | + style: TextStyle( | ||
| 320 | + fontSize: font(7), | ||
| 321 | + fontWeight: FontWeight.bold, | ||
| 322 | + color: MyColours.color_E34D59), | ||
| 323 | + ) | ||
| 324 | + : SizedBox(), | ||
| 325 | + HEmptyView(10), | ||
| 326 | + discount != '' | ||
| 327 | + ? Container( | ||
| 328 | + padding: EdgeInsets.symmetric( | ||
| 329 | + horizontal: w(3), vertical: w(2)), | ||
| 330 | + decoration: BoxDecoration( | ||
| 331 | + borderRadius: BorderRadius.circular(r(3)), | ||
| 332 | + border: Border.all( | ||
| 333 | + width: w(0.5), | ||
| 334 | + color: MyColours.color_E34D59)), | ||
| 335 | + child: Text( | ||
| 336 | + discount, | ||
| 337 | + style: TextStyle( | ||
| 338 | + color: MyColours.color_E34D59, | ||
| 339 | + fontSize: font(7)), | ||
| 340 | + ), | ||
| 341 | + ) | ||
| 342 | + : SizedBox(), | ||
| 343 | + ], | ||
| 344 | + ), | ||
| 345 | + if (content != '') VEmptyView(20), | ||
| 346 | + if (content != '') | ||
| 347 | + Text( | ||
| 348 | + content, | ||
| 349 | + style: TextStyle( | ||
| 350 | + height: 1.2, | ||
| 351 | + fontSize: font(10), | ||
| 352 | + fontWeight: FontWeight.bold, | ||
| 353 | + color: MyColours.color_515151), | ||
| 354 | + ) | ||
| 355 | + ], | ||
| 356 | + )), | ||
| 357 | + ], | ||
| 358 | + ), | ||
| 359 | + ), | ||
| 360 | + ); | ||
| 361 | + } | ||
| 362 | + | ||
| 363 | + ///营销推广 | ||
| 364 | + Widget _markingItem( | ||
| 365 | + String selectTitle, | ||
| 366 | + String title, { | ||
| 367 | + bool select = false, | ||
| 368 | + VoidCallback onPressedSelect, | ||
| 369 | + }) { | ||
| 370 | + return Container( | ||
| 371 | + margin: EdgeInsets.only(left: w(18), top: w(12), right: w(18)), | ||
| 372 | + child: Column( | ||
| 373 | + children: [ | ||
| 374 | + InkWell( | ||
| 375 | + onTap: onPressedSelect, | ||
| 376 | + child: Row( | ||
| 377 | + children: [ | ||
| 378 | + Image.asset( | ||
| 379 | + Utils.getImgPath(select ? 'f_select' : 'f_select_not'), | ||
| 380 | + width: w(20), | ||
| 381 | + ), | ||
| 382 | + HEmptyView(20), | ||
| 383 | + Text( | ||
| 384 | + selectTitle, | ||
| 385 | + style: TextStyle( | ||
| 386 | + fontSize: font(14), color: MyColours.color_515151), | ||
| 387 | + ) | ||
| 388 | + ], | ||
| 389 | + )), | ||
| 390 | + VEmptyView(20), | ||
| 391 | + Container( | ||
| 392 | + height: w(76), | ||
| 393 | + padding: EdgeInsets.all(w(12)), | ||
| 394 | + decoration: BoxDecoration( | ||
| 395 | + borderRadius: BorderRadiusDirectional.circular(r(8)), | ||
| 396 | + border: | ||
| 397 | + Border.all(width: w(1), color: MyColours.color_DBDBDB)), | ||
| 398 | + child: Text( | ||
| 399 | + title, | ||
| 400 | + maxLines: 2, | ||
| 401 | + style: TextStyle( | ||
| 402 | + fontSize: font(14), | ||
| 403 | + // fontWeight: FontWeight.bold, | ||
| 404 | + color: MyColours.color_515151), | ||
| 405 | + )) | ||
| 406 | + ], | ||
| 407 | + ), | ||
| 408 | + ); | ||
| 409 | + } | ||
| 410 | + | ||
| 411 | + @override | ||
| 412 | + Widget build(BuildContext context) { | ||
| 413 | + couponProvider = Provider.of<CouponProvider>(context, listen: false); | ||
| 414 | + | ||
| 415 | + marketingCenterProvider = | ||
| 416 | + Provider.of<MarketingCenterProvider>(context, listen: false); | ||
| 417 | + return Scaffold( | ||
| 418 | + backgroundColor: MyColours.color_ffffff, | ||
| 419 | + appBar: SystemAppBar('用户评价设置'), | ||
| 420 | + body: Column( | ||
| 421 | + children: [ | ||
| 422 | + Expanded( | ||
| 423 | + child: SingleChildScrollView( | ||
| 424 | + controller: controller, | ||
| 425 | + child: Column( | ||
| 426 | + children: [ | ||
| 427 | + // _headItem('预订安排启用顾客反馈评价功能'), | ||
| 428 | + InkWell( | ||
| 429 | + onTap: () { | ||
| 430 | + setState(() { | ||
| 431 | + isComments = !isComments; | ||
| 432 | + }); | ||
| 433 | + }, | ||
| 434 | + child: Padding( | ||
| 435 | + padding: EdgeInsets.only( | ||
| 436 | + left: w(16), | ||
| 437 | + top: w(12), | ||
| 438 | + bottom: w(12), | ||
| 439 | + right: w(12)), | ||
| 440 | + child: Row( | ||
| 441 | + mainAxisAlignment: | ||
| 442 | + MainAxisAlignment.spaceBetween, | ||
| 443 | + children: [ | ||
| 444 | + Text( | ||
| 445 | + '预订安排启用顾客反馈评价功能', | ||
| 446 | + style: TextStyle( | ||
| 447 | + color: MyColours.color_515151, | ||
| 448 | + fontSize: font(16)), | ||
| 449 | + ), | ||
| 450 | + Spacer(), | ||
| 451 | + Container( | ||
| 452 | + padding: EdgeInsets.symmetric( | ||
| 453 | + horizontal: w(7), vertical: w(4)), | ||
| 454 | + child: Image.asset( | ||
| 455 | + Utils.getImgPath(isComments | ||
| 456 | + ? 'swich_on' | ||
| 457 | + : 'swich_off'), | ||
| 458 | + width: w(44), | ||
| 459 | + ), | ||
| 460 | + ) | ||
| 461 | + // RoundButton( | ||
| 462 | + // text: '预览', | ||
| 463 | + // gradientStart: MyColours.color_ffffff, | ||
| 464 | + // gradientEnd: MyColours.color_ffffff, | ||
| 465 | + // borderColor: MyColours.color_438E93, | ||
| 466 | + // textColor: MyColours.color_438E93, | ||
| 467 | + // radius: ScreenUtil().setWidth(22), | ||
| 468 | + // fontSize: 24, | ||
| 469 | + // width: w(72), | ||
| 470 | + // height: ScreenUtil().setWidth(44), | ||
| 471 | + // isBold: true, | ||
| 472 | + // onPressed: () { | ||
| 473 | + // NavigatorUtil.goMarkingPreviewPage(context); | ||
| 474 | + // }, | ||
| 475 | + // ), | ||
| 476 | + ]))), | ||
| 477 | + VEmptyView(24), | ||
| 478 | + couponProvider.couponListSelect != null && | ||
| 479 | + couponProvider.couponListSelect.length > 0 | ||
| 480 | + ? _markingCupon( | ||
| 481 | + select: isCommentsCoupon, | ||
| 482 | + onPressedSelect: () { | ||
| 483 | + setState(() { | ||
| 484 | + isCommentsCoupon = !isCommentsCoupon; | ||
| 485 | + }); | ||
| 486 | + }, | ||
| 487 | + onPressed: () async { | ||
| 488 | + //切换活动 | ||
| 489 | + | ||
| 490 | + Map temp = | ||
| 491 | + await NavigatorUtil.goMarkingCouponSelectPage( | ||
| 492 | + context, | ||
| 493 | + {'object': couponDataListComments}, | ||
| 494 | + mulSelect: false); | ||
| 495 | + // Map temp = await NavigatorUtil.goCouponSelectPage( | ||
| 496 | + // context, | ||
| 497 | + // from: 'statistics', | ||
| 498 | + // hasModify: false); | ||
| 499 | + if (temp!= null && temp['coupon'] != null) { | ||
| 500 | + couponDataListComments = temp['coupon']; | ||
| 501 | + | ||
| 502 | + setState(() {}); | ||
| 503 | + } | ||
| 504 | + }) | ||
| 505 | + : (couponProvider.couponListSelect == null || | ||
| 506 | + couponProvider.couponListSelect.length == 0) | ||
| 507 | + ? _markingItem( | ||
| 508 | + '顾客点评后赠送优惠券', | ||
| 509 | + '当前没有可用优惠券,请创建优惠券后再来尝试。', | ||
| 510 | + select: false, | ||
| 511 | + ) | ||
| 512 | + : SizedBox(), | ||
| 513 | + ], | ||
| 514 | + ), | ||
| 515 | + ), | ||
| 516 | + ), | ||
| 517 | + Container( | ||
| 518 | + color: MyColours.color_ffffff, | ||
| 519 | + padding: EdgeInsets.only( | ||
| 520 | + left: w(45), right: w(45), top: w(12), bottom: w(25)), | ||
| 521 | + child: RoundButton( | ||
| 522 | + text: '保存', | ||
| 523 | + gradientStart: MyColours.color_199095, | ||
| 524 | + gradientEnd: MyColours.color_199095, | ||
| 525 | + // borderColor: MyColours.color_999999, | ||
| 526 | + radius: r(5), | ||
| 527 | + fontSize: 34, | ||
| 528 | + height: w(40), | ||
| 529 | + isBold: true, | ||
| 530 | + onPressed: () async { | ||
| 531 | + _setCouponShow(); | ||
| 532 | + }, | ||
| 533 | + ), | ||
| 534 | + ) | ||
| 535 | + ], | ||
| 536 | + )); | ||
| 537 | + } | ||
| 538 | +} |
| @@ -269,6 +269,41 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { | @@ -269,6 +269,41 @@ class _MarketingCenterHomePageState extends State<MarketingCenterHomePage> { | ||
| 269 | VEmptyView(24), | 269 | VEmptyView(24), |
| 270 | InkWell( | 270 | InkWell( |
| 271 | onTap: () { | 271 | onTap: () { |
| 272 | + NavigatorUtil.goCommentsSettingPage(context); | ||
| 273 | + }, | ||
| 274 | + child: Padding( | ||
| 275 | + padding: EdgeInsets.only( | ||
| 276 | + left: w(16), | ||
| 277 | + top: w(12), | ||
| 278 | + bottom: w(12), | ||
| 279 | + right: w(12)), | ||
| 280 | + child: Row( | ||
| 281 | + children: [ | ||
| 282 | + Text( | ||
| 283 | + '用户评价反馈', | ||
| 284 | + style: TextStyle( | ||
| 285 | + color: MyColours.color_515151, | ||
| 286 | + fontSize: ScreenUtil().setWidth(32)), | ||
| 287 | + ), | ||
| 288 | + Spacer(), | ||
| 289 | + Container( | ||
| 290 | + padding: EdgeInsets.symmetric( | ||
| 291 | + horizontal: w(7), vertical: w(4)), | ||
| 292 | + child: Image.asset( | ||
| 293 | + "assets/arrow_right_new.png", | ||
| 294 | + width: ScreenUtil().setWidth(18), | ||
| 295 | + height: ScreenUtil().setWidth(32), | ||
| 296 | + ), | ||
| 297 | + ) | ||
| 298 | + ], | ||
| 299 | + ))), | ||
| 300 | + Padding( | ||
| 301 | + padding: EdgeInsets.only(left: w(16)), | ||
| 302 | + child: MyDivider(double.infinity, w(0.5), | ||
| 303 | + color: MyColours.color_E7E7E7)), | ||
| 304 | + VEmptyView(24), | ||
| 305 | + InkWell( | ||
| 306 | + onTap: () { | ||
| 272 | NavigatorUtil.goCustomerNoticeSettingPage(context); | 307 | NavigatorUtil.goCustomerNoticeSettingPage(context); |
| 273 | }, | 308 | }, |
| 274 | child: Padding( | 309 | child: Padding( |
| @@ -27,7 +27,6 @@ class OrderSettingPage extends StatefulWidget { | @@ -27,7 +27,6 @@ class OrderSettingPage extends StatefulWidget { | ||
| 27 | 27 | ||
| 28 | class _OrderSettingPageState extends State<OrderSettingPage> { | 28 | class _OrderSettingPageState extends State<OrderSettingPage> { |
| 29 | MarketingCenterProvider marketingCenterProvider; | 29 | MarketingCenterProvider marketingCenterProvider; |
| 30 | - | ||
| 31 | 30 | ||
| 32 | bool isTranspond = false; //转发邀请函 | 31 | bool isTranspond = false; //转发邀请函 |
| 33 | bool isArrival = false; //确认到店 | 32 | bool isArrival = false; //确认到店 |
| @@ -44,6 +43,9 @@ class _OrderSettingPageState extends State<OrderSettingPage> { | @@ -44,6 +43,9 @@ class _OrderSettingPageState extends State<OrderSettingPage> { | ||
| 44 | String welcome = ''; | 43 | String welcome = ''; |
| 45 | 44 | ||
| 46 | List<CouponSunModel> couponDataList = []; | 45 | List<CouponSunModel> couponDataList = []; |
| 46 | + bool isComments = false; //启用评价设置 | ||
| 47 | + bool isCommentsCoupon = false; //启用评价送券 | ||
| 48 | + List<CouponSunModel> couponDataListComments = []; | ||
| 47 | 49 | ||
| 48 | @override | 50 | @override |
| 49 | void initState() { | 51 | void initState() { |
| @@ -90,6 +92,18 @@ class _OrderSettingPageState extends State<OrderSettingPage> { | @@ -90,6 +92,18 @@ class _OrderSettingPageState extends State<OrderSettingPage> { | ||
| 90 | marketingCenterProvider.markDataModel.marketing.rechargeData; | 92 | marketingCenterProvider.markDataModel.marketing.rechargeData; |
| 91 | couponDataList = | 93 | couponDataList = |
| 92 | marketingCenterProvider.markDataModel.marketing.couponDataList ?? []; | 94 | marketingCenterProvider.markDataModel.marketing.couponDataList ?? []; |
| 95 | + couponDataListComments = marketingCenterProvider | ||
| 96 | + .markDataModel.marketing.couponDataListComments ?? | ||
| 97 | + []; | ||
| 98 | + isComments = | ||
| 99 | + marketingCenterProvider.markDataModel.marketing.isComments == '1' | ||
| 100 | + ? true | ||
| 101 | + : false; | ||
| 102 | + isCommentsCoupon = | ||
| 103 | + marketingCenterProvider.markDataModel.marketing.isCommentsCoupon == | ||
| 104 | + '1' | ||
| 105 | + ? true | ||
| 106 | + : false; | ||
| 93 | 107 | ||
| 94 | qiniuUrl = marketingCenterProvider.markDataModel.marketing.logo ?? null; | 108 | qiniuUrl = marketingCenterProvider.markDataModel.marketing.logo ?? null; |
| 95 | 109 | ||
| @@ -115,7 +129,10 @@ class _OrderSettingPageState extends State<OrderSettingPage> { | @@ -115,7 +129,10 @@ class _OrderSettingPageState extends State<OrderSettingPage> { | ||
| 115 | 'wecomle': welcome ?? '', | 129 | 'wecomle': welcome ?? '', |
| 116 | 'logo': qiniuUrl, | 130 | 'logo': qiniuUrl, |
| 117 | 'recharge_data': rechargeData, | 131 | 'recharge_data': rechargeData, |
| 118 | - 'coupon_data': json.encode(couponDataList) | 132 | + 'coupon_data': json.encode(couponDataList), |
| 133 | + 'is_comments': isComments ? '1' : '0', | ||
| 134 | + 'is_comments_coupon': isCommentsCoupon ? '1' : '0', | ||
| 135 | + 'coupon_data_comments': json.encode(couponDataListComments), | ||
| 119 | }; | 136 | }; |
| 120 | Map<String, String> params = { | 137 | Map<String, String> params = { |
| 121 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | 138 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, |
| @@ -169,9 +186,8 @@ class _OrderSettingPageState extends State<OrderSettingPage> { | @@ -169,9 +186,8 @@ class _OrderSettingPageState extends State<OrderSettingPage> { | ||
| 169 | padding: EdgeInsets.symmetric( | 186 | padding: EdgeInsets.symmetric( |
| 170 | horizontal: w(7), vertical: w(4)), | 187 | horizontal: w(7), vertical: w(4)), |
| 171 | child: Image.asset( | 188 | child: Image.asset( |
| 172 | - Utils.getImgPath(isOrder | ||
| 173 | - ? 'swich_on' | ||
| 174 | - : 'swich_off'), | 189 | + Utils.getImgPath( |
| 190 | + isOrder ? 'swich_on' : 'swich_off'), | ||
| 175 | width: w(44), | 191 | width: w(44), |
| 176 | ), | 192 | ), |
| 177 | ) | 193 | ) |
| @@ -48,6 +48,9 @@ class _RechargeSettingPageState extends State<RechargeSettingPage> { | @@ -48,6 +48,9 @@ class _RechargeSettingPageState extends State<RechargeSettingPage> { | ||
| 48 | 48 | ||
| 49 | List<CouponSunModel> couponDataList = []; | 49 | List<CouponSunModel> couponDataList = []; |
| 50 | List<RechargeListSunModel> rechargeListCanUse = []; | 50 | List<RechargeListSunModel> rechargeListCanUse = []; |
| 51 | + bool isComments = false; //启用评价设置 | ||
| 52 | + bool isCommentsCoupon = false; //启用评价送券 | ||
| 53 | + List<CouponSunModel> couponDataListComments = []; | ||
| 51 | @override | 54 | @override |
| 52 | void initState() { | 55 | void initState() { |
| 53 | super.initState(); | 56 | super.initState(); |
| @@ -93,6 +96,18 @@ class _RechargeSettingPageState extends State<RechargeSettingPage> { | @@ -93,6 +96,18 @@ class _RechargeSettingPageState extends State<RechargeSettingPage> { | ||
| 93 | marketingCenterProvider.markDataModel.marketing.rechargeData; | 96 | marketingCenterProvider.markDataModel.marketing.rechargeData; |
| 94 | couponDataList = | 97 | couponDataList = |
| 95 | marketingCenterProvider.markDataModel.marketing.couponDataList ?? []; | 98 | marketingCenterProvider.markDataModel.marketing.couponDataList ?? []; |
| 99 | + couponDataListComments = marketingCenterProvider | ||
| 100 | + .markDataModel.marketing.couponDataListComments ?? | ||
| 101 | + []; | ||
| 102 | + isComments = | ||
| 103 | + marketingCenterProvider.markDataModel.marketing.isComments == '1' | ||
| 104 | + ? true | ||
| 105 | + : false; | ||
| 106 | + isCommentsCoupon = | ||
| 107 | + marketingCenterProvider.markDataModel.marketing.isCommentsCoupon == | ||
| 108 | + '1' | ||
| 109 | + ? true | ||
| 110 | + : false; | ||
| 96 | 111 | ||
| 97 | qiniuUrl = marketingCenterProvider.markDataModel.marketing.logo ?? null; | 112 | qiniuUrl = marketingCenterProvider.markDataModel.marketing.logo ?? null; |
| 98 | 113 | ||
| @@ -118,7 +133,10 @@ class _RechargeSettingPageState extends State<RechargeSettingPage> { | @@ -118,7 +133,10 @@ class _RechargeSettingPageState extends State<RechargeSettingPage> { | ||
| 118 | 'wecomle': welcome ?? '', | 133 | 'wecomle': welcome ?? '', |
| 119 | 'logo': qiniuUrl, | 134 | 'logo': qiniuUrl, |
| 120 | 'recharge_data': rechargeData, | 135 | 'recharge_data': rechargeData, |
| 121 | - 'coupon_data': json.encode(couponDataList) | 136 | + 'coupon_data': json.encode(couponDataList), |
| 137 | + 'is_comments': isComments ? '1' : '0', | ||
| 138 | + 'is_comments_coupon': isCommentsCoupon ? '1' : '0', | ||
| 139 | + 'coupon_data_comments': json.encode(couponDataListComments), | ||
| 122 | }; | 140 | }; |
| 123 | Map<String, String> params = { | 141 | Map<String, String> params = { |
| 124 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, | 142 | 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid, |
| @@ -1304,32 +1304,32 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -1304,32 +1304,32 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 1304 | isRowLow: outDay == '0' || | 1304 | isRowLow: outDay == '0' || |
| 1305 | !Utils.getAuthority( | 1305 | !Utils.getAuthority( |
| 1306 | context, '营销中心'))), | 1306 | context, '营销中心'))), |
| 1307 | - // InkWell( | ||
| 1308 | - // onTap: () { | ||
| 1309 | - // if (outDay == '0') { | ||
| 1310 | - // return; | ||
| 1311 | - // } | ||
| 1312 | - // if (Utils.getAuthority( | ||
| 1313 | - // context, '评价管理')) { | ||
| 1314 | - // NavigatorUtil | ||
| 1315 | - // .goCommentManageHomePage( | ||
| 1316 | - // context); | ||
| 1317 | - // } | ||
| 1318 | - // }, | ||
| 1319 | - // child: _item( | ||
| 1320 | - // outDay == '0' || | ||
| 1321 | - // !Utils.getAuthority( | ||
| 1322 | - // context, '评价管理') | ||
| 1323 | - // ? Utils.getImgPath( | ||
| 1324 | - // 'my_comment_un') | ||
| 1325 | - // : Utils.getImgPath( | ||
| 1326 | - // 'my_comment'), | ||
| 1327 | - // '评价管理', | ||
| 1328 | - // isRowLow: outDay == '0' || | ||
| 1329 | - // !Utils.getAuthority( | ||
| 1330 | - // context, '评价管理'))), | ||
| 1331 | InkWell( | 1307 | InkWell( |
| 1332 | - onTap: () {}, child: _item('', '空空空空')), | 1308 | + onTap: () { |
| 1309 | + if (outDay == '0') { | ||
| 1310 | + return; | ||
| 1311 | + } | ||
| 1312 | + if (Utils.getAuthority( | ||
| 1313 | + context, '评价管理')) { | ||
| 1314 | + NavigatorUtil | ||
| 1315 | + .goCommentManageHomePage( | ||
| 1316 | + context); | ||
| 1317 | + } | ||
| 1318 | + }, | ||
| 1319 | + child: _item( | ||
| 1320 | + outDay == '0' || | ||
| 1321 | + !Utils.getAuthority( | ||
| 1322 | + context, '评价管理') | ||
| 1323 | + ? Utils.getImgPath( | ||
| 1324 | + 'my_comment_un') | ||
| 1325 | + : Utils.getImgPath( | ||
| 1326 | + 'my_comment'), | ||
| 1327 | + '评价管理', | ||
| 1328 | + isRowLow: outDay == '0' || | ||
| 1329 | + !Utils.getAuthority( | ||
| 1330 | + context, '评价管理'))), | ||
| 1331 | + // InkWell( | ||
| 1332 | + // onTap: () {}, child: _item('', '空空空空')), | ||
| 1333 | InkWell( | 1333 | InkWell( |
| 1334 | onTap: () {}, child: _item('', '空空空空')), | 1334 | onTap: () {}, child: _item('', '空空空空')), |
| 1335 | ], | 1335 | ], |
| @@ -1459,12 +1459,10 @@ class NavigatorUtil { | @@ -1459,12 +1459,10 @@ class NavigatorUtil { | ||
| 1459 | 1459 | ||
| 1460 | ///预订安排通知定制------优惠券选择 | 1460 | ///预订安排通知定制------优惠券选择 |
| 1461 | static Future<dynamic> goMarkingCouponSelectPage( | 1461 | static Future<dynamic> goMarkingCouponSelectPage( |
| 1462 | - BuildContext context, | ||
| 1463 | - Map object, { | ||
| 1464 | - replace = false, | ||
| 1465 | - }) { | 1462 | + BuildContext context, Map object, |
| 1463 | + {replace = false, bool mulSelect = true}) { | ||
| 1466 | return _navigateTo(context, | 1464 | return _navigateTo(context, |
| 1467 | - "${Routes.marking_coupon_select_page}?object=${FluroConvertUtils.object2string(object)}", | 1465 | + "${Routes.marking_coupon_select_page}?object=${FluroConvertUtils.object2string(object)}&mulSelect=${mulSelect}", |
| 1468 | replace: replace); | 1466 | replace: replace); |
| 1469 | } | 1467 | } |
| 1470 | 1468 | ||
| @@ -1806,4 +1804,13 @@ class NavigatorUtil { | @@ -1806,4 +1804,13 @@ class NavigatorUtil { | ||
| 1806 | return _navigateTo(context, "${Routes.comment_manage_home_page}", | 1804 | return _navigateTo(context, "${Routes.comment_manage_home_page}", |
| 1807 | replace: replace); | 1805 | replace: replace); |
| 1808 | } | 1806 | } |
| 1807 | + | ||
| 1808 | + /// 客户通知配置页----评价配置页 | ||
| 1809 | + static Future<dynamic> goCommentsSettingPage( | ||
| 1810 | + BuildContext context, { | ||
| 1811 | + replace = false, | ||
| 1812 | + }) { | ||
| 1813 | + return _navigateTo(context, "${Routes.comments_setting_page}", | ||
| 1814 | + replace: replace); | ||
| 1815 | + } | ||
| 1809 | } | 1816 | } |
| @@ -206,6 +206,7 @@ import '../pages/my/marketing_center/book_notification/marking_coupon_select_pag | @@ -206,6 +206,7 @@ import '../pages/my/marketing_center/book_notification/marking_coupon_select_pag | ||
| 206 | import '../pages/my/marketing_center/book_notification/marking_preview_page.dart'; | 206 | import '../pages/my/marketing_center/book_notification/marking_preview_page.dart'; |
| 207 | import '../pages/my/marketing_center/book_notification/marking_recharge_select_page.dart'; | 207 | import '../pages/my/marketing_center/book_notification/marking_recharge_select_page.dart'; |
| 208 | import '../pages/my/marketing_center/book_notification/store_introduce_page.dart'; | 208 | import '../pages/my/marketing_center/book_notification/store_introduce_page.dart'; |
| 209 | +import '../pages/my/marketing_center/comments_setting_page.dart'; | ||
| 209 | import '../pages/my/marketing_center/customer_notice_setting_page.dart'; | 210 | import '../pages/my/marketing_center/customer_notice_setting_page.dart'; |
| 210 | import '../pages/my/marketing_center/marketing_center_home_page.dart'; | 211 | import '../pages/my/marketing_center/marketing_center_home_page.dart'; |
| 211 | import '../pages/my/marketing_center/order_setting_manager_page.dart'; | 212 | import '../pages/my/marketing_center/order_setting_manager_page.dart'; |
| @@ -2503,11 +2504,13 @@ var markingCouponSelectPageHandle = new Handler( | @@ -2503,11 +2504,13 @@ var markingCouponSelectPageHandle = new Handler( | ||
| 2503 | res.add(CouponSunModel.fromJson(item)); | 2504 | res.add(CouponSunModel.fromJson(item)); |
| 2504 | } | 2505 | } |
| 2505 | } | 2506 | } |
| 2507 | + | ||
| 2508 | + bool mulSelect = FluroConvertUtils.string2bool(params["mulSelect"].first); | ||
| 2506 | // NotebookDetail detailEntity = NotebookDetail.fromJson(json | 2509 | // NotebookDetail detailEntity = NotebookDetail.fromJson(json |
| 2507 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); | 2510 | // .decode(FluroConvertUtils.fluroCnParamsDecode(params["detail"].first))); |
| 2508 | return ChangeNotifierProvider<MarketingCenterProvider>( | 2511 | return ChangeNotifierProvider<MarketingCenterProvider>( |
| 2509 | create: (_) => MarketingCenterProvider(), | 2512 | create: (_) => MarketingCenterProvider(), |
| 2510 | - child: MarkingCouponSelectPage(couponList: res)); | 2513 | + child: MarkingCouponSelectPage(couponList: res, mulSelect: mulSelect)); |
| 2511 | }); | 2514 | }); |
| 2512 | 2515 | ||
| 2513 | //我的----营销中心-预订安排预览页 | 2516 | //我的----营销中心-预订安排预览页 |
| @@ -3015,3 +3018,20 @@ var commentManageHomePageHandle = new Handler( | @@ -3015,3 +3018,20 @@ var commentManageHomePageHandle = new Handler( | ||
| 3015 | return ChangeNotifierProvider<CommentManageProvider>( | 3018 | return ChangeNotifierProvider<CommentManageProvider>( |
| 3016 | create: (_) => CommentManageProvider(), child: CommentManageHomePage()); | 3019 | create: (_) => CommentManageProvider(), child: CommentManageHomePage()); |
| 3017 | }); | 3020 | }); |
| 3021 | + | ||
| 3022 | +//客户通知----评价配置页 | ||
| 3023 | +var commentsSettingPageHandle = new Handler( | ||
| 3024 | + handlerFunc: (BuildContext context, Map<String, List<Object>> params) { | ||
| 3025 | + // String year = params["year"].first; | ||
| 3026 | + // String month = params["month"].first; | ||
| 3027 | + // String day = params["day"].first; | ||
| 3028 | + // String uid = params["uid"].first; | ||
| 3029 | + | ||
| 3030 | + // DayList daylist = DayList.fromJson(json | ||
| 3031 | + // .decode(FluroConvertUtils.fluroCnParamsDecode(params["daylist"].first))); | ||
| 3032 | + | ||
| 3033 | + return ChangeNotifierProvider<MarketingCenterProvider>( | ||
| 3034 | + create: (_) => MarketingCenterProvider(), | ||
| 3035 | + child: ChangeNotifierProvider<CouponProvider>( | ||
| 3036 | + create: (_) => CouponProvider(), child: CommentsSettingPage())); | ||
| 3037 | +}); |
| @@ -289,6 +289,10 @@ class Routes { | @@ -289,6 +289,10 @@ class Routes { | ||
| 289 | static String recharge_setting_page = "/recharge_setting_page"; // 充值优惠设置页 | 289 | static String recharge_setting_page = "/recharge_setting_page"; // 充值优惠设置页 |
| 290 | static String comment_manage_home_page = "/comment_manage_home_page"; // 评价管理 | 290 | static String comment_manage_home_page = "/comment_manage_home_page"; // 评价管理 |
| 291 | 291 | ||
| 292 | + | ||
| 293 | + static String comments_setting_page = "/comments_setting_page"; // 评价管理设置 | ||
| 294 | + | ||
| 295 | + | ||
| 292 | static void configureRoutes(FluroRouter router) { | 296 | static void configureRoutes(FluroRouter router) { |
| 293 | router.notFoundHandler = new Handler( | 297 | router.notFoundHandler = new Handler( |
| 294 | handlerFunc: (BuildContext context, Map<String, List<String>> params) { | 298 | handlerFunc: (BuildContext context, Map<String, List<String>> params) { |
| @@ -538,5 +542,10 @@ class Routes { | @@ -538,5 +542,10 @@ class Routes { | ||
| 538 | router.define(recharge_setting_page, handler: rechargeSettingPageHandle); | 542 | router.define(recharge_setting_page, handler: rechargeSettingPageHandle); |
| 539 | router.define(comment_manage_home_page, | 543 | router.define(comment_manage_home_page, |
| 540 | handler: commentManageHomePageHandle); | 544 | handler: commentManageHomePageHandle); |
| 545 | + | ||
| 546 | + router.define(comments_setting_page, | ||
| 547 | + handler: commentsSettingPageHandle); | ||
| 548 | + | ||
| 549 | + | ||
| 541 | } | 550 | } |
| 542 | } | 551 | } |
| @@ -55,87 +55,108 @@ typedef ClickCallback = void Function(String value); | @@ -55,87 +55,108 @@ typedef ClickCallback = void Function(String value); | ||
| 55 | // }; | 55 | // }; |
| 56 | 56 | ||
| 57 | class DialogUtil { | 57 | class DialogUtil { |
| 58 | - | ||
| 59 | //回复评论弹框 | 58 | //回复评论弹框 |
| 60 | - static openCommentsModalBottomSheet(context, | 59 | + static openCommentsModalBottomSheet(context, TextEditingController controller, |
| 61 | {VoidCallback lCallback, VoidCallback rCallback}) async { | 60 | {VoidCallback lCallback, VoidCallback rCallback}) async { |
| 62 | final option = await showModalBottomSheet( | 61 | final option = await showModalBottomSheet( |
| 63 | context: context, | 62 | context: context, |
| 64 | backgroundColor: Colors.transparent, | 63 | backgroundColor: Colors.transparent, |
| 65 | - isDismissible: false, | 64 | + isDismissible: true, |
| 66 | builder: (BuildContext context) { | 65 | builder: (BuildContext context) { |
| 67 | - return Container( | ||
| 68 | - // height: ScreenUtil().setWidth(180 * 2), | ||
| 69 | - decoration: BoxDecoration( | ||
| 70 | - color: MyColours.color_DBDBDB, | 66 | + return Scaffold( |
| 67 | + resizeToAvoidBottomInset: false, | ||
| 68 | + body: Column(mainAxisSize: MainAxisSize.min, children: [ | ||
| 69 | + Container( | ||
| 70 | + // height: ScreenUtil().setWidth(180 * 2), | ||
| 71 | + // constraints: BoxConstraints(minHeight: w(40), maxHeight: w(500)), | ||
| 72 | + decoration: BoxDecoration( | ||
| 73 | + color: MyColours.color_F7F7F7, | ||
| 71 | // borderRadius: BorderRadius.only( | 74 | // borderRadius: BorderRadius.only( |
| 72 | // topLeft: Radius.circular(ScreenUtil().setWidth(24)), | 75 | // topLeft: Radius.circular(ScreenUtil().setWidth(24)), |
| 73 | // topRight: Radius.circular(ScreenUtil().setWidth(24))) | 76 | // topRight: Radius.circular(ScreenUtil().setWidth(24))) |
| 74 | - ), | ||
| 75 | - child: Row( | ||
| 76 | - | ||
| 77 | - children: <Widget>[ | ||
| 78 | - InkWell( | ||
| 79 | - onTap: lCallback, | ||
| 80 | - child: Container( | ||
| 81 | - width: double.infinity, | ||
| 82 | - height: ScreenUtil().setWidth(58 * 2), | ||
| 83 | - child: Center( | ||
| 84 | - child: Text( | ||
| 85 | - '拍摄', | ||
| 86 | - style: TextStyle( | ||
| 87 | - fontSize: ScreenUtil().setSp(32), | ||
| 88 | - color: MyColours.color_353535, | ||
| 89 | - fontWeight: FontWeight.bold), | ||
| 90 | - ), | ||
| 91 | - )), | ||
| 92 | - ), | ||
| 93 | - MyDivider( | ||
| 94 | - double.infinity, | ||
| 95 | - ScreenUtil().setWidth(2), | ||
| 96 | - color: MyColours.color_EEEEEE, | ||
| 97 | - ), | ||
| 98 | - InkWell( | ||
| 99 | - onTap: rCallback, | ||
| 100 | - child: Container( | ||
| 101 | - width: double.infinity, | ||
| 102 | - height: ScreenUtil().setWidth(58 * 2), | ||
| 103 | - child: Center( | ||
| 104 | - child: Text( | ||
| 105 | - '从相册选择', | ||
| 106 | - style: TextStyle( | ||
| 107 | - fontSize: ScreenUtil().setSp(32), | ||
| 108 | - color: MyColours.color_353535, | ||
| 109 | - fontWeight: FontWeight.bold), | ||
| 110 | - ), | ||
| 111 | - )), | ||
| 112 | - ), | ||
| 113 | - MyDivider( | ||
| 114 | - double.infinity, | ||
| 115 | - ScreenUtil().setWidth(10), | ||
| 116 | - color: MyColours.color_EEEEEE, | ||
| 117 | - ), | ||
| 118 | - InkWell( | ||
| 119 | - onTap: () { | ||
| 120 | - Navigator.pop(context, '取消'); | ||
| 121 | - }, | ||
| 122 | - child: Container( | ||
| 123 | - width: double.infinity, | ||
| 124 | - height: ScreenUtil().setWidth(58 * 2), | ||
| 125 | - child: Center( | ||
| 126 | - child: Text( | ||
| 127 | - '取消', | ||
| 128 | - style: TextStyle( | ||
| 129 | - fontSize: ScreenUtil().setSp(32), | ||
| 130 | - color: MyColours.color_353535, | ||
| 131 | - fontWeight: FontWeight.bold), | ||
| 132 | - ), | ||
| 133 | - ))) | ||
| 134 | - ], | ||
| 135 | - ), | ||
| 136 | - ); | 77 | + ), |
| 78 | + child: Row( | ||
| 79 | + crossAxisAlignment: CrossAxisAlignment.end, | ||
| 80 | + children: <Widget>[ | ||
| 81 | + Expanded( | ||
| 82 | + child: Container( | ||
| 83 | + margin: EdgeInsets.symmetric( | ||
| 84 | + horizontal: w(15), vertical: w(8)), | ||
| 85 | + decoration: BoxDecoration( | ||
| 86 | + color: MyColours.color_ffffff, | ||
| 87 | + borderRadius: BorderRadius.circular(r(8))), | ||
| 88 | + padding: EdgeInsets.symmetric(horizontal: w(4)), | ||
| 89 | + child: TextField( | ||
| 90 | + controller: controller, | ||
| 91 | + maxLines: null, | ||
| 92 | + autofocus: true, | ||
| 93 | + | ||
| 94 | + // //光标颜色 | ||
| 95 | + // cursorColor: | ||
| 96 | + // widget.isSelect ? Colors.white : MyColours.color_199095, | ||
| 97 | + //输入文本的样式 | ||
| 98 | + // inputFormatters: lenghtLimit | ||
| 99 | + // ? [ | ||
| 100 | + // LengthLimitingTextInputFormatter(10), | ||
| 101 | + // ] | ||
| 102 | + // : [], | ||
| 103 | + textAlignVertical: TextAlignVertical.bottom, | ||
| 104 | + textAlign: TextAlign.left, | ||
| 105 | + style: TextStyle( | ||
| 106 | + fontSize: ScreenUtil().setSp(28), | ||
| 107 | + ), | ||
| 108 | + decoration: InputDecoration( | ||
| 109 | + border: OutlineInputBorder( | ||
| 110 | + borderSide: BorderSide.none), | ||
| 111 | + hintText: '评论', | ||
| 112 | + hintStyle: TextStyle( | ||
| 113 | + color: MyColours.color_999999, | ||
| 114 | + fontSize: ScreenUtil().setSp(28), | ||
| 115 | + ), | ||
| 116 | + enabledBorder: new UnderlineInputBorder( | ||
| 117 | + borderSide: BorderSide.none, | ||
| 118 | + ), | ||
| 119 | + focusedBorder: new UnderlineInputBorder( | ||
| 120 | + borderSide: BorderSide.none, | ||
| 121 | + ), | ||
| 122 | + ), | ||
| 123 | + onChanged: (value) { | ||
| 124 | + // name = value; | ||
| 125 | + }, | ||
| 126 | + onEditingComplete: () { | ||
| 127 | + FocusScope.of(context) | ||
| 128 | + .requestFocus(FocusNode()); //点击空白处隐藏键盘 | ||
| 129 | + }, | ||
| 130 | + keyboardType: TextInputType.text))), | ||
| 131 | + HEmptyView(20), | ||
| 132 | + RoundButton( | ||
| 133 | + text: '发送', | ||
| 134 | + width: w(54), | ||
| 135 | + height: w(24), | ||
| 136 | + gradientStart: controller.text.trim().length > 0 | ||
| 137 | + ? MyColours.color_438E93 | ||
| 138 | + : MyColours.color_ffffff, | ||
| 139 | + gradientEnd: controller.text.trim().length > 0 | ||
| 140 | + ? MyColours.color_438E93 | ||
| 141 | + : MyColours.color_ffffff, | ||
| 142 | + textColor: controller.text.trim().length > 0 | ||
| 143 | + ? MyColours.color_F8F9FD | ||
| 144 | + : MyColours.color_000000, | ||
| 145 | + fontSize: 24, | ||
| 146 | + borderColor: controller.text.trim().length > 0 | ||
| 147 | + ? MyColours.color_438E93 | ||
| 148 | + : MyColours.color_999999, | ||
| 149 | + radius: r(15), | ||
| 150 | + onPressed: () {}, | ||
| 151 | + ), | ||
| 152 | + HEmptyView(20), | ||
| 153 | + ], | ||
| 154 | + ), | ||
| 155 | + ) | ||
| 156 | + ])); | ||
| 137 | }); | 157 | }); |
| 138 | } | 158 | } |
| 159 | + | ||
| 139 | static List<Widget> menuSelectBtn(MenuSunModel menuSunModel, state) { | 160 | static List<Widget> menuSelectBtn(MenuSunModel menuSunModel, state) { |
| 140 | List<Widget> temp = []; | 161 | List<Widget> temp = []; |
| 141 | for (int i = 0; i < menuSunModel.practice.length; i++) { | 162 | for (int i = 0; i < menuSunModel.practice.length; i++) { |
| @@ -169,6 +169,13 @@ packages: | @@ -169,6 +169,13 @@ packages: | ||
| 169 | url: "https://pub.flutter-io.cn" | 169 | url: "https://pub.flutter-io.cn" |
| 170 | source: hosted | 170 | source: hosted |
| 171 | version: "1.0.1" | 171 | version: "1.0.1" |
| 172 | + cached_video_player: | ||
| 173 | + dependency: "direct main" | ||
| 174 | + description: | ||
| 175 | + name: cached_video_player | ||
| 176 | + url: "https://pub.flutter-io.cn" | ||
| 177 | + source: hosted | ||
| 178 | + version: "2.0.4" | ||
| 172 | characters: | 179 | characters: |
| 173 | dependency: transitive | 180 | dependency: transitive |
| 174 | description: | 181 | description: |
| @@ -400,6 +407,13 @@ packages: | @@ -400,6 +407,13 @@ packages: | ||
| 400 | url: "https://pub.flutter-io.cn" | 407 | url: "https://pub.flutter-io.cn" |
| 401 | source: hosted | 408 | source: hosted |
| 402 | version: "1.1.2" | 409 | version: "1.1.2" |
| 410 | + fijkplayer: | ||
| 411 | + dependency: "direct main" | ||
| 412 | + description: | ||
| 413 | + name: fijkplayer | ||
| 414 | + url: "https://pub.flutter-io.cn" | ||
| 415 | + source: hosted | ||
| 416 | + version: "0.11.0" | ||
| 403 | file: | 417 | file: |
| 404 | dependency: transitive | 418 | dependency: transitive |
| 405 | description: | 419 | description: |
| @@ -930,35 +944,35 @@ packages: | @@ -930,35 +944,35 @@ packages: | ||
| 930 | name: permission_handler | 944 | name: permission_handler |
| 931 | url: "https://pub.flutter-io.cn" | 945 | url: "https://pub.flutter-io.cn" |
| 932 | source: hosted | 946 | source: hosted |
| 933 | - version: "10.0.0" | 947 | + version: "10.4.3" |
| 934 | permission_handler_android: | 948 | permission_handler_android: |
| 935 | dependency: transitive | 949 | dependency: transitive |
| 936 | description: | 950 | description: |
| 937 | name: permission_handler_android | 951 | name: permission_handler_android |
| 938 | url: "https://pub.flutter-io.cn" | 952 | url: "https://pub.flutter-io.cn" |
| 939 | source: hosted | 953 | source: hosted |
| 940 | - version: "10.0.0" | 954 | + version: "10.3.4" |
| 941 | permission_handler_apple: | 955 | permission_handler_apple: |
| 942 | dependency: transitive | 956 | dependency: transitive |
| 943 | description: | 957 | description: |
| 944 | name: permission_handler_apple | 958 | name: permission_handler_apple |
| 945 | url: "https://pub.flutter-io.cn" | 959 | url: "https://pub.flutter-io.cn" |
| 946 | source: hosted | 960 | source: hosted |
| 947 | - version: "9.0.4" | 961 | + version: "9.1.4" |
| 948 | permission_handler_platform_interface: | 962 | permission_handler_platform_interface: |
| 949 | dependency: transitive | 963 | dependency: transitive |
| 950 | description: | 964 | description: |
| 951 | name: permission_handler_platform_interface | 965 | name: permission_handler_platform_interface |
| 952 | url: "https://pub.flutter-io.cn" | 966 | url: "https://pub.flutter-io.cn" |
| 953 | source: hosted | 967 | source: hosted |
| 954 | - version: "3.7.0" | 968 | + version: "3.11.3" |
| 955 | permission_handler_windows: | 969 | permission_handler_windows: |
| 956 | dependency: transitive | 970 | dependency: transitive |
| 957 | description: | 971 | description: |
| 958 | name: permission_handler_windows | 972 | name: permission_handler_windows |
| 959 | url: "https://pub.flutter-io.cn" | 973 | url: "https://pub.flutter-io.cn" |
| 960 | source: hosted | 974 | source: hosted |
| 961 | - version: "0.1.0" | 975 | + version: "0.1.3" |
| 962 | petitparser: | 976 | petitparser: |
| 963 | dependency: transitive | 977 | dependency: transitive |
| 964 | description: | 978 | description: |
| @@ -1401,40 +1415,47 @@ packages: | @@ -1401,40 +1415,47 @@ packages: | ||
| 1401 | source: hosted | 1415 | source: hosted |
| 1402 | version: "3.1.1" | 1416 | version: "3.1.1" |
| 1403 | video_player: | 1417 | video_player: |
| 1404 | - dependency: "direct main" | 1418 | + dependency: transitive |
| 1405 | description: | 1419 | description: |
| 1406 | name: video_player | 1420 | name: video_player |
| 1407 | url: "https://pub.flutter-io.cn" | 1421 | url: "https://pub.flutter-io.cn" |
| 1408 | source: hosted | 1422 | source: hosted |
| 1409 | - version: "2.4.7" | 1423 | + version: "2.6.0" |
| 1410 | video_player_android: | 1424 | video_player_android: |
| 1411 | dependency: transitive | 1425 | dependency: transitive |
| 1412 | description: | 1426 | description: |
| 1413 | name: video_player_android | 1427 | name: video_player_android |
| 1414 | url: "https://pub.flutter-io.cn" | 1428 | url: "https://pub.flutter-io.cn" |
| 1415 | source: hosted | 1429 | source: hosted |
| 1416 | - version: "2.3.5" | 1430 | + version: "2.4.3" |
| 1417 | video_player_avfoundation: | 1431 | video_player_avfoundation: |
| 1418 | dependency: transitive | 1432 | dependency: transitive |
| 1419 | description: | 1433 | description: |
| 1420 | name: video_player_avfoundation | 1434 | name: video_player_avfoundation |
| 1421 | url: "https://pub.flutter-io.cn" | 1435 | url: "https://pub.flutter-io.cn" |
| 1422 | source: hosted | 1436 | source: hosted |
| 1423 | - version: "2.3.4" | 1437 | + version: "2.4.2" |
| 1424 | video_player_platform_interface: | 1438 | video_player_platform_interface: |
| 1425 | dependency: transitive | 1439 | dependency: transitive |
| 1426 | description: | 1440 | description: |
| 1427 | name: video_player_platform_interface | 1441 | name: video_player_platform_interface |
| 1428 | url: "https://pub.flutter-io.cn" | 1442 | url: "https://pub.flutter-io.cn" |
| 1429 | source: hosted | 1443 | source: hosted |
| 1430 | - version: "5.1.2" | 1444 | + version: "5.1.4" |
| 1431 | video_player_web: | 1445 | video_player_web: |
| 1432 | dependency: transitive | 1446 | dependency: transitive |
| 1433 | description: | 1447 | description: |
| 1434 | name: video_player_web | 1448 | name: video_player_web |
| 1435 | url: "https://pub.flutter-io.cn" | 1449 | url: "https://pub.flutter-io.cn" |
| 1436 | source: hosted | 1450 | source: hosted |
| 1437 | - version: "2.0.10" | 1451 | + version: "2.0.15" |
| 1452 | + video_thumbnail: | ||
| 1453 | + dependency: "direct main" | ||
| 1454 | + description: | ||
| 1455 | + name: video_thumbnail | ||
| 1456 | + url: "https://pub.flutter-io.cn" | ||
| 1457 | + source: hosted | ||
| 1458 | + version: "0.5.3" | ||
| 1438 | wakelock: | 1459 | wakelock: |
| 1439 | dependency: transitive | 1460 | dependency: transitive |
| 1440 | description: | 1461 | description: |
| @@ -79,6 +79,7 @@ dependencies: | @@ -79,6 +79,7 @@ dependencies: | ||
| 79 | # 日历 | 79 | # 日历 |
| 80 | table_calendar: ^2.2.1 | 80 | table_calendar: ^2.2.1 |
| 81 | # 微信SDK | 81 | # 微信SDK |
| 82 | + | ||
| 82 | # fluwx: ^3.9.0+2 | 83 | # fluwx: ^3.9.0+2 |
| 83 | fluwx: ^3.13.1 | 84 | fluwx: ^3.13.1 |
| 84 | # fluwx: ^4.2.5 | 85 | # fluwx: ^4.2.5 |
| @@ -135,14 +136,18 @@ dependencies: | @@ -135,14 +136,18 @@ dependencies: | ||
| 135 | #苹果登陆 | 136 | #苹果登陆 |
| 136 | sign_in_with_apple: ^3.0.0 | 137 | sign_in_with_apple: ^3.0.0 |
| 137 | # sign_in_with_apple: ^3.0.0 | 138 | # sign_in_with_apple: ^3.0.0 |
| 138 | - # video_thumbnail: ^0.2.5 | ||
| 139 | - video_player: ^2.4.7 | 139 | + video_thumbnail: ^0.5.3 |
| 140 | + # video_player: ^2.4.7 | ||
| 141 | + # video_player: ^2.7.0 | ||
| 140 | # video_player: ^2.4.2 | 142 | # video_player: ^2.4.2 |
| 143 | + # video_player: ^2.2.12 | ||
| 141 | # ^2.4.7 | 144 | # ^2.4.7 |
| 142 | # chewie: ^1.3.3 | 145 | # chewie: ^1.3.3 |
| 143 | chewie: ^1.3.5 | 146 | chewie: ^1.3.5 |
| 147 | + cached_video_player: ^2.0.4 | ||
| 144 | # 视频播放 | 148 | # 视频播放 |
| 145 | # flutter_ijkplayer: 0.3.5+1 | 149 | # flutter_ijkplayer: 0.3.5+1 |
| 150 | + # fijkplayer: ^0.11.0 | ||
| 146 | # 视频信息获取 | 151 | # 视频信息获取 |
| 147 | # video_compress: ^2.1.1 | 152 | # video_compress: ^2.1.1 |
| 148 | video_compress: ^3.1.1 | 153 | video_compress: ^3.1.1 |
| @@ -198,6 +203,9 @@ dependencies: | @@ -198,6 +203,9 @@ dependencies: | ||
| 198 | #评论弹框 | 203 | #评论弹框 |
| 199 | sliding_up_panel2: ^3.3.0+1 | 204 | sliding_up_panel2: ^3.3.0+1 |
| 200 | 205 | ||
| 206 | + #视频播放 | ||
| 207 | + fijkplayer: ^0.11.0 | ||
| 208 | + | ||
| 201 | 209 | ||
| 202 | 210 | ||
| 203 | # shimmer: ^3.0.0 | 211 | # shimmer: ^3.0.0 |
-
Please register or login to post a comment