Commit 4e02d0bd by 胡悦

提交学习中心样式和修复bug

1 parent 16d10142

2.49 MB | W: | H:

2.49 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -20,6 +20,7 @@ export default {
created() {
uni.$on('messageBackHome', (topList) => {
this.topList = topList
this.getMessageSummary()
})
},
mounted() {
......
......@@ -29,6 +29,7 @@
<view :class="['progress-bar-value', isBeisen ? '' : 'big-top']"
:style="{ width: dataInfo[item.key] ? `${dataInfo[item.key]}%` : '0' }"></view>
</view>
<view v-else :class="['progress-bar-box2', isBeisen ? '' : 'big-height']"></view>
<view :class="['progress-item-finish', isBeisen ? '' : 'big-margin']">
<template v-if="dataInfo[item.key] || dataInfo[item.key] == 0">
<view>本周已有</view>
......@@ -131,7 +132,7 @@ export default {
width: calc(100% - #{toRpx(64)});
border-radius: toRpx(24);
background: #ffffff;
padding: toRpx(24);
padding: toRpx(28) toRpx(24) toRpx(24);
margin: 0 toRpx(32) toRpx(20);
&.small-height {
......@@ -152,7 +153,7 @@ export default {
grid-template-columns: repeat(2, 1fr);
align-items: center;
margin-top: toRpx(12);
margin-bottom: toRpx(36);
margin-bottom: toRpx(42);
.statistics-item {
display: flex;
......@@ -199,7 +200,7 @@ export default {
.progress-item {
display: flex;
justify-content: space-between;
// justify-content: space-between;
flex-direction: column;
border-radius: toRpx(12);
......@@ -252,13 +253,20 @@ export default {
position: relative;
width: calc(100% - #{toRpx(68)});
}
.progress-bar-box2 {
width: calc(100% - #{toRpx(68)});
height: toRpx(48);
&.big-height {
height: toRpx(80);
}
}
.progress-bar {
width: 100%;
height: toRpx(12);
border-radius: toRpx(8);
opacity: 0.35;
background: linear-gradient(128.8deg, #75bcff 0%, #2c66f7 100%);
margin-top: toRpx(32);
margin-top: toRpx(36);
&.big-margin {
margin-top: toRpx(72);
......@@ -281,13 +289,13 @@ export default {
.progress-item-finish {
height: toRpx(72);
margin-top: toRpx(36);
margin-top: toRpx(46);
font-size: toRpx(22);
color: #808080;
line-height: toRpx(36);
&.big-margin {
margin-top: toRpx(72);
margin-top: toRpx(84);
}
.progress-text {
......
......@@ -41,7 +41,7 @@
<template v-else-if="item._showDays">
<view class="countdown-label">剩</view>
<view class="countdown-num">{{ item._leftDays }}</view>
<view class="countdown-days-label">天</view>
<view class="countdown-label">天</view>
</template>
<template v-else>
<view class="countdown-label">剩</view>
......@@ -63,14 +63,18 @@
<view class="task-item-title">{{ item.taskTitle }}</view>
<view class="task-item-text">
<view class="task-item-label">任务进度</view>
<view class="task-item-progress">
<view class="task-item-progress" v-if="item.completeStatus == 0">
<view class="task-item-progress-bar" :style="{ width: Math.floor(item.taskProgress) + '%' }"></view>
<view class="task-item-progress-text">{{ Math.floor(item.taskProgress) }}%</view>
</view>
<view class="task-item-value" v-else><view class="dot-value"></view><view class="green">已完成</view></view>
</view>
<view class="task-item-text" v-if="item.courseType === 2">
<view class="task-item-label">课程数</view>
<view class="task-item-value">{{ item.courseTotalCount }} 节 | {{ item.totalDuration ? `${item.totalDuration}min` : '-' }}</view>
<view class="task-item-value">
{{ item.courseTotalCount }}节 |
{{ (item.totalDuration || item.totalDuration === 0) ? `${item.totalDuration}min` : '-' }}
</view>
</view>
<view class="task-item-text">
<view class="task-item-label">完成时间</view>
......@@ -129,18 +133,13 @@ export default {
}
}
},
// created () {
// // 监听自定义事件
// uni.$on('backStudyCenter', () => {
// console.log('backStudyCenter')
// this.getCourseTaskPage(this.tabIndex)
// })
// },
mounted() {
this.getCourseTaskPage(this.tabIndex)
},
beforeDestroy() {
this.clearCountdownTimer();
// 移除事件监听,防止内存泄漏
uni.$off && uni.$off('backStudyCenter');
},
methods: {
// 清除倒计时定时器
......@@ -359,7 +358,7 @@ export default {
this.getCourseTaskPage(this.tabIndex, index)
},
handleTaskItemClick(item) {
console.log(item)
// console.log(item)
const {courseType, id} = item
if (courseType == 1) {
uni.$track.add({eventCode: 'app_short_course', businessId: id, pagePath: '/pages/equity/index'})
......@@ -368,6 +367,11 @@ export default {
url: `/pages/common/studyDetail/${courseType == 1 ? 'shortCourse' : 'longCourse'}?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${this.tabIndex}`,
fail: (err) => {
console.error('页面跳转失败:', err);
},
// 页面跳转后,监听返回事件
success: () => {
// 兼容H5/小程序/APP,返回时触发自定义事件
// 这里不需要处理,onShow和backStudyCenter事件已处理倒计时恢复
}
});
},
......@@ -411,6 +415,7 @@ export default {
background-color: #fff;
color: #1A1A1A;
border-radius: toRpx(10);
font-weight: 600;
}
}
}
......@@ -452,7 +457,7 @@ export default {
background: #f2f2f2;
color: #666666;
font-size: toRpx(28);
line-height: toRpx(64);
line-height: toRpx(68);
text-align: center;
margin-right: toRpx(16);
......@@ -538,7 +543,7 @@ export default {
}
.timeout-label {
height: toRpx(40);
line-height: toRpx(40);
line-height: toRpx(44);
border-radius: toRpx(4);
background: #00000059;
color: #fff;
......@@ -562,7 +567,7 @@ export default {
font-size: toRpx(30);
color: #292D33;
font-weight: 500;
margin-bottom: toRpx(20);
margin-bottom: toRpx(24);
width: toRpx(340);
overflow: hidden;
text-overflow: ellipsis;
......@@ -574,7 +579,7 @@ export default {
display: flex;
align-items: center;
font-size: toRpx(24);
margin-bottom: toRpx(12);
margin-bottom: toRpx(24);
.task-item-label {
width: toRpx(96);
......@@ -584,6 +589,19 @@ export default {
.task-item-value {
color: #666666;
display: inline-flex;
align-items: center;
justify-content: center;
.dot-value {
width: toRpx(12);
height: toRpx(12);
border-radius: 50%;
background: #2CCA74;
margin-right: toRpx(8);
}
.green {
color: #2CCA74;
}
}
}
......
......@@ -14,7 +14,7 @@
<view class="recommend-course-item-title">
{{ item.courseName }}
</view>
<view class="recommend-course-item-text">{{ item.courseTotalCount ? `${item.courseTotalCount}节` : '-' }} | {{ item.totalDuration ? `${item.totalDuration}min` : '-' }}</view>
<view class="recommend-course-item-text">{{ (item.totalDuration || item.totalDuration === 0) ? `${item.totalDuration}min` : '-' }}</view>
</view>
</view>
</view>
......
......@@ -74,43 +74,26 @@ export default {
computed: {
tabList() {
const weekConversionRatio = this.dataInfo && this.dataInfo.weekConversionRatio
// const weekConversionRatio = {
// 0: {
// top: 1,
// myConversionRatio: '0',
// topOneConversionRatio: '94.5'
// },
// 1: {
// top: 2,
// myConversionRatio: '74.3',
// topOneConversionRatio: '94.5'
// },
// 2: {
// top: 3,
// myConversionRatio: '55.7',
// topOneConversionRatio: '84.5'
// },
// }
if (!weekConversionRatio) return []
// 按顺序延保、权益、轻改生成tabList
const order = [0, 2, 1]
// 按顺序轻改、权益、延保生成tabList
const order = [0, 1, 2]
const tabArr = order
.filter(key => weekConversionRatio.hasOwnProperty(key))
.map(key => {
let title = '';
if (key == 0) title = '延保';
else if (key == 2) title = '权益';
else if (key == 1) title = '轻改';
if (key == 0) title = '轻改';
else if (key == 1) title = '权益';
else if (key == 2) title = '延保';
else title = `类型${key}`;
return {
title,
value: key
}
});
// 默认展示延保,如果没有延保,tabIndex默认为第一个
// 有延保默认展示延保,没有延保默认展示第一个
this.$nextTick(() => {
if (tabArr.length > 0) {
const yanbaoIndex = tabArr.findIndex(item => item.value == 0);
const yanbaoIndex = tabArr.findIndex(item => item.value == 2);
if (yanbaoIndex !== -1) {
if (this.tabIndex !== yanbaoIndex) this.tabIndex = yanbaoIndex;
} else {
......@@ -213,7 +196,7 @@ export default {
/* 进度条整体项样式 */
.bar-box {
margin-top: toRpx(28);
margin-top: toRpx(44);
}
.bar-item {
......@@ -223,7 +206,7 @@ export default {
padding-right: toRpx(120);
&:last-child {
margin-bottom: toRpx(10);
margin-bottom: toRpx(22);
}
.bar-label {
......
......@@ -77,8 +77,13 @@ export default {
created () {
// 监听自定义事件
uni.$on('backStudyCenter', () => {
console.log('backStudyCenter')
this.$refs.myTask.getCourseTaskPage(this.tabIndex)
console.log('backStudyCenter', this.$refs.myTask)
const { tabIndex, finishIndex } = this.$refs.myTask
if (tabIndex === 0) {
this.$refs.myTask.getCourseTaskPage(tabIndex)
} else {
this.$refs.myTask.getCourseTaskPage(tabIndex, finishIndex)
}
this.getStudyBoard()
})
},
......@@ -191,7 +196,7 @@ export default {
width: calc(100% - #{toRpx(64)});
border-radius: toRpx(24);
background: #ffffff;
padding: toRpx(24);
padding: toRpx(28) toRpx(24) toRpx(24);
margin: 0 toRpx(32) toRpx(16);
&.big-height {
......
......@@ -21,12 +21,24 @@
<scroll-view scroll-y class="service-list" @scrolltolower="pageonReachBottom" :scroll-top="scrollTop">
<view class="service-item" v-for="(item, index) in list" :key="index" @click="handleDetail(item)">
<view class="service-item-title">
<template v-if="moduleType == 3 || moduleType == 4">
<view class="service-item-title-left">{{ item.title }}</view>
</template>
<template v-else>
<view class="service-item-title-left">{{ moduleTypeEnum[moduleType] }}</view>
</template>
<view class="service-item-title-left">
<view
class="dot-value"
v-if="(
(moduleType == 0 && !item.readFlag) ||
(moduleType == 1 && item.status == 0) ||
(moduleType == 2 && item.status == 0) ||
(moduleType == 3 && item.status == 0) ||
(moduleType == 4 && item.status == 0)
)"
></view>
<template v-if="moduleType == 3 || moduleType == 4">
{{ item.title }}
</template>
<template v-else>
{{ moduleTypeEnum[moduleType] }}
</template>
</view>
<view class="service-item-title-right">
<view>查看详情</view>
<view class="sprite-icon icon-coupon-arrow"></view>
......@@ -121,24 +133,7 @@ export default {
watch: {
moduleType: {
handler(newVal) {
switch (newVal) {
case 0:
this.getSystemPage()
break
case 1:
this.getScriptList()
break
case 2:
this.getWarningPage()
break
case 3:
this.getCourseList(3)
break
case 4:
this.getCourseList(4)
default:
break
}
this.getRightList(newVal)
},
}
},
......@@ -149,6 +144,8 @@ export default {
},
onShow() {
this.getMessageSummary(this.userInfo.sceneType)
console.log(this.moduleType, 'moduleType')
this.getRightList(this.moduleType)
},
methods: {
formatTime(time, formatStr) {
......@@ -160,6 +157,27 @@ export default {
const res = await getMessageSummary({businessType: sceneType})
this.messageList = res
},
getRightList(val) {
switch (val) {
case 0:
this.getSystemPage()
break
case 1:
this.getScriptList()
break
case 2:
this.getWarningPage()
break
case 3:
console.log(111)
this.getCourseList(3)
break
case 4:
this.getCourseList(4)
default:
break
}
},
// 获取缓存中置顶的列表
getTopInfo() {
const {phone, shopMerchantId, sceneType} = this.userInfo
......@@ -325,6 +343,20 @@ export default {
console.error('调用 getWarningPage 方法时出错:', error);
}
break;
case 3:
try {
this.getCourseList(3);
} catch (error) {
console.error('调用 getWarningPage 方法时出错:', error);
}
break;
case 4:
try {
this.getCourseList(4);
} catch (error) {
console.error('调用 getWarningPage 方法时出错:', error);
}
break;
default:
break;
}
......@@ -383,9 +415,13 @@ export default {
break
case 3:
console.log('短课程学习跳转')
uni.$track.add({eventCode: 'app_short_course', businessId: item.id, pagePath: '/pages/common/serviceDetail/index'})
uni.$track.add({eventCode: 'app_short_course', businessId: item.detailId, pagePath: '/pages/common/serviceDetail/index'})
// const row = {
// ...item,
// }
// row.id = item.detailId
uni.navigateTo({
url: `/pages/common/studyDetail/shortCourse?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${item.completeStatus}`,
url: `/pages/common/studyDetail/shortCourse?row=${encodeURIComponent(JSON.stringify(item))}&completeStatus=${item.completeStatus}&from=service`,
fail: (err) => {
console.error('页面跳转失败:', err);
}
......@@ -555,7 +591,17 @@ export default {
&:not(:last-child) {
margin-bottom: toRpx(32);
}
&-title-left {
display: flex;
align-items: center;
.dot-value {
width: toRpx(12);
height: toRpx(12);
border-radius: 50%;
background: #F24724;
margin-right: toRpx(24);
}
}
&-title {
display: flex;
align-items: center;
......
<template>
<view >
<template v-if="labelColors && labelColors.length > 0">
<qiun-data-charts type="radar" :opts="opts" :chartData="chartData" :class="['charts-box', heightClass]" />
<qiun-data-charts type="radar" :opts="opts" :tooltipShow="false" :chartData="chartData" :class="['charts-box', heightClass]" />
</template>
<template v-else>
<view class="nothing flex" :class="['big-height']">
......@@ -55,6 +55,7 @@ export default {
opacity: 0.2,
max: 3,
labelShow: true,
dataPointShape: false,
axisLabelTofix: 1, // 保留一位小数
labelFormatter: function (val) {
// 精确到小数点后一位
......@@ -82,7 +83,7 @@ export default {
width: 100%;
height: toRpx(228);
flex-direction: column;
margin-top: toRpx(44);
margin-top: toRpx(76);
font-size: toRpx(24);
color: #999999;
box-sizing: border-box;
......
......@@ -31,7 +31,7 @@
</view>
<view class="item-info">
<view class="item-info-label">课程时长</view>
<view class="item-info-value">{{ item.learnDuration ? `${item.learnDuration}min` : '-' }}</view>
<view class="item-info-value">{{ (item.learnDuration || item.learnDuration === 0) ? `${item.learnDuration}min` : '-' }}</view>
</view>
</view>
<image class="completed-bg" src="../../../assets/images/common/completed-bg.png" mode="scaleToFill"
......@@ -47,7 +47,7 @@
<view class="item-content">
<view class="recommendation-title">{{ item.courseName }}</view>
<view class="item-info">
<view class="item-info-label">{{item.courseTotalCount ? `${item.courseTotalCount}节` : '-' }}|{{ item.totalDuration ? `${item.totalDuration}min` : '-' }}</view>
<view class="item-info-label">{{ (item.totalDuration || item.totalDuration === 0) ? `${item.totalDuration}min` : '-' }}</view>
</view>
</view>
<view class="item-btn" @click="openCourse(index, item)">
......@@ -333,10 +333,15 @@ export default {
&:first-child {
border-radius: toRpx(24) toRpx(24) 0 0;
}
&:last-child {
border-radius: 0 0 toRpx(24) toRpx(24);
}
&:first-child:last-child {
/* 只有一个元素时,四个角都圆角 */
border-radius: toRpx(24);
}
&.active {
background: #EBF0FF;
......@@ -369,6 +374,7 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
margin-bottom: toRpx(16);
}
.recommendation-title {
......@@ -389,7 +395,7 @@ export default {
font-size: toRpx(24);
&:not(:last-child) {
margin-bottom: toRpx(2);
margin-bottom: toRpx(10);
}
.item-info-label {
......
......@@ -23,11 +23,15 @@
</view>
<view class="course-info">
<view class="info-label">课程数</view>
<view class="info-value">{{rowData.courseTotalCount ? `${rowData.courseTotalCount}节` : '-' }}|{{ rowData.totalDuration ? `${rowData.totalDuration}min` : '-' }}</view>
<view class="info-value">
{{ (rowData.courseTotalCount || rowData.courseTotalCount === 0) ? `${rowData.courseTotalCount}节` : '-' }}|
{{ (rowData.totalDuration || rowData.totalDuration === 0) ? `${rowData.totalDuration}min` : '-' }}
</view>
</view>
<view class="course-info">
<view class="info-label">完成时间</view>
<view class="info-value">{{completeStatus == 0 ? formatTime(rowData.taskDeadline, 'YYYY-MM-DD HH:mm') : formatTime(rowData.finishDate, 'YYYY-MM-DD HH:mm') }}</view>
<view class="info-value">{{ completeStatus == 0 ? formatTime(rowData.taskDeadline, 'YYYY-MM-DD HH:mm') :
formatTime(rowData.finishDate, 'YYYY-MM-DD HH:mm') }}</view>
</view>
</view>
<view class="time-limit-countdown" v-if="completeStatus == 0 && rowData.punishType == 1">
......@@ -35,15 +39,13 @@
<view class="countdown-label">仅剩</view>
<view class="countdown-num">{{ countdown.days < 10 ? '0' + countdown.days : countdown.days }}</view>
<view class="countdown-separator">天</view>
<view class="countdown-num">{{ countdown.hours < 10 ? '0' + countdown.hours : countdown.hours
}}</view>
<view class="countdown-num">{{ countdown.hours < 10 ? '0' + countdown.hours : countdown.hours }}</view>
<view class="countdown-separator">:</view>
<view class="countdown-num">{{ countdown.minutes < 10 ? '0' + countdown.minutes :
countdown.minutes }}</view>
<view class="countdown-num">{{ countdown.minutes < 10 ? '0' + countdown.minutes : countdown.minutes
}}</view>
<view class="countdown-separator">:</view>
<view class="countdown-num">{{ countdown.seconds < 10 ? '0' + countdown.seconds :
countdown.seconds }}</view>
<view class="countdown-unit">天</view>
countdown.seconds }}</view>
</template>
<template v-else>
<view class="countdown-label" style="color:#B87A11;">已超时</view>
......@@ -52,9 +54,10 @@
</view>
<view class="course-list-box-wrapper">
<view class="course-list-box-title">课程列表</view>
<scroll-view class="course-list-box" scroll-y >
<scroll-view class="course-list-box" scroll-y>
<view class="course-list-item-wrapper">
<view class="course-list-item" @click="startStudy(index, item)" v-for="(item, index) in courseList" :key="index">
<view class="course-list-item" @click="startStudy(index, item)" v-for="(item, index) in courseList"
:key="index">
<image class="course-img" src="../../../assets/images/common/long-course-default.webp" mode="scaleToFill" />
<view class="item-content">
<view class="item-title">{{ item.courseName }}</view>
......@@ -67,11 +70,11 @@
</view>
<view class="item-info">
<view class="item-info-label">考试成绩</view>
<view class="item-info-value">{{ item.totalScore ? '已完成' : '待考核'}}</view>
<view class="item-info-value">{{ item.totalScore ? '已完成' : '待考核' }}</view>
</view>
<view class="item-info">
<view class="item-info-label">课程时长</view>
<view class="item-info-value">{{ item.learnDuration ? `${item.learnDuration}min` : '-' }}</view>
<view class="item-info-value">{{ (item.learnDuration || item.learnDuration === 0) ? `${item.learnDuration}min` : '-' }}</view>
</view>
<template v-if="item.status === 5">
<image class="completed-bg" src="../../../assets/images/common/completed-bg.png" mode="scaleToFill" />
......@@ -81,7 +84,7 @@
开始学习
</view>
</template>
</view>
</view>
</view>
......@@ -121,7 +124,7 @@ export default {
}
},
onLoad(options) {
const {row} = options
const { row } = options
const rowData = JSON.parse(decodeURIComponent(row))
console.log(rowData, 'rowData')
this.rowData = rowData
......@@ -204,27 +207,22 @@ export default {
this.timer = setInterval(updateCountdown, 1000)
},
startStudy(index, item) {
const beisenToken = this.findBeiSenSSOToken()
if (beisenToken) {
uni.$track.add({eventCode: 'app_long_course', businessId: item.id, pagePath: '/pages/common/studyDetail/longCourse'})
uni.navigateTo({
url: `/pages/common/studyDetail/detail?type=long&index=${index}&courseList=${encodeURIComponent(JSON.stringify(this.courseList))}`
})
} else {
uni.showToast({
title: '培训账号未创建',
icon: 'none'
})
}
},
findBeiSenSSOToken () {
return new Promise(resolve => {
uni.$api.commonApi.findBeiSenSSOToken({}).then(res => {
uni.$storage.set('beisenToken', res.data)
resolve(res.data)
})
uni.$api.commonApi.findBeiSenSSOToken({}).then(res => {
console.log(res, 'res')
const beisenToken = res.data
if (beisenToken) {
uni.$track.add({ eventCode: 'app_long_course', businessId: item.id, pagePath: '/pages/common/studyDetail/longCourse' })
uni.navigateTo({
url: `/pages/common/studyDetail/detail?type=long&index=${index}&courseList=${encodeURIComponent(JSON.stringify(this.courseList))}`
})
} else {
uni.showToast({
title: '培训账号未创建',
icon: 'none'
})
}
})
},
}
}
}
</script>
......@@ -306,7 +304,7 @@ export default {
.course-title {
font-size: toRpx(34);
color: #292D33;
margin-bottom: toRpx(24);
margin-bottom: toRpx(28);
font-weight: 500;
}
......@@ -317,7 +315,7 @@ export default {
font-size: toRpx(28);
&:not(:last-child) {
margin-bottom: toRpx(16);
margin-bottom: toRpx(28);
}
.info-label {
......@@ -358,6 +356,7 @@ export default {
position: absolute;
right: toRpx(48);
top: toRpx(40);
line-height: toRpx(48);
display: flex;
align-items: center;
justify-content: center;
......@@ -369,16 +368,20 @@ export default {
height: toRpx(48);
margin-right: toRpx(16);
}
.countdown-num {
display: flex;
align-items: center;
justify-content: center;
flex-basis: 0;
// justify-content: center;
color: #B87A11;
width: toRpx(48);
height: toRpx(48);
line-height: toRpx(48);
border-radius: toRpx(6);
background: #b87a1126;
margin: 0 toRpx(8);
line-height:normal;
padding: toRpx(10) toRpx(8) toRpx(6);
}
.countdown-separator {
......@@ -387,6 +390,7 @@ export default {
.countdown-label,
.countdown-unit {
line-height: toRpx(48);
color: #B87A11;
margin: 0 toRpx(4);
}
......@@ -443,18 +447,16 @@ export default {
font-size: toRpx(30);
color: #292D33;
font-weight: 500;
margin-bottom: toRpx(20);
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
word-break: break-all;
margin-top: toRpx(8);
margin-bottom: toRpx(28);
overflow: hidden; /* 超出部分隐藏 */
white-space: nowrap; /* 文本不换行 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
}
.item-info {
display: flex;
margin-bottom: toRpx(12);
margin-bottom: toRpx(16);
font-size: toRpx(24);
.item-info-label {
......@@ -483,7 +485,7 @@ export default {
}
.item-btn {
margin-top: toRpx(24);
margin-top: toRpx(32);
width: toRpx(430.5);
height: toRpx(56);
border-radius: toRpx(24);
......
......@@ -30,7 +30,7 @@
</view>
</view>
<view class="bottom-box">
<view class="bottom-box-title">
<view class="bottom-box-title margin-bottom">
<view>战败复盘</view>
<view class="date">{{ formatTime(rowData.checkDate, 'YYYY年MM月DD日') }}</view>
</view>
......@@ -78,11 +78,11 @@
</view>
<view class="role-tag-score">
<view class="role-tag-score-text">战败</view>
<view class="score-line"></view> {{ item.inspectionScore }} <view class="score-text-unit">分</view>
<view class="score-line"></view> {{ Math.floor(item.inspectionScore) }} <view class="score-text-unit">分</view>
</view>
</view>
</view>
<view class="sprite-icon icon-coupon-arrow"></view>
<view class="sprite-icon icon-detail-arrow"></view>
</view>
</scroll-view>
</view>
......@@ -115,7 +115,6 @@
<view class="countdown-separator">:</view>
<view class="countdown-num">{{ countdown.seconds < 10 ? '0' + countdown.seconds :
countdown.seconds }}</view>
<view class="countdown-unit">天</view>
</template>
<template v-else>
<view
......@@ -194,7 +193,7 @@
<view class="role-tag-score">
<view class="role-tag-score-text">战败</view>
<view class="score-line"></view>
<view class="score-value">{{ popupDetail.inspectionScore }}</view>
<view class="score-value">{{ Math.floor(popupDetail.inspectionScore) }}</view>
<view class="score-text-unit">分</view>
</view>
</view>
......@@ -273,13 +272,19 @@ export default {
}
},
onLoad (options) {
console.log(options, 'options')
const { row } = options
const rowData = JSON.parse(decodeURIComponent(row))
console.log(rowData, 'rowData')
this.rowData = rowData
this.completeStatus = options.completeStatus
if (!this.rowData.taskDeadline) this.rowData.taskDeadline = rowData.finishTime
this.getShortCourseDetail(rowData.id)
if (options.from === 'service') {
this.getShortCourseDetail(rowData.detailId, rowData.id)
} else {
this.getShortCourseDetail(rowData.id)
}
if (this.completeStatus == 0) {
this.initCountdown()
}
......@@ -336,10 +341,14 @@ export default {
uni.navigateBack();
}
},
async getShortCourseDetail (id) {
async getShortCourseDetail (id, boxId) {
uni.showLoading()
this.studyId = id
const res = await uni.$api.commonApi.getShortCourseDetail({ id })
const params = { id }
if (boxId) {
params.boxId = boxId
}
const res = await uni.$api.commonApi.getShortCourseDetail(params)
uni.hideLoading()
// const res = {
// staffName: '许小奇',
......@@ -549,7 +558,7 @@ export default {
height: toRpx(36);
border-radius: toRpx(4);
border: toRpx(2) solid #e8ecf0;
padding: 0 toRpx(16);
padding: toRpx(4) toRpx(16);
font-size: toRpx(24);
color: #79859e;
margin-left: toRpx(12);
......@@ -564,7 +573,7 @@ export default {
&-info {
display: flex;
justify-content: space-between;
margin-top: toRpx(16);
margin-top: toRpx(24);
&-item {
color: #79859e;
......@@ -589,6 +598,9 @@ export default {
color: #1a1a1a;
font-size: toRpx(28);
font-weight: 400;
&.margin-bottom {
margin-bottom: toRpx(12);
}
.date {
font-size: toRpx(24);
......@@ -679,7 +691,7 @@ export default {
color: #79859e;
border-radius: toRpx(4);
border: toRpx(2) solid #e8ecf0;
padding: 0 toRpx(8);
padding: toRpx(4) toRpx(8);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
......@@ -688,7 +700,7 @@ export default {
.role-tag-score {
display: flex;
align-items: center;
font-size: toRpx(32);
font-size: toRpx(28);
color: #292d33;
margin-right: toRpx(26);
......@@ -868,9 +880,11 @@ export default {
.table-content-text {
color: #71747a;
line-height: toRpx(40);
}
.table-content-suggest {
line-height: toRpx(40);
.suggest-title {
display: inline-block;
color: #3b73ff;
......@@ -922,7 +936,7 @@ export default {
margin-right: toRpx(12);
}
.score-value {
font-size: toRpx(40);
font-size: toRpx(32);
color: #292d33;
}
.score-text-unit {
......@@ -938,6 +952,8 @@ export default {
margin-top: toRpx(16);
.role-tag {
height: toRpx(44);
line-height: toRpx(44);
margin-right: toRpx(12);
font-size: toRpx(22);
color: #79859e;
......@@ -971,10 +987,14 @@ export default {
flex-direction: column;
align-items: center;
justify-content: center;
width: toRpx(208);
width: 100%;
height: toRpx(170);
border-radius: toRpx(16);
background-color: #f5f7fa;
// margin-right: toRpx(32);
&:nth-child(5n) {
margin-right: 0;
}
.identity-title {
font-size: toRpx(32);
color: #383838;
......@@ -982,7 +1002,7 @@ export default {
.identity-desc {
font-size: toRpx(40);
color: #181a1f;
margin-top: toRpx(12);
margin-top: toRpx(16);
&.bad {
color: #eb4e4e;
}
......@@ -990,4 +1010,7 @@ export default {
}
}
}
.summary-content {
line-height: toRpx(40);
}
</style>
\ No newline at end of file
......@@ -39,7 +39,7 @@ export default {
// 返回
back() {
// this.showPage('MessageList')
uni.$emit('pageBack');
// uni.$emit('pageBack');
uni.navigateBack({
delta: 1,
animationType: 'pop-out',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!