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 | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/manager/src/views/seller/shop/shopOperation.vue b/manager/src/views/seller/shop/shopOperation.vue
index 97c5324..c29fe94 100644
--- a/manager/src/views/seller/shop/shopOperation.vue
+++ b/manager/src/views/seller/shop/shopOperation.vue
@@ -79,6 +79,9 @@
<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>
@@ -214,6 +217,9 @@
<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>
<Divider orientation="left">娉曚汉淇℃伅</Divider>
@@ -242,6 +248,14 @@
: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>
@@ -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