|
|
@@ -52,23 +52,24 @@
|
|
|
|
|
|
<view class="detail-item">
|
|
|
<text class="detail-label">门头照片</text>
|
|
|
- <image
|
|
|
- class="detail-image"
|
|
|
- :src="patrolDetails.storefrontPhoto"
|
|
|
- mode="aspectFill"
|
|
|
- @click="previewImage(patrolDetails.storefrontPhoto)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="detail-item no-border">
|
|
|
- <text class="detail-label">陈列照片</text>
|
|
|
- <image v-for="item in patrolDetails.displayPhoto"
|
|
|
- class="detail-image"
|
|
|
- :src="item"
|
|
|
- mode="aspectFill"
|
|
|
- @click="previewImage(item)"
|
|
|
- ></image>
|
|
|
- </view>
|
|
|
+ <image
|
|
|
+ class="detail-image"
|
|
|
+ :src="patrolDetails.storefrontPhoto"
|
|
|
+ mode="aspectFill"
|
|
|
+ @click="previewImage([patrolDetails.storefrontPhoto], patrolDetails.storefrontPhoto)"
|
|
|
+ ></image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="detail-item no-border">
|
|
|
+ <text class="detail-label">陈列照片</text>
|
|
|
+ <image v-for="item in patrolDetails.displayPhoto"
|
|
|
+ :key="item"
|
|
|
+ class="detail-image"
|
|
|
+ :src="item"
|
|
|
+ mode="aspectFill"
|
|
|
+ @click="previewImage(patrolDetails.displayPhoto, item)"
|
|
|
+ ></image>
|
|
|
+ </view>
|
|
|
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -148,13 +149,13 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 图片预览
|
|
|
- previewImage(currentUrl) {
|
|
|
- const urls = [this.patrolDetails.storefrontPhoto, this.patrolDetails.displayPhoto].filter(url => url);
|
|
|
- uni.previewImage({
|
|
|
- urls: urls,
|
|
|
- current: currentUrl
|
|
|
- });
|
|
|
- }
|
|
|
+ previewImage(urls, currentUrl) {
|
|
|
+ const previewUrls = Array.isArray(urls) ? urls.filter(url => url) : [urls].filter(url => url);
|
|
|
+ uni.previewImage({
|
|
|
+ urls: previewUrls,
|
|
|
+ current: currentUrl
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|