Commit 8bcf0ad4 by Lin

修复(HomeFrame, PreStudyPopup):更新预学习弹窗逻辑和样式

- 将 HomeFrame 中的 confirmText 绑定改为使用 preStudyPopInfo。
- 更新 HomeFrame 默认隐藏预学习弹窗。
- 优化 PreStudyPopup,增强按钮功能并调整布局,包括为已学课程集成图标。
1 parent eed08aee
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
<!-- 预学习弹框 --> <!-- 预学习弹框 -->
<StudyPopup :show.sync="showPreStudyPopup" title="提示" :width="848" :height="968" <StudyPopup :show.sync="showPreStudyPopup" title="提示" :width="848" :height="968"
:topImage="require('@/assets/images/common/warning-notice.webp')" :topImageWidth="848" :topImageHeight="248"> :topImage="require('@/assets/images/common/warning-notice.webp')" :topImageWidth="848" :topImageHeight="248">
<PreStudyPopup :confirmText="examPopInfo.confirmText" @cancel="handlePreStudyCancel" <PreStudyPopup :confirmText="preStudyPopInfo.confirmText" @cancel="handlePreStudyCancel"
@confirm="handlePreStudyConfirm" @start-study="handlePreStudyStart" /> @confirm="handlePreStudyConfirm" @start-study="handlePreStudyStart" />
</StudyPopup> </StudyPopup>
...@@ -366,8 +366,11 @@ export default { ...@@ -366,8 +366,11 @@ export default {
showError: false, showError: false,
confirmText: '确认已提交' confirmText: '确认已提交'
}, },
preStudyPopInfo: {
confirmText: '跳过(剩余2次)',
},
showStudyPermissionPopup: false, showStudyPermissionPopup: false,
showPreStudyPopup: true, showPreStudyPopup: false,
courseInfo: { courseInfo: {
title: '' title: ''
}, },
......
...@@ -16,7 +16,10 @@ ...@@ -16,7 +16,10 @@
v-if="item.state === 0" v-if="item.state === 0"
@click.stop="handleStartStudy(item, index)" @click.stop="handleStartStudy(item, index)"
>开启学习</view> >开启学习</view>
<view class="course-item-btn course-item-btn--learned" v-else>已学习</view> <view class="course-item-btn course-item-btn--learned" v-else>
<image class="course-item-btn-icon" :src="require('@/assets/images/common/icon-study-right.png')" mode="aspectFit"></image>
<text>已学习</text>
</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
...@@ -35,13 +38,13 @@ const DEFAULT_COURSE_LIST = [ ...@@ -35,13 +38,13 @@ const DEFAULT_COURSE_LIST = [
id: 1, id: 1,
title: 'AITO 春醒悦享车衣套餐', title: 'AITO 春醒悦享车衣套餐',
description: '包含:原厂定制隐形车衣 + 专属天窗....', description: '包含:原厂定制隐形车衣 + 专属天窗....',
state:1 state: 1
}, },
{ {
id: 2, id: 2,
title: 'AITO 春醒悦享车衣套餐', title: 'AITO 春醒悦享车衣套餐',
description: '包含:原厂定制隐形车衣 + 专属天窗....', description: '包含:原厂定制隐形车衣 + 专属天窗....',
state:0 state: 0
} }
] ]
...@@ -164,12 +167,21 @@ export default { ...@@ -164,12 +167,21 @@ export default {
white-space: nowrap; white-space: nowrap;
&--learned { &--learned {
display: flex;
align-items: center;
gap: toRpx(8);
border: 1px solid rgba(44, 102, 247, 0.10); border: 1px solid rgba(44, 102, 247, 0.10);
background: rgba(44, 102, 247, 0.05); background: rgba(44, 102, 247, 0.05);
color: #2c66f7; color: #2c66f7;
} }
} }
.course-item-btn-icon {
width: 16px;
height: 16px;
flex-shrink: 0;
}
.button-group { .button-group {
display: flex; display: flex;
align-items: center; align-items: center;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!