|
@@ -21,20 +21,20 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="display: flex; flex-direction: column; padding: 5px 10px">
|
|
<div style="display: flex; flex-direction: column; padding: 5px 10px">
|
|
|
- <span style="font-size: 16px; font-weight: bold">{{ item.title }}</span>
|
|
|
|
|
|
|
+ <span style="font-size: 16px; font-weight: bold">{{ item.courseName }}</span>
|
|
|
<span style="font-size: 12px">{{ item.description }}</span>
|
|
<span style="font-size: 12px">{{ item.description }}</span>
|
|
|
<span style="font-size: 12px">{{ item.name }}</span>
|
|
<span style="font-size: 12px">{{ item.name }}</span>
|
|
|
<div style="display: flex; justify-content: space-between">
|
|
<div style="display: flex; justify-content: space-between">
|
|
|
<div style="display: flex; justify-content: center; align-items: center">
|
|
<div style="display: flex; justify-content: center; align-items: center">
|
|
|
<FieldTimeOutlined />
|
|
<FieldTimeOutlined />
|
|
|
<div style="width: 5px"></div>
|
|
<div style="width: 5px"></div>
|
|
|
- <span style="font-size: 12px">{{ item.time }}</span>
|
|
|
|
|
|
|
+ <span style="font-size: 12px">{{ tool.formatTimestamp(item.publishTime) }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div style="display: flex; justify-content: center; align-items: center">
|
|
<div style="display: flex; justify-content: center; align-items: center">
|
|
|
<EyeOutlined />
|
|
<EyeOutlined />
|
|
|
<div style="width: 5px"></div>
|
|
<div style="width: 5px"></div>
|
|
|
- <span style="font-size: 12px">{{ item.look }}</span>
|
|
|
|
|
|
|
+ <span style="font-size: 12px">{{ item.viewCount }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -50,7 +50,7 @@
|
|
|
|
|
|
|
|
<div style="height: 20px"></div>
|
|
<div style="height: 20px"></div>
|
|
|
<div style="display: flex; width: 100%; align-items: center; justify-content: center">
|
|
<div style="display: flex; width: 100%; align-items: center; justify-content: center">
|
|
|
- <a-pagination v-model:current="currentPage" :total="total" show-size-changer />
|
|
|
|
|
|
|
+ <a-pagination v-model:current="currentPage.current" :total="total" @change="onChange" show-size-changer />
|
|
|
</div>
|
|
</div>
|
|
|
<div style="height: 20px"></div>
|
|
<div style="height: 20px"></div>
|
|
|
</div>
|
|
</div>
|
|
@@ -59,24 +59,29 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
|
import TabSwitcher from './TabSwitcher.vue'
|
|
import TabSwitcher from './TabSwitcher.vue'
|
|
|
|
|
+ import { list } from '@/api/portal'
|
|
|
|
|
+ import tool from '@/utils/tool'
|
|
|
const total = ref(1024)
|
|
const total = ref(1024)
|
|
|
const tabKey = ref('new')
|
|
const tabKey = ref('new')
|
|
|
- const currentPage = ref(1)
|
|
|
|
|
- const resources = [
|
|
|
|
|
- { id: 1, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 2, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 3, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 4, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 5, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 6, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 7, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 8, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 9, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 10, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 11, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
- { id: 12, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 }
|
|
|
|
|
|
|
+ const currentPage = reactive({
|
|
|
|
|
+ current: 1,
|
|
|
|
|
+ size: 10
|
|
|
|
|
+ })
|
|
|
|
|
+ const resources = ref([
|
|
|
|
|
+ // { id: 1, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 2, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 3, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 4, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 5, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 6, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 7, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 8, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 9, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 10, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 11, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 },
|
|
|
|
|
+ // { id: 12, title: '学术交流英语', description: '来源学校', name: '姓名', time: '05-22 10:49', look: 10000 }
|
|
|
// 更多数据...
|
|
// 更多数据...
|
|
|
- ]
|
|
|
|
|
|
|
+ ])
|
|
|
|
|
|
|
|
const selectTab = (key) => {
|
|
const selectTab = (key) => {
|
|
|
console.log('现在是点了tab', key)
|
|
console.log('现在是点了tab', key)
|
|
@@ -87,6 +92,80 @@
|
|
|
const onSearch = (value) => {
|
|
const onSearch = (value) => {
|
|
|
console.log('搜索了', value)
|
|
console.log('搜索了', value)
|
|
|
}
|
|
}
|
|
|
|
|
+ const onChange = (page, pageSize) => {
|
|
|
|
|
+ console.log('翻页', page, pageSize)
|
|
|
|
|
+ getList()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // watch(currentPage.value.current, (newValue) => {
|
|
|
|
|
+ // console.log('变化了', newValue)
|
|
|
|
|
+ // // getList()
|
|
|
|
|
+ // })
|
|
|
|
|
+
|
|
|
|
|
+ const getList = () => {
|
|
|
|
|
+ list(currentPage)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ console.log('下面列表获取', res)
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ resources.value = res.data.records
|
|
|
|
|
+ total.value = res.data.total
|
|
|
|
|
+ currentPage.current = res.data.current
|
|
|
|
|
+ // "size": 20,
|
|
|
|
|
+ // "current": 1,
|
|
|
|
|
+ // "pages": 1
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // {
|
|
|
|
|
+ // "code": 200,
|
|
|
|
|
+ // "msg": "操作成功",
|
|
|
|
|
+ // "data": {
|
|
|
|
|
+ // "records": [
|
|
|
|
|
+ // {
|
|
|
|
|
+ // "publishTime": 1750820852119,
|
|
|
|
|
+ // "courseName": "转手绢",
|
|
|
|
|
+ // "collegeIdName": "二人转研究学院",
|
|
|
|
|
+ // "teacherId": "1936984714123436034",
|
|
|
|
|
+ // "coverImageId": "1936957954687279104",
|
|
|
|
|
+ // "collegeId": "1",
|
|
|
|
|
+ // "timeLimitType": "0",
|
|
|
|
|
+ // "viewCount": 0,
|
|
|
|
|
+ // "courseId": "1937091089341124610",
|
|
|
|
|
+ // "teacherIdName": "老师"
|
|
|
|
|
+ // },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // "publishTime": 1750820875604,
|
|
|
|
|
+ // "courseName": "胸口碎大石",
|
|
|
|
|
+ // "collegeIdName": "二人转研究学院",
|
|
|
|
|
+ // "teacherId": "1936984714123436034",
|
|
|
|
|
+ // "coverImageId": "1937056330116354050",
|
|
|
|
|
+ // "coverImagePath": "http://localhost:9003/api/webapp/dev/file/download?id=1937056330116354050",
|
|
|
|
|
+ // "collegeId": "1",
|
|
|
|
|
+ // "timeLimitType": "0",
|
|
|
|
|
+ // "viewCount": 10000,
|
|
|
|
|
+ // "courseId": "1937326992873689089",
|
|
|
|
|
+ // "teacherIdName": "老师"
|
|
|
|
|
+ // }
|
|
|
|
|
+ // ],
|
|
|
|
|
+ // "total": 2,
|
|
|
|
|
+ // "size": 20,
|
|
|
|
|
+ // "current": 1,
|
|
|
|
|
+ // "orders": [],
|
|
|
|
|
+ // "optimizeCountSql": true,
|
|
|
|
|
+ // "searchCount": true,
|
|
|
|
|
+ // "maxLimit": null,
|
|
|
|
|
+ // "countId": null,
|
|
|
|
|
+ // "pages": 1
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ console.log(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ onMounted(() => {
|
|
|
|
|
+ getList()
|
|
|
|
|
+ })
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|