From 4b706bb8115fb8fcba2c67813209f8a4bfd484ea Mon Sep 17 00:00:00 2001 From: chenghuan Date: Mon, 1 Dec 2025 16:35:44 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=9A=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=96=B0=E9=97=BB=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/modules/news.ts | 27 +++++++++ pages.json | 6 ++ pages/news/details.vue | 122 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 api/modules/news.ts create mode 100644 pages/news/details.vue diff --git a/api/modules/news.ts b/api/modules/news.ts new file mode 100644 index 0000000..12368fc --- /dev/null +++ b/api/modules/news.ts @@ -0,0 +1,27 @@ +import { mainClient } from '@/api/clients/main' +import type { IApiResponse } from '@/api/types' + +export const newsApi = { + /** + * 获取新闻详情 + */ + getNewsDetail: async (newsId: string | number) => { + const res = await mainClient.request>({ + url: `common/message/getMessageById?id=${newsId}`, + method: 'POST' + }) + return res + }, + + /** + * 获取太湖之光文章详情 + */ + getTaihuWelfareArticleDetail: async (newsId: string | number) => { + const res = await mainClient.request>({ + url: 'common/taihuWelfare/getTaihuWelfareArticleDetail', + method: 'POST', + data: { id: newsId } + }) + return res + } +} \ No newline at end of file diff --git a/pages.json b/pages.json index 0a8d423..fa4f305 100644 --- a/pages.json +++ b/pages.json @@ -193,6 +193,12 @@ "navigationStyle": "custom", "navigationBarTitleText": "%order.orderDetails%" } + }, { + "path": "pages/news/details", + "style": { + "navigationStyle": "custom", + "navigationBarTitleText": "新闻详情" + } }, { "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup", "style": { diff --git a/pages/news/details.vue b/pages/news/details.vue new file mode 100644 index 0000000..0c57939 --- /dev/null +++ b/pages/news/details.vue @@ -0,0 +1,122 @@ + + + + + \ No newline at end of file From 1049030a46d160d54a0af67567b7b24bbd191eb4 Mon Sep 17 00:00:00 2001 From: chenghuan Date: Mon, 1 Dec 2025 16:39:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=86=85?= =?UTF-8?q?=E6=B5=8B=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=85=8D?= =?UTF-8?q?=E8=B4=B9=E8=AF=BE=E7=A8=8B=E5=8F=8A=E8=AF=BE=E7=A8=8B=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96=E3=80=81=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E6=94=AF=E4=BB=98=E9=BB=98=E8=AE=A4=E5=80=BC=E3=80=81?= =?UTF-8?q?=E4=B9=A6=E7=B1=8D=E4=BB=B7=E6=A0=BC=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/modules/course.ts | 2 +- components/course/CatalogueList.vue | 96 ---- components/course/ChapterList.vue | 320 ------------- components/order/Confirm.vue | 10 +- locale/en.json | 3 + locale/zh-Hans.json | 3 + pages/book/search.vue | 26 +- pages/course/details/chapter.vue | 2 +- .../details/components/CatalogueList.vue | 450 ++++++++++++++++++ .../course/details/components}/CourseInfo.vue | 0 pages/course/details/course.vue | 155 ++---- pages/course/index.vue | 18 +- static/nobg.jpg | Bin 0 -> 4985 bytes stores/course.ts | 142 ------ style/tailwind.css | 92 +--- 15 files changed, 520 insertions(+), 799 deletions(-) delete mode 100644 components/course/CatalogueList.vue delete mode 100644 components/course/ChapterList.vue create mode 100644 pages/course/details/components/CatalogueList.vue rename {components/course => pages/course/details/components}/CourseInfo.vue (100%) create mode 100644 static/nobg.jpg delete mode 100644 stores/course.ts diff --git a/api/modules/course.ts b/api/modules/course.ts index c7b3cfd..eb411f1 100644 --- a/api/modules/course.ts +++ b/api/modules/course.ts @@ -114,7 +114,7 @@ export const courseApi = { }, /** - * 开始学习免费课程 + * 领取免费课程 * @param catalogueId 目录ID */ startStudyForMF(catalogueId: number) { diff --git a/components/course/CatalogueList.vue b/components/course/CatalogueList.vue deleted file mode 100644 index da9ddef..0000000 --- a/components/course/CatalogueList.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - - - diff --git a/components/course/ChapterList.vue b/components/course/ChapterList.vue deleted file mode 100644 index d6eeaf9..0000000 --- a/components/course/ChapterList.vue +++ /dev/null @@ -1,320 +0,0 @@ - - - - - diff --git a/components/order/Confirm.vue b/components/order/Confirm.vue index 344b448..285b648 100644 --- a/components/order/Confirm.vue +++ b/components/order/Confirm.vue @@ -290,7 +290,11 @@ const handlePointsInput = (value: any) => { } // 重新计算实付款 - calculateFinalPrice() + const result = Math.max( + 0, + totalAmount.value - pointsDiscounted.value - promotionDiscounted.value - vipDiscounted.value + ) + finalAmount.value = result } /** @@ -314,9 +318,11 @@ const calculateFinalPrice = () => { props?.userInfo?.jf || 0, Math.floor(orderAmountAfterDiscount - couponAmount) ) + + pointsDiscounted.value = pointsUsableMax.value // 限制当前积分不超过最大值 - if (pointsDiscounted.value > pointsUsableMax.value) { + if (pointsDiscounted.value >= pointsUsableMax.value) { pointsDiscounted.value = pointsUsableMax.value } diff --git a/locale/en.json b/locale/en.json index 0d4b3b0..e8378da 100644 --- a/locale/en.json +++ b/locale/en.json @@ -491,5 +491,8 @@ "openVip": "Open Now", "renewal": "Renewal", "daily": "Daily" + }, + "news": { + "newsDetail": "News Detail" } } diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json index 496bc55..831db6a 100644 --- a/locale/zh-Hans.json +++ b/locale/zh-Hans.json @@ -491,5 +491,8 @@ "openVip": "立即开通", "renewal": "续费", "daily": "日均" + }, + "news": { + "newsDetail": "新闻详情" } } diff --git a/pages/book/search.vue b/pages/book/search.vue index 1bf1b0e..497f7dd 100644 --- a/pages/book/search.vue +++ b/pages/book/search.vue @@ -27,12 +27,7 @@ > {{ item.name }} - {{ - formatPrice(item) - }} - {{ - formatStats(item) - }} + @@ -47,6 +42,7 @@ import { ref, onMounted } from 'vue' import { onLoad } from '@dcloudio/uni-app' import { useI18n } from 'vue-i18n' import { homeApi } from '@/api/modules/book_home' +import BookPrice from '@/components/book/BookPrice.vue' import type { IBookWithStats, IVipInfo } from '@/types/home' const { t } = useI18n() @@ -260,21 +256,9 @@ onMounted(async () => { overflow: hidden; } - .book-price { - position: absolute; - font-size: 28rpx; - color: #ff4703; - left: 30rpx; - bottom: 20rpx; - } - - .book-flag { - display: block; - font-size: 26rpx; - color: #999; - position: absolute; - right: 6%; - bottom: 20rpx; + .book-price-container { + width: 80%; + margin: 15rpx auto 0; } } } diff --git a/pages/course/details/chapter.vue b/pages/course/details/chapter.vue index 014bdfa..537d86b 100644 --- a/pages/course/details/chapter.vue +++ b/pages/course/details/chapter.vue @@ -31,7 +31,7 @@ {{ $t('courseDetails.videoTeaching') }} - + 【{{ video.type == "2" ? $t('courseDetails.audio') : $t('courseDetails.video') }}】{{ index + 1 }} diff --git a/pages/course/details/components/CatalogueList.vue b/pages/course/details/components/CatalogueList.vue new file mode 100644 index 0000000..de9e50d --- /dev/null +++ b/pages/course/details/components/CatalogueList.vue @@ -0,0 +1,450 @@ + + + + + diff --git a/components/course/CourseInfo.vue b/pages/course/details/components/CourseInfo.vue similarity index 100% rename from components/course/CourseInfo.vue rename to pages/course/details/components/CourseInfo.vue diff --git a/pages/course/details/course.vue b/pages/course/details/course.vue index c10c816..067cd5d 100644 --- a/pages/course/details/course.vue +++ b/pages/course/details/course.vue @@ -16,40 +16,23 @@ - - - - - - - + {{ $t('courseDetails.progress') }} - + @@ -166,30 +149,24 @@