diff --git a/src/api/home.ts b/src/api/home.ts deleted file mode 100644 index 6396bab..0000000 --- a/src/api/home.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { http } from '@/http/alova' - -/** - * 获取首页轮播图 - */ -export function getHomeBannerList() { - return http.Post<{ list: Array<{ address: string;}> }>('/api/index/carouselLists', null, - { - meta: { ignoreAuth: true } - } - ) -} \ No newline at end of file diff --git a/src/api/tes-specialist.ts b/src/api/tes-specialist.ts index f08f7e0..4b15914 100644 --- a/src/api/tes-specialist.ts +++ b/src/api/tes-specialist.ts @@ -139,4 +139,18 @@ export function getTeaSpecialistBillDetails(id: number) { */ export function refuseTeaSpecialistOrder(id: number) { return http.Post('/teamapi/order/orderCancel', { id }) +} + +/** + * 获取公告信息 + */ +export function getAnnouncements(data: {page: number, size: number, search: string}) { + return http.Post('/teamapi/training/trainingList', data) +} + +/** + * 获取公告详情 + */ +export function getAnnouncementDetails(id: number) { + return http.Post('/teamapi/training/trainingDetails', { id }) } \ No newline at end of file diff --git a/src/bundle/teaching/detail.vue b/src/bundle/teaching/detail.vue new file mode 100644 index 0000000..12810c0 --- /dev/null +++ b/src/bundle/teaching/detail.vue @@ -0,0 +1,57 @@ +{ + "needLogin": true, + "layout": "default", + "style": { + "navigationStyle": "custom" + } +} + + + + + + diff --git a/src/bundle/teaching/list.vue b/src/bundle/teaching/list.vue new file mode 100644 index 0000000..f78ee1f --- /dev/null +++ b/src/bundle/teaching/list.vue @@ -0,0 +1,130 @@ +{ + "needLogin": true, + "layout": "default", + "style": { + "navigationBarBackgroundColor": "#F6F7F9", + "navigationBarTitleText": "平台公告" + } +} + + + + + + diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index c345afc..c0643e5 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -25,8 +25,7 @@ - + - @@ -193,14 +189,14 @@ | 消息早知道 - + 更多 + @click="router.navigateTo(`/bundle/teaching/detail?id=${item.id}`)"> {{ item.title }} {{ item.time }} @@ -219,10 +215,9 @@ import { inject, onMounted, ref } from 'vue' import { router, getCurrentDate } from '@/utils/tools' import { useUserStore } from '@/store' - import { getTeaSpecialistOrderList } from '@/api/tes-specialist' + import { getTeaSpecialistOrderList, getAnnouncements } from '@/api/tes-specialist' import { TeaSpecialistManageStatusTextValue, TeaSpecialistOrderStatus } from '@/utils/teaSpecialistOrder' - const OSS = inject('OSS') const navbarHeight = inject('navbarHeight') @@ -230,7 +225,6 @@ const userStore = useUserStore() const userInfo = userStore.userInfo - // 等级信息(模拟数据 - 5个等级) const levelList = ref([ { @@ -295,36 +289,7 @@ const todayOrders = ref>([]) // 公告列表(模拟数据) - const announcements = ref>([ - { - id: 1, - title: '必备课,茶文化基础与通识,了解茶的起源?', - time: '2025-08-09 17:21', - image: `${OSS}images/banner1.png`, - type: 'image', - }, - { - id: 2, - title: '行为举止要领,茶艺师职业礼仪与行茶举止规范?', - time: '2025-08-09 17:21', - image: `${OSS}images/banner1.png`, - type: 'video', - }, - { - id: 3, - title: '行为举止要领,茶艺师职业礼仪与行茶举止规范?', - time: '2025-08-09 17:21', - image: `${OSS}images/banner1.png`, - type: 'image', - }, - { - id: 4, - title: '行为举止要领,茶艺师职业礼仪与行茶举止规范?', - time: '2025-08-09 17:21', - image: `${OSS}images/banner1.png`, - type: 'image', - }, - ]) + const announcements = ref>([]) onShow(() => { Index.handleGetTodayOrder() @@ -332,6 +297,10 @@ onLoad(() => { calculateProgress() + + getAnnouncements({ page: 1, size: 5, search: '' }).then(res => { + announcements.value = res.list + }) }) // 计算进度百分比 @@ -342,26 +311,6 @@ }) } - // 处理等级卡片滑动 - function handleLevelScroll(e: any) { - // const scrollLeft = e.detail.scrollLeft - // const systemInfo = uni.getSystemInfoSync() - // // 每个卡片项的宽度:100vw - 120rpx,加上左右margin各30rpx - // // 1rpx = windowWidth / 750 - // const rpxToPx = systemInfo.windowWidth / 750 - // // 卡片宽度 + 左右margin = (100vw - 120rpx) + 60rpx = 100vw - 60rpx - // const itemWidthPx = systemInfo.windowWidth - (60 * rpxToPx) - // const index = Math.round(scrollLeft / itemWidthPx) - // if (index >= 0 && index < levelList.value.length) { - // currentLevelIndex.value = index - // } - } - - // 菜单点击 - function handleMenuClick() { - console.log('菜单点击') - } - // 当前订单索引(用于指示点) const currentOrderIndex = ref(0) @@ -391,16 +340,6 @@ } } - // 更多公告 - function handleMoreAnnouncement() { - console.log('更多公告') - } - - // 公告点击 - function handleAnnouncementClick(item: any) { - console.log('公告点击', item) - } - // 今日行程显示的月和日 const month = ref(0) const day = ref(0) diff --git a/src/uni_modules/uv-parse/changelog.md b/src/uni_modules/uv-parse/changelog.md new file mode 100644 index 0000000..4575e07 --- /dev/null +++ b/src/uni_modules/uv-parse/changelog.md @@ -0,0 +1,13 @@ +## 1.0.4(2023-07-17) +1. 优化文档 +2. 优化其他 +## 1.0.3(2023-06-19) +1. 修复nvue模式下不显示的BUG +## 1.0.2(2023-06-02) +1. 修复可能存在的BUG +2. 优化 +## 1.0.1(2023-05-16) +1. 优化组件依赖,修改后无需全局引入,组件导入即可使用 +2. 优化部分功能 +## 1.0.0(2023-05-10) +uv-parse 富文本解析器 diff --git a/src/uni_modules/uv-parse/components/uv-parse/node/node.vue b/src/uni_modules/uv-parse/components/uv-parse/node/node.vue new file mode 100644 index 0000000..5857077 --- /dev/null +++ b/src/uni_modules/uv-parse/components/uv-parse/node/node.vue @@ -0,0 +1,576 @@ +