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
+39 -13
View File
@@ -13,6 +13,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>
@@ -26,27 +32,38 @@ export default {
},
data() {
return {
webUrl: this.$VUE_APP_RESOURCES_URL,
list: [],
currentList: [],
isMore: false
}
},
mounted() {
const params = {
landmarkDataId: this.landmarkDataId,
page: 1,
limit: 99999
}
getPorjectPolicyFiles(params).then(res => {
this.list = res.data.records
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() {
const params = {
landmarkDataId: this.landmarkDataId,
page: 1,
limit: 99999
}
getPorjectPolicyFiles(params).then(res => {
this.list = res.data.records
if(this.isMore) {
this.currentList = this.list
} else {
this.currentList = this.list.filter((item, index) => index < 3)
}
})
},
showMore() {
this.isMore = !this.isMore
if(this.isMore) {
@@ -131,4 +148,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>