From 7a4b8764b68e0dbaeb90e292a8a4bd47cb379e68 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期一, 27 四月 2026 17:26:02 +0800
Subject: [PATCH] 小程序端和PC端bug修复

---
 small-program/unpackage/dist/dev/mp-weixin/pages/store-apply/store-apply.js |  254 ++++++++++++++++++++++++--------------------------
 1 files changed, 120 insertions(+), 134 deletions(-)

diff --git a/small-program/unpackage/dist/dev/mp-weixin/pages/store-apply/store-apply.js b/small-program/unpackage/dist/dev/mp-weixin/pages/store-apply/store-apply.js
index a83baf9..daf1e1b 100644
--- a/small-program/unpackage/dist/dev/mp-weixin/pages/store-apply/store-apply.js
+++ b/small-program/unpackage/dist/dev/mp-weixin/pages/store-apply/store-apply.js
@@ -101,10 +101,10 @@
 try {
   components = {
     uIcon: function () {
-      return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 467))
+      return Promise.all(/*! import() | node-modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-icon/u-icon.vue */ 475))
     },
     uPicker: function () {
-      return Promise.all(/*! import() | node-modules/uview-ui/components/u-picker/u-picker */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-picker/u-picker")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-picker/u-picker.vue */ 518))
+      return Promise.all(/*! import() | node-modules/uview-ui/components/u-picker/u-picker */[__webpack_require__.e("common/vendor"), __webpack_require__.e("node-modules/uview-ui/components/u-picker/u-picker")]).then(__webpack_require__.bind(null, /*! uview-ui/components/u-picker/u-picker.vue */ 526))
     },
   }
 } catch (e) {
@@ -130,36 +130,6 @@
   var _c = _vm._self._c || _h
   var g0 =
     _vm.currentStep === 1 ? _vm.areaList && _vm.areaList.length > 0 : null
-  var m0 =
-    !(_vm.currentStep === 1) &&
-    _vm.qualificationType === "personal" &&
-    !!_vm.form.idcardImg
-      ? _vm.getFullPath(_vm.form.idcardImg)
-      : null
-  var m1 =
-    !(_vm.currentStep === 1) &&
-    _vm.qualificationType === "personal" &&
-    !!_vm.form.idcardImgBack
-      ? _vm.getFullPath(_vm.form.idcardImgBack)
-      : null
-  var m2 =
-    !(_vm.currentStep === 1) &&
-    !(_vm.qualificationType === "personal") &&
-    !!_vm.form.legalPersonCard
-      ? _vm.getFullPath(_vm.form.legalPersonCard)
-      : null
-  var m3 =
-    !(_vm.currentStep === 1) &&
-    !(_vm.qualificationType === "personal") &&
-    !!_vm.form.legalPersonCardBack
-      ? _vm.getFullPath(_vm.form.legalPersonCardBack)
-      : null
-  var m4 =
-    !(_vm.currentStep === 1) &&
-    !(_vm.qualificationType === "personal") &&
-    !!_vm.form.businessImg
-      ? _vm.getFullPath(_vm.form.businessImg)
-      : null
   if (!_vm._isMounted) {
     _vm.e0 = function ($event) {
       _vm.currentStep = 1
@@ -174,6 +144,15 @@
       _vm.showAreaPicker = false
     }
     _vm.e4 = function ($event) {
+      _vm.form.companyType = 0
+    }
+    _vm.e5 = function ($event) {
+      _vm.form.companyType = 1
+    }
+    _vm.e6 = function ($event) {
+      _vm.agreed = !_vm.agreed
+    }
+    _vm.e7 = function ($event) {
       _vm.currentStep = 1
     }
   }
@@ -182,11 +161,6 @@
     {
       $root: {
         g0: g0,
-        m0: m0,
-        m1: m1,
-        m2: m2,
-        m3: m3,
-        m4: m4,
       },
     }
   )
@@ -246,6 +220,7 @@
   }),
   data: function data() {
     return {
+      agreed: false,
       form: {
         telephone: '',
         companyType: 0,
@@ -268,6 +243,7 @@
         laborContractImgs: [],
         socialSecurityImgs: [],
         legalPersonCard: '',
+        legalPersonCardFront: '',
         legalPersonCardBack: '',
         legalPersonName: '',
         legalPersonPhone: '',
@@ -275,10 +251,14 @@
         aliName: '',
         businessImg: ''
       },
+      businessImgUrl: '',
+      idcardImgUrl: '',
+      idcardImgBackUrl: '',
+      legalPersonCardFrontUrl: '',
+      legalPersonCardBackUrl: '',
       previewMode: 'filled',
       imgPrefix: '',
       currentStep: 1,
-      qualificationType: 'company',
       showAreaPicker: false,
       areaList: [],
       areaColumns: [],
@@ -290,7 +270,6 @@
       uploadedSocialSecurityImages: [],
       storeFrontImages: [],
       idCardImages: [],
-      businessImages: [],
       permitImages: [],
       laborContractImages: [],
       socialSecurityImages: []
@@ -361,9 +340,10 @@
       }
       this.currentStep = 2;
     },
-    switchQualification: function switchQualification(type) {
-      this.qualificationType = type;
-      this.form.companyType = type === 'personal' ? 0 : 1;
+    goToService: function goToService(type) {
+      uni.navigateTo({
+        url: '/pages/rich-text/rich-text?type=' + type
+      });
     },
     submitApply: function submitApply() {
       var _this = this;
@@ -437,7 +417,7 @@
                 });
                 return _context.abrupt("return");
               case 19:
-                _context.next = 39;
+                _context.next = 44;
                 break;
               case 21:
                 if (_this.form.legalPersonName) {
@@ -475,13 +455,23 @@
                   break;
                 }
                 uni.showToast({
-                  title: '璇蜂笂浼犳硶浜鸿韩浠借瘉浜哄儚闈�',
+                  title: '璇疯緭鍏ユ硶浜鸿韩浠借瘉鍙�',
                   icon: 'none'
                 });
                 return _context.abrupt("return");
               case 33:
-                if (_this.form.legalPersonCardBack) {
+                if (_this.form.legalPersonCardFront) {
                   _context.next = 36;
+                  break;
+                }
+                uni.showToast({
+                  title: '璇蜂笂浼犳硶浜鸿韩浠借瘉浜哄儚闈�',
+                  icon: 'none'
+                });
+                return _context.abrupt("return");
+              case 36:
+                if (_this.form.legalPersonCardBack) {
+                  _context.next = 39;
                   break;
                 }
                 uni.showToast({
@@ -489,9 +479,9 @@
                   icon: 'none'
                 });
                 return _context.abrupt("return");
-              case 36:
+              case 39:
                 if (_this.form.businessImg) {
-                  _context.next = 39;
+                  _context.next = 42;
                   break;
                 }
                 uni.showToast({
@@ -499,15 +489,28 @@
                   icon: 'none'
                 });
                 return _context.abrupt("return");
-              case 39:
+              case 42:
+                _this.form.idcardImgBack = _this.form.legalPersonCardBack;
+                _this.form.idcardImg = _this.form.legalPersonCardFront;
+              case 44:
+                if (_this.agreed) {
+                  _context.next = 47;
+                  break;
+                }
+                uni.showToast({
+                  title: '璇峰厛闃呰骞跺悓鎰忓崗璁�',
+                  icon: 'none'
+                });
+                return _context.abrupt("return");
+              case 47:
                 uni.showLoading({
                   title: '鎻愪氦涓�...',
                   mask: true
                 });
-                _context.prev = 40;
-                _context.next = 43;
+                _context.prev = 48;
+                _context.next = 51;
                 return _this.$u.api.applyShop(_this.form);
-              case 43:
+              case 51:
                 res = _context.sent;
                 uni.hideLoading();
                 if (res.code === 200) {
@@ -524,22 +527,22 @@
                     icon: 'none'
                   });
                 }
-                _context.next = 52;
+                _context.next = 60;
                 break;
-              case 48:
-                _context.prev = 48;
-                _context.t0 = _context["catch"](40);
+              case 56:
+                _context.prev = 56;
+                _context.t0 = _context["catch"](48);
                 uni.hideLoading();
                 uni.showToast({
                   title: '鎻愪氦澶辫触',
                   icon: 'none'
                 });
-              case 52:
+              case 60:
               case "end":
                 return _context.stop();
             }
           }
-        }, _callee, null, [[40, 48]]);
+        }, _callee, null, [[48, 56]]);
       }))();
     },
     getMyShopData: function getMyShopData() {
@@ -576,6 +579,11 @@
                   _this2.form.telephone = data.telephone || _this2.userInfo.telephone || '';
                   _this2.form.legalPersonName = data.legalPersonName || '';
                   _this2.form.legalPersonPhone = data.legalPersonPhone || '';
+                  _this2.businessImgUrl = data.businessImgUrl || '';
+                  _this2.idcardImgUrl = data.idcardImgUrl || '';
+                  _this2.idcardImgBackUrl = data.idcardImgBackUrl || '';
+                  _this2.legalPersonCardFrontUrl = data.idcardImgUrl || '';
+                  _this2.legalPersonCardBackUrl = data.idcardImgBackUrl || '';
                   _this2.qualificationType = data.companyType === 0 ? 'personal' : 'company';
                   if (data.storeFrontImgs) {
                     _this2.storeFrontImages = data.storeFrontImgUrls;
@@ -627,9 +635,6 @@
                   _this2.form.legalPersonCard = data.legalPersonCard || '';
                   _this2.form.legalPersonCardBack = data.legalPersonCardBack || '';
                   _this2.form.businessImg = data.businessImg || '';
-                  if (data.businessImg) {
-                    _this2.businessImages = [data.businessImgUrl];
-                  }
                 }
                 _context2.next = 10;
                 break;
@@ -844,9 +849,9 @@
                                 };
                               })));
                               _this7.storeFrontImages = [].concat((0, _toConsumableArray2.default)(_this7.storeFrontImages), (0, _toConsumableArray2.default)(fullPaths));
-                              _this7.form.storeFrontImgs = _this7.storeFrontImages.map(function (url) {
-                                return _this7.getShortPath(url);
-                              });
+                              _this7.form.storeFrontImgs = [].concat((0, _toConsumableArray2.default)(_this7.form.storeFrontImgs), (0, _toConsumableArray2.default)(uploadResults.map(function (item) {
+                                return item.imgaddr;
+                              })));
                               uni.hideLoading();
                               uni.showToast({
                                 title: '涓婁紶鎴愬姛',
@@ -938,9 +943,9 @@
                                 };
                               })));
                               _this9.idCardImages = [].concat((0, _toConsumableArray2.default)(_this9.idCardImages), (0, _toConsumableArray2.default)(fullPaths));
-                              _this9.form.storeInteriorImgs = _this9.idCardImages.map(function (url) {
-                                return _this9.getShortPath(url);
-                              });
+                              _this9.form.storeInteriorImgs = [].concat((0, _toConsumableArray2.default)(_this9.form.storeInteriorImgs), (0, _toConsumableArray2.default)(uploadResults.map(function (item) {
+                                return item.imgaddr;
+                              })));
                               uni.hideLoading();
                               uni.showToast({
                                 title: '涓婁紶鎴愬姛',
@@ -984,31 +989,17 @@
     chooseBusinessImage: function chooseBusinessImage() {
       var _this11 = this;
       return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
-        var maxCount, currentCount, remainingCount;
         return _regenerator.default.wrap(function _callee9$(_context9) {
           while (1) {
             switch (_context9.prev = _context9.next) {
               case 0:
-                maxCount = 3;
-                currentCount = _this11.businessImages.length;
-                remainingCount = maxCount - currentCount;
-                if (!(remainingCount <= 0)) {
-                  _context9.next = 6;
-                  break;
-                }
-                uni.showToast({
-                  title: "\u6700\u591A\u4E0A\u4F20".concat(maxCount, "\u5F20\u56FE\u7247"),
-                  icon: 'none'
-                });
-                return _context9.abrupt("return");
-              case 6:
                 uni.chooseImage({
-                  count: remainingCount,
+                  count: 1,
                   sizeType: ['compressed'],
                   sourceType: ['album', 'camera'],
                   success: function () {
                     var _success3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(res) {
-                      var tempFilePaths, uploadResults, fullPaths;
+                      var tempFilePaths, uploadResults;
                       return _regenerator.default.wrap(function _callee8$(_context8) {
                         while (1) {
                           switch (_context8.prev = _context8.next) {
@@ -1020,38 +1011,29 @@
                               });
                               _context8.prev = 2;
                               _context8.next = 5;
-                              return _this11.uploadFiles(tempFilePaths, maxCount);
+                              return _this11.uploadFiles(tempFilePaths, 1);
                             case 5:
                               uploadResults = _context8.sent;
-                              fullPaths = uploadResults.map(function (item) {
-                                return item.url || item.path || item;
-                              });
-                              _this11.uploadedImagesBusiness = [].concat((0, _toConsumableArray2.default)(_this11.uploadedImagesBusiness), (0, _toConsumableArray2.default)(fullPaths.map(function (url) {
-                                return {
-                                  url: url
-                                };
-                              })));
-                              _this11.businessImages = [].concat((0, _toConsumableArray2.default)(_this11.businessImages), (0, _toConsumableArray2.default)(fullPaths));
-                              _this11.form.businessImg = _this11.businessImages.map(function (url) {
-                                return _this11.getShortPath(url);
-                              }).join(',');
+                              _this11.form.businessImg = uploadResults[0].imgaddr;
+                              _this11.businessImgUrl = uploadResults[0].url;
+                              console.log("=======================", _this11.businessImgUrl);
                               uni.hideLoading();
                               uni.showToast({
                                 title: '涓婁紶鎴愬姛',
                                 icon: 'success'
                               });
-                              _context8.next = 17;
+                              _context8.next = 16;
                               break;
-                            case 14:
-                              _context8.prev = 14;
+                            case 13:
+                              _context8.prev = 13;
                               _context8.t0 = _context8["catch"](2);
                               uni.hideLoading();
-                            case 17:
+                            case 16:
                             case "end":
                               return _context8.stop();
                           }
                         }
-                      }, _callee8, null, [[2, 14]]);
+                      }, _callee8, null, [[2, 13]]);
                     }));
                     function success(_x3) {
                       return _success3.apply(this, arguments);
@@ -1059,7 +1041,7 @@
                     return success;
                   }()
                 });
-              case 7:
+              case 1:
               case "end":
                 return _context9.stop();
             }
@@ -1126,9 +1108,9 @@
                                 };
                               })));
                               _this13.permitImages = [].concat((0, _toConsumableArray2.default)(_this13.permitImages), (0, _toConsumableArray2.default)(fullPaths));
-                              _this13.form.otherMaterialImgs = _this13.permitImages.map(function (url) {
-                                return _this13.getShortPath(url);
-                              });
+                              _this13.form.otherMaterialImgs = [].concat((0, _toConsumableArray2.default)(_this13.form.otherMaterialImgs), (0, _toConsumableArray2.default)(uploadResults.map(function (item) {
+                                return item.imgaddr;
+                              })));
                               uni.hideLoading();
                               uni.showToast({
                                 title: '涓婁紶鎴愬姛',
@@ -1184,24 +1166,25 @@
                     return _this14.uploadFiles(tempFilePaths, 1);
                   case 5:
                     uploadResults = _context12.sent;
-                    _this14.form.idcardImg = _this14.getShortPath(uploadResults[0].url || uploadResults[0].path || uploadResults[0]);
+                    _this14.form.idcardImg = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0];
+                    _this14.idcardImgUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0];
                     uni.hideLoading();
                     uni.showToast({
                       title: '涓婁紶鎴愬姛',
                       icon: 'success'
                     });
-                    _context12.next = 14;
+                    _context12.next = 15;
                     break;
-                  case 11:
-                    _context12.prev = 11;
+                  case 12:
+                    _context12.prev = 12;
                     _context12.t0 = _context12["catch"](2);
                     uni.hideLoading();
-                  case 14:
+                  case 15:
                   case "end":
                     return _context12.stop();
                 }
               }
-            }, _callee12, null, [[2, 11]]);
+            }, _callee12, null, [[2, 12]]);
           }));
           function success(_x5) {
             return _success5.apply(this, arguments);
@@ -1233,24 +1216,25 @@
                     return _this15.uploadFiles(tempFilePaths, 1);
                   case 5:
                     uploadResults = _context13.sent;
-                    _this15.form.idcardImgBack = _this15.getShortPath(uploadResults[0].url || uploadResults[0].path || uploadResults[0]);
+                    _this15.form.idcardImgBack = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0];
+                    _this15.idcardImgBackUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0];
                     uni.hideLoading();
                     uni.showToast({
                       title: '涓婁紶鎴愬姛',
                       icon: 'success'
                     });
-                    _context13.next = 14;
+                    _context13.next = 15;
                     break;
-                  case 11:
-                    _context13.prev = 11;
+                  case 12:
+                    _context13.prev = 12;
                     _context13.t0 = _context13["catch"](2);
                     uni.hideLoading();
-                  case 14:
+                  case 15:
                   case "end":
                     return _context13.stop();
                 }
               }
-            }, _callee13, null, [[2, 11]]);
+            }, _callee13, null, [[2, 12]]);
           }));
           function success(_x6) {
             return _success6.apply(this, arguments);
@@ -1282,24 +1266,25 @@
                     return _this16.uploadFiles(tempFilePaths, 1);
                   case 5:
                     uploadResults = _context14.sent;
-                    _this16.form.legalPersonCard = _this16.getShortPath(uploadResults[0].url || uploadResults[0].path || uploadResults[0]);
+                    _this16.form.legalPersonCardFront = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0];
+                    _this16.legalPersonCardFrontUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0];
                     uni.hideLoading();
                     uni.showToast({
                       title: '涓婁紶鎴愬姛',
                       icon: 'success'
                     });
-                    _context14.next = 14;
+                    _context14.next = 15;
                     break;
-                  case 11:
-                    _context14.prev = 11;
+                  case 12:
+                    _context14.prev = 12;
                     _context14.t0 = _context14["catch"](2);
                     uni.hideLoading();
-                  case 14:
+                  case 15:
                   case "end":
                     return _context14.stop();
                 }
               }
-            }, _callee14, null, [[2, 11]]);
+            }, _callee14, null, [[2, 12]]);
           }));
           function success(_x7) {
             return _success7.apply(this, arguments);
@@ -1331,24 +1316,25 @@
                     return _this17.uploadFiles(tempFilePaths, 1);
                   case 5:
                     uploadResults = _context15.sent;
-                    _this17.form.legalPersonCardBack = _this17.getShortPath(uploadResults[0].url || uploadResults[0].path || uploadResults[0]);
+                    _this17.form.legalPersonCardBack = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0];
+                    _this17.legalPersonCardBackUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0];
                     uni.hideLoading();
                     uni.showToast({
                       title: '涓婁紶鎴愬姛',
                       icon: 'success'
                     });
-                    _context15.next = 14;
+                    _context15.next = 15;
                     break;
-                  case 11:
-                    _context15.prev = 11;
+                  case 12:
+                    _context15.prev = 12;
                     _context15.t0 = _context15["catch"](2);
                     uni.hideLoading();
-                  case 14:
+                  case 15:
                   case "end":
                     return _context15.stop();
                 }
               }
-            }, _callee15, null, [[2, 11]]);
+            }, _callee15, null, [[2, 12]]);
           }));
           function success(_x8) {
             return _success8.apply(this, arguments);
@@ -1416,9 +1402,9 @@
                                 };
                               })));
                               _this19.laborContractImages = [].concat((0, _toConsumableArray2.default)(_this19.laborContractImages), (0, _toConsumableArray2.default)(fullPaths));
-                              _this19.form.laborContractImgs = _this19.laborContractImages.map(function (url) {
-                                return _this19.getShortPath(url);
-                              });
+                              _this19.form.laborContractImgs = [].concat((0, _toConsumableArray2.default)(_this19.form.laborContractImgs), (0, _toConsumableArray2.default)(uploadResults.map(function (item) {
+                                return item.imgaddr;
+                              })));
                               uni.hideLoading();
                               uni.showToast({
                                 title: '涓婁紶鎴愬姛',
@@ -1524,9 +1510,9 @@
                                 };
                               })));
                               _this21.socialSecurityImages = [].concat((0, _toConsumableArray2.default)(_this21.socialSecurityImages), (0, _toConsumableArray2.default)(fullPaths));
-                              _this21.form.socialSecurityImgs = _this21.socialSecurityImages.map(function (url) {
-                                return _this21.getShortPath(url);
-                              });
+                              _this21.form.socialSecurityImgs = [].concat((0, _toConsumableArray2.default)(_this21.form.socialSecurityImgs), (0, _toConsumableArray2.default)(uploadResults.map(function (item) {
+                                return item.imgaddr;
+                              })));
                               uni.hideLoading();
                               uni.showToast({
                                 title: '涓婁紶鎴愬姛',

--
Gitblit v1.9.3