20261008
This commit is contained in:
@@ -1,13 +1,66 @@
|
||||
<template>
|
||||
|
||||
<view>
|
||||
<top-bar></top-bar>
|
||||
<common-header></common-header>
|
||||
<category-bar></category-bar>
|
||||
<gap height="50"/>
|
||||
<view class="w-1200 m-a bg-white p-40">
|
||||
<view v-for="(item, index) in list" :key="index"
|
||||
@click="navTo(item._id)"
|
||||
class="py-30 border-bottom flex justify-between items-center pointer">
|
||||
<text class="font-bold">{{ item.name }}</text>
|
||||
<text class="text-gray">{{ item._add_time_str }}</text>
|
||||
</view>
|
||||
<view class="text-center">
|
||||
<el-pagination
|
||||
:page-size="pageSize"
|
||||
@current-change="getList"
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</view>
|
||||
</view>
|
||||
<gap height="50"/>
|
||||
<common-footer></common-footer>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "list",
|
||||
data() {
|
||||
return {}
|
||||
return {
|
||||
list: [],
|
||||
parentId: null,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
getList(pageIndex) {
|
||||
vk.callFunction({
|
||||
url: 'client/otherArticle/list/pub/getList',
|
||||
pageSize: this.pageSize,
|
||||
pageIndex,
|
||||
data: {
|
||||
parentId: this.parentId
|
||||
},
|
||||
success: res => {
|
||||
this.list = res.rows;
|
||||
this.total = res.total;
|
||||
}
|
||||
})
|
||||
},
|
||||
navTo(id) {
|
||||
vk.navigateTo({
|
||||
url: `/pages/otherArticle/detail?id=${id}`
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options) this.parentId = options.id;
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user