|
|
|
1
|
+import 'package:cached_network_image/cached_network_image.dart';
|
|
1
|
import 'package:flutter/material.dart';
|
2
|
import 'package:flutter/material.dart';
|
|
2
|
import 'package:flutter/rendering.dart';
|
3
|
import 'package:flutter/rendering.dart';
|
|
|
|
4
|
+import 'package:one_key/models/comments_label_model.dart';
|
|
|
|
5
|
+import 'package:one_key/models/comments_model.dart';
|
|
3
|
import 'package:one_key/provider/user_model.dart';
|
6
|
import 'package:one_key/provider/user_model.dart';
|
|
4
|
import 'package:one_key/res/colors.dart';
|
7
|
import 'package:one_key/res/colors.dart';
|
|
5
|
import 'package:one_key/widgets/h_empty_view.dart';
|
8
|
import 'package:one_key/widgets/h_empty_view.dart';
|
|
@@ -8,10 +11,14 @@ import 'package:one_key/widgets/system_app_bar.dart'; |
|
@@ -8,10 +11,14 @@ import 'package:one_key/widgets/system_app_bar.dart'; |
|
8
|
import 'package:one_key/widgets/v_empty_view.dart';
|
11
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
9
|
import 'package:provider/provider.dart';
|
12
|
import 'package:provider/provider.dart';
|
|
10
|
|
13
|
|
|
|
|
14
|
+import '../../../constant/state.dart';
|
|
11
|
import '../../../provider/comment_manage_provider.dart';
|
15
|
import '../../../provider/comment_manage_provider.dart';
|
|
12
|
import '../../../utils/event_bus.dart';
|
16
|
import '../../../utils/event_bus.dart';
|
|
13
|
import '../../../utils/screen_util.dart';
|
17
|
import '../../../utils/screen_util.dart';
|
|
14
|
import '../../../utils/utils.dart';
|
18
|
import '../../../utils/utils.dart';
|
|
|
|
19
|
+import '../../../widgets/page_exception.dart';
|
|
|
|
20
|
+import '../../online_check/photo_view_wiget.dart';
|
|
|
|
21
|
+import 'package:sliding_up_panel2/sliding_up_panel2.dart';
|
|
15
|
|
22
|
|
|
16
|
/**
|
23
|
/**
|
|
17
|
* 评价管理
|
24
|
* 评价管理
|
|
@@ -24,13 +31,20 @@ class CommentManageHomePage extends StatefulWidget { |
|
@@ -24,13 +31,20 @@ class CommentManageHomePage extends StatefulWidget { |
|
24
|
|
31
|
|
|
25
|
class _CommentManageHomePageState extends State<CommentManageHomePage> {
|
32
|
class _CommentManageHomePageState extends State<CommentManageHomePage> {
|
|
26
|
CommentManageProvider commentManageProvider;
|
33
|
CommentManageProvider commentManageProvider;
|
|
27
|
-
|
34
|
+ ScrollController controller = ScrollController();
|
|
|
|
35
|
+ Map<String, String> starTextMap = {};
|
|
|
|
36
|
+ bool allSelect = true;
|
|
|
|
37
|
+ String label = '';
|
|
|
|
38
|
+ bool showInput = false;
|
|
28
|
@override
|
39
|
@override
|
|
29
|
void initState() {
|
40
|
void initState() {
|
|
30
|
super.initState();
|
41
|
super.initState();
|
|
31
|
|
42
|
|
|
|
|
43
|
+ starTextMap = {'1': '差', '2': '有点差', '3': '一般', '4': '满意', '5': '非常满意'};
|
|
|
|
44
|
+
|
|
32
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
45
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
33
|
- _getSellerComments();
|
46
|
+ _getSellerComments(isShowLoading: false);
|
|
|
|
47
|
+ _getCountCommentLabel(isShowLoading: false);
|
|
34
|
});
|
48
|
});
|
|
35
|
}
|
49
|
}
|
|
36
|
|
50
|
|
|
@@ -41,38 +55,162 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { |
|
@@ -41,38 +55,162 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { |
|
41
|
super.dispose();
|
55
|
super.dispose();
|
|
42
|
}
|
56
|
}
|
|
43
|
|
57
|
|
|
44
|
- ///我的客户首页
|
58
|
+ ///评价标签
|
|
|
|
59
|
+ _getCountCommentLabel({bool isShowLoading = true}) async {
|
|
|
|
60
|
+ Map<String, String> pramas = {
|
|
|
|
61
|
+ 'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
62
|
+ };
|
|
|
|
63
|
+ // label
|
|
|
|
64
|
+ await commentManageProvider.getCountCommentLabel(context, pramas,
|
|
|
|
65
|
+ isShowLoading: isShowLoading);
|
|
|
|
66
|
+ }
|
|
|
|
67
|
+
|
|
|
|
68
|
+ ///评价列表
|
|
45
|
_getSellerComments({bool isShowLoading = true}) async {
|
69
|
_getSellerComments({bool isShowLoading = true}) async {
|
|
46
|
Map<String, String> pramas = {
|
70
|
Map<String, String> pramas = {
|
|
47
|
'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
71
|
'sid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
48
|
'scene': '3',
|
72
|
'scene': '3',
|
|
49
|
'status': '1'
|
73
|
'status': '1'
|
|
50
|
};
|
74
|
};
|
|
51
|
- // label
|
75
|
+ if (label != '') {
|
|
|
|
76
|
+ pramas['label'] = label;
|
|
|
|
77
|
+ }
|
|
|
|
78
|
+
|
|
52
|
await commentManageProvider.getSellerComments(context, pramas,
|
79
|
await commentManageProvider.getSellerComments(context, pramas,
|
|
53
|
isShowLoading: isShowLoading);
|
80
|
isShowLoading: isShowLoading);
|
|
54
|
}
|
81
|
}
|
|
55
|
|
82
|
|
|
56
|
List<Widget> _labelWidget() {
|
83
|
List<Widget> _labelWidget() {
|
|
57
|
List<Widget> data = [];
|
84
|
List<Widget> data = [];
|
|
58
|
-
|
|
|
|
59
|
- for (int i = 0; i < 10; i++) {
|
|
|
|
60
|
- data.add(Container(
|
|
|
|
61
|
- padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)),
|
|
|
|
62
|
- decoration: BoxDecoration(
|
|
|
|
63
|
- borderRadius: BorderRadius.circular(r(10)),
|
|
|
|
64
|
- color: true ? MyColours.color_33438E93 : MyColours.color_F8F7F3),
|
|
|
|
65
|
- child: Text(
|
|
|
|
66
|
- '全部',
|
|
|
|
67
|
- style: TextStyle(
|
|
|
|
68
|
- fontSize: font(14),
|
|
|
|
69
|
- color: true ? MyColours.color_438E93 : MyColours.color_515151),
|
|
|
|
70
|
- ),
|
|
|
|
71
|
- ));
|
85
|
+ data.add(InkWell(
|
|
|
|
86
|
+ onTap: () {
|
|
|
|
87
|
+ allSelect = true;
|
|
|
|
88
|
+ commentManageProvider.commentsLabeldata.forEach((element) {
|
|
|
|
89
|
+ element.select = false;
|
|
|
|
90
|
+ });
|
|
|
|
91
|
+ setState(() {});
|
|
|
|
92
|
+ label = '';
|
|
|
|
93
|
+ _getSellerComments(isShowLoading: true);
|
|
|
|
94
|
+ },
|
|
|
|
95
|
+ child: Container(
|
|
|
|
96
|
+ padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)),
|
|
|
|
97
|
+ decoration: BoxDecoration(
|
|
|
|
98
|
+ borderRadius: BorderRadius.circular(r(10)),
|
|
|
|
99
|
+ color: allSelect
|
|
|
|
100
|
+ ? MyColours.color_33438E93
|
|
|
|
101
|
+ : MyColours.color_F8F7F3),
|
|
|
|
102
|
+ child: Text(
|
|
|
|
103
|
+ '全部',
|
|
|
|
104
|
+ style: TextStyle(
|
|
|
|
105
|
+ fontSize: font(14),
|
|
|
|
106
|
+ color: allSelect
|
|
|
|
107
|
+ ? MyColours.color_438E93
|
|
|
|
108
|
+ : MyColours.color_515151),
|
|
|
|
109
|
+ ),
|
|
|
|
110
|
+ )));
|
|
|
|
111
|
+ for (int i = 0; i < commentManageProvider.commentsLabeldata.length; i++) {
|
|
|
|
112
|
+ CommentsLabelSunModel sunModel =
|
|
|
|
113
|
+ commentManageProvider.commentsLabeldata[i];
|
|
|
|
114
|
+ data.add(InkWell(
|
|
|
|
115
|
+ onTap: () {
|
|
|
|
116
|
+ commentManageProvider.commentsLabeldata.forEach((element) {
|
|
|
|
117
|
+ element.select = false;
|
|
|
|
118
|
+ });
|
|
|
|
119
|
+ allSelect = false;
|
|
|
|
120
|
+ sunModel.select = true;
|
|
|
|
121
|
+ setState(() {});
|
|
|
|
122
|
+ label = sunModel.name;
|
|
|
|
123
|
+ _getSellerComments(isShowLoading: true);
|
|
|
|
124
|
+ },
|
|
|
|
125
|
+ child: Container(
|
|
|
|
126
|
+ padding: EdgeInsets.symmetric(horizontal: w(8), vertical: w(3)),
|
|
|
|
127
|
+ decoration: BoxDecoration(
|
|
|
|
128
|
+ borderRadius: BorderRadius.circular(r(10)),
|
|
|
|
129
|
+ color: sunModel.select
|
|
|
|
130
|
+ ? MyColours.color_33438E93
|
|
|
|
131
|
+ : MyColours.color_F8F7F3),
|
|
|
|
132
|
+ child: Text(
|
|
|
|
133
|
+ sunModel.name,
|
|
|
|
134
|
+ style: TextStyle(
|
|
|
|
135
|
+ fontSize: font(14),
|
|
|
|
136
|
+ color: sunModel.select
|
|
|
|
137
|
+ ? MyColours.color_438E93
|
|
|
|
138
|
+ : MyColours.color_515151),
|
|
|
|
139
|
+ ),
|
|
|
|
140
|
+ )));
|
|
72
|
}
|
141
|
}
|
|
73
|
return data;
|
142
|
return data;
|
|
74
|
}
|
143
|
}
|
|
75
|
|
144
|
|
|
|
|
145
|
+ /// 九宫格
|
|
|
|
146
|
+ Widget _getGridImg(List<CommentsImageModel> imags) {
|
|
|
|
147
|
+ return GridView.builder(
|
|
|
|
148
|
+ controller: controller,
|
|
|
|
149
|
+ padding: EdgeInsets.symmetric(vertical: w(7)),
|
|
|
|
150
|
+ shrinkWrap: true,
|
|
|
|
151
|
+ itemCount: imags.length,
|
|
|
|
152
|
+
|
|
|
|
153
|
+ //SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget
|
|
|
|
154
|
+ gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
155
|
+ //横轴元素个数
|
|
|
|
156
|
+ crossAxisCount: 3,
|
|
|
|
157
|
+ //纵轴间距
|
|
|
|
158
|
+ mainAxisSpacing: w(7),
|
|
|
|
159
|
+ //横轴间距
|
|
|
|
160
|
+ crossAxisSpacing: w(7),
|
|
|
|
161
|
+ //子组件宽高长度比例
|
|
|
|
162
|
+ childAspectRatio: 1.0),
|
|
|
|
163
|
+ itemBuilder: (BuildContext context, int index) {
|
|
|
|
164
|
+ return InkWell(
|
|
|
|
165
|
+ onTap: () {
|
|
|
|
166
|
+ List<String> images = imags.map((e) => e.url).toList();
|
|
|
|
167
|
+ _showPhotoView(context, index, images);
|
|
|
|
168
|
+ },
|
|
|
|
169
|
+ child: ClipRRect(
|
|
|
|
170
|
+ borderRadius: BorderRadius.circular(r(8)),
|
|
|
|
171
|
+ child: CachedNetworkImage(
|
|
|
|
172
|
+ imageUrl: imags[index].url,
|
|
|
|
173
|
+ fit: BoxFit.cover,
|
|
|
|
174
|
+
|
|
|
|
175
|
+ // width: w(),
|
|
|
|
176
|
+ // height: ScreenUtil().setWidth(100 * 2),
|
|
|
|
177
|
+ ),
|
|
|
|
178
|
+ ));
|
|
|
|
179
|
+ });
|
|
|
|
180
|
+ }
|
|
|
|
181
|
+
|
|
|
|
182
|
+ //查看大图
|
|
|
|
183
|
+ _showPhotoView(BuildContext context, int index, List imgs,
|
|
|
|
184
|
+ {isShow = false, List dashName}) async {
|
|
|
|
185
|
+ // if (imgs.length == 1 &&
|
|
|
|
186
|
+ // imgs[0] ==
|
|
|
|
187
|
+ // 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
|
|
|
|
188
|
+ // imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
|
|
|
|
189
|
+ // }
|
|
|
|
190
|
+ Utils.setBarStatus(false, color: Colors.black);
|
|
|
|
191
|
+ dynamic result = await showGeneralDialog(
|
|
|
|
192
|
+ context: context,
|
|
|
|
193
|
+ barrierDismissible: false,
|
|
|
|
194
|
+ // barrierColor: Colors.red,
|
|
|
|
195
|
+ barrierLabel:
|
|
|
|
196
|
+ MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
|
|
|
197
|
+ transitionDuration: const Duration(milliseconds: 150),
|
|
|
|
198
|
+ pageBuilder: (BuildContext context, Animation animation,
|
|
|
|
199
|
+ Animation secondaryAnimation) {
|
|
|
|
200
|
+ Widget child = Stack(
|
|
|
|
201
|
+ children: <Widget>[
|
|
|
|
202
|
+ PhotoPreview(
|
|
|
|
203
|
+ initialIndex: index,
|
|
|
|
204
|
+ photoList: imgs,
|
|
|
|
205
|
+ isShow: isShow,
|
|
|
|
206
|
+ dashName: dashName)
|
|
|
|
207
|
+ ],
|
|
|
|
208
|
+ );
|
|
|
|
209
|
+ return child;
|
|
|
|
210
|
+ });
|
|
|
|
211
|
+ Utils.setBarStatus(true, color: Colors.white);
|
|
|
|
212
|
+ }
|
|
|
|
213
|
+
|
|
76
|
@override
|
214
|
@override
|
|
77
|
Widget build(BuildContext context) {
|
215
|
Widget build(BuildContext context) {
|
|
78
|
commentManageProvider =
|
216
|
commentManageProvider =
|
|
@@ -80,102 +218,184 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { |
|
@@ -80,102 +218,184 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { |
|
80
|
return Scaffold(
|
218
|
return Scaffold(
|
|
81
|
backgroundColor: MyColours.color_ffffff,
|
219
|
backgroundColor: MyColours.color_ffffff,
|
|
82
|
appBar: SystemAppBar('评价管理'),
|
220
|
appBar: SystemAppBar('评价管理'),
|
|
83
|
- body: Padding(
|
|
|
|
84
|
- padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
85
|
- child: Column(
|
|
|
|
86
|
- children: [
|
|
|
|
87
|
- Container(
|
|
|
|
88
|
- child: Wrap(
|
|
|
|
89
|
- runSpacing: w(10),
|
|
|
|
90
|
- spacing: w(10),
|
|
|
|
91
|
- children: _labelWidget()),
|
|
|
|
92
|
- ),
|
|
|
|
93
|
- VEmptyView(10),
|
|
|
|
94
|
- Expanded(
|
|
|
|
95
|
- child: ListView.builder(
|
|
|
|
96
|
- itemCount: 10,
|
|
|
|
97
|
- shrinkWrap: true,
|
|
|
|
98
|
- itemBuilder: (context, index) {
|
|
|
|
99
|
- return Container(
|
|
|
|
100
|
- margin: EdgeInsets.only(top: w(10)),
|
|
|
|
101
|
- decoration: BoxDecoration(
|
|
|
|
102
|
- border: Border(
|
|
|
|
103
|
- bottom: BorderSide(
|
|
|
|
104
|
- width: w(0.5),
|
|
|
|
105
|
- color: MyColours.color_DBDBDB))),
|
|
|
|
106
|
- child: Row(
|
|
|
|
107
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
108
|
- children: [
|
|
|
|
109
|
- Container(
|
|
|
|
110
|
- width: w(50),
|
|
|
|
111
|
- height: w(50),
|
|
|
|
112
|
- margin: EdgeInsets.only(
|
|
|
|
113
|
- left: w(8), right: w(8), top: w(20)),
|
|
|
|
114
|
- child: ClipRRect(
|
|
|
|
115
|
- borderRadius:
|
|
|
|
116
|
- BorderRadius.circular(w(50)),
|
|
|
|
117
|
- child: Container(
|
|
|
|
118
|
- width: w(50),
|
|
|
|
119
|
- height: w(50),
|
|
|
|
120
|
- decoration: BoxDecoration(
|
|
|
|
121
|
- color: MyColours.color_d9d9d9,
|
|
|
|
122
|
- borderRadius:
|
|
|
|
123
|
- BorderRadius.circular(r(50))),
|
|
|
|
124
|
- ))),
|
|
|
|
125
|
- HEmptyView(34),
|
|
|
|
126
|
- Expanded(
|
|
|
|
127
|
- child: Padding(
|
|
|
|
128
|
- padding: EdgeInsets.symmetric(
|
|
|
|
129
|
- vertical: w(4)),
|
|
|
|
130
|
- child: Column(
|
|
|
|
131
|
- crossAxisAlignment:
|
|
|
|
132
|
- CrossAxisAlignment.start,
|
|
|
|
133
|
- children: [
|
|
|
|
134
|
- Row(
|
221
|
+ body: Consumer<CommentManageProvider>(builder: (context1, model, _) {
|
|
|
|
222
|
+ if (model.pageState != PageState.Success) {
|
|
|
|
223
|
+ return ExceptionPage(
|
|
|
|
224
|
+ pageState: model.pageState,
|
|
|
|
225
|
+ callback: () async {
|
|
|
|
226
|
+ _getCountCommentLabel();
|
|
|
|
227
|
+ _getSellerComments();
|
|
|
|
228
|
+ },
|
|
|
|
229
|
+ emptyMsg: "暂时没有评论列表信息哦",
|
|
|
|
230
|
+ emptyImg: "empty_search",
|
|
|
|
231
|
+ showMsg: "加载中,请稍后...",
|
|
|
|
232
|
+ );
|
|
|
|
233
|
+ } else {
|
|
|
|
234
|
+ return Container(
|
|
|
|
235
|
+ color: MyColours.color_ffffff,
|
|
|
|
236
|
+ padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
237
|
+ child: Column(
|
|
|
|
238
|
+ children: [
|
|
|
|
239
|
+ Container(
|
|
|
|
240
|
+ child: Wrap(
|
|
|
|
241
|
+ runSpacing: w(10),
|
|
|
|
242
|
+ spacing: w(10),
|
|
|
|
243
|
+ children: _labelWidget()),
|
|
|
|
244
|
+ ),
|
|
|
|
245
|
+ VEmptyView(10),
|
|
|
|
246
|
+ Expanded(
|
|
|
|
247
|
+ child: ListView.builder(
|
|
|
|
248
|
+ itemCount:
|
|
|
|
249
|
+ commentManageProvider.commentsData.length,
|
|
|
|
250
|
+ shrinkWrap: true,
|
|
|
|
251
|
+ controller: controller,
|
|
|
|
252
|
+ itemBuilder: (context, index) {
|
|
|
|
253
|
+ CommentsSunModel sunModel =
|
|
|
|
254
|
+ commentManageProvider.commentsData[index];
|
|
|
|
255
|
+ return Container(
|
|
|
|
256
|
+ margin: EdgeInsets.only(top: w(10)),
|
|
|
|
257
|
+ decoration: BoxDecoration(
|
|
|
|
258
|
+ border: Border(
|
|
|
|
259
|
+ bottom: BorderSide(
|
|
|
|
260
|
+ width: w(0.5),
|
|
|
|
261
|
+ color: MyColours.color_DBDBDB))),
|
|
|
|
262
|
+ child: Row(
|
|
|
|
263
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
264
|
+ children: [
|
|
|
|
265
|
+ Container(
|
|
|
|
266
|
+ width: w(50),
|
|
|
|
267
|
+ height: w(50),
|
|
|
|
268
|
+ margin: EdgeInsets.only(
|
|
|
|
269
|
+ left: w(8),
|
|
|
|
270
|
+ right: w(8),
|
|
|
|
271
|
+ top: w(20)),
|
|
|
|
272
|
+ child: ClipRRect(
|
|
|
|
273
|
+ borderRadius:
|
|
|
|
274
|
+ BorderRadius.circular(w(50)),
|
|
|
|
275
|
+ child: sunModel.authorImage !=
|
|
|
|
276
|
+ null &&
|
|
|
|
277
|
+ sunModel.authorImage != ''
|
|
|
|
278
|
+ ? CachedNetworkImage(
|
|
|
|
279
|
+ imageUrl:
|
|
|
|
280
|
+ sunModel.authorImage,
|
|
|
|
281
|
+ width: w(50),
|
|
|
|
282
|
+ height: w(50),
|
|
|
|
283
|
+ )
|
|
|
|
284
|
+ : Container(
|
|
|
|
285
|
+ width: w(50),
|
|
|
|
286
|
+ height: w(50),
|
|
|
|
287
|
+ decoration: BoxDecoration(
|
|
|
|
288
|
+ color: MyColours
|
|
|
|
289
|
+ .color_d9d9d9,
|
|
|
|
290
|
+ borderRadius:
|
|
|
|
291
|
+ BorderRadius
|
|
|
|
292
|
+ .circular(
|
|
|
|
293
|
+ r(50))),
|
|
|
|
294
|
+ ))),
|
|
|
|
295
|
+ HEmptyView(34),
|
|
|
|
296
|
+ Expanded(
|
|
|
|
297
|
+ child: Padding(
|
|
|
|
298
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
299
|
+ vertical: w(4)),
|
|
|
|
300
|
+ child: Column(
|
|
|
|
301
|
+ crossAxisAlignment:
|
|
|
|
302
|
+ CrossAxisAlignment.start,
|
|
135
|
children: [
|
303
|
children: [
|
|
|
|
304
|
+ Row(
|
|
|
|
305
|
+ children: [
|
|
|
|
306
|
+ Container(
|
|
|
|
307
|
+ padding: EdgeInsets
|
|
|
|
308
|
+ .symmetric(
|
|
|
|
309
|
+ vertical:
|
|
|
|
310
|
+ w(4)),
|
|
|
|
311
|
+ constraints:
|
|
|
|
312
|
+ BoxConstraints(
|
|
|
|
313
|
+ maxWidth:
|
|
|
|
314
|
+ w(120)),
|
|
|
|
315
|
+ child: Text(
|
|
|
|
316
|
+ sunModel.author ??
|
|
|
|
317
|
+ '',
|
|
|
|
318
|
+ maxLines: 10,
|
|
|
|
319
|
+ overflow:
|
|
|
|
320
|
+ TextOverflow
|
|
|
|
321
|
+ .ellipsis,
|
|
|
|
322
|
+ style: TextStyle(
|
|
|
|
323
|
+ fontSize:
|
|
|
|
324
|
+ font(14),
|
|
|
|
325
|
+ fontWeight:
|
|
|
|
326
|
+ FontWeight
|
|
|
|
327
|
+ .bold,
|
|
|
|
328
|
+ color: MyColours
|
|
|
|
329
|
+ .color_515151),
|
|
|
|
330
|
+ )),
|
|
|
|
331
|
+ Spacer(),
|
|
|
|
332
|
+ Container(
|
|
|
|
333
|
+ width: w(75),
|
|
|
|
334
|
+ height: w(24),
|
|
|
|
335
|
+ child:
|
|
|
|
336
|
+ ListView.builder(
|
|
|
|
337
|
+ itemCount: 5,
|
|
|
|
338
|
+ shrinkWrap:
|
|
|
|
339
|
+ true,
|
|
|
|
340
|
+ scrollDirection:
|
|
|
|
341
|
+ Axis
|
|
|
|
342
|
+ .horizontal,
|
|
|
|
343
|
+ itemBuilder:
|
|
|
|
344
|
+ (context,
|
|
|
|
345
|
+ index) {
|
|
|
|
346
|
+ return Image
|
|
|
|
347
|
+ .asset(
|
|
|
|
348
|
+ Utils.getImgPath(index <=
|
|
|
|
349
|
+ int.parse(sunModel.grade) - 1
|
|
|
|
350
|
+ ? 'zwzp'
|
|
|
|
351
|
+ : 'apple'),
|
|
|
|
352
|
+ width:
|
|
|
|
353
|
+ w(15),
|
|
|
|
354
|
+ );
|
|
|
|
355
|
+ })),
|
|
|
|
356
|
+ Container(
|
|
|
|
357
|
+ padding: EdgeInsets
|
|
|
|
358
|
+ .symmetric(
|
|
|
|
359
|
+ vertical:
|
|
|
|
360
|
+ w(4)),
|
|
|
|
361
|
+ child: Text(
|
|
|
|
362
|
+ starTextMap[
|
|
|
|
363
|
+ '${sunModel.grade}'] ??
|
|
|
|
364
|
+ '',
|
|
|
|
365
|
+ maxLines: 2,
|
|
|
|
366
|
+ overflow:
|
|
|
|
367
|
+ TextOverflow
|
|
|
|
368
|
+ .ellipsis,
|
|
|
|
369
|
+ style: TextStyle(
|
|
|
|
370
|
+ fontSize:
|
|
|
|
371
|
+ font(12),
|
|
|
|
372
|
+ color: MyColours
|
|
|
|
373
|
+ .color_999999),
|
|
|
|
374
|
+ )),
|
|
|
|
375
|
+ ],
|
|
|
|
376
|
+ ),
|
|
|
|
377
|
+ VEmptyView(8),
|
|
136
|
Container(
|
378
|
Container(
|
|
137
|
padding:
|
379
|
padding:
|
|
138
|
EdgeInsets.symmetric(
|
380
|
EdgeInsets.symmetric(
|
|
139
|
vertical: w(4)),
|
381
|
vertical: w(4)),
|
|
140
|
- constraints:
|
|
|
|
141
|
- BoxConstraints(
|
|
|
|
142
|
- maxWidth: w(120)),
|
|
|
|
143
|
child: Text(
|
382
|
child: Text(
|
|
144
|
- '四处行走的花',
|
383
|
+ '就餐于 2023-8-24 午餐 二楼205',
|
|
145
|
maxLines: 10,
|
384
|
maxLines: 10,
|
|
146
|
overflow: TextOverflow
|
385
|
overflow: TextOverflow
|
|
147
|
.ellipsis,
|
386
|
.ellipsis,
|
|
148
|
style: TextStyle(
|
387
|
style: TextStyle(
|
|
149
|
- fontSize: font(14),
|
|
|
|
150
|
- fontWeight:
|
|
|
|
151
|
- FontWeight.bold,
|
388
|
+ fontSize: font(12),
|
|
152
|
color: MyColours
|
389
|
color: MyColours
|
|
153
|
- .color_515151),
|
390
|
+ .color_999999),
|
|
154
|
)),
|
391
|
)),
|
|
155
|
- Spacer(),
|
|
|
|
156
|
- Container(
|
|
|
|
157
|
- width: w(75),
|
|
|
|
158
|
- height: w(24),
|
|
|
|
159
|
- child: ListView.builder(
|
|
|
|
160
|
- itemCount: 5,
|
|
|
|
161
|
- shrinkWrap: true,
|
|
|
|
162
|
- scrollDirection:
|
|
|
|
163
|
- Axis.horizontal,
|
|
|
|
164
|
- itemBuilder:
|
|
|
|
165
|
- (context, index) {
|
|
|
|
166
|
- return Image.asset(
|
|
|
|
167
|
- Utils.getImgPath(
|
|
|
|
168
|
- 'zwzp'),
|
|
|
|
169
|
- width: w(15),
|
|
|
|
170
|
- );
|
|
|
|
171
|
- })),
|
|
|
|
172
|
Container(
|
392
|
Container(
|
|
173
|
padding:
|
393
|
padding:
|
|
174
|
EdgeInsets.symmetric(
|
394
|
EdgeInsets.symmetric(
|
|
175
|
vertical: w(4)),
|
395
|
vertical: w(4)),
|
|
176
|
child: Text(
|
396
|
child: Text(
|
|
177
|
- '非常满意',
|
|
|
|
178
|
- maxLines: 2,
|
397
|
+ '发表于 ${sunModel.createTimeStr}',
|
|
|
|
398
|
+ maxLines: 10,
|
|
179
|
overflow: TextOverflow
|
399
|
overflow: TextOverflow
|
|
180
|
.ellipsis,
|
400
|
.ellipsis,
|
|
181
|
style: TextStyle(
|
401
|
style: TextStyle(
|
|
@@ -183,85 +403,137 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { |
|
@@ -183,85 +403,137 @@ class _CommentManageHomePageState extends State<CommentManageHomePage> { |
|
183
|
color: MyColours
|
403
|
color: MyColours
|
|
184
|
.color_999999),
|
404
|
.color_999999),
|
|
185
|
)),
|
405
|
)),
|
|
186
|
- ],
|
|
|
|
187
|
- ),
|
|
|
|
188
|
- VEmptyView(8),
|
|
|
|
189
|
- Container(
|
|
|
|
190
|
- padding: EdgeInsets.symmetric(
|
|
|
|
191
|
- vertical: w(4)),
|
|
|
|
192
|
- child: Text(
|
|
|
|
193
|
- '就餐于 2023-8-24 午餐 二楼205',
|
|
|
|
194
|
- maxLines: 10,
|
|
|
|
195
|
- overflow:
|
|
|
|
196
|
- TextOverflow.ellipsis,
|
|
|
|
197
|
- style: TextStyle(
|
|
|
|
198
|
- fontSize: font(12),
|
|
|
|
199
|
- color: MyColours
|
|
|
|
200
|
- .color_999999),
|
|
|
|
201
|
- )),
|
|
|
|
202
|
- Container(
|
|
|
|
203
|
- padding: EdgeInsets.symmetric(
|
|
|
|
204
|
- vertical: w(4)),
|
|
|
|
205
|
- child: Text(
|
|
|
|
206
|
- '发表于 2023-8-25',
|
|
|
|
207
|
- maxLines: 10,
|
|
|
|
208
|
- overflow:
|
|
|
|
209
|
- TextOverflow.ellipsis,
|
|
|
|
210
|
- style: TextStyle(
|
|
|
|
211
|
- fontSize: font(12),
|
|
|
|
212
|
- color: MyColours
|
|
|
|
213
|
- .color_999999),
|
|
|
|
214
|
- )),
|
|
|
|
215
|
- VEmptyView(8),
|
|
|
|
216
|
- Container(
|
|
|
|
217
|
- padding: EdgeInsets.symmetric(
|
|
|
|
218
|
- vertical: w(4)),
|
|
|
|
219
|
- child: Text(
|
|
|
|
220
|
- '第二次来了,味道还是一如既往的好吃,包间也很干净整洁,',
|
|
|
|
221
|
- style: TextStyle(
|
|
|
|
222
|
- height: 1.8,
|
|
|
|
223
|
- fontSize: font(12),
|
|
|
|
224
|
- color: MyColours
|
|
|
|
225
|
- .color_515151),
|
|
|
|
226
|
- )),
|
|
|
|
227
|
- Container(
|
|
|
|
228
|
- padding: EdgeInsets.symmetric(
|
|
|
|
229
|
- vertical: w(4)),
|
|
|
|
230
|
- child: Text(
|
|
|
|
231
|
- '#口味佳,服务热情',
|
|
|
|
232
|
- style: TextStyle(
|
|
|
|
233
|
- height: 1.8,
|
|
|
|
234
|
- fontSize: font(12),
|
|
|
|
235
|
- color: MyColours
|
|
|
|
236
|
- .color_438E93),
|
|
|
|
237
|
- )),
|
|
|
|
238
|
- VEmptyView(8),
|
|
|
|
239
|
- Align(
|
|
|
|
240
|
- alignment:
|
|
|
|
241
|
- Alignment.centerRight,
|
|
|
|
242
|
- child: RoundButton(
|
|
|
|
243
|
- text: '回复',
|
|
|
|
244
|
- width: w(54),
|
|
|
|
245
|
- height: w(24),
|
|
|
|
246
|
- gradientStart:
|
|
|
|
247
|
- MyColours.color_ffffff,
|
|
|
|
248
|
- gradientEnd:
|
|
|
|
249
|
- MyColours.color_ffffff,
|
|
|
|
250
|
- textColor:
|
|
|
|
251
|
- MyColours.color_000000,
|
|
|
|
252
|
- fontSize: 24,
|
|
|
|
253
|
- borderColor:
|
|
|
|
254
|
- MyColours.color_999999,
|
|
|
|
255
|
- radius: r(15),
|
|
|
|
256
|
- ),
|
|
|
|
257
|
- ),
|
|
|
|
258
|
- VEmptyView(26),
|
|
|
|
259
|
- ]))),
|
|
|
|
260
|
- ],
|
|
|
|
261
|
- ),
|
|
|
|
262
|
- );
|
|
|
|
263
|
- }))
|
|
|
|
264
|
- ],
|
|
|
|
265
|
- )));
|
406
|
+ VEmptyView(8),
|
|
|
|
407
|
+ if (sunModel.text != null &&
|
|
|
|
408
|
+ sunModel.text.length > 0)
|
|
|
|
409
|
+ Container(
|
|
|
|
410
|
+ padding: EdgeInsets
|
|
|
|
411
|
+ .symmetric(
|
|
|
|
412
|
+ vertical: w(4)),
|
|
|
|
413
|
+ child: Text(
|
|
|
|
414
|
+ sunModel.text ?? '',
|
|
|
|
415
|
+ style: TextStyle(
|
|
|
|
416
|
+ height: 1.8,
|
|
|
|
417
|
+ fontSize:
|
|
|
|
418
|
+ font(12),
|
|
|
|
419
|
+ color: MyColours
|
|
|
|
420
|
+ .color_515151),
|
|
|
|
421
|
+ )),
|
|
|
|
422
|
+ Container(
|
|
|
|
423
|
+ padding:
|
|
|
|
424
|
+ EdgeInsets.symmetric(
|
|
|
|
425
|
+ vertical: w(4)),
|
|
|
|
426
|
+ child: Text(
|
|
|
|
427
|
+ '#${sunModel.evalLabel ?? ''}',
|
|
|
|
428
|
+ style: TextStyle(
|
|
|
|
429
|
+ height: 1.8,
|
|
|
|
430
|
+ fontSize: font(12),
|
|
|
|
431
|
+ color: MyColours
|
|
|
|
432
|
+ .color_438E93),
|
|
|
|
433
|
+ )),
|
|
|
|
434
|
+ if (sunModel
|
|
|
|
435
|
+ .enclosure.length >
|
|
|
|
436
|
+ 0)
|
|
|
|
437
|
+ _getGridImg(
|
|
|
|
438
|
+ sunModel.enclosure),
|
|
|
|
439
|
+ VEmptyView(8),
|
|
|
|
440
|
+ sunModel.reply != null
|
|
|
|
441
|
+ ? Container(
|
|
|
|
442
|
+ width:
|
|
|
|
443
|
+ double.infinity,
|
|
|
|
444
|
+ padding:
|
|
|
|
445
|
+ EdgeInsets.all(
|
|
|
|
446
|
+ w(4)),
|
|
|
|
447
|
+ decoration: BoxDecoration(
|
|
|
|
448
|
+ color: MyColours
|
|
|
|
449
|
+ .color_33438E93,
|
|
|
|
450
|
+ borderRadius:
|
|
|
|
451
|
+ BorderRadius
|
|
|
|
452
|
+ .circular(
|
|
|
|
453
|
+ r(8))),
|
|
|
|
454
|
+ child: Column(
|
|
|
|
455
|
+ crossAxisAlignment:
|
|
|
|
456
|
+ CrossAxisAlignment
|
|
|
|
457
|
+ .start,
|
|
|
|
458
|
+ children: [
|
|
|
|
459
|
+ Text(
|
|
|
|
460
|
+ '回复内容',
|
|
|
|
461
|
+ style: TextStyle(
|
|
|
|
462
|
+ color: MyColours
|
|
|
|
463
|
+ .color_515151,
|
|
|
|
464
|
+ fontWeight:
|
|
|
|
465
|
+ FontWeight
|
|
|
|
466
|
+ .bold,
|
|
|
|
467
|
+ fontSize:
|
|
|
|
468
|
+ font(
|
|
|
|
469
|
+ 12)),
|
|
|
|
470
|
+ ),
|
|
|
|
471
|
+ VEmptyView(6),
|
|
|
|
472
|
+ Container(
|
|
|
|
473
|
+ padding: EdgeInsets
|
|
|
|
474
|
+ .symmetric(
|
|
|
|
475
|
+ vertical:
|
|
|
|
476
|
+ w(4)),
|
|
|
|
477
|
+ child: Text(
|
|
|
|
478
|
+ sunModel.reply
|
|
|
|
479
|
+ .text ??
|
|
|
|
480
|
+ "",
|
|
|
|
481
|
+ style: TextStyle(
|
|
|
|
482
|
+ height:
|
|
|
|
483
|
+ 1.8,
|
|
|
|
484
|
+ fontSize:
|
|
|
|
485
|
+ font(
|
|
|
|
486
|
+ 12),
|
|
|
|
487
|
+ color: MyColours
|
|
|
|
488
|
+ .color_515151),
|
|
|
|
489
|
+ )),
|
|
|
|
490
|
+ ],
|
|
|
|
491
|
+ ),
|
|
|
|
492
|
+ )
|
|
|
|
493
|
+ :
|
|
|
|
494
|
+ // showInput
|
|
|
|
495
|
+ // ? SlidingUpPanel(
|
|
|
|
496
|
+ // panel: Center(
|
|
|
|
497
|
+ // child: Text(
|
|
|
|
498
|
+ // "This is the sliding Widget"),
|
|
|
|
499
|
+ // ),
|
|
|
|
500
|
+ // )
|
|
|
|
501
|
+ // :
|
|
|
|
502
|
+ Align(
|
|
|
|
503
|
+ alignment: Alignment
|
|
|
|
504
|
+ .centerRight,
|
|
|
|
505
|
+ child: RoundButton(
|
|
|
|
506
|
+ text: '回复',
|
|
|
|
507
|
+ width: w(54),
|
|
|
|
508
|
+ height: w(24),
|
|
|
|
509
|
+ gradientStart:
|
|
|
|
510
|
+ MyColours
|
|
|
|
511
|
+ .color_ffffff,
|
|
|
|
512
|
+ gradientEnd: MyColours
|
|
|
|
513
|
+ .color_ffffff,
|
|
|
|
514
|
+ textColor: MyColours
|
|
|
|
515
|
+ .color_000000,
|
|
|
|
516
|
+ fontSize: 24,
|
|
|
|
517
|
+ borderColor: MyColours
|
|
|
|
518
|
+ .color_999999,
|
|
|
|
519
|
+ radius: r(15),
|
|
|
|
520
|
+ onPressed: () {
|
|
|
|
521
|
+ setState(() {
|
|
|
|
522
|
+ showInput =
|
|
|
|
523
|
+ !showInput;
|
|
|
|
524
|
+ });
|
|
|
|
525
|
+ },
|
|
|
|
526
|
+ ),
|
|
|
|
527
|
+ ),
|
|
|
|
528
|
+ VEmptyView(26),
|
|
|
|
529
|
+ ]))),
|
|
|
|
530
|
+ ],
|
|
|
|
531
|
+ ),
|
|
|
|
532
|
+ );
|
|
|
|
533
|
+ }))
|
|
|
|
534
|
+ ],
|
|
|
|
535
|
+ ));
|
|
|
|
536
|
+ }
|
|
|
|
537
|
+ }));
|
|
266
|
}
|
538
|
}
|
|
267
|
} |
539
|
} |