From 61d8f6fc00e4fa295971a32439cc7d3b8e87621a Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期一, 27 十月 2025 16:02:19 +0800
Subject: [PATCH] 页面调整图片预览

---
 manager/src/views/seller/shop/shopOperation.vue |   46 ++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/manager/src/views/seller/shop/shopOperation.vue b/manager/src/views/seller/shop/shopOperation.vue
index 1693e7b..c29fe94 100644
--- a/manager/src/views/seller/shop/shopOperation.vue
+++ b/manager/src/views/seller/shop/shopOperation.vue
@@ -73,11 +73,14 @@
                   shape="square"
                   icon="ios-person"
                   size="default"
-                  :src="endpoint + '/' + shopForm.storeLogo"
+                  :src="shopForm.storeLogo"
                 />
                 <div>
                   <Button @click="handleCLickImg('storeLogo')" type="primary"
                     >閫夋嫨鍥剧墖</Button
+                  >
+                  <Button v-if="shopForm.storeLogo" @click="previewImage(shopForm.storeLogo)" type="info" style="margin-left: 10px;"
+                    >棰勮鍥剧墖</Button
                   >
                 </div>
               </FormItem>
@@ -208,11 +211,14 @@
                   shape="square"
                   icon="ios-person"
                   size="default"
-                  :src="endpoint + '/' + shopForm.licencePhoto"
+                  :src="shopForm.licencePhoto"
                 />
                 <div>
                   <Button @click="handleCLickImg('licencePhoto')" type="primary"
                   >閫夋嫨鍥剧墖</Button
+                  >
+                  <Button v-if="shopForm.licencePhoto" @click="previewImage(shopForm.licencePhoto)" type="info" style="margin-left: 10px;"
+                  >棰勮鍥剧墖</Button
                   >
                 </div>
               </FormItem>
@@ -231,7 +237,7 @@
                   size="100"
                   icon="md-add"
                   @click.native="handleCLickImg('legalPhoto', 0)"
-                  :src="endpoint + '/' + shopForm.legalPhoto[0]"
+                  :src="shopForm.legalPhoto[0]"
                 />
                 <Avatar
                   class="ml_10 legal-photo"
@@ -239,9 +245,17 @@
                   size="100"
                   icon="md-add"
                   @click.native="handleCLickImg('legalPhoto', 1)"
-                  :src="endpoint + '/' + shopForm.legalPhoto[1]"
+                  :src=" shopForm.legalPhoto[1]"
                 />
                 <span>鐐瑰嚮鍥剧墖涓婁紶韬唤璇佹鍙嶉潰锛岃姹傝韩浠借瘉娓呮櫚锛屽洓瑙掓棤缂烘紡</span>
+                <div v-if="shopForm.legalPhoto[0] || shopForm.legalPhoto[1]" style="margin-top: 10px;">
+                  <Button v-if="shopForm.legalPhoto[0]" @click="previewImage(shopForm.legalPhoto[0])" type="info"
+                  >棰勮鍥剧墖</Button
+                  >
+                  <Button v-if="shopForm.legalPhoto[1]" @click="previewImage(shopForm.legalPhoto[1])" type="info" style="margin-left: 10px;"
+                  >棰勮鍥剧墖</Button
+                  >
+                </div>
               </FormItem>
 
               <Divider orientation="left">缁撶畻閾惰淇℃伅</Divider>
@@ -404,6 +418,14 @@
       </div>
     </Modal>
 
+    <!-- 鍥剧墖棰勮妯℃�佹 -->
+    <Modal v-model="previewModal" title="鍥剧墖棰勮" width="600">
+      <img :src="previewImageUrl" alt="棰勮鍥剧墖" style="width: 100%; height: auto;" />
+      <div slot="footer">
+        <Button @click="previewModal = false">鍏抽棴</Button>
+      </div>
+    </Modal>
+
     <multipleMap ref="map" @callback="getAddress" />
   </div>
 </template>
@@ -477,7 +499,7 @@
           { required: true, message: "鑱旂郴浜烘墜鏈哄彿涓嶈兘涓虹┖" },
           {
             type: "string",
-            pattern: /^1[3|4|5|6|7|8][0-9]{9}$/,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]{9}$/,
             message: "鎵嬫満鍙锋牸寮忓嚭閿�",
             trigger: "blur",
           },
@@ -499,7 +521,7 @@
         salesConsigneeMobile: [
           {
             type: "string",
-            pattern: /^1[3|4|5|6|7|8][0-9]{9}$/,
+            pattern: /^1[3|4|5|6|7|8|9][0-9]{9}$/,
             message: "鎵嬫満鍙锋牸寮忓嚭閿�",
             trigger: "blur",
           },
@@ -550,6 +572,9 @@
       infoResult: {}, // 搴楅摵璇︽儏
       picIndex: "", // 瀛樺偍韬唤璇佸浘鐗囦笅鏍囷紝鏂逛究璧嬪��
       currentAddress:"", //褰撳墠閫変腑鐨勫湴鍧�
+      // 鍥剧墖棰勮鐩稿叧
+      previewModal: false,
+      previewImageUrl: "",
     };
   },
   methods: {
@@ -839,6 +864,15 @@
         });
       }
     },
+    // 鍥剧墖棰勮鍔熻兘
+    previewImage(url) {
+      if (url) {
+        this.previewImageUrl = url;
+        this.previewModal = true;
+      } else {
+        this.$Message.warning("鏆傛棤鍥剧墖鍙瑙�");
+      }
+    }
   },
   created() {
     this.init();

--
Gitblit v1.8.0