Commit 394a2be222f49d699c1532fc723973bc3a042582

Authored by wdn127929
1 parent 58718afe

正在上传图片的时候,不能调用接口

@@ -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 */
@@ -548,7 +548,7 @@ @@ -548,7 +548,7 @@
548 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 548 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
549 CODE_SIGN_IDENTITY = "Apple Development"; 549 CODE_SIGN_IDENTITY = "Apple Development";
550 CODE_SIGN_STYLE = Automatic; 550 CODE_SIGN_STYLE = Automatic;
551 - CURRENT_PROJECT_VERSION = 542; 551 + CURRENT_PROJECT_VERSION = 5430;
552 DEVELOPMENT_TEAM = 8J59HM8B82; 552 DEVELOPMENT_TEAM = 8J59HM8B82;
553 ENABLE_BITCODE = NO; 553 ENABLE_BITCODE = NO;
554 FLUTTER_BUILD_MODE = release; 554 FLUTTER_BUILD_MODE = release;
@@ -699,10 +699,10 @@ @@ -699,10 +699,10 @@
699 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 699 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
700 CODE_SIGN_IDENTITY = "Apple Development"; 700 CODE_SIGN_IDENTITY = "Apple Development";
701 CODE_SIGN_STYLE = Automatic; 701 CODE_SIGN_STYLE = Automatic;
702 - CURRENT_PROJECT_VERSION = 542; 702 + CURRENT_PROJECT_VERSION = 5430;
703 DEVELOPMENT_TEAM = 8J59HM8B82; 703 DEVELOPMENT_TEAM = 8J59HM8B82;
704 ENABLE_BITCODE = NO; 704 ENABLE_BITCODE = NO;
705 - FLUTTER_BUILD_MODE = release; 705 + FLUTTER_BUILD_MODE = debug;
706 FLUTTER_ROOT = /Users/naji2021/Documents/flutter; 706 FLUTTER_ROOT = /Users/naji2021/Documents/flutter;
707 FLUTTER_TARGET = "/Users/naji2021/Desktop/Flutter-ReserveApp/lib/main.dart"; 707 FLUTTER_TARGET = "/Users/naji2021/Desktop/Flutter-ReserveApp/lib/main.dart";
708 FRAMEWORK_SEARCH_PATHS = ( 708 FRAMEWORK_SEARCH_PATHS = (
@@ -741,7 +741,7 @@ @@ -741,7 +741,7 @@
741 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 741 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
742 CODE_SIGN_IDENTITY = "Apple Development"; 742 CODE_SIGN_IDENTITY = "Apple Development";
743 CODE_SIGN_STYLE = Automatic; 743 CODE_SIGN_STYLE = Automatic;
744 - CURRENT_PROJECT_VERSION = 542; 744 + CURRENT_PROJECT_VERSION = 5430;
745 DEVELOPMENT_TEAM = 8J59HM8B82; 745 DEVELOPMENT_TEAM = 8J59HM8B82;
746 ENABLE_BITCODE = NO; 746 ENABLE_BITCODE = NO;
747 FLUTTER_BUILD_MODE = release; 747 FLUTTER_BUILD_MODE = release;
@@ -298,6 +298,84 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { @@ -298,6 +298,84 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> {
298 )); 298 ));
299 } 299 }
300 300
  301 + Widget _errorWidget() {
  302 + return Column(
  303 + children: [
  304 + Expanded(
  305 + child: SingleChildScrollView(
  306 + child: Column(
  307 + children: [
  308 + VEmptyView(384),
  309 + Row(
  310 + mainAxisAlignment: MainAxisAlignment.center,
  311 + children: [
  312 + Image.asset(
  313 + Utils.getImgPath('error_circle'),
  314 + width: w(70),
  315 + ),
  316 + HEmptyView(20),
  317 + Text(
  318 + '出错了!',
  319 + style: TextStyle(
  320 + color: MyColours.color_E34D59, fontSize: font(20)),
  321 + )
  322 + ],
  323 + ),
  324 + VEmptyView(100),
  325 + Padding(
  326 + padding: EdgeInsets.symmetric(horizontal: w(20)),
  327 + child: Text(
  328 + '您输入的店铺名字:\nxxx和商家\nxxx\n高度重合,如果您是这家店铺的工作人员,请与店铺管理员(xxx)联系增员,谢谢!',
  329 + style: TextStyle(
  330 + color: MyColours.color_515151, fontSize: font(16)),
  331 + ))
  332 + ],
  333 + ),
  334 + )),
  335 + Container(
  336 + margin: EdgeInsets.only(
  337 + left: w(23), top: w(10), right: w(21), bottom: w(25)),
  338 + child: Row(
  339 + children: [
  340 + RoundButton(
  341 + text: '不是店员,继续注册',
  342 + isBold: true,
  343 + width: w(218),
  344 + height: w(43),
  345 + fontSize: 32,
  346 + textColor: MyColours.color_438E93,
  347 + gradientStart: MyColours.color_ffffff,
  348 + gradientEnd: MyColours.color_ffffff,
  349 + borderColor: MyColours.color_438E93,
  350 + radius: 10,
  351 + onPressed: () {
  352 + //再一次提交原来的数据,标识是第二次提交
  353 + },
  354 + ),
  355 + HEmptyView(28),
  356 + Expanded(
  357 + child: RoundButton(
  358 + text: '朕知道了',
  359 + isBold: true,
  360 + height: w(43),
  361 + fontSize: 32,
  362 + radius: 10,
  363 + textColor: MyColours.color_ffffff,
  364 + gradientStart: MyColours.color_438E93,
  365 + gradientEnd: MyColours.color_438E93,
  366 + borderColor: MyColours.color_438E93,
  367 + onPressed: () {
  368 + //
  369 + Navigator.pop(context);
  370 + },
  371 + ))
  372 + ],
  373 + ),
  374 + )
  375 + ],
  376 + );
  377 + }
  378 +
301 @override 379 @override
302 Widget build(BuildContext context) { 380 Widget build(BuildContext context) {
303 collectStoreProvider = 381 collectStoreProvider =
@@ -307,287 +385,292 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { @@ -307,287 +385,292 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> {
307 child: Scaffold( 385 child: Scaffold(
308 backgroundColor: MyColours.color_ffffff, 386 backgroundColor: MyColours.color_ffffff,
309 appBar: SystemAppBar('店铺信息'), 387 appBar: SystemAppBar('店铺信息'),
310 - body: Column(  
311 - children: [  
312 - Expanded(  
313 - child: SingleChildScrollView(  
314 - child: Column(  
315 - children: [  
316 - VEmptyView(50),  
317 - Container(  
318 - padding: EdgeInsets.symmetric(  
319 - horizontal: w(20), vertical: w(15)),  
320 - child: Text('在开始之前,请告诉我们关于您的一些信息,以方便专属客服给您提供周到的服务。',  
321 - style: TextStyle(  
322 - height: 1.5,  
323 - fontSize: font(16),  
324 - color: MyColours.color_000000))),  
325 - VEmptyView(40),  
326 - _textFeildWidget(nameC, '店铺名称:', '点击输入店铺名称'),  
327 - _divider(),  
328 - VEmptyView(20),  
329 - _addressWidget('店铺地址:', storeAddress, () {  
330 - //  
331 - FocusScope.of(context)  
332 - .requestFocus(FocusNode()); //点击空白处隐藏键盘  
333 - Utils.getPickPermission(context, () async {  
334 - var address =  
335 - await NavigatorUtil.goMapChoicePointPage(context);  
336 - if (address != null && address is Map) {  
337 - setState(() {  
338 - storeAddress = address['address']; 388 + body: true
  389 + ? _errorWidget()
  390 + : Column(
  391 + children: [
  392 + Expanded(
  393 + child: SingleChildScrollView(
  394 + child: Column(
  395 + children: [
  396 + VEmptyView(50),
  397 + Container(
  398 + padding: EdgeInsets.symmetric(
  399 + horizontal: w(20), vertical: w(15)),
  400 + child: Text(
  401 + '在开始之前,请告诉我们关于您的一些信息,以方便专属客服给您提供周到的服务。',
  402 + style: TextStyle(
  403 + height: 1.5,
  404 + fontSize: font(16),
  405 + color: MyColours.color_000000))),
  406 + VEmptyView(40),
  407 + _textFeildWidget(nameC, '店铺名称:', '点击输入店铺名称'),
  408 + _divider(),
  409 + VEmptyView(20),
  410 + _addressWidget('店铺地址:', storeAddress, () {
  411 + //
  412 + FocusScope.of(context)
  413 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  414 + Utils.getPickPermission(context, () async {
  415 + var address =
  416 + await NavigatorUtil.goMapChoicePointPage(
  417 + context);
  418 + if (address != null && address is Map) {
  419 + setState(() {
  420 + storeAddress = address['address'];
339 421
340 - lat = double.parse(address['lat'].toString());  
341 - lng = double.parse(address['lng'].toString());  
342 - });  
343 - }  
344 - }, Permission.location);  
345 - }),  
346 - _divider(),  
347 - VEmptyView(20),  
348 - _addressWidget('城市选择:', cityString, () async {  
349 - FocusScope.of(context)  
350 - .requestFocus(FocusNode()); //点击空白处隐藏键盘  
351 - Result result = await CityPickers.showCityPicker(  
352 - context: context,  
353 - borderRadius: r(8),  
354 - cancelWidget: Container(  
355 - padding: EdgeInsets.symmetric(  
356 - horizontal: w(20), vertical: w(20)),  
357 - child: Text(  
358 - '取消',  
359 - style: TextStyle(  
360 - color: MyColours.color_515151,  
361 - fontSize: ScreenUtil().setSp(32)),  
362 - ),  
363 - ),  
364 - confirmWidget: Container(  
365 - padding: EdgeInsets.symmetric(  
366 - horizontal: w(20), vertical: w(20)),  
367 - child: Text(  
368 - '确定',  
369 - style: TextStyle(  
370 - color: MyColours.color_438E93,  
371 - fontSize: ScreenUtil().setSp(32)),  
372 - ),  
373 - ),  
374 - theme: ThemeData(  
375 - textTheme: TextTheme(  
376 - bodyText1: TextStyle(  
377 - fontSize: font(11),  
378 - // fontWeight: FontWeight.w200,  
379 - ),  
380 - )));  
381 - print(result);  
382 - if (result != null) {  
383 - proCode = result.provinceId;  
384 - cityCode = result.cityId;  
385 - disCode = result.areaId;  
386 - cityString = result.provinceName +  
387 - result.cityName +  
388 - result.areaName;  
389 - setState(() {});  
390 - }  
391 - }),  
392 - _divider(),  
393 - VEmptyView(20),  
394 - _textFeildWidget(personC, '联系人:', '点击输入您的姓名'),  
395 - _divider(),  
396 - VEmptyView(20),  
397 - _textFeildWidget(phoneC, '联系电话:', '点击输入您的电话号码'),  
398 - _divider(),  
399 - VEmptyView(20), 422 + lat = double.parse(address['lat'].toString());
  423 + lng = double.parse(address['lng'].toString());
  424 + });
  425 + }
  426 + }, Permission.location);
  427 + }),
  428 + _divider(),
  429 + VEmptyView(20),
  430 + _addressWidget('城市选择:', cityString, () async {
  431 + FocusScope.of(context)
  432 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  433 + Result result = await CityPickers.showCityPicker(
  434 + context: context,
  435 + borderRadius: r(8),
  436 + cancelWidget: Container(
  437 + padding: EdgeInsets.symmetric(
  438 + horizontal: w(20), vertical: w(20)),
  439 + child: Text(
  440 + '取消',
  441 + style: TextStyle(
  442 + color: MyColours.color_515151,
  443 + fontSize: ScreenUtil().setSp(32)),
  444 + ),
  445 + ),
  446 + confirmWidget: Container(
  447 + padding: EdgeInsets.symmetric(
  448 + horizontal: w(20), vertical: w(20)),
  449 + child: Text(
  450 + '确定',
  451 + style: TextStyle(
  452 + color: MyColours.color_438E93,
  453 + fontSize: ScreenUtil().setSp(32)),
  454 + ),
  455 + ),
  456 + theme: ThemeData(
  457 + textTheme: TextTheme(
  458 + bodyText1: TextStyle(
  459 + fontSize: font(11),
  460 + // fontWeight: FontWeight.w200,
  461 + ),
  462 + )));
  463 + print(result);
  464 + if (result != null) {
  465 + proCode = result.provinceId;
  466 + cityCode = result.cityId;
  467 + disCode = result.areaId;
  468 + cityString = result.provinceName +
  469 + result.cityName +
  470 + result.areaName;
  471 + setState(() {});
  472 + }
  473 + }),
  474 + _divider(),
  475 + VEmptyView(20),
  476 + _textFeildWidget(personC, '联系人:', '点击输入您的姓名'),
  477 + _divider(),
  478 + VEmptyView(20),
  479 + _textFeildWidget(phoneC, '联系电话:', '点击输入您的电话号码'),
  480 + _divider(),
  481 + VEmptyView(20),
400 482
401 - _textFeildWidgetBtn(codeC, '验证码:', '点击输入验证码'),  
402 - _divider(),  
403 - VEmptyView(20),  
404 - // Container(  
405 - // height: ScreenUtil().setHeight(52 * 2),  
406 - // // width: ScreenUtil().setWidth(611),  
407 - // padding:  
408 - // EdgeInsets.only(left: ScreenUtil().setWidth(20)),  
409 - // margin: EdgeInsets.only(top: ScreenUtil().setHeight(8)),  
410 - // alignment: Alignment.center,  
411 - // decoration: BoxDecoration(  
412 - // border: Border.all(  
413 - // color: MyColours.color_bff6f7,  
414 - // width: ScreenUtil().setWidth(2)),  
415 - // borderRadius: BorderRadius.circular(  
416 - // ScreenUtil().setWidth(10))),  
417 - // child: Row(  
418 - // crossAxisAlignment: CrossAxisAlignment.center,  
419 - // children: <Widget>[  
420 - // HEmptyView(30),  
421 - // Text(  
422 - // "验证码",  
423 - // style: TextStyle(  
424 - // color: MyColours.color_333333,  
425 - // fontSize: ScreenUtil().setSp(26)),  
426 - // ),  
427 - // HEmptyView(30),  
428 - // Expanded(  
429 - // child: TextField(  
430 - // focusNode: _codeNode,  
431 - // style: TextStyle(  
432 - // color: MyColours.color_353535,  
433 - // fontSize: ScreenUtil().setSp(28)),  
434 - // decoration: InputDecoration(  
435 - // hintText: "请输入验证码",  
436 - // hintStyle: TextStyle(  
437 - // color: MyColours.color_999999,  
438 - // fontSize: ScreenUtil().setSp(26)),  
439 - // contentPadding: EdgeInsets.zero,  
440 - // border: OutlineInputBorder(  
441 - // borderSide: BorderSide.none),  
442 - // // contentPadding: EdgeInsets.fromLTRB(  
443 - // // 0,  
444 - // // ScreenUtil().setWidth(28),  
445 - // // ScreenUtil().setWidth(30),  
446 - // // ScreenUtil().setWidth(28)),  
447 - // ),  
448 - // onChanged: (value) {  
449 - // code = value;  
450 - // },  
451 - // onEditingComplete: () {  
452 - // FocusScope.of(context)  
453 - // .requestFocus(FocusNode()); //点击空白处隐藏键盘  
454 - // },  
455 - // keyboardType: TextInputType.numberWithOptions(  
456 - // decimal: true),  
457 - // ),  
458 - // ), 483 + _textFeildWidgetBtn(codeC, '验证码:', '点击输入验证码'),
  484 + _divider(),
  485 + VEmptyView(20),
  486 + // Container(
  487 + // height: ScreenUtil().setHeight(52 * 2),
  488 + // // width: ScreenUtil().setWidth(611),
  489 + // padding:
  490 + // EdgeInsets.only(left: ScreenUtil().setWidth(20)),
  491 + // margin: EdgeInsets.only(top: ScreenUtil().setHeight(8)),
  492 + // alignment: Alignment.center,
  493 + // decoration: BoxDecoration(
  494 + // border: Border.all(
  495 + // color: MyColours.color_bff6f7,
  496 + // width: ScreenUtil().setWidth(2)),
  497 + // borderRadius: BorderRadius.circular(
  498 + // ScreenUtil().setWidth(10))),
  499 + // child: Row(
  500 + // crossAxisAlignment: CrossAxisAlignment.center,
  501 + // children: <Widget>[
  502 + // HEmptyView(30),
  503 + // Text(
  504 + // "验证码",
  505 + // style: TextStyle(
  506 + // color: MyColours.color_333333,
  507 + // fontSize: ScreenUtil().setSp(26)),
  508 + // ),
  509 + // HEmptyView(30),
  510 + // Expanded(
  511 + // child: TextField(
  512 + // focusNode: _codeNode,
  513 + // style: TextStyle(
  514 + // color: MyColours.color_353535,
  515 + // fontSize: ScreenUtil().setSp(28)),
  516 + // decoration: InputDecoration(
  517 + // hintText: "请输入验证码",
  518 + // hintStyle: TextStyle(
  519 + // color: MyColours.color_999999,
  520 + // fontSize: ScreenUtil().setSp(26)),
  521 + // contentPadding: EdgeInsets.zero,
  522 + // border: OutlineInputBorder(
  523 + // borderSide: BorderSide.none),
  524 + // // contentPadding: EdgeInsets.fromLTRB(
  525 + // // 0,
  526 + // // ScreenUtil().setWidth(28),
  527 + // // ScreenUtil().setWidth(30),
  528 + // // ScreenUtil().setWidth(28)),
  529 + // ),
  530 + // onChanged: (value) {
  531 + // code = value;
  532 + // },
  533 + // onEditingComplete: () {
  534 + // FocusScope.of(context)
  535 + // .requestFocus(FocusNode()); //点击空白处隐藏键盘
  536 + // },
  537 + // keyboardType: TextInputType.numberWithOptions(
  538 + // decimal: true),
  539 + // ),
  540 + // ),
459 541
460 - // ],  
461 - // )),  
462 - ],  
463 - ))),  
464 - Container(  
465 - height: ScreenUtil().setWidth(191 * 2),  
466 - width: double.infinity,  
467 - padding: EdgeInsets.only(  
468 - top: ScreenUtil().setWidth(16 * 2),  
469 - bottom: ScreenUtil().setWidth(35 * 2),  
470 - // left: ScreenUtil().setWidth(45 * 2),  
471 - // right: ScreenUtil().setWidth(45 * 2),  
472 - ),  
473 - decoration: BoxDecoration(  
474 - color: MyColours.color_ffffff,  
475 - // boxShadow: [  
476 - // BoxShadow(  
477 - // spreadRadius: ScreenUtil().setWidth(2),  
478 - // color: Color.fromRGBO(0, 0, 0, 0.1),  
479 - // offset: Offset(0, ScreenUtil().setWidth(-2)),  
480 - // blurRadius: ScreenUtil().setWidth(8))  
481 - // ],  
482 - // borderRadius: BorderRadius.all(  
483 - // Radius.circular(ScreenUtil().setWidth(16)),  
484 - // ),  
485 - ),  
486 - child: Column(  
487 - children: [  
488 - Container(  
489 - padding: EdgeInsets.symmetric(  
490 - horizontal: w(20), vertical: w(15)),  
491 - child: Text(  
492 - '注:如果您的店铺已经在使用周到安排为客户预订包间,请联系管理员给您创建使用账号。',  
493 - style: TextStyle(  
494 - height: 1.5,  
495 - fontSize: font(14),  
496 - color: MyColours.color_000000))),  
497 - VEmptyView(24),  
498 - RoundButton(  
499 - text: '提交',  
500 - height: ScreenUtil().setWidth(80),  
501 - radius: ScreenUtil().setWidth(10),  
502 - isBold: true,  
503 - margin: EdgeInsets.only(  
504 - left: ScreenUtil().setWidth(45 * 2),  
505 - right: ScreenUtil().setWidth(45 * 2), 542 + // ],
  543 + // )),
  544 + ],
  545 + ))),
  546 + Container(
  547 + height: ScreenUtil().setWidth(191 * 2),
  548 + width: double.infinity,
  549 + padding: EdgeInsets.only(
  550 + top: ScreenUtil().setWidth(16 * 2),
  551 + bottom: ScreenUtil().setWidth(35 * 2),
  552 + // left: ScreenUtil().setWidth(45 * 2),
  553 + // right: ScreenUtil().setWidth(45 * 2),
506 ), 554 ),
507 - fontSize: 32,  
508 - textColor: MyColours.color_F8F9FD,  
509 - onPressed: () async {  
510 - //判空  
511 - if (nameC.text.trim().length == 0) {  
512 - Utils.showToast('请输入店铺名称');  
513 - return;  
514 - }  
515 - // if (storeAddress == '点击设置您的地址') {  
516 - // Utils.showToast('请设置您的地址');  
517 - // return;  
518 - // }  
519 - if (cityString == '点击设置您的城市') {  
520 - Utils.showToast('请设置您的城市');  
521 - return;  
522 - }  
523 - if (personC.text.trim().length == 0) {  
524 - Utils.showToast('请输入联系人');  
525 - return;  
526 - } 555 + decoration: BoxDecoration(
  556 + color: MyColours.color_ffffff,
  557 + // boxShadow: [
  558 + // BoxShadow(
  559 + // spreadRadius: ScreenUtil().setWidth(2),
  560 + // color: Color.fromRGBO(0, 0, 0, 0.1),
  561 + // offset: Offset(0, ScreenUtil().setWidth(-2)),
  562 + // blurRadius: ScreenUtil().setWidth(8))
  563 + // ],
  564 + // borderRadius: BorderRadius.all(
  565 + // Radius.circular(ScreenUtil().setWidth(16)),
  566 + // ),
  567 + ),
  568 + child: Column(
  569 + children: [
  570 + Container(
  571 + padding: EdgeInsets.symmetric(
  572 + horizontal: w(20), vertical: w(15)),
  573 + child: Text(
  574 + '注:如果您的店铺已经在使用周到安排为客户预订包间,请联系管理员给您创建使用账号。',
  575 + style: TextStyle(
  576 + height: 1.5,
  577 + fontSize: font(14),
  578 + color: MyColours.color_000000))),
  579 + VEmptyView(24),
  580 + RoundButton(
  581 + text: '提交',
  582 + height: ScreenUtil().setWidth(80),
  583 + radius: ScreenUtil().setWidth(10),
  584 + isBold: true,
  585 + margin: EdgeInsets.only(
  586 + left: ScreenUtil().setWidth(45 * 2),
  587 + right: ScreenUtil().setWidth(45 * 2),
  588 + ),
  589 + fontSize: 32,
  590 + textColor: MyColours.color_F8F9FD,
  591 + onPressed: () async {
  592 + //判空
  593 + if (nameC.text.trim().length == 0) {
  594 + Utils.showToast('请输入店铺名称');
  595 + return;
  596 + }
  597 + // if (storeAddress == '点击设置您的地址') {
  598 + // Utils.showToast('请设置您的地址');
  599 + // return;
  600 + // }
  601 + if (cityString == '点击设置您的城市') {
  602 + Utils.showToast('请设置您的城市');
  603 + return;
  604 + }
  605 + if (personC.text.trim().length == 0) {
  606 + Utils.showToast('请输入联系人');
  607 + return;
  608 + }
527 609
528 - if (phoneC.text.trim().length == 0) {  
529 - Utils.showToast('请输入联系电话');  
530 - return;  
531 - }  
532 - if (phoneC.text.trim() != '18601216909') {  
533 - if (code == null || code.trim().length == 0) {  
534 - Utils.showToast('请输入验证码');  
535 - return;  
536 - }  
537 - if (otherLoginProvider.code != null &&  
538 - !codeEnabled) {  
539 - Utils.showToast('验证码已失效,请重新获取');  
540 - return;  
541 - }  
542 - if (otherLoginProvider.code == null) {  
543 - Utils.showToast('请获取验证码');  
544 - return;  
545 - }  
546 - if (otherLoginProvider.code != code) {  
547 - Utils.showToast('您输入的验证码不正确,请重新输入');  
548 - return;  
549 - }  
550 - } 610 + if (phoneC.text.trim().length == 0) {
  611 + Utils.showToast('请输入联系电话');
  612 + return;
  613 + }
  614 + if (phoneC.text.trim() != '18601216909') {
  615 + if (code == null ||
  616 + code.trim().length == 0) {
  617 + Utils.showToast('请输入验证码');
  618 + return;
  619 + }
  620 + if (otherLoginProvider.code != null &&
  621 + !codeEnabled) {
  622 + Utils.showToast('验证码已失效,请重新获取');
  623 + return;
  624 + }
  625 + if (otherLoginProvider.code == null) {
  626 + Utils.showToast('请获取验证码');
  627 + return;
  628 + }
  629 + if (otherLoginProvider.code != code) {
  630 + Utils.showToast('您输入的验证码不正确,请重新输入');
  631 + return;
  632 + }
  633 + }
551 634
552 - FocusScope.of(context)  
553 - .requestFocus(FocusNode()); //点击空白处隐藏键盘  
554 - Map<String, String> params = {  
555 - 'sellername': nameC.text,  
556 - 'phone': phoneC.text,  
557 - 'rname': personC.text,  
558 - 'pro_code': proCode,  
559 - 'city_code': cityCode,  
560 - 'dis_code': disCode,  
561 - };  
562 - if (storeAddress != '点击设置您的地址') {  
563 - //填写了地址  
564 - params['map_address'] = storeAddress;  
565 - params['lat'] = lat.toString();  
566 - params['long'] = lng.toString();  
567 - }  
568 - bool success = await collectStoreProvider  
569 - .setSellerCollect(context, params);  
570 - if (success) {  
571 - if (phoneC.text.trim() != '18601216909') {  
572 - await collectStoreProvider  
573 - .sendIntention(context, {  
574 - "shopname": nameC.text,  
575 - "shopnumber": phoneC.text,  
576 - "name": personC.text,  
577 - "address": storeAddress,  
578 - "laiyuan": 'app'  
579 - });  
580 - } 635 + FocusScope.of(context)
  636 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  637 + Map<String, String> params = {
  638 + 'sellername': nameC.text,
  639 + 'phone': phoneC.text,
  640 + 'rname': personC.text,
  641 + 'pro_code': proCode,
  642 + 'city_code': cityCode,
  643 + 'dis_code': disCode,
  644 + };
  645 + if (storeAddress != '点击设置您的地址') {
  646 + //填写了地址
  647 + params['map_address'] = storeAddress;
  648 + params['lat'] = lat.toString();
  649 + params['long'] = lng.toString();
  650 + }
  651 + bool success = await collectStoreProvider
  652 + .setSellerCollect(context, params);
  653 + if (success) {
  654 + if (phoneC.text.trim() != '18601216909') {
  655 + await collectStoreProvider
  656 + .sendIntention(context, {
  657 + "shopname": nameC.text,
  658 + "shopnumber": phoneC.text,
  659 + "name": personC.text,
  660 + "address": storeAddress,
  661 + "laiyuan": 'app'
  662 + });
  663 + }
581 664
582 - //成功  
583 - NavigatorUtil.goCompleteStorePage(context,  
584 - replace: true);  
585 - }  
586 - },  
587 - ),  
588 - ],  
589 - ))  
590 - ],  
591 - ))); 665 + //成功
  666 + NavigatorUtil.goCompleteStorePage(context,
  667 + replace: true);
  668 + }
  669 + },
  670 + ),
  671 + ],
  672 + ))
  673 + ],
  674 + )));
592 } 675 }
593 } 676 }
@@ -722,6 +722,11 @@ class _BaseInfoPageState extends State<BaseInfoPage> { @@ -722,6 +722,11 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
722 ScreenUtil().setWidth(56)), 722 ScreenUtil().setWidth(56)),
723 child: RoundButton( 723 child: RoundButton(
724 onPressed: () { 724 onPressed: () {
  725 + if (_uploadImageProvider.touxiang.process < 1 &&
  726 + _uploadImageProvider.touxiang.process > 0) {
  727 + Utils.showToast('正在上传图片,请稍等!');
  728 + return;
  729 + }
725 if (_phoneController.text.trim().length == 0 || 730 if (_phoneController.text.trim().length == 0 ||
726 _nameController.text.trim().length == 0) { 731 _nameController.text.trim().length == 0) {
727 Utils.showToast('请至少填写您的姓名和电话'); 732 Utils.showToast('请至少填写您的姓名和电话');
@@ -180,6 +180,12 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> { @@ -180,6 +180,12 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> {
180 180
181 ///添加菜品 181 ///添加菜品
182 _addCookbook({bool showLoading = true}) async { 182 _addCookbook({bool showLoading = true}) async {
  183 + bool canDelete = false;
  184 + if (uploadImageProvider.dish.process < 1 &&
  185 + uploadImageProvider.dish.process > 0) {
  186 + Utils.showToast('正在上传菜品图片,请稍等!');
  187 + return false;
  188 + }
183 if (_nameController.text.trim().length == 0) { 189 if (_nameController.text.trim().length == 0) {
184 Utils.showToast('请输入菜品名称'); 190 Utils.showToast('请输入菜品名称');
185 return; 191 return;
@@ -228,6 +234,7 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> { @@ -228,6 +234,7 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> {
228 } 234 }
229 if (uploadImageProvider.dish.qiniuUrl != null && 235 if (uploadImageProvider.dish.qiniuUrl != null &&
230 uploadImageProvider.dish.qiniuUrl != '') { 236 uploadImageProvider.dish.qiniuUrl != '') {
  237 + canDelete = true;
231 params['image'] = uploadImageProvider.dish.qiniuUrl; 238 params['image'] = uploadImageProvider.dish.qiniuUrl;
232 } 239 }
233 if (selectPracticeShow != null && selectPracticeShow != '') { 240 if (selectPracticeShow != null && selectPracticeShow != '') {
@@ -261,7 +268,7 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> { @@ -261,7 +268,7 @@ class _MenuAddDishesPageState extends State<MenuAddDishesPage> {
261 268
262 if (sucess) { 269 if (sucess) {
263 if (uploadImageProvider.dish.qiniuUrl != null && 270 if (uploadImageProvider.dish.qiniuUrl != null &&
264 - uploadImageProvider.dish.qiniuUrl != '') { 271 + uploadImageProvider.dish.qiniuUrl != '' && canDelete) {
265 // imgAll和images 比较,挑出不一样的,删除七牛云 272 // imgAll和images 比较,挑出不一样的,删除七牛云
266 Set<String> difference = Set.from(imgAll) 273 Set<String> difference = Set.from(imgAll)
267 ..removeAll([uploadImageProvider.dish.qiniuUrl]); 274 ..removeAll([uploadImageProvider.dish.qiniuUrl]);
@@ -2,6 +2,7 @@ import 'dart:convert'; @@ -2,6 +2,7 @@ import 'dart:convert';
2 2
3 import 'package:flutter/material.dart'; 3 import 'package:flutter/material.dart';
4 import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 import 'package:flutter_screenutil/flutter_screenutil.dart';
  5 +import 'package:one_key/models/upload_img_model.dart';
5 import 'package:one_key/pages/online_check/img_picker_widget.dart'; 6 import 'package:one_key/pages/online_check/img_picker_widget.dart';
6 import 'package:one_key/pages/online_check/img_picker_widget_f.dart'; 7 import 'package:one_key/pages/online_check/img_picker_widget_f.dart';
7 import 'package:one_key/provider/message_dialog_model.dart'; 8 import 'package:one_key/provider/message_dialog_model.dart';
@@ -843,23 +844,37 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> { @@ -843,23 +844,37 @@ class _OnlineCheckEditPageState extends State<OnlineCheckEditPage> {
843 onPress: () async { 844 onPress: () async {
844 if (btnState == 1) { 845 if (btnState == 1) {
845 _focusNode.unfocus(); 846 _focusNode.unfocus();
846 - if (_editingController.text  
847 - .startsWith('¥') &&  
848 - _editingController.text.length == 1) {  
849 - Utils.showToast('请输入金额');  
850 - setState(() {  
851 - btnState = -1;  
852 - });  
853 - return; 847 + bool can = true;
  848 + innerloop:
  849 + for (UploadImgModel item
  850 + in _uploadImageProvider.imageList) {
  851 + if (item.process > 0 &&
  852 + item.process < 1) {
  853 + Utils.showToast('正在上传,请稍等');
  854 + // return false;
  855 + can = false;
  856 + break innerloop;
  857 + }
854 } 858 }
855 - DialogUtil.confirmDialog(  
856 - context, _editingController.text, 438,  
857 - onTap: () {  
858 - if (Navigator.canPop(context)) {  
859 - Navigator.pop(context); 859 + if (can) {
  860 + if (_editingController.text
  861 + .startsWith('¥') &&
  862 + _editingController.text.length == 1) {
  863 + Utils.showToast('请输入金额');
  864 + setState(() {
  865 + btnState = -1;
  866 + });
  867 + return;
860 } 868 }
861 - _updateOrderInfo();  
862 - }); 869 + DialogUtil.confirmDialog(
  870 + context, _editingController.text, 438,
  871 + onTap: () {
  872 + if (Navigator.canPop(context)) {
  873 + Navigator.pop(context);
  874 + }
  875 + _updateOrderInfo();
  876 + });
  877 + }
863 } 878 }
864 }, 879 },
865 )) 880 ))
@@ -724,6 +724,11 @@ class _BaseInfoPageSimState extends State<BaseInfoPageSim> { @@ -724,6 +724,11 @@ class _BaseInfoPageSimState extends State<BaseInfoPageSim> {
724 ScreenUtil().setWidth(56)), 724 ScreenUtil().setWidth(56)),
725 child: RoundButton( 725 child: RoundButton(
726 onPressed: () { 726 onPressed: () {
  727 + if (_uploadImageProvider.touxiang.process < 1 &&
  728 + _uploadImageProvider.touxiang.process > 0) {
  729 + Utils.showToast('正在上传图片,请稍等!');
  730 + return;
  731 + }
727 if (_phoneController.text.trim().length == 0 || 732 if (_phoneController.text.trim().length == 0 ||
728 _nameController.text.trim().length == 0) { 733 _nameController.text.trim().length == 0) {
729 Utils.showToast('请至少填写您的姓名和电话'); 734 Utils.showToast('请至少填写您的姓名和电话');