Commit d3fc800d by 胡悦

添加学习中心页面

1 parent 1d7a66c9
No preview for this file type
No preview for this file type

2.42 MB | W: | H:

2.44 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<template v-if="taskList.length"> <template v-if="taskList.length">
<view class="task-list"> <view class="task-list">
<view class="task-item" v-for="(item, index) in taskList" :key="index" @click="handleTaskItemClick(item)"> <view class="task-item" v-for="(item, index) in taskList" :key="index" @click="handleTaskItemClick(item)">
<view class="time-limit-tag" v-if="item.punishType == 1"></view> <view class="time-limit-tag" v-if="item.type == 1"></view>
<view v-if="item.punishType == 1" class="time-limit-countdown "> <view v-if="item.type == 1" class="time-limit-countdown ">
<view class="countdown-label">剩</view> <view class="countdown-label">剩</view>
<view class="countdown-num">08</view> <view class="countdown-num">08</view>
<view class="countdown-separator">:</view> <view class="countdown-separator">:</view>
...@@ -203,8 +203,9 @@ export default { ...@@ -203,8 +203,9 @@ export default {
}, },
handleTaskItemClick(item) { handleTaskItemClick(item) {
console.log(item) console.log(item)
const {type} = item
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/studyDetail/longCourse?row=${encodeURIComponent(JSON.stringify(item))}`, url: `/pages/common/studyDetail/${type == 1 ? 'shortCourse' : 'longCourse'}?row=${encodeURIComponent(JSON.stringify(item))}`,
fail: (err) => { fail: (err) => {
console.error('页面跳转失败:', err); console.error('页面跳转失败:', err);
} }
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
:class="getScrollHeight"> :class="getScrollHeight">
<template v-if="recommendCourseList.length"> <template v-if="recommendCourseList.length">
<view class="recommend-course-list"> <view class="recommend-course-list">
<view class="recommend-course-item" v-for="(item, index) in recommendCourseList" :key="index"> <view class="recommend-course-item" v-for="(item, index) in recommendCourseList" :key="index" @click="startStudy(index)">
<image <image
class="recommend-course-item-img" class="recommend-course-item-img"
src="../../../../assets/images/common/course-default-bg.webp" src="../../../../assets/images/common/recommend-course-default.webp"
mode="scaleToFill" mode="scaleToFill"
/> />
<view class="recommend-course-content"> <view class="recommend-course-content">
...@@ -177,6 +177,13 @@ export default { ...@@ -177,6 +177,13 @@ export default {
return 'scroll-view' return 'scroll-view'
} }
}, },
methods: {
startStudy(index) {
uni.navigateTo({
url: `/pages/common/studyDetail/detail?type=recommendation&index=${index}`
})
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -8,7 +8,10 @@ ...@@ -8,7 +8,10 @@
<!-- 周转化率看板 --> <!-- 周转化率看板 -->
<WeeklyConversionRate :barList="barList" :barValue="barValue" /> <WeeklyConversionRate :barList="barList" :barValue="barValue" />
<!-- 能力分析看板 --> <!-- 能力分析看板 -->
<CapabilityAnalysis :chartData="chartData" /> <view class="study-box3">
<view>能力分析</view>
<RadarChart :chartData="chartData" />
</view>
</view> </view>
</view> </view>
<view class="study-right"> <view class="study-right">
...@@ -39,17 +42,17 @@ ...@@ -39,17 +42,17 @@
<script> <script>
import LearnStatistics from './Study/LearnStatistics.vue' import LearnStatistics from './Study/LearnStatistics.vue'
import WeeklyConversionRate from './Study/WeeklyConversionRate.vue' import WeeklyConversionRate from './Study/WeeklyConversionRate.vue'
import CapabilityAnalysis from './Study/CapabilityAnalysis.vue'
import MyTask from './Study/MyTask.vue' import MyTask from './Study/MyTask.vue'
import RecommendCourse from './Study/RecommendCourse.vue' import RecommendCourse from './Study/RecommendCourse.vue'
import RadarChart from 'pages/common/studyDetail/components/RadarChart.vue'
export default { export default {
name: 'StudyCenter', name: 'StudyCenter',
components: { components: {
LearnStatistics, LearnStatistics,
WeeklyConversionRate, WeeklyConversionRate,
CapabilityAnalysis,
MyTask, MyTask,
RecommendCourse RecommendCourse,
RadarChart
}, },
data() { data() {
return { return {
...@@ -113,6 +116,7 @@ export default { ...@@ -113,6 +116,7 @@ export default {
] ]
}; };
this.chartData = JSON.parse(JSON.stringify(res)); this.chartData = JSON.parse(JSON.stringify(res));
console.log(this.chartData, ' 首页')
}, 500); }, 500);
} }
} }
...@@ -152,7 +156,13 @@ export default { ...@@ -152,7 +156,13 @@ export default {
border-radius: 0 0 toRpx(48) toRpx(48); border-radius: 0 0 toRpx(48) toRpx(48);
} }
} }
.study-box3 {
width: calc(100% - #{toRpx(64)});
border-radius: toRpx(24);
background: #ffffff;
padding: toRpx(24);
margin: 0 toRpx(32) toRpx(16);
}
.study-right { .study-right {
flex: 1; flex: 1;
background-color: rgba(255, 255, 255, 0.35); background-color: rgba(255, 255, 255, 0.35);
......
...@@ -161,6 +161,18 @@ ...@@ -161,6 +161,18 @@
} }
}, },
{ {
"path": "pages/common/studyDetail/shortCourse",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/studyDetail/detail",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/serviceDetail/index", "path": "pages/common/serviceDetail/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
......
<template> <template>
<view class="study-box3"> <view>
<view>能力分析</view> <qiun-data-charts type="radar" :opts="opts" :chartData="chartData" class="charts-box" />
<!-- <qiun-data-charts type="radar" :opts="opts" :chartData="chartData" class="charts-box" /> -->
</view> </view>
</template> </template>
<script> <script>
export default { export default {
name: 'CapabilityAnalysis', name: 'RadarChart',
props: { props: {
chartData: { chartData: {
type: Object, type: Object,
...@@ -21,6 +20,7 @@ export default { ...@@ -21,6 +20,7 @@ export default {
dataLabel: false, dataLabel: false,
enableScroll: false, enableScroll: false,
labelColors: ['#666666', '#EB4E4E', '#666666', '#666666', '#666666', '#EB4E4E', '#666666', '#EB4E4E', '#666666'], labelColors: ['#666666', '#EB4E4E', '#666666', '#666666', '#666666', '#EB4E4E', '#666666', '#EB4E4E', '#666666'],
fontSize: 12,
legend: { legend: {
show: false show: false
}, },
...@@ -41,20 +41,15 @@ export default { ...@@ -41,20 +41,15 @@ export default {
} }
}, },
} }
},
mounted() {
console.log(this.chartData, ' 详情')
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.study-box3 { .charts-box {
width: calc(100% - #{toRpx(64)});
border-radius: toRpx(24);
background: #ffffff;
padding: toRpx(24);
margin: 0 toRpx(32) toRpx(16);
.charts-box {
width: 100%; width: 100%;
height: toRpx(272); height: toRpx(272);
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!