Feat: 寻趣味改版(新增古镇模块)

This commit is contained in:
linxi
2024-12-12 18:06:03 +08:00
parent 07bccb8b68
commit 50cbe66332
9 changed files with 955 additions and 22 deletions
+70
View File
@@ -0,0 +1,70 @@
<template>
<view>
<view class="culture v12-d-grid-columns-2">
<view class="img-item " v-for="(item, index) in list" :key="index" @click="viewImg(item)">
<image class="img-item" :src="item" mode="widthFix|heightFix" lazy-load="false"></image>
</view>
</view>
<image
v-if="list.length === 0"
:src="webUrl + '/orderIcon/wu.png'"
class="img-nodata"
mode="scaleToFill"
/>
</view>
</template>
<script>
export default {
props: {
list: {
type: Array,
default: () => []
}
},
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
}
},
watch: {
landmarkDataId(value) {
if(value) {
this.getData()
}
}
},
methods: {
viewImg(item) {
uni.previewImage({
current: item, // 当前显示图片的http链接
urls: this.list || [] // 需要预览的图片http链接列表
})
}
}
}
</script>
<style lang="scss" scoped>
.culture{
grid-gap: 20rpx 20rpx;
padding: 20rpx;
background: #fff;
border-radius: 30rpx;
margin-top: 20rpx;
}
.img-item{
width: 340rpx;
height: 340rpx;
border-radius: 30rpx;
}
.img-nodata {
position: relative;
top: 0;
left: 50%;
transform: translate(-50%, 0);
width: 352rpx;
height: 338rpx;
margin-bottom: 60rpx;
}
</style>