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 @@
-
-
-
- {{ catalogue.title }}
-
-
-
-
-
-
-
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 @@
-
-
-
-
-
-
-
- VIP畅学权益有效期截止到:{{ userVip.endTime }}
-
-
-
- 当前目录还未开始学习
-
-
- 课程有效期截止到:{{ catalogue.endTime }}
-
-
-
-
-
-
-
-
-
- {{ $t('courseDetails.free') }}
-
-
-
-
-
- {{ $t('courseDetails.unpurchasedTip') }}
-
-
-
- {{ $t('courseDetails.purchase') }}
-
-
- {{ $t('courseDetails.relearn') }}
-
-
- {{ $t('courseDetails.openVip') }}
-
-
-
-
-
-
-
-
- VIP畅学权益生效中
-
-
-
-
-
-
- {{ chapter.title }}
-
-
-
- 试听
-
-
-
-
-
- 未学
-
-
- 已学
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 暂无章节内容
-
-
-
-
-
-
-
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 @@
+
+
+
+
+ {{ catalogue.title }}
+
+
+
+
+
+
+
+
+
+ VIP畅学权益有效期截止到:{{ userVip.endTime }}
+
+
+
+ 当前目录还未开始学习
+
+
+ 课程有效期截止到:{{ currentCatalogue.endTime }}
+
+
+
+
+
+
+
+
+
+ {{ $t('courseDetails.free') }}
+
+
+
+
+
+ {{ $t('courseDetails.unpurchasedTip') }}
+
+
+
+ {{ $t('courseDetails.purchase') }}
+
+
+ {{ $t('courseDetails.relearn') }}
+
+
+ {{ $t('courseDetails.openVip') }}
+
+
+
+
+
+
+
+
+ VIP畅学权益生效中
+
+
+
+
+
+
+ {{ chapter.title }}
+
+
+
+ 试听
+
+
+
+
+
+ 未学
+
+
+ 已学
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无章节内容
+
+
+
+
+
+
+
+
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 @@