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/shopDetail.vue | 29 +++++++++++++++++++++++++++--
manager/src/views/seller/shop/shopOperation.vue | 4 ++--
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/manager/src/views/seller/shop/shopDetail.vue b/manager/src/views/seller/shop/shopDetail.vue
index 85f6fda..07b507d 100644
--- a/manager/src/views/seller/shop/shopDetail.vue
+++ b/manager/src/views/seller/shop/shopDetail.vue
@@ -176,7 +176,9 @@
<p class="item">
<span class="label">韬唤璇佺収鐗囷細</span>
<span class="info">
- <img style="height: 100px;width: 100px" class="mr_10" v-for="item in storeInfo.legalPhoto" :src="item" :key="item">
+ <img style="height: 100px;width: 100px; cursor: pointer;" class="mr_10" v-for="(item, index) in storeInfo.legalPhoto" :src="item" :key="item" @click="previewImage(item, '韬唤璇佺収鐗�(' + (index + 1) + ')')">
+ <Button v-if="storeInfo.legalPhoto && storeInfo.legalPhoto.length > 0" @click="previewImage(storeInfo.legalPhoto[0], '韬唤璇佹闈�')" type="info" size="small" style="margin-left: 10px;">棰勮鍥剧墖</Button>
+ <Button v-if="storeInfo.legalPhoto && storeInfo.legalPhoto.length > 1" @click="previewImage(storeInfo.legalPhoto[1], '韬唤璇佸弽闈�')" type="info" size="small" style="margin-left: 10px;">棰勮鍥剧墖</Button>
</span>
</p>
<p class="item">
@@ -191,7 +193,8 @@
<p class="item">
<span class="label">钀ヤ笟鎵х収鐢靛瓙鐗堬細</span>
<span class="info">
- <img style="height: 100px;width: 100px" :src="storeInfo.licencePhoto">
+ <img style="height: 100px;width: 100px; cursor: pointer;" :src="storeInfo.licencePhoto" @click="previewImage(storeInfo.licencePhoto, '钀ヤ笟鎵х収')">
+ <Button v-if="storeInfo.licencePhoto" @click="previewImage(storeInfo.licencePhoto, '钀ヤ笟鎵х収')" type="info" size="small" style="margin-left: 10px;">棰勮鍥剧墖</Button>
</span>
</p>
<p class="item">
@@ -615,6 +618,14 @@
</Tabs>
</Card>
+ <!-- 鍥剧墖棰勮妯℃�佹 -->
+ <Modal v-model="previewModal" :title="previewTitle" width="600">
+ <img :src="previewImageUrl" alt="棰勮鍥剧墖" style="width: 100%; height: auto;" />
+ <div slot="footer">
+ <Button @click="previewModal = false">鍏抽棴</Button>
+ </div>
+ </Modal>
+
</div>
</template>
@@ -906,6 +917,10 @@
},
refundOrderData: [],//鍞悗鍗曟暟鎹�
refundOrderTotal: 0,//鍞悗鍗曟�绘潯鏁�
+ // 鍥剧墖棰勮鐩稿叧
+ previewModal: false,
+ previewImageUrl: "",
+ previewTitle: "鍥剧墖棰勮",
};
},
watch: {
@@ -1138,6 +1153,16 @@
this.refundOrderSearchForm.endDate = v[1];
}
},
+ // 鍥剧墖棰勮鍔熻兘
+ previewImage(url, title) {
+ if (url) {
+ this.previewImageUrl = url;
+ this.previewTitle = title || "鍥剧墖棰勮";
+ this.previewModal = true;
+ } else {
+ this.$Message.warning("鏆傛棤鍥剧墖鍙瑙�");
+ }
+ }
},
mounted() {
this.id = this.$route.query.id;
diff --git a/manager/src/views/seller/shop/shopOperation.vue b/manager/src/views/seller/shop/shopOperation.vue
index dc468bf..c29fe94 100644
--- a/manager/src/views/seller/shop/shopOperation.vue
+++ b/manager/src/views/seller/shop/shopOperation.vue
@@ -250,10 +250,10 @@
<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"
- >棰勮姝i潰</Button
+ >棰勮鍥剧墖</Button
>
<Button v-if="shopForm.legalPhoto[1]" @click="previewImage(shopForm.legalPhoto[1])" type="info" style="margin-left: 10px;"
- >棰勮鍙嶉潰</Button
+ >棰勮鍥剧墖</Button
>
</div>
</FormItem>
--
Gitblit v1.8.0