@@ -18,6 +18,12 @@
|
||||
<view class="item-action v12-white"><u-icon name="arrow-right" color="#C52733 " size="12"></u-icon></view>
|
||||
</view>
|
||||
</view>
|
||||
<image
|
||||
v-if="list.length === 0"
|
||||
:src="webUrl + '/20231023131208675588.png'"
|
||||
class="img-nodata"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -31,22 +37,34 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
webUrl: this.$VUE_APP_RESOURCES_URL,
|
||||
list: [],
|
||||
currentList: [],
|
||||
isMore: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getPorjectRecommend({landmarkDataId: this.landmarkDataId}).then(res => {
|
||||
this.list = res.data
|
||||
if(this.isMore) {
|
||||
this.currentList = this.list
|
||||
} else {
|
||||
this.currentList = this.list.filter((item, index) => index < 3)
|
||||
watch: {
|
||||
landmarkDataId(value) {
|
||||
if(value) {
|
||||
this.getData()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getData() {
|
||||
getPorjectRecommend({landmarkDataId: this.landmarkDataId}).then(res => {
|
||||
this.list = res.data
|
||||
if(this.isMore) {
|
||||
this.currentList = this.list
|
||||
} else {
|
||||
this.currentList = this.list.filter((item, index) => index < 3)
|
||||
}
|
||||
})
|
||||
},
|
||||
toStore(id) {
|
||||
if (!id) {
|
||||
return
|
||||
@@ -131,4 +149,13 @@ export default {
|
||||
padding: 5rpx 20rpx;
|
||||
border-radius: 30rpx;
|
||||
}
|
||||
.img-nodata {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 0);
|
||||
width: 352rpx;
|
||||
height: 338rpx;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user