From ae64e55532c608894c156ab7d1955a34cfe3a7f2 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Wed, 5 Aug 2026 16:18:44 +0800 Subject: [PATCH] 1 --- package3/shop/merchantRegister.vue | 193 ++++++++++++++++++++++------- 1 file changed, 150 insertions(+), 43 deletions(-) diff --git a/package3/shop/merchantRegister.vue b/package3/shop/merchantRegister.vue index 108a33b..de5968d 100644 --- a/package3/shop/merchantRegister.vue +++ b/package3/shop/merchantRegister.vue @@ -46,15 +46,18 @@ - - + + 门头图 - - - + + + + + + + × - @@ -120,23 +123,24 @@ - - + + 法人身份证正反面 - - - + + + + × - - + + - + + × @@ -158,29 +162,40 @@ - - + + 营业执照 - - - + + + + + + + × - - - + + 其他补充证照 - - - - - - {{formData.qita.length}} + + + + + + + + + + + × + + + @@ -408,10 +423,18 @@ } }); }, - pictureAdd(type) { + pictureAdd(type, index) { let that = this + let count = type == 'qita' ? 9 - this.formData.qita.length : 1 + if(type == 'qita' && index !== undefined) { + count = 1 + } + if(type == 'qita' && count <= 0) { + this.tui.toast('最多上传9张补充证照') + return + } uni.chooseMedia({ - count: type == 'qita'?9:1, + count: count, mediaType: ['image'], sourceType: ['camera', 'album'], success(res) { @@ -420,13 +443,13 @@ mask: true }) for (let i = 0; i < res.tempFiles.length; i++) { - that.upLoadFile(res.tempFiles[i].tempFilePath,type) + that.upLoadFile(res.tempFiles[i].tempFilePath,type,index) } } }) }, - async upLoadFile(path,type) { + async upLoadFile(path,type,index) { let that = this; let hiver_token = uni.getStorageSync("hiver_token") await uni.uploadFile({ @@ -448,6 +471,8 @@ that.formData.yingyezhizhao = pathData.result }else if(type == 'mentou'){ that.formData.shopIcon = pathData.result + }else if(index !== undefined){ + that.formData.qita.splice(index, 1, pathData.result) }else{ that.formData.qita.push(pathData.result) } @@ -466,6 +491,20 @@ uni.hideLoading(); }, 1000) }, + deleteImage(type,index) { + if(type == 'zheng'){ + this.formData.zhengzhao = '' + }else if(type == 'fan'){ + this.formData.fanzhao = '' + }else if(type == 'yingye'){ + this.formData.yingyezhizhao = '' + }else if(type == 'mentou'){ + this.formData.shopIcon = '' + }else if(index !== undefined){ + this.formData.qita.splice(index, 1) + } + this.$forceUpdate() + }, // 触发提交表单 submit() { let that = this; @@ -930,30 +969,98 @@ border: 1rpx dashed rgba(11, 155, 115, 0.26); box-shadow: inset 0 0 0 1rpx rgba(255, 255, 255, 0.8); object-fit: cover; + line-height: 180rpx; + text-align: center; } - .id-card-upload .upload-img { - width: 160rpx; - height: 160rpx; - line-height: 160rpx !important; + .image-row { + height: 220rpx; + align-items: center; } - .red-dot { + .image-name { + width: 240rpx; + flex: 0 0 240rpx; + line-height: 42rpx; + white-space: nowrap; + } + + .single-upload { + flex: 0 0 180rpx; + display: flex; + justify-content: flex-end; + } + + .image-card { + position: relative; + width: 180rpx; + height: 180rpx; + flex: 0 0 auto; + } + + .delete-img { position: absolute; - top: 4rpx; - right: -8rpx; + top: -12rpx; + right: -12rpx; + z-index: 2; width: 42rpx; height: 42rpx; - line-height: 42rpx; + line-height: 38rpx; text-align: center; + border: 4rpx solid #fff; border-radius: 50%; background: #ff5b5b; color: #fff; - font-size: 22rpx; - font-weight: 800; + font-size: 28rpx; + font-weight: 900; + box-sizing: border-box; box-shadow: 0 6rpx 14rpx rgba(255, 91, 91, 0.3); } + .id-card-upload { + flex: 0 0 340rpx; + display: flex; + justify-content: flex-end; + } + + .id-card-upload .image-card { + width: 160rpx; + height: 160rpx; + } + + .id-card-upload .image-card + .image-card { + margin-left: 20rpx; + } + + .id-card-upload .upload-img { + width: 160rpx; + height: 160rpx; + line-height: 160rpx !important; + } + + .supplement-upload { + min-width: 0; + } + + .supplement-scroll { + width: 100%; + white-space: nowrap; + } + + .supplement-list { + display: inline-flex; + align-items: center; + padding: 10rpx 0; + } + + .supplement-card { + margin-left: 20rpx; + } + + .supplement-card:first-child { + margin-left: 0; + } + button { width: 100%; height: 96rpx;