|
|
|
1
|
+import 'package:cached_network_image/cached_network_image.dart';
|
|
|
|
2
|
+import 'package:common_utils/common_utils.dart';
|
|
1
|
import 'package:flutter/material.dart';
|
3
|
import 'package:flutter/material.dart';
|
|
2
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
4
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
5
|
+import 'package:one_key/models/seller_phone_model.dart';
|
|
3
|
import 'package:one_key/models/user.dart';
|
6
|
import 'package:one_key/models/user.dart';
|
|
|
|
7
|
+import 'package:one_key/pages/online_check/photo_view_wiget.dart';
|
|
|
|
8
|
+import 'package:one_key/provider/base_info_provider.dart';
|
|
4
|
import 'package:one_key/provider/coupon_provider.dart';
|
9
|
import 'package:one_key/provider/coupon_provider.dart';
|
|
5
|
import 'package:one_key/provider/user_model.dart';
|
10
|
import 'package:one_key/provider/user_model.dart';
|
|
6
|
import 'package:one_key/res/colors.dart';
|
11
|
import 'package:one_key/res/colors.dart';
|
|
@@ -35,6 +40,11 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -35,6 +40,11 @@ class InvicationPageState extends State<InvicationPage> { |
|
35
|
ScrollController controller = ScrollController();
|
40
|
ScrollController controller = ScrollController();
|
|
36
|
double couponHeight = 180.0;
|
41
|
double couponHeight = 180.0;
|
|
37
|
CouponProvider couponProvider;
|
42
|
CouponProvider couponProvider;
|
|
|
|
43
|
+ BaseIndoProvider _baseIndoProvider;
|
|
|
|
44
|
+ String name = '请填写姓名';
|
|
|
|
45
|
+ String position = '请填写职位';
|
|
|
|
46
|
+ String phone = '请填写电话';
|
|
|
|
47
|
+ String qiniuUrl = '';
|
|
38
|
|
48
|
|
|
39
|
@override
|
49
|
@override
|
|
40
|
void initState() {
|
50
|
void initState() {
|
|
@@ -42,6 +52,8 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -42,6 +52,8 @@ class InvicationPageState extends State<InvicationPage> { |
|
42
|
|
52
|
|
|
43
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
53
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
44
|
_getActivityByRid();
|
54
|
_getActivityByRid();
|
|
|
|
55
|
+ _getCustomerActivityBaseinfo();
|
|
|
|
56
|
+ _getSellerPhotoById();
|
|
45
|
});
|
57
|
});
|
|
46
|
Utils.changeStatusColor(color: Colors.transparent);
|
58
|
Utils.changeStatusColor(color: Colors.transparent);
|
|
47
|
dateTime =
|
59
|
dateTime =
|
|
@@ -51,6 +63,37 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -51,6 +63,37 @@ class InvicationPageState extends State<InvicationPage> { |
|
51
|
"${dateTime.year}/${Utils.addZeroNumber(dateTime.month)}/${Utils.addZeroNumber(dateTime.day)} 星期${Utils.formatWeekDayNum(dateTime.weekday)} ${widget.ddateStr}";
|
63
|
"${dateTime.year}/${Utils.addZeroNumber(dateTime.month)}/${Utils.addZeroNumber(dateTime.day)} 星期${Utils.formatWeekDayNum(dateTime.weekday)} ${widget.ddateStr}";
|
|
52
|
}
|
64
|
}
|
|
53
|
|
65
|
|
|
|
|
66
|
+ _getSellerPhotoById() async {
|
|
|
|
67
|
+ Map<String, String> params = {
|
|
|
|
68
|
+ 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
69
|
+ "type": '2',
|
|
|
|
70
|
+ };
|
|
|
|
71
|
+ bool success = await _baseIndoProvider.getSellerPhotoById(context, params);
|
|
|
|
72
|
+ }
|
|
|
|
73
|
+
|
|
|
|
74
|
+ _getCustomerActivityBaseinfo() async {
|
|
|
|
75
|
+ Map<String, String> params = {
|
|
|
|
76
|
+ 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
|
|
|
|
77
|
+ "uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
78
|
+ };
|
|
|
|
79
|
+ bool success =
|
|
|
|
80
|
+ await _baseIndoProvider.getCustomerActivityBaseinfo(context, params);
|
|
|
|
81
|
+ if (success) {
|
|
|
|
82
|
+ name = _baseIndoProvider.baseInfoSunModel.name;
|
|
|
|
83
|
+ qiniuUrl = _baseIndoProvider.baseInfoSunModel.photo;
|
|
|
|
84
|
+ // _uploadImageProvider.erweima.qiniuUrl =
|
|
|
|
85
|
+ // _baseIndoProvider.baseInfoSunModel.qrcode;
|
|
|
|
86
|
+ phone = _baseIndoProvider.baseInfoSunModel.phone;
|
|
|
|
87
|
+ position = _baseIndoProvider.baseInfoSunModel.position;
|
|
|
|
88
|
+ setState(() {});
|
|
|
|
89
|
+ } else {
|
|
|
|
90
|
+ // name = '请填写姓名';
|
|
|
|
91
|
+ // position = '请填写职位';
|
|
|
|
92
|
+ // phone = '请填写电话';
|
|
|
|
93
|
+ // qiniuUrl = '';
|
|
|
|
94
|
+ }
|
|
|
|
95
|
+ }
|
|
|
|
96
|
+
|
|
54
|
_getActivityByRid() async {
|
97
|
_getActivityByRid() async {
|
|
55
|
Map<String, String> params = {
|
98
|
Map<String, String> params = {
|
|
56
|
"rid": widget.rid,
|
99
|
"rid": widget.rid,
|
|
@@ -140,10 +183,50 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -140,10 +183,50 @@ class InvicationPageState extends State<InvicationPage> { |
|
140
|
);
|
183
|
);
|
|
141
|
}
|
184
|
}
|
|
142
|
|
185
|
|
|
|
|
186
|
+ _goBaseInfoPage() async {
|
|
|
|
187
|
+ bool needRefresh = await NavigatorUtil.goBaseInfoPage(context);
|
|
|
|
188
|
+ if (needRefresh != null && needRefresh) {
|
|
|
|
189
|
+ //刷新页面数据
|
|
|
|
190
|
+ _getCustomerActivityBaseinfo();
|
|
|
|
191
|
+ }
|
|
|
|
192
|
+ }
|
|
|
|
193
|
+
|
|
|
|
194
|
+ //查看大图
|
|
|
|
195
|
+ _showPhotoView(BuildContext context, int index, List imgs,
|
|
|
|
196
|
+ {isShow = false, List dashName}) async {
|
|
|
|
197
|
+ // if (imgs.length == 1 &&
|
|
|
|
198
|
+ // imgs[0] ==
|
|
|
|
199
|
+ // 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
|
|
|
|
200
|
+ // imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
|
|
|
|
201
|
+ // }
|
|
|
|
202
|
+ Utils.setBarStatus(false, color: Colors.black);
|
|
|
|
203
|
+ dynamic result = await showGeneralDialog(
|
|
|
|
204
|
+ context: context,
|
|
|
|
205
|
+ barrierDismissible: false,
|
|
|
|
206
|
+ // barrierColor: Colors.red,
|
|
|
|
207
|
+ barrierLabel:
|
|
|
|
208
|
+ MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
|
|
|
209
|
+ transitionDuration: const Duration(milliseconds: 150),
|
|
|
|
210
|
+ pageBuilder: (BuildContext context, Animation animation,
|
|
|
|
211
|
+ Animation secondaryAnimation) {
|
|
|
|
212
|
+ Widget child = Stack(
|
|
|
|
213
|
+ children: <Widget>[
|
|
|
|
214
|
+ PhotoPreview(
|
|
|
|
215
|
+ initialIndex: index,
|
|
|
|
216
|
+ photoList: imgs,
|
|
|
|
217
|
+ isShow: isShow,
|
|
|
|
218
|
+ dashName: dashName)
|
|
|
|
219
|
+ ],
|
|
|
|
220
|
+ );
|
|
|
|
221
|
+ return child;
|
|
|
|
222
|
+ });
|
|
|
|
223
|
+ Utils.setBarStatus(true, color: Colors.white);
|
|
|
|
224
|
+ }
|
|
|
|
225
|
+
|
|
143
|
@override
|
226
|
@override
|
|
144
|
Widget build(BuildContext context) {
|
227
|
Widget build(BuildContext context) {
|
|
145
|
// TODO: implement build
|
228
|
// TODO: implement build
|
|
146
|
-
|
229
|
+ _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true);
|
|
147
|
couponProvider = Provider.of<CouponProvider>(context, listen: true);
|
230
|
couponProvider = Provider.of<CouponProvider>(context, listen: true);
|
|
148
|
return Container(
|
231
|
return Container(
|
|
149
|
width: double.infinity,
|
232
|
width: double.infinity,
|
|
@@ -157,7 +240,8 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -157,7 +240,8 @@ class InvicationPageState extends State<InvicationPage> { |
|
157
|
body: SafeArea(
|
240
|
body: SafeArea(
|
|
158
|
child: Stack(
|
241
|
child: Stack(
|
|
159
|
children: [
|
242
|
children: [
|
|
160
|
- Padding(
|
243
|
+ Container(
|
|
|
|
244
|
+ margin: EdgeInsets.only(top: ScreenUtil().setWidth(10 * 2)),
|
|
161
|
padding:
|
245
|
padding:
|
|
162
|
EdgeInsets.only(top: ScreenUtil().setWidth(35 * 2)),
|
246
|
EdgeInsets.only(top: ScreenUtil().setWidth(35 * 2)),
|
|
163
|
child: Column(children: [
|
247
|
child: Column(children: [
|
|
@@ -172,14 +256,14 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -172,14 +256,14 @@ class InvicationPageState extends State<InvicationPage> { |
|
172
|
Image.asset(
|
256
|
Image.asset(
|
|
173
|
"assets/img_ydap.png",
|
257
|
"assets/img_ydap.png",
|
|
174
|
width: ScreenUtil().setWidth(220 * 2),
|
258
|
width: ScreenUtil().setWidth(220 * 2),
|
|
175
|
- height: ScreenUtil().setHeight(120 * 2),
|
259
|
+ height: ScreenUtil().setHeight(98 * 2),
|
|
176
|
),
|
260
|
),
|
|
177
|
- VEmptyView(20),
|
261
|
+ VEmptyView(10),
|
|
178
|
Container(
|
262
|
Container(
|
|
179
|
margin: EdgeInsets.symmetric(
|
263
|
margin: EdgeInsets.symmetric(
|
|
180
|
horizontal: ScreenUtil().setWidth(40)),
|
264
|
horizontal: ScreenUtil().setWidth(40)),
|
|
181
|
- padding: EdgeInsets.all(
|
|
|
|
182
|
- ScreenUtil().setWidth(60)),
|
265
|
+ // padding: EdgeInsets.all(
|
|
|
|
266
|
+ // ScreenUtil().setWidth(60)),
|
|
183
|
decoration: BoxDecoration(
|
267
|
decoration: BoxDecoration(
|
|
184
|
gradient: LinearGradient(
|
268
|
gradient: LinearGradient(
|
|
185
|
begin: Alignment.topCenter,
|
269
|
begin: Alignment.topCenter,
|
|
@@ -196,8 +280,186 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -196,8 +280,186 @@ class InvicationPageState extends State<InvicationPage> { |
|
196
|
CrossAxisAlignment.center,
|
280
|
CrossAxisAlignment.center,
|
|
197
|
children: [
|
281
|
children: [
|
|
198
|
Container(
|
282
|
Container(
|
|
199
|
- color: Colors.red,
|
|
|
|
200
|
- height: 160,
|
283
|
+ width:
|
|
|
|
284
|
+ ScreenUtil().setWidth(335 * 2),
|
|
|
|
285
|
+ height:
|
|
|
|
286
|
+ ScreenUtil().setWidth(200 * 2),
|
|
|
|
287
|
+ decoration: BoxDecoration(
|
|
|
|
288
|
+ image: DecorationImage(
|
|
|
|
289
|
+ alignment:
|
|
|
|
290
|
+ Alignment.topCenter,
|
|
|
|
291
|
+ image: AssetImage(
|
|
|
|
292
|
+ "assets/yd_baiinfo_bg.png"),
|
|
|
|
293
|
+ fit: BoxFit.cover),
|
|
|
|
294
|
+ ),
|
|
|
|
295
|
+ child: Row(
|
|
|
|
296
|
+ crossAxisAlignment:
|
|
|
|
297
|
+ CrossAxisAlignment.start,
|
|
|
|
298
|
+ children: [
|
|
|
|
299
|
+ Padding(
|
|
|
|
300
|
+ padding: EdgeInsets.only(
|
|
|
|
301
|
+ top: ScreenUtil()
|
|
|
|
302
|
+ .setWidth(20),
|
|
|
|
303
|
+ left: ScreenUtil()
|
|
|
|
304
|
+ .setWidth(60)),
|
|
|
|
305
|
+ child: qiniuUrl == ''
|
|
|
|
306
|
+ ? Image.asset(
|
|
|
|
307
|
+ Utils.getImgPath(
|
|
|
|
308
|
+ 'person'),
|
|
|
|
309
|
+ width: ScreenUtil().setWidth(
|
|
|
|
310
|
+ 143 * 2),
|
|
|
|
311
|
+ height: ScreenUtil()
|
|
|
|
312
|
+ .setWidth(
|
|
|
|
313
|
+ 190 * 2))
|
|
|
|
314
|
+ : Image.network(qiniuUrl,
|
|
|
|
315
|
+ width: ScreenUtil()
|
|
|
|
316
|
+ .setWidth(
|
|
|
|
317
|
+ 143 * 2),
|
|
|
|
318
|
+ height: ScreenUtil()
|
|
|
|
319
|
+ .setWidth(190 * 2)),
|
|
|
|
320
|
+ ),
|
|
|
|
321
|
+ HEmptyView(10),
|
|
|
|
322
|
+ Spacer(),
|
|
|
|
323
|
+ Container(
|
|
|
|
324
|
+ height: ScreenUtil()
|
|
|
|
325
|
+ .setWidth(200 * 2),
|
|
|
|
326
|
+ child: Column(
|
|
|
|
327
|
+ mainAxisAlignment:
|
|
|
|
328
|
+ MainAxisAlignment
|
|
|
|
329
|
+ .start,
|
|
|
|
330
|
+ crossAxisAlignment:
|
|
|
|
331
|
+ CrossAxisAlignment
|
|
|
|
332
|
+ .start,
|
|
|
|
333
|
+ children: [
|
|
|
|
334
|
+ VEmptyView(60),
|
|
|
|
335
|
+ GestureDetector(
|
|
|
|
336
|
+ behavior:
|
|
|
|
337
|
+ HitTestBehavior
|
|
|
|
338
|
+ .opaque,
|
|
|
|
339
|
+ onTap: () {
|
|
|
|
340
|
+ _goBaseInfoPage();
|
|
|
|
341
|
+ },
|
|
|
|
342
|
+ child: Container(
|
|
|
|
343
|
+ width: ScreenUtil()
|
|
|
|
344
|
+ .setWidth(
|
|
|
|
345
|
+ 100 * 2),
|
|
|
|
346
|
+ height: ScreenUtil()
|
|
|
|
347
|
+ .setWidth(
|
|
|
|
348
|
+ 24 * 2),
|
|
|
|
349
|
+ child: Text(
|
|
|
|
350
|
+ name,
|
|
|
|
351
|
+ overflow:
|
|
|
|
352
|
+ TextOverflow
|
|
|
|
353
|
+ .ellipsis,
|
|
|
|
354
|
+ style: TextStyle(
|
|
|
|
355
|
+ fontWeight:
|
|
|
|
356
|
+ FontWeight
|
|
|
|
357
|
+ .bold,
|
|
|
|
358
|
+ color: MyColours
|
|
|
|
359
|
+ .color_794F28,
|
|
|
|
360
|
+ fontSize:
|
|
|
|
361
|
+ ScreenUtil()
|
|
|
|
362
|
+ .setSp(
|
|
|
|
363
|
+ 36)),
|
|
|
|
364
|
+ ),
|
|
|
|
365
|
+ ),
|
|
|
|
366
|
+ ),
|
|
|
|
367
|
+ VEmptyView(6),
|
|
|
|
368
|
+ InkWell(
|
|
|
|
369
|
+ onTap: () {
|
|
|
|
370
|
+ _goBaseInfoPage();
|
|
|
|
371
|
+ },
|
|
|
|
372
|
+ child: Container(
|
|
|
|
373
|
+ width: ScreenUtil()
|
|
|
|
374
|
+ .setWidth(
|
|
|
|
375
|
+ 100 * 2),
|
|
|
|
376
|
+ height:
|
|
|
|
377
|
+ ScreenUtil()
|
|
|
|
378
|
+ .setWidth(
|
|
|
|
379
|
+ 18 *
|
|
|
|
380
|
+ 2),
|
|
|
|
381
|
+ child: Text(
|
|
|
|
382
|
+ position,
|
|
|
|
383
|
+ overflow:
|
|
|
|
384
|
+ TextOverflow
|
|
|
|
385
|
+ .ellipsis,
|
|
|
|
386
|
+ style: TextStyle(
|
|
|
|
387
|
+ color: MyColours
|
|
|
|
388
|
+ .color_794F28,
|
|
|
|
389
|
+ fontSize: ScreenUtil()
|
|
|
|
390
|
+ .setSp(
|
|
|
|
391
|
+ 28)),
|
|
|
|
392
|
+ ),
|
|
|
|
393
|
+ )),
|
|
|
|
394
|
+ VEmptyView(6),
|
|
|
|
395
|
+ InkWell(
|
|
|
|
396
|
+ onTap: () {
|
|
|
|
397
|
+ _goBaseInfoPage();
|
|
|
|
398
|
+ },
|
|
|
|
399
|
+ child: Container(
|
|
|
|
400
|
+ width: ScreenUtil()
|
|
|
|
401
|
+ .setWidth(
|
|
|
|
402
|
+ 100 * 2),
|
|
|
|
403
|
+ height:
|
|
|
|
404
|
+ ScreenUtil()
|
|
|
|
405
|
+ .setWidth(
|
|
|
|
406
|
+ 18 *
|
|
|
|
407
|
+ 2),
|
|
|
|
408
|
+ child: Text(
|
|
|
|
409
|
+ phone,
|
|
|
|
410
|
+ overflow:
|
|
|
|
411
|
+ TextOverflow
|
|
|
|
412
|
+ .ellipsis,
|
|
|
|
413
|
+ style: TextStyle(
|
|
|
|
414
|
+ color: MyColours
|
|
|
|
415
|
+ .color_794F28,
|
|
|
|
416
|
+ fontSize: ScreenUtil()
|
|
|
|
417
|
+ .setSp(
|
|
|
|
418
|
+ 28)),
|
|
|
|
419
|
+ ),
|
|
|
|
420
|
+ )),
|
|
|
|
421
|
+ VEmptyView(14),
|
|
|
|
422
|
+ RoundButton(
|
|
|
|
423
|
+ height: ScreenUtil()
|
|
|
|
424
|
+ .setWidth(94 * 2),
|
|
|
|
425
|
+ image:
|
|
|
|
426
|
+ Utils.getImgPath(
|
|
|
|
427
|
+ 'yd_bianji'),
|
|
|
|
428
|
+ imgWidth: 24,
|
|
|
|
429
|
+ space: ScreenUtil()
|
|
|
|
430
|
+ .setWidth(20),
|
|
|
|
431
|
+ text: '编辑',
|
|
|
|
432
|
+ textColor: MyColours
|
|
|
|
433
|
+ .color_794F28,
|
|
|
|
434
|
+ isBold: false,
|
|
|
|
435
|
+ fontSize: 28,
|
|
|
|
436
|
+ gradientStart: Colors
|
|
|
|
437
|
+ .transparent,
|
|
|
|
438
|
+ gradientEnd: Colors
|
|
|
|
439
|
+ .transparent,
|
|
|
|
440
|
+ onPressed: () {
|
|
|
|
441
|
+ _goBaseInfoPage();
|
|
|
|
442
|
+ },
|
|
|
|
443
|
+ )
|
|
|
|
444
|
+ ],
|
|
|
|
445
|
+ )),
|
|
|
|
446
|
+ HEmptyView(60),
|
|
|
|
447
|
+ ],
|
|
|
|
448
|
+ )),
|
|
|
|
449
|
+ // Positioned(
|
|
|
|
450
|
+ // bottom: 0,
|
|
|
|
451
|
+ // child: Container(
|
|
|
|
452
|
+ // color: MyColours.color_EEDBC4,
|
|
|
|
453
|
+ // width: double.infinity,
|
|
|
|
454
|
+ // height:
|
|
|
|
455
|
+ // ScreenUtil().setWidth(40),
|
|
|
|
456
|
+ // ))
|
|
|
|
457
|
+ // ],
|
|
|
|
458
|
+ // ),
|
|
|
|
459
|
+ Container(
|
|
|
|
460
|
+ color: MyColours.color_EEDBC4,
|
|
|
|
461
|
+ width: double.infinity,
|
|
|
|
462
|
+ height: ScreenUtil().setWidth(40),
|
|
201
|
),
|
463
|
),
|
|
202
|
VEmptyView(40),
|
464
|
VEmptyView(40),
|
|
203
|
Image.asset(
|
465
|
Image.asset(
|
|
@@ -206,7 +468,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -206,7 +468,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
206
|
height:
|
468
|
height:
|
|
207
|
ScreenUtil().setHeight(33 * 2),
|
469
|
ScreenUtil().setHeight(33 * 2),
|
|
208
|
),
|
470
|
),
|
|
209
|
- VEmptyView(60),
|
471
|
+ VEmptyView(50),
|
|
210
|
Container(
|
472
|
Container(
|
|
211
|
height: ScreenUtil().setWidth(48),
|
473
|
height: ScreenUtil().setWidth(48),
|
|
212
|
child: Text(
|
474
|
child: Text(
|
|
@@ -217,7 +479,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -217,7 +479,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
217
|
color: MyColours.color_794F28,
|
479
|
color: MyColours.color_794F28,
|
|
218
|
fontWeight: FontWeight.bold,
|
480
|
fontWeight: FontWeight.bold,
|
|
219
|
fontSize:
|
481
|
fontSize:
|
|
220
|
- ScreenUtil().setSp(34)),
|
482
|
+ ScreenUtil().setSp(36)),
|
|
221
|
),
|
483
|
),
|
|
222
|
),
|
484
|
),
|
|
223
|
VEmptyView(30),
|
485
|
VEmptyView(30),
|
|
@@ -230,7 +492,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -230,7 +492,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
230
|
.setWidth(1.7 * 2),
|
492
|
.setWidth(1.7 * 2),
|
|
231
|
color: MyColours.color_C19E5B,
|
493
|
color: MyColours.color_C19E5B,
|
|
232
|
fontSize:
|
494
|
fontSize:
|
|
233
|
- ScreenUtil().setSp(26)),
|
495
|
+ ScreenUtil().setSp(28)),
|
|
234
|
),
|
496
|
),
|
|
235
|
),
|
497
|
),
|
|
236
|
VEmptyView(12),
|
498
|
VEmptyView(12),
|
|
@@ -257,7 +519,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -257,7 +519,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
257
|
MyColours.color_794F28,
|
519
|
MyColours.color_794F28,
|
|
258
|
fontWeight: FontWeight.bold,
|
520
|
fontWeight: FontWeight.bold,
|
|
259
|
fontSize:
|
521
|
fontSize:
|
|
260
|
- ScreenUtil().setSp(34)),
|
522
|
+ ScreenUtil().setSp(42)),
|
|
261
|
),
|
523
|
),
|
|
262
|
),
|
524
|
),
|
|
263
|
Image.asset(
|
525
|
Image.asset(
|
|
@@ -269,19 +531,46 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -269,19 +531,46 @@ class InvicationPageState extends State<InvicationPage> { |
|
269
|
),
|
531
|
),
|
|
270
|
],
|
532
|
],
|
|
271
|
),
|
533
|
),
|
|
272
|
- VEmptyView(18),
|
|
|
|
273
|
- RoundButton(
|
|
|
|
274
|
- text: '浏览照片',
|
|
|
|
275
|
- width: ScreenUtil().setWidth(68 * 2),
|
|
|
|
276
|
- height: ScreenUtil().setWidth(24 * 2),
|
|
|
|
277
|
- fontSize: 24,
|
|
|
|
278
|
- textColor: MyColours.color_794F28,
|
|
|
|
279
|
- isBold: false,
|
|
|
|
280
|
- gradientStart:
|
|
|
|
281
|
- Color.fromRGBO(121, 79, 40, 0.1),
|
|
|
|
282
|
- gradientEnd:
|
|
|
|
283
|
- Color.fromRGBO(121, 79, 40, 0.1),
|
|
|
|
284
|
- ),
|
534
|
+ _baseIndoProvider.photoList.length > 0
|
|
|
|
535
|
+ ? VEmptyView(18)
|
|
|
|
536
|
+ : Container(),
|
|
|
|
537
|
+ _baseIndoProvider.photoList.length > 0
|
|
|
|
538
|
+ ? RoundButton(
|
|
|
|
539
|
+ onPressed: () {
|
|
|
|
540
|
+ List<String> temp = [];
|
|
|
|
541
|
+ if (_baseIndoProvider
|
|
|
|
542
|
+ .photoList.length >
|
|
|
|
543
|
+ 0) {
|
|
|
|
544
|
+ for (int i = 0;
|
|
|
|
545
|
+ i <
|
|
|
|
546
|
+ _baseIndoProvider
|
|
|
|
547
|
+ .photoList
|
|
|
|
548
|
+ .length;
|
|
|
|
549
|
+ i++) {
|
|
|
|
550
|
+ temp.add(_baseIndoProvider
|
|
|
|
551
|
+ .photoList[i].image);
|
|
|
|
552
|
+ }
|
|
|
|
553
|
+
|
|
|
|
554
|
+ ///没有上传完成的不可以点击
|
|
|
|
555
|
+ _showPhotoView(
|
|
|
|
556
|
+ context, 0, temp);
|
|
|
|
557
|
+ }
|
|
|
|
558
|
+ },
|
|
|
|
559
|
+ text: '浏览照片',
|
|
|
|
560
|
+ width: ScreenUtil()
|
|
|
|
561
|
+ .setWidth(68 * 2),
|
|
|
|
562
|
+ height: ScreenUtil()
|
|
|
|
563
|
+ .setWidth(24 * 2),
|
|
|
|
564
|
+ fontSize: 26,
|
|
|
|
565
|
+ textColor:
|
|
|
|
566
|
+ MyColours.color_794F28,
|
|
|
|
567
|
+ isBold: false,
|
|
|
|
568
|
+ gradientStart: Color.fromRGBO(
|
|
|
|
569
|
+ 121, 79, 40, 0.1),
|
|
|
|
570
|
+ gradientEnd: Color.fromRGBO(
|
|
|
|
571
|
+ 121, 79, 40, 0.1),
|
|
|
|
572
|
+ )
|
|
|
|
573
|
+ : Container(),
|
|
285
|
VEmptyView(60),
|
574
|
VEmptyView(60),
|
|
286
|
Container(
|
575
|
Container(
|
|
287
|
height: ScreenUtil().setWidth(40),
|
576
|
height: ScreenUtil().setWidth(40),
|
|
@@ -293,7 +582,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -293,7 +582,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
293
|
color: MyColours.color_794F28,
|
582
|
color: MyColours.color_794F28,
|
|
294
|
fontWeight: FontWeight.bold,
|
583
|
fontWeight: FontWeight.bold,
|
|
295
|
fontSize:
|
584
|
fontSize:
|
|
296
|
- ScreenUtil().setSp(28)),
|
585
|
+ ScreenUtil().setSp(30)),
|
|
297
|
),
|
586
|
),
|
|
298
|
),
|
587
|
),
|
|
299
|
VEmptyView(20),
|
588
|
VEmptyView(20),
|
|
@@ -310,7 +599,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -310,7 +599,7 @@ class InvicationPageState extends State<InvicationPage> { |
|
310
|
color: MyColours.color_794F28,
|
599
|
color: MyColours.color_794F28,
|
|
311
|
fontWeight: FontWeight.bold,
|
600
|
fontWeight: FontWeight.bold,
|
|
312
|
fontSize:
|
601
|
fontSize:
|
|
313
|
- ScreenUtil().setSp(28)),
|
602
|
+ ScreenUtil().setSp(30)),
|
|
314
|
),
|
603
|
),
|
|
315
|
),
|
604
|
),
|
|
316
|
// VEmptyView(20),
|
605
|
// VEmptyView(20),
|
|
@@ -326,13 +615,14 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -326,13 +615,14 @@ class InvicationPageState extends State<InvicationPage> { |
|
326
|
// gradientEnd:
|
615
|
// gradientEnd:
|
|
327
|
// Color.fromRGBO(121, 79, 40, 0.1),
|
616
|
// Color.fromRGBO(121, 79, 40, 0.1),
|
|
328
|
// ),
|
617
|
// ),
|
|
329
|
- VEmptyView(60),
|
618
|
+ VEmptyView(50),
|
|
330
|
Image.asset(
|
619
|
Image.asset(
|
|
331
|
"assets/yd_down.png",
|
620
|
"assets/yd_down.png",
|
|
332
|
width: ScreenUtil().setWidth(195 * 2),
|
621
|
width: ScreenUtil().setWidth(195 * 2),
|
|
333
|
height:
|
622
|
height:
|
|
334
|
ScreenUtil().setHeight(33 * 2),
|
623
|
ScreenUtil().setHeight(33 * 2),
|
|
335
|
),
|
624
|
),
|
|
|
|
625
|
+ VEmptyView(60),
|
|
336
|
],
|
626
|
],
|
|
337
|
),
|
627
|
),
|
|
338
|
)
|
628
|
)
|
|
@@ -375,6 +665,36 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -375,6 +665,36 @@ class InvicationPageState extends State<InvicationPage> { |
|
375
|
Expanded(
|
665
|
Expanded(
|
|
376
|
child: GestureDetector(
|
666
|
child: GestureDetector(
|
|
377
|
onTap: () async {
|
667
|
onTap: () async {
|
|
|
|
668
|
+ if (ObjectUtil.isEmpty(
|
|
|
|
669
|
+ _baseIndoProvider.baseInfoSunModel)) {
|
|
|
|
670
|
+ Utils.showToast('请输入个人资料');
|
|
|
|
671
|
+ return;
|
|
|
|
672
|
+ }
|
|
|
|
673
|
+ if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
674
|
+ .baseInfoSunModel.name)) {
|
|
|
|
675
|
+ Utils.showToast('请填写您的姓名');
|
|
|
|
676
|
+ return;
|
|
|
|
677
|
+ }
|
|
|
|
678
|
+ if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
679
|
+ .baseInfoSunModel.phone)) {
|
|
|
|
680
|
+ Utils.showToast('请填写您的联系电话');
|
|
|
|
681
|
+ return;
|
|
|
|
682
|
+ }
|
|
|
|
683
|
+ if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
684
|
+ .baseInfoSunModel.position)) {
|
|
|
|
685
|
+ Utils.showToast('请填写您在餐厅中的职位');
|
|
|
|
686
|
+ return;
|
|
|
|
687
|
+ }
|
|
|
|
688
|
+ if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
689
|
+ .baseInfoSunModel.phone)) {
|
|
|
|
690
|
+ Utils.showToast('请上传您的头像');
|
|
|
|
691
|
+ return;
|
|
|
|
692
|
+ }
|
|
|
|
693
|
+ if (ObjectUtil.isEmpty(_baseIndoProvider
|
|
|
|
694
|
+ .baseInfoSunModel.qrcode)) {
|
|
|
|
695
|
+ Utils.showToast('请上传您的微信二维码');
|
|
|
|
696
|
+ return;
|
|
|
|
697
|
+ }
|
|
378
|
if (!couponProvider.hasModify &&
|
698
|
if (!couponProvider.hasModify &&
|
|
379
|
couponProvider.coupons.length > 0) {
|
699
|
couponProvider.coupons.length > 0) {
|
|
380
|
Map<String, String> params = {
|
700
|
Map<String, String> params = {
|
|
@@ -386,9 +706,14 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -386,9 +706,14 @@ class InvicationPageState extends State<InvicationPage> { |
|
386
|
.setActivityAsReserve(context, params);
|
706
|
.setActivityAsReserve(context, params);
|
|
387
|
if (isSuc) {
|
707
|
if (isSuc) {
|
|
388
|
couponProvider.hasModify = true;
|
708
|
couponProvider.hasModify = true;
|
|
|
|
709
|
+
|
|
389
|
bool isSuccess =
|
710
|
bool isSuccess =
|
|
390
|
await Utils.goShareInvicationToWeChat(
|
711
|
await Utils.goShareInvicationToWeChat(
|
|
391
|
- widget.rid);
|
712
|
+ widget.rid,
|
|
|
|
713
|
+ Provider.of<UserModel>(context,
|
|
|
|
714
|
+ listen: false)
|
|
|
|
715
|
+ .user
|
|
|
|
716
|
+ .openid);
|
|
392
|
print(isSuccess);
|
717
|
print(isSuccess);
|
|
393
|
// couponProvider.couponsShow = [];
|
718
|
// couponProvider.couponsShow = [];
|
|
394
|
// couponProvider.couponsShow
|
719
|
// couponProvider.couponsShow
|
|
@@ -399,7 +724,11 @@ class InvicationPageState extends State<InvicationPage> { |
|
@@ -399,7 +724,11 @@ class InvicationPageState extends State<InvicationPage> { |
|
399
|
} else {
|
724
|
} else {
|
|
400
|
bool isSuccess =
|
725
|
bool isSuccess =
|
|
401
|
await Utils.goShareInvicationToWeChat(
|
726
|
await Utils.goShareInvicationToWeChat(
|
|
402
|
- widget.rid);
|
727
|
+ widget.rid,
|
|
|
|
728
|
+ Provider.of<UserModel>(context,
|
|
|
|
729
|
+ listen: false)
|
|
|
|
730
|
+ .user
|
|
|
|
731
|
+ .openid);
|
|
403
|
print(isSuccess);
|
732
|
print(isSuccess);
|
|
404
|
}
|
733
|
}
|
|
405
|
},
|
734
|
},
|