Feat: 地标好物(服务)

(cherry picked from commit d3957be379)
This commit is contained in:
linxi
2024-11-15 10:40:22 +08:00
parent b5c87c1edb
commit 5f9a6b358d
8 changed files with 258 additions and 51 deletions
+33 -8
View File
@@ -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>