| | |
| | | return; |
| | | } |
| | | var mobileRegex = /^1\d{10}$/; |
| | | var landlineRegex = /^\d{3,4}-?\d{7,8}$/; |
| | | if (!mobileRegex.test(this.form.linkPhone) && !landlineRegex.test(this.form.linkPhone)) { |
| | | if (!mobileRegex.test(this.form.linkPhone)) { |
| | | uni.showToast({ |
| | | title: '请输入正确的手机号或固定电话', |
| | | title: '请输入正确的手机号', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | |
| | | if (!this.form.idcard) { |
| | | uni.showToast({ |
| | | title: '请输入联系人身份证号', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | | } |
| | | if (!/^\d{18}$/.test(this.form.idcard)) { |
| | | uni.showToast({ |
| | | title: '请输入18位身份证号', |
| | | icon: 'none' |
| | | }); |
| | | return; |
| | |
| | | }); |
| | | return _context.abrupt("return"); |
| | | case 19: |
| | | _context.next = 50; |
| | | _context.next = 53; |
| | | break; |
| | | case 21: |
| | | if (_this.form.legalPersonName) { |
| | |
| | | }); |
| | | return _context.abrupt("return"); |
| | | case 41: |
| | | if (_this.form.idcardImg) { |
| | | if (/^\d{18}$/.test(_this.form.legalPersonCard)) { |
| | | _context.next = 44; |
| | | break; |
| | | } |
| | | uni.showToast({ |
| | | title: '请输入18位身份证号', |
| | | icon: 'none' |
| | | }); |
| | | return _context.abrupt("return"); |
| | | case 44: |
| | | if (_this.form.idcardImg) { |
| | | _context.next = 47; |
| | | break; |
| | | } |
| | | uni.showToast({ |
| | |
| | | icon: 'none' |
| | | }); |
| | | return _context.abrupt("return"); |
| | | case 44: |
| | | case 47: |
| | | if (_this.form.idcardImgBack) { |
| | | _context.next = 47; |
| | | _context.next = 50; |
| | | break; |
| | | } |
| | | uni.showToast({ |
| | |
| | | icon: 'none' |
| | | }); |
| | | return _context.abrupt("return"); |
| | | case 47: |
| | | case 50: |
| | | if (_this.form.businessImg) { |
| | | _context.next = 50; |
| | | _context.next = 53; |
| | | break; |
| | | } |
| | | uni.showToast({ |
| | |
| | | icon: 'none' |
| | | }); |
| | | return _context.abrupt("return"); |
| | | case 50: |
| | | case 53: |
| | | if (_this.agreed) { |
| | | _context.next = 53; |
| | | _context.next = 56; |
| | | break; |
| | | } |
| | | uni.showToast({ |
| | |
| | | icon: 'none' |
| | | }); |
| | | return _context.abrupt("return"); |
| | | case 53: |
| | | case 56: |
| | | uni.showLoading({ |
| | | title: '提交中...', |
| | | mask: true |
| | | }); |
| | | _context.prev = 54; |
| | | _context.next = 57; |
| | | _context.prev = 57; |
| | | _context.next = 60; |
| | | return _this.$u.api.applyShop(_this.form); |
| | | case 57: |
| | | case 60: |
| | | res = _context.sent; |
| | | uni.hideLoading(); |
| | | if (res.code === 200) { |
| | |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | _context.next = 66; |
| | | _context.next = 69; |
| | | break; |
| | | case 62: |
| | | _context.prev = 62; |
| | | _context.t0 = _context["catch"](54); |
| | | case 65: |
| | | _context.prev = 65; |
| | | _context.t0 = _context["catch"](57); |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | title: '提交失败', |
| | | icon: 'none' |
| | | }); |
| | | case 66: |
| | | case 69: |
| | | case "end": |
| | | return _context.stop(); |
| | | } |
| | | } |
| | | }, _callee, null, [[54, 62]]); |
| | | }, _callee, null, [[57, 65]]); |
| | | }))(); |
| | | }, |
| | | getMyShopData: function getMyShopData() { |