diff --git a/manifest.json b/manifest.json index e57fb9f..9eed575 100644 --- a/manifest.json +++ b/manifest.json @@ -52,7 +52,7 @@ "h5" : { "devServer" : { "port" : 8002, - "disableHostCheck": true + "disableHostCheck" : true } }, /* 小程序特有相关 */ diff --git a/pages.json b/pages.json index 215cbc5..01f690e 100644 --- a/pages.json +++ b/pages.json @@ -7,17 +7,17 @@ "navigationBarTitleText": "主页" } }, + // #ifdef H5 { "path": "pages/index/desk", "style": { - // #ifdef H5 "navigationStyle": "custom", - // #endif - + "navigationBarTitleText": "书桌", "enablePullDownRefresh": true } }, + // #endif { "path": "pages/index/member", "style": { @@ -213,26 +213,26 @@ { "pagePath": "pages/index/home", "text": "主页", - "iconPath": "/static/主页图标.png", - "selectedIconPath": "/static/主页图标-点击.png" + "iconPath": "/static/home-icon.png", + "selectedIconPath": "/static/home-icon-active.png" }, { "pagePath": "pages/index/desk", "text": "书桌", - "iconPath": "/static/书桌图标.png", - "selectedIconPath": "/static/书桌图标-点击.png" + "iconPath": "/static/desk-icon.png", + "selectedIconPath": "/static/desk-icon-active.png" }, { "pagePath": "pages/index/member", "text": "会员", - "iconPath": "/static/会员图标.png", - "selectedIconPath": "/static/会员图标-点击.png" + "iconPath": "/static/member-icon.png", + "selectedIconPath": "/static/member-icon-active.png" }, { "pagePath": "pages/index/user", "text": "我的", - "iconPath": "/static/我的图标.png", - "selectedIconPath": "/static/我的图标-点击.png" + "iconPath": "/static/profile-icon.png", + "selectedIconPath": "/static/profile-icon-active.png" } ] } diff --git a/pages/index/desk.vue b/pages/index/desk.vue index 387b78b..a74494e 100644 --- a/pages/index/desk.vue +++ b/pages/index/desk.vue @@ -43,7 +43,7 @@ {{ book.book.booksName }} {{ book.book.categoryName }}/ - + {{ book.book.duration }} diff --git a/pages/index/home.vue b/pages/index/home.vue index 68e8fa5..8d5a1c7 100644 --- a/pages/index/home.vue +++ b/pages/index/home.vue @@ -85,13 +85,13 @@ @click="goBook(item)" > - + {{ item.booksName }} {{ item.booksAuthor }} - + {{ item.duration }} @@ -114,10 +114,10 @@ @click="goBook(book)" > - + - - + + {{ book.duration }} {{ book.booksName }} @@ -136,16 +136,16 @@ @click="goBook(book)" > - + - + @@ -523,17 +523,30 @@ export default { .book-item { flex-shrink: 0; width: 270rpx; - // border-radius: 16rpx; + transition: transform 0.3s ease, box-shadow 0.3s ease; + + &:active { + transform: scale(0.98); + } + .book-cover { width: 100%; height: 360rpx; border-radius: 16rpx; overflow: hidden; position: relative; + box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.15); + transition: box-shadow 0.3s ease, transform 0.3s ease; + + &:active { + box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.25); + transform: translateY(-2rpx); + } image { width: 100%; height: 100%; + transition: transform 0.3s ease; } @@ -544,46 +557,63 @@ export default { right: 0; width: 100%; height: 140rpx; - padding-top: 4rpx; - padding-right: 16rpx; - padding-bottom: 8rpx; - padding-left: 16rpx; - backdrop-filter: blur(5px); + padding: 20rpx 16rpx 12rpx; box-sizing: border-box; - background: #00000066; - padding: 20rpx 16rpx 8rpx; - // gap: 26rpx; + + /* 优化的渐变遮罩效果 */ + background: linear-gradient( + 180deg, + rgba(0, 0, 0, 0) 0%, + rgba(0, 0, 0, 0.3) 30%, + rgba(0, 0, 0, 0.7) 70%, + rgba(0, 0, 0, 0.85) 100% + ); + + /* 增强的毛玻璃效果 */ + backdrop-filter: blur(8px) saturate(1.2); + -webkit-backdrop-filter: blur(8px) saturate(1.2); + + /* 添加微妙的边框 */ + border-top: 1px solid rgba(255, 255, 255, 0.1); + + /* 平滑过渡效果 */ + transition: all 0.3s ease; .book-duration{ display: flex; - gap: 8rpx; + align-items: center; + gap: 6rpx; + margin-bottom: 8rpx; &-icon{ - width: 24rpx; - height: 24rpx; + width: 22rpx; + height: 22rpx; + opacity: 0.9; } &-text{ font-size: 20rpx; - color: #DCDCDC; + font-weight: 500; + color: rgba(255, 255, 255, 0.9); + text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); } } .book-title { - margin-top: 10rpx; max-width: 220rpx; font-size: 24rpx; - line-height: 1.4; - color: #fff; - - // max-height: 68rpx; /* = line-height * 2(34rpx * 2)作为保险 */ + font-weight: 600; + line-height: 1.3; + color: #ffffff; + text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); + + /* 文本截断优化 */ display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 2; /* 关键:显示两行,超过两行才省略 */ + -webkit-line-clamp: 2; overflow: hidden; - word-break: break-word; /* 长单词也能断行 */ - white-space: normal; /* 允许换行 */ + word-break: break-word; + white-space: normal; } - } } diff --git a/pages/index/maintain.vue b/pages/index/maintain.vue index 39951c6..0124816 100644 --- a/pages/index/maintain.vue +++ b/pages/index/maintain.vue @@ -80,7 +80,7 @@ - + @@ -15,14 +15,14 @@ @@ -82,9 +82,10 @@ - - - + + + + @@ -104,7 +105,7 @@ 精心设计科学的学习流程 「测试-讲解-练习-检验」知识掌握更牢固 - + --> @@ -137,8 +138,8 @@ {{ book.book.booksName || '暂无课程' }} {{ book.book.categoryName || '--' }}/ - - + + {{ book.book.duration }} @@ -170,7 +171,7 @@ {{ book.booksName }} {{ book.categoryName }}/ - + {{ book.duration }} @@ -190,7 +191,7 @@ export default{ memberBenefits: [], userInfo: { name: '战斗世界', - avatar: '/static/默认头像.png' + avatar: '/static/default-avatar.png' }, // 学习计划书籍数据 @@ -292,7 +293,7 @@ export default{ this.isLogin = false this.userInfo = { name: '登录后查看会员情况', - avatar: '/static/默认头像.png' + avatar: '/static/default-avatar.png' } } } diff --git a/pages/index/test.vue b/pages/index/test.vue index 8af9d05..c050fb5 100644 --- a/pages/index/test.vue +++ b/pages/index/test.vue @@ -62,7 +62,7 @@ export default { }, { name: 'img', - attrs: { src: '/static/默认图片.png' } + attrs: { src: '/static/default-image.png' } } ], ], diff --git a/pages/index/user.vue b/pages/index/user.vue index 0df21b4..565db28 100644 --- a/pages/index/user.vue +++ b/pages/index/user.vue @@ -24,7 +24,7 @@ - + 会员中心 @@ -47,7 +47,7 @@ - + 推广中心 @@ -58,7 +58,7 @@ - + 我的优惠券 @@ -69,7 +69,7 @@ - + 产品介绍 @@ -83,7 +83,7 @@ - + 联系我们 @@ -94,18 +94,17 @@ - - 服务协议与隐私政策 + + 服务与隐私 - + > - - + - + 修改信息 @@ -115,7 +114,7 @@ - + 退出登录 @@ -130,7 +129,7 @@ 联系我们 {{ configParamContent('contact_us') }} - + @@ -144,7 +143,7 @@ export default { data() { return { userInfo: { - avatar: '/static/默认头像.png', + avatar: '/static/default-avatar.png', name: '请先登录', id: 'XXXXX' }, @@ -153,7 +152,7 @@ export default { displayInfo: { name: '点击登录', phone: 'xxxxxxxxx', - avatar: '/static/默认头像.png' + avatar: '/static/default-avatar.png' } } }, @@ -278,7 +277,7 @@ export default { // 重置用户信息 this.userInfo = { - avatar: '/static/默认头像.png', + avatar: '/static/default-avatar.png', name: '请先登录', id: 'XXXXX' } diff --git a/static/闹钟图标.png b/static/alarm-icon.png similarity index 100% rename from static/闹钟图标.png rename to static/alarm-icon.png diff --git a/static/联系我们图标.png b/static/contact-icon.png similarity index 100% rename from static/联系我们图标.png rename to static/contact-icon.png diff --git a/static/内容图标.png b/static/content-icon.png similarity index 100% rename from static/内容图标.png rename to static/content-icon.png diff --git a/static/优惠卷图标.png b/static/coupon-icon.png similarity index 100% rename from static/优惠卷图标.png rename to static/coupon-icon.png diff --git a/static/课程图标.png b/static/course-icon.png similarity index 100% rename from static/课程图标.png rename to static/course-icon.png diff --git a/static/修饰箭头.png b/static/decorative-arrow.png similarity index 100% rename from static/修饰箭头.png rename to static/decorative-arrow.png diff --git a/static/默认头像.png b/static/default-avatar.png similarity index 100% rename from static/默认头像.png rename to static/default-avatar.png diff --git a/static/默认图片.png b/static/default-image.png similarity index 100% rename from static/默认图片.png rename to static/default-image.png diff --git a/static/书桌图标-点击.png b/static/desk-icon-active.png similarity index 100% rename from static/书桌图标-点击.png rename to static/desk-icon-active.png diff --git a/static/书桌图标.png b/static/desk-icon.png similarity index 100% rename from static/书桌图标.png rename to static/desk-icon.png diff --git a/static/修改信息图标.png b/static/edit-info-icon.png similarity index 100% rename from static/修改信息图标.png rename to static/edit-info-icon.png diff --git a/static/已过期盖章.png b/static/expired-stamp.png similarity index 100% rename from static/已过期盖章.png rename to static/expired-stamp.png diff --git a/static/划重点图标.png b/static/highlight-icon.png similarity index 100% rename from static/划重点图标.png rename to static/highlight-icon.png diff --git a/static/划重点图片.png b/static/highlight-image.png similarity index 100% rename from static/划重点图片.png rename to static/highlight-image.png diff --git a/static/首页背景图.png b/static/home-background.png similarity index 100% rename from static/首页背景图.png rename to static/home-background.png diff --git a/static/主页图标-点击.png b/static/home-icon-active.png similarity index 100% rename from static/主页图标-点击.png rename to static/home-icon-active.png diff --git a/static/主页图标.png b/static/home-icon.png similarity index 100% rename from static/主页图标.png rename to static/home-icon.png diff --git a/static/介绍图标.png b/static/intro-icon.png similarity index 100% rename from static/介绍图标.png rename to static/intro-icon.png diff --git a/static/知识收获图标.png b/static/knowledge-icon.png similarity index 100% rename from static/知识收获图标.png rename to static/knowledge-icon.png diff --git a/static/退出登录图标.png b/static/logout-icon.png similarity index 100% rename from static/退出登录图标.png rename to static/logout-icon.png diff --git a/static/会员1.png b/static/member-1.png similarity index 100% rename from static/会员1.png rename to static/member-1.png diff --git a/static/会员2.png b/static/member-2.png similarity index 100% rename from static/会员2.png rename to static/member-2.png diff --git a/static/会员3.png b/static/member-3.png similarity index 100% rename from static/会员3.png rename to static/member-3.png diff --git a/static/会员背景.png b/static/member-background.png similarity index 100% rename from static/会员背景.png rename to static/member-background.png diff --git a/static/会员钻石.png b/static/member-diamond.png similarity index 100% rename from static/会员钻石.png rename to static/member-diamond.png diff --git a/static/会员图标-点击.png b/static/member-icon-active.png similarity index 100% rename from static/会员图标-点击.png rename to static/member-icon-active.png diff --git a/static/会员图标.png b/static/member-icon.png similarity index 100% rename from static/会员图标.png rename to static/member-icon.png diff --git a/static/会员图片1.png b/static/member-image-1.png similarity index 100% rename from static/会员图片1.png rename to static/member-image-1.png diff --git a/static/会员图片2.png b/static/member-image-2.png similarity index 100% rename from static/会员图片2.png rename to static/member-image-2.png diff --git a/static/会员图片3.png b/static/member-image-3.png similarity index 100% rename from static/会员图片3.png rename to static/member-image-3.png diff --git a/static/小程序标题.png b/static/miniprogram-title.png similarity index 100% rename from static/小程序标题.png rename to static/miniprogram-title.png diff --git a/static/暂无收藏.png b/static/no-favorites.png similarity index 100% rename from static/暂无收藏.png rename to static/no-favorites.png diff --git a/static/暂无搜索结果.png b/static/no-search-results.png similarity index 100% rename from static/暂无搜索结果.png rename to static/no-search-results.png diff --git a/static/拨号图标.png b/static/phone-icon.png similarity index 100% rename from static/拨号图标.png rename to static/phone-icon.png diff --git a/static/播放图标高亮.png b/static/play-icon-highlight.png similarity index 100% rename from static/播放图标高亮.png rename to static/play-icon-highlight.png diff --git a/static/播放图标.png b/static/play-icon.png similarity index 100% rename from static/播放图标.png rename to static/play-icon.png diff --git a/static/服务隐私图标.png b/static/privacy-icon.png similarity index 100% rename from static/服务隐私图标.png rename to static/privacy-icon.png diff --git a/static/我的图标-点击.png b/static/profile-icon-active.png similarity index 100% rename from static/我的图标-点击.png rename to static/profile-icon-active.png diff --git a/static/我的图标.png b/static/profile-icon.png similarity index 100% rename from static/我的图标.png rename to static/profile-icon.png diff --git a/static/推广官.png b/static/promoter.png similarity index 100% rename from static/推广官.png rename to static/promoter.png diff --git a/static/推广图标.png b/static/promotion-icon.png similarity index 100% rename from static/推广图标.png rename to static/promotion-icon.png diff --git a/static/推广标语.png b/static/promotion-slogan.png similarity index 100% rename from static/推广标语.png rename to static/promotion-slogan.png diff --git a/static/二维码图标.png b/static/qrcode-icon.png similarity index 100% rename from static/二维码图标.png rename to static/qrcode-icon.png diff --git a/static/团队图标.png b/static/team-icon.png similarity index 100% rename from static/团队图标.png rename to static/team-icon.png diff --git a/static/待上传头像.png b/static/upload-avatar-placeholder.png similarity index 100% rename from static/待上传头像.png rename to static/upload-avatar-placeholder.png diff --git a/static/已使用盖章.png b/static/used-stamp.png similarity index 100% rename from static/已使用盖章.png rename to static/used-stamp.png diff --git a/static/音色切换图标.png b/static/voice-switch-icon.png similarity index 100% rename from static/音色切换图标.png rename to static/voice-switch-icon.png diff --git a/static/提现图标.png b/static/withdraw-icon.png similarity index 100% rename from static/提现图标.png rename to static/withdraw-icon.png diff --git a/subPages/home/AudioControls.vue b/subPages/home/AudioControls.vue index 616d14f..412f355 100644 --- a/subPages/home/AudioControls.vue +++ b/subPages/home/AudioControls.vue @@ -95,6 +95,10 @@ export default { type: Boolean, default: false }, + shouldLoadAudio: { + type: Boolean, + default: false + }, isMember: { type: Boolean, default: false @@ -250,8 +254,8 @@ export default { methods: { // 检查并自动加载预加载完成的音频 checkAndLoadPreloadedAudio() { - // 只在文本页面检查 - if (!this.isTextPage) { + // 只在需要加载音频的页面检查 + if (!this.shouldLoadAudio) { return; } @@ -452,9 +456,9 @@ export default { return; } - // 检查是否为卡片页面,如果是则不加载任何音频 - if (!this.isTextPage) { - console.log('当前为卡片页面,不加载音频'); + // 检查是否需要加载音频 + if (!this.shouldLoadAudio) { + console.log('当前页面不需要加载音频'); // 清空音频状态 this.currentPageAudios = []; this.hasAudioData = false; @@ -662,7 +666,7 @@ export default { // 设置音频数据状态和失败状态 this.hasAudioData = this.currentPageAudios.length > 0; - this.audioLoadFailed = !this.hasAudioData && this.isTextPage; // 如果是文本页面但没有音频数据,则认为获取失败 + this.audioLoadFailed = !this.hasAudioData && this.shouldLoadAudio; // 如果需要音频但没有音频数据,则认为获取失败 // 通知父组件音频状态变化 this.$emit('audio-state-change', { @@ -702,9 +706,9 @@ export default { retryGetAudio() { console.log('用户点击重新获取音频'); - // 检查是否为卡片页面 - if (!this.isTextPage) { - console.log('卡片页面不支持音频功能'); + // 检查是否需要加载音频 + if (!this.shouldLoadAudio) { + console.log('当前页面不支持音频功能'); return; } @@ -748,9 +752,9 @@ export default { this.currentHighlightIndex = -1; this.playSpeed = 1.0; - // 如果是卡片页面,直接重置为初始状态 - if (!this.isTextPage) { - console.log('卡片页面:重置音频状态'); + // 如果不需要加载音频,直接重置为初始状态 + if (!this.shouldLoadAudio) { + console.log('不需要音频的页面:重置音频状态'); this.currentPageAudios = []; this.totalTime = 0; this.hasAudioData = false; @@ -857,10 +861,10 @@ export default { return; } - // 检查当前页面是否有文本内容 - if (!this.isTextPage) { + // 检查当前页面是否支持音频播放 + if (!this.shouldLoadAudio) { uni.showToast({ - title: '当前页面没有文本内容', + title: '当前页面不支持音频播放', icon: 'none' }); return; @@ -1652,9 +1656,9 @@ export default { try { console.log('開始自動加載第一頁音頻'); - // 確保當前是第一頁且是文字頁面 - if (this.currentPage === 1 && this.isTextPage) { - console.log('當前是第一頁文字頁面,開始加載音頻'); + // 確保當前是第一頁且需要加載音頻 + if (this.currentPage === 1 && this.shouldLoadAudio) { + console.log('當前是第一頁且需要音頻,開始加載音頻'); // 加載音頻 await this.getCurrentPageAudio(); @@ -1746,9 +1750,9 @@ export default { async autoLoadAndPlayAudio() { console.log('开始自动加载音频'); - // 检查是否为文本页面 - if (!this.isTextPage) { - console.log('当前不是文本页面,跳过音频加载'); + // 检查是否需要加载音频 + if (!this.shouldLoadAudio) { + console.log('当前页面不需要加载音频,跳过音频加载'); return; } @@ -1829,15 +1833,15 @@ export default { currentHighlightIndex: -1 }); - // 8. 如果当前是文本页面,优先获取当前页面音频 - if (this.isTextPage && this.courseId && this.currentPage) { + // 8. 如果当前页面需要加载音频,优先获取当前页面音频 + if (this.shouldLoadAudio && this.courseId && this.currentPage) { console.log('🎵 AudioControls: 优先获取当前页面音频,使用新音色:', newVoiceId); await this.getCurrentPageAudio(); console.log('🎵 AudioControls: 当前页面音频获取完成'); } else { - // 如果不是文本页面,直接清除加载状态 + // 如果不需要加载音频,直接清除加载状态 this.isAudioLoading = false; - console.log('🎵 AudioControls: 非文本页面,直接清除加载状态'); + console.log('🎵 AudioControls: 不需要音频的页面,直接清除加载状态'); } // 9. 清除音色切换加载状态 diff --git a/subPages/home/book.vue b/subPages/home/book.vue index 1282b23..474d245 100644 --- a/subPages/home/book.vue +++ b/subPages/home/book.vue @@ -52,12 +52,18 @@ v-for="(token, tokenIndex) in splitEnglishSentence(item.content)" :key="tokenIndex" :class="['english-token', { 'clickable-word': token.isWord && findWordDefinition(token.text) }]" - @tap="token.isWord && findWordDefinition(token.text) ? handleWordClick(token.text) : null" + @click.stop="token.isWord && findWordDefinition(token.text) ? handleWordClick(token.text) : null" user-select >{{ token.text }} - {{ item.content }} + {{ segment.text }} @@ -68,11 +74,14 @@ {{ item.content }} + {{ item.content }} @@ -97,7 +106,6 @@ :poster="item.coverUrl" @loadstart="onVideoLoadStart" @loadeddata="onVideoLoadStart" - @error="onVideoError" > @@ -109,155 +117,64 @@ - - - - - - - - - - - 课程 - - - - 音色切换 - - - - - - - - {{ index + 1 }} - - - - - - - - + - - - - - - - 课程 - - 倒序 - - - - - {{ String(course.index).padStart(2, '0') }} - - {{ course.english }} - {{ course.chinese }} - - - - - + + /> - - - - - 关闭 - - 释义 - - - - - - - - - {{ currentWordMeaning.word }} - - - - {{ currentWordMeaning.phonetic }} - - - {{ currentWordMeaning.partOfSpeech }} - {{ currentWordMeaning.meaning }} - - - - - - - 知识收获 - - {{ currentWordMeaning.knowledgeGain }} - - - - + /> + + \ No newline at end of file diff --git a/subPages/home/components/CustomTabbar.vue b/subPages/home/components/CustomTabbar.vue new file mode 100644 index 0000000..ca7739c --- /dev/null +++ b/subPages/home/components/CustomTabbar.vue @@ -0,0 +1,229 @@ + + + + + \ No newline at end of file diff --git a/subPages/home/components/MeaningPopup.vue b/subPages/home/components/MeaningPopup.vue new file mode 100644 index 0000000..cddabfb --- /dev/null +++ b/subPages/home/components/MeaningPopup.vue @@ -0,0 +1,225 @@ + + + + + \ No newline at end of file diff --git a/subPages/home/directory.vue b/subPages/home/directory.vue index 5fc9f99..2d11e1f 100644 --- a/subPages/home/directory.vue +++ b/subPages/home/directory.vue @@ -89,11 +89,11 @@ - + 加入课程 - + 内容朗读 灵活设置

语音合成支持中文、英文、粤语、四川话,也可以合成中英混读语音;

- +

高拟真度

基于业界领先技术构建的语音合成系统,具备合成速度快、合成语音自然流畅等特点,合成语音拟真度高,能够符合多样化的应用场景,让设备和应用轻松发声,人机语音交互效果更加逼真。

- +
diff --git a/subPages/home/search.vue b/subPages/home/search.vue index 3d56e41..edf1db5 100644 --- a/subPages/home/search.vue +++ b/subPages/home/search.vue @@ -57,7 +57,7 @@ {{ book.booksAuthor }} - + {{ book.duration }} diff --git a/subPages/login/otherDemo.vue b/subPages/login/otherDemo.vue index ffd9c02..94b6189 100644 --- a/subPages/login/otherDemo.vue +++ b/subPages/login/otherDemo.vue @@ -29,7 +29,7 @@ > diff --git a/subPages/login/userInfo.vue b/subPages/login/userInfo.vue index 5e4ee9f..cea1768 100644 --- a/subPages/login/userInfo.vue +++ b/subPages/login/userInfo.vue @@ -20,7 +20,7 @@ diff --git a/subPages/member/recharge.vue b/subPages/member/recharge.vue index 9a63d77..23aede6 100644 --- a/subPages/member/recharge.vue +++ b/subPages/member/recharge.vue @@ -3,7 +3,7 @@ @@ -36,7 +36,7 @@ @@ -126,7 +126,7 @@ 依据水平精准推课,不做无用功快速提升 - + @@ -137,7 +137,7 @@ 精心设计科学的学习流程 「测试-讲解-练习-检验」知识掌握更牢固 - +
-->
diff --git a/subPages/user/cash.vue b/subPages/user/cash.vue index 01e31e4..5457ecc 100644 --- a/subPages/user/cash.vue +++ b/subPages/user/cash.vue @@ -1,6 +1,9 @@