@@ -74,6 +74,12 @@
|
||||
class="no-data-loadend"
|
||||
/>
|
||||
</view>
|
||||
<image
|
||||
v-if="infoArray.length === 0"
|
||||
:src="webUrl + '/20231023131208675588.png'"
|
||||
class="img-nodata"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -97,17 +103,27 @@ export default {
|
||||
infoArray: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const params = {
|
||||
landmarkDataId: this.landmarkDataId,
|
||||
page: 1,
|
||||
limit: 9999
|
||||
watch: {
|
||||
landmarkDataId(value) {
|
||||
if(value) {
|
||||
this.getData()
|
||||
}
|
||||
}
|
||||
getNews(params).then(res => {
|
||||
this.infoArray = res.data.records
|
||||
})
|
||||
},
|
||||
created() {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
const params = {
|
||||
landmarkDataId: this.landmarkDataId,
|
||||
page: 1,
|
||||
limit: 9999
|
||||
}
|
||||
getNews(params).then(res => {
|
||||
this.infoArray = res.data.records
|
||||
})
|
||||
},
|
||||
likeInfoItemHandle(item, index, value, voValue) {
|
||||
hadLike({ landmarkNewsId: item.id }).then(res => {
|
||||
const { success } = res
|
||||
@@ -258,5 +274,14 @@ export default {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
.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