This commit is contained in:
2026-10-08 18:14:56 +08:00
parent dec4ebc773
commit 9cc1ff546c
1081 changed files with 238349 additions and 52163 deletions
+41 -31
View File
@@ -1,40 +1,50 @@
<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 class="text-50 font-bold">{{ info.name }}</view>
<view class="mt-20 text-gray text-28 pb-20 border-bottom">{{ info._add_time_str }}</view>
<view v-html="info.content" class="mt-20"></view>
</view>
<gap height="50"/>
<common-footer></common-footer>
<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 class="text-50 font-bold">{{ info.name }}</view>
<view class="mt-20 text-gray text-28 pb-20 border-bottom">{{ info._update_time ? info._update_time : info._add_time_str }}</view>
<view v-html="info.content" class="mt-20"></view>
</view>
<gap height="50"/>
<common-footer></common-footer>
</view>
</template>
<script>
export default {
name: "detail",
data() {
return {
info: {
name: '',
content: ''
}
}
},
onLoad(option) {
if (option.id) this.getInfo(option.id);
},
methods: {
async getInfo(id) {
this.info = await vk.callFunction({
url: `client/otherArticle/list/pub/getDetail`,
data: {id}
});
}
name: "detail",
data() {
return {
info: {
name: '',
content: ''
}
}
},
onLoad(option) {
if (option.id) {
this.getInfo(option.id);
this.addViewNum(option.id);
}
},
methods: {
async getInfo(id) {
const res = await vk.callFunction({
url: `client/otherArticle/list/pub/getDetail`,
data: {id}
});
this.info = res
},
addViewNum(_id){
vk.callFunction({
url: `client/otherArticle/list/pub/addViewNum`,
data: {_id}
});
}
}
}
</script>
+56 -3
View File
@@ -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>