This commit is contained in:
parent
8aec346652
commit
8fe4f256bf
15
pages.json
15
pages.json
|
|
@ -7,7 +7,7 @@
|
||||||
// {
|
// {
|
||||||
// "path": "pages/YNEduApp/index/index",
|
// "path": "pages/YNEduApp/index/index",
|
||||||
// "style": {
|
// "style": {
|
||||||
// "navigationBarTitleText": "首页"
|
// "navigationStyle" : "custom"
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
|
|
@ -59,7 +59,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/YNEduApp/index/index",
|
"path": "pages/YNEduApp/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "首页"
|
"navigationStyle" : "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
{
|
{
|
||||||
"path": "pages/YNEduApp/exam/beforeExam",
|
"path": "pages/YNEduApp/exam/beforeExam",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": "考试详情"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -133,7 +133,7 @@
|
||||||
"path" : "pages/YNEduApp/prac/prac",
|
"path" : "pages/YNEduApp/prac/prac",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "练习"
|
"navigationStyle" : "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -184,6 +184,13 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "pdf学习"
|
"navigationBarTitleText" : "pdf学习"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/YNEduApp/prac/pracDetail",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle" : "custom"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ export default {
|
||||||
.tab-wrapper {
|
.tab-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
background: #fff;
|
/* background: #fff; */
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
.tab-item {
|
.tab-item {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="page">
|
<view class="page">
|
||||||
|
<u-navbar leftIcon="" title="首页" placeholder />
|
||||||
<view class="search">
|
<view class="search">
|
||||||
<uni-icons
|
<uni-icons
|
||||||
type="scan"
|
type="scan"
|
||||||
|
|
|
||||||
|
|
@ -37,57 +37,66 @@
|
||||||
<uni-collapse>
|
<uni-collapse>
|
||||||
<uni-collapse-item title="理论学习">
|
<uni-collapse-item title="理论学习">
|
||||||
<uni-list>
|
<uni-list>
|
||||||
<uni-list-item
|
<div
|
||||||
|
class="list-wrapper"
|
||||||
v-for="(item, index) in theoryLearnList"
|
v-for="(item, index) in theoryLearnList"
|
||||||
:key="item.id"
|
:key="index"
|
||||||
title="课程"
|
|
||||||
:note="item.title"
|
|
||||||
clickable
|
|
||||||
:show-extra-icon="true"
|
|
||||||
:extra-icon="learnIconObj"
|
|
||||||
:rightText="item.percent + '%'"
|
|
||||||
@click="toggleTheoryLearn(item.id)"
|
@click="toggleTheoryLearn(item.id)"
|
||||||
>
|
>
|
||||||
<!-- <template v-slot:footer>
|
<div class="left-content">
|
||||||
<liu-progressbar
|
<div class="title">
|
||||||
:progress="item.percent"
|
<u-icon name="/static/images/课程.png" size="15" />
|
||||||
color="#000"
|
<div style="margin: 0 15px 0 3px">课程</div>
|
||||||
:height="'20rpx'"
|
<div>{{ item.time }}</div>
|
||||||
bgColor="#1989FA"
|
</div>
|
||||||
:textInside="false"
|
<div class="note">{{ item.title }}</div>
|
||||||
/>
|
</div>
|
||||||
</template>-->
|
<div class="right-content">
|
||||||
</uni-list-item>
|
<div class="progress">
|
||||||
|
<u-line-progress :percentage="item.percent" :showText="false" activeColor="#579AF8" height="8" />
|
||||||
|
</div>
|
||||||
|
<div>{{ item.percent }}%</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</uni-list>
|
</uni-list>
|
||||||
</uni-collapse-item>
|
</uni-collapse-item>
|
||||||
<uni-collapse-item title="理论练习">
|
<uni-collapse-item title="理论练习">
|
||||||
<uni-list>
|
<uni-list>
|
||||||
<uni-list-item
|
<div
|
||||||
|
class="list-wrapper"
|
||||||
v-for="(item, index) in theoryPracList"
|
v-for="(item, index) in theoryPracList"
|
||||||
:key="item.id"
|
:key="index"
|
||||||
title="练习"
|
|
||||||
:note="item.title"
|
|
||||||
:rightText="item.ifPrac ? '已练习' : '未练习'"
|
|
||||||
clickable
|
|
||||||
:show-extra-icon="true"
|
|
||||||
:extra-icon="pracIconObj"
|
|
||||||
@click="toggleTheoryPrac(item.id)"
|
@click="toggleTheoryPrac(item.id)"
|
||||||
></uni-list-item>
|
>
|
||||||
|
<div class="left-content">
|
||||||
|
<div class="title">
|
||||||
|
<u-icon name="/static/images/练习.png" size="15" />
|
||||||
|
<div style="margin: 0 15px 0 3px">练习</div>
|
||||||
|
</div>
|
||||||
|
<div class="note">{{ item.title }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="right-content">{{ item.ifExam ? '已练习' : '未练习' }}</div>
|
||||||
|
</div>
|
||||||
</uni-list>
|
</uni-list>
|
||||||
</uni-collapse-item>
|
</uni-collapse-item>
|
||||||
<uni-collapse-item title="理论模拟考试">
|
<uni-collapse-item title="理论模拟考试">
|
||||||
<uni-list>
|
<uni-list>
|
||||||
<uni-list-item
|
<div
|
||||||
|
class="list-wrapper"
|
||||||
v-for="(item, index) in theoryExamList"
|
v-for="(item, index) in theoryExamList"
|
||||||
:key="item.id"
|
:key="index"
|
||||||
title="考试"
|
|
||||||
:note="item.title"
|
|
||||||
:rightText="item.ifExam ? '已考试' : '未考试'"
|
|
||||||
clickable
|
|
||||||
:show-extra-icon="true"
|
|
||||||
:extra-icon="pracIconObj"
|
|
||||||
@click="toggleTheoryExam(item.id)"
|
@click="toggleTheoryExam(item.id)"
|
||||||
></uni-list-item>
|
>
|
||||||
|
<div class="left-content">
|
||||||
|
<div class="title">
|
||||||
|
<u-icon name="/static/images/考试.png" size="15" />
|
||||||
|
<div style="margin: 0 15px 0 3px">考试</div>
|
||||||
|
<div>{{ item.time }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="note">{{ item.title }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="right-content">{{ item.ifExam ? '已完成' : '未完成' }}</div>
|
||||||
|
</div>
|
||||||
</uni-list>
|
</uni-list>
|
||||||
</uni-collapse-item>
|
</uni-collapse-item>
|
||||||
<uni-collapse-item title="实操题目练习">
|
<uni-collapse-item title="实操题目练习">
|
||||||
|
|
@ -100,8 +109,18 @@
|
||||||
<view class="comment-area">
|
<view class="comment-area">
|
||||||
<h2 style="margin-bottom: 15rpx">最新评论 ({{ commentList.length }})</h2>
|
<h2 style="margin-bottom: 15rpx">最新评论 ({{ commentList.length }})</h2>
|
||||||
<view class="write-cmt">
|
<view class="write-cmt">
|
||||||
<uni-icons style="color: #9b9b9b; margin-right: 1vw" type="compose" size="12"></uni-icons>
|
<!-- <uni-icons style="color: #9b9b9b; margin-right: 1vw" type="compose" size="12"></uni-icons>
|
||||||
写评论
|
写评论 -->
|
||||||
|
<u--input
|
||||||
|
ref="uInput"
|
||||||
|
placeholder="写评论"
|
||||||
|
prefixIcon="edit-pen"
|
||||||
|
prefixIconStyle="font-size: 18px;color: #c0c4cc"
|
||||||
|
placeholderStyle="font-size: 13px;color: #c0c4cc"
|
||||||
|
border="none"
|
||||||
|
maxlength="999"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="cmts" v-for="(item, index) in commentList" :key="index">
|
<view class="cmts" v-for="(item, index) in commentList" :key="index">
|
||||||
<view class="cmt-up">
|
<view class="cmt-up">
|
||||||
|
|
@ -150,10 +169,10 @@ export default {
|
||||||
{ title: '远程练习', id: 144, ifPrac: false }
|
{ title: '远程练习', id: 144, ifPrac: false }
|
||||||
],
|
],
|
||||||
theoryExamList: [
|
theoryExamList: [
|
||||||
{ title: '物理考试', id: 161, ifExam: false },
|
{ title: '物理考试', id: 161, ifExam: false, time: '00:34:21' },
|
||||||
{ title: '魔法考试', id: 162, ifExam: true },
|
{ title: '魔法考试', id: 162, ifExam: true, time: '00:34:21' },
|
||||||
{ title: '近战考试', id: 163, ifExam: true },
|
{ title: '近战考试', id: 163, ifExam: true, time: '00:34:21' },
|
||||||
{ title: '远程考试', id: 164, ifExam: false }
|
{ title: '远程考试', id: 164, ifExam: false, time: '00:34:21' }
|
||||||
],
|
],
|
||||||
commentList: [
|
commentList: [
|
||||||
{ username: '王二', avatar: '/static/eduImg/avatar.jpg', cont: '写的什么东西' },
|
{ username: '王二', avatar: '/static/eduImg/avatar.jpg', cont: '写的什么东西' },
|
||||||
|
|
@ -167,6 +186,10 @@ export default {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad(params) {
|
||||||
|
this.projId = params.id
|
||||||
|
console.log(this.projId)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleTheoryLearn(id) {
|
toggleTheoryLearn(id) {
|
||||||
console.log(id)
|
console.log(id)
|
||||||
|
|
@ -177,17 +200,17 @@ export default {
|
||||||
toggleTheoryPrac(id) {
|
toggleTheoryPrac(id) {
|
||||||
console.log(id)
|
console.log(id)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/YNEduApp/prac/prac?id=' + id
|
url: '/pages/YNEduApp/prac/pracDetail?id=' + id
|
||||||
})
|
})
|
||||||
|
|
||||||
|
uni.removeStorageSync('from')
|
||||||
|
uni.setStorageSync('from', '/pages/YNEduApp/learnProj/learnProjDetail')
|
||||||
},
|
},
|
||||||
toggleTheoryExam(id) {
|
toggleTheoryExam(id) {
|
||||||
console.log(id)
|
console.log(id)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/YNEduApp/exam/beforeExam?id=' + id
|
url: '/pages/YNEduApp/exam/beforeExam?id=' + id
|
||||||
})
|
})
|
||||||
|
|
||||||
// uni.setStorageSync('form', '/pages/YNEduApp/learnProj/learnProjDetail')
|
|
||||||
// 先清空之前设置的 form 路径 在重新设置
|
|
||||||
uni.removeStorageSync('from')
|
uni.removeStorageSync('from')
|
||||||
uni.setStorageSync('from', '/pages/YNEduApp/learnProj/learnProjDetail')
|
uni.setStorageSync('from', '/pages/YNEduApp/learnProj/learnProjDetail')
|
||||||
},
|
},
|
||||||
|
|
@ -196,10 +219,6 @@ export default {
|
||||||
url: '/pages/YNEduApp/learnProj/learnProj'
|
url: '/pages/YNEduApp/learnProj/learnProj'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
|
||||||
onLoad(params) {
|
|
||||||
this.projId = params.id
|
|
||||||
console.log(this.projId)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -282,6 +301,35 @@ export default {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 25rpx 15rpx;
|
padding: 25rpx 15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20px 10px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #b0b0b0;
|
||||||
|
.left-content {
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.note {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.progress {
|
||||||
|
width: 100px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment-area {
|
.comment-area {
|
||||||
|
|
|
||||||
|
|
@ -1,49 +1,41 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="wrapper">
|
<view>
|
||||||
<div class="top-container">
|
<u-navbar title="练习" @leftClick="leftClick" placeholder />
|
||||||
<u-avatar :src="avatar" size="60" />
|
<div class="tab-wrapper">
|
||||||
<div class="name">{{ name }}</div>
|
<div v-for="(item, index) in tabList" :key="index" class="tab-item" @click="handleTab(item, index)">
|
||||||
|
<div :style="{ color: activeIndex === index ? '#409eff' : '#333' }">
|
||||||
|
{{ item.name }}
|
||||||
</div>
|
</div>
|
||||||
<div class="title">{{ title }}</div>
|
<div :class="{ 'tab-line': activeIndex === index }"></div>
|
||||||
<div class="center-container">
|
|
||||||
<div class="left">
|
|
||||||
<div class="item">
|
|
||||||
<u-icon name="/static/images/正确率.png" size="50" />
|
|
||||||
<div class="text">
|
|
||||||
<div>正确率</div>
|
|
||||||
<div>{{ correctRate }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="content">
|
||||||
<u-icon name="/static/images/累计作答.png" size="50" />
|
<div v-for="(item, index) in list" :key="index" class="item-wrapper">
|
||||||
<div class="text">
|
<div class="title">{{ item.title }}</div>
|
||||||
<div>累计作答</div>
|
<div class="name-status">
|
||||||
<div>{{ totalAnswer }}</div>
|
<div class="name">
|
||||||
|
{{ item.name }}
|
||||||
|
<div class="name-sub">指派</div>
|
||||||
|
</div>
|
||||||
|
<div class="status">{{ item.status }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="time">{{ item.time }}</div>
|
||||||
|
<div class="count-total">
|
||||||
|
<div class="count">练习{{ item.count }}次</div>
|
||||||
|
<div class="total">总分:{{ item.total }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="bt-wrapper">
|
||||||
|
<div class="score">得分:{{ item.score }}</div>
|
||||||
|
<div class="btn" @click="handleExercise(item.id)">开始练习</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
|
||||||
<u-icon name="/static/images/累计答对.png" size="50" />
|
<!-- 暂无数据 -->
|
||||||
<div class="text">
|
<div class="no-data" v-if="list.length == 0">
|
||||||
<div>累计答对</div>
|
<image src="/static/images/zanwuneirong.png" mode="aspectFit" />
|
||||||
<div>{{ totalCorrect }}</div>
|
<view class="no-data-text">暂无内容</view>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="right">
|
|
||||||
<div class="right-top" @click="handleExercises(1)">
|
|
||||||
<div class="right-text">顺序练习</div>
|
|
||||||
<u-icon class="top-icon" name="/static/images/顺序练习.png" width="84" height="73" />
|
|
||||||
</div>
|
|
||||||
<div class="right-bottom" @click="handleExercises(1)">
|
|
||||||
<div class="right-text">随机练习</div>
|
|
||||||
<u-icon class="bottom-icon" name="/static/images/随机练习.png" width="84" height="73" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="bottom">
|
|
||||||
<div class="bottom-text">选择题库</div>
|
|
||||||
<u-icon class="bottom-icon" name="/static/images/选择题库.png" width="140" height="100" />
|
|
||||||
</div>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -51,25 +43,77 @@
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 头像
|
tabList: [{ name: '全部' }, { name: '待练习' }, { name: '已练习' }],
|
||||||
avatar: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
activeIndex: 0,
|
||||||
|
list: [],
|
||||||
|
// 全部列表
|
||||||
|
allList: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
// 标题
|
||||||
|
title: '送配电线路架设(初级)',
|
||||||
// 姓名
|
// 姓名
|
||||||
name: '张三',
|
name: '张三',
|
||||||
// 练习标题
|
// 状态
|
||||||
|
status: '待练习',
|
||||||
|
// 练习时间
|
||||||
|
time: '2020-12-12 12:00',
|
||||||
|
// 练习次数
|
||||||
|
count: 1,
|
||||||
|
// 总分数
|
||||||
|
total: '--',
|
||||||
|
// 得分
|
||||||
|
score: '暂无'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
// 标题
|
||||||
title: '送配电线路架设(初级)',
|
title: '送配电线路架设(初级)',
|
||||||
// 正确率
|
// 姓名
|
||||||
correctRate: '80%',
|
name: '张三',
|
||||||
// 累计作答
|
// 状态
|
||||||
totalAnswer: 100,
|
status: '待练习',
|
||||||
// 累计答对
|
// 练习时间
|
||||||
totalCorrect: 80
|
time: '2020-12-12 12:00',
|
||||||
|
// 练习次数
|
||||||
|
count: 1,
|
||||||
|
// 总分数
|
||||||
|
total: '--',
|
||||||
|
// 得分
|
||||||
|
score: '暂无'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 待练习列表
|
||||||
|
waitList: [],
|
||||||
|
// 已练习列表
|
||||||
|
alreadyList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.list = this.allList
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleExercises(type) {
|
handleTab(item, index) {
|
||||||
console.log('type', type)
|
this.activeIndex = index
|
||||||
|
if (index === 0) {
|
||||||
|
this.list = this.allList
|
||||||
|
} else if (index === 1) {
|
||||||
|
this.list = this.waitList
|
||||||
|
} else if (index === 2) {
|
||||||
|
this.list = this.alreadyList
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 开始练习
|
||||||
|
handleExercise(id) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/YNEduApp/prac/exercises?type=${type}`
|
url: '/pages/YNEduApp/prac/pracDetail?id=' + id
|
||||||
|
})
|
||||||
|
uni.removeStorageSync('from')
|
||||||
|
uni.setStorageSync('from', '/pages/YNEduApp/prac/prac')
|
||||||
|
},
|
||||||
|
leftClick() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/YNEduApp/index/index'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -77,128 +121,93 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.wrapper {
|
.tab-wrapper {
|
||||||
height: 94vh;
|
|
||||||
background: url('/static/images/练习-bg.png') no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
padding: 20px;
|
|
||||||
|
|
||||||
.top-container {
|
|
||||||
margin-top: 40px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
justify-content: space-around;
|
||||||
|
/* background: #fff; */
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
.name {
|
.tab-item {
|
||||||
font-weight: 500;
|
width: 25%;
|
||||||
font-size: 17px;
|
display: flex;
|
||||||
color: #ffffff;
|
flex-direction: column;
|
||||||
margin-left: 20px;
|
align-items: center;
|
||||||
|
padding: 10px 0;
|
||||||
|
.tab-line {
|
||||||
|
margin-top: 5px;
|
||||||
|
width: 30%;
|
||||||
|
height: 2px;
|
||||||
|
background-color: #409eff;
|
||||||
|
transition: width 0.3s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
padding: 0 10px;
|
||||||
|
.item-wrapper {
|
||||||
|
background: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border-radius: 5px;
|
||||||
.title {
|
.title {
|
||||||
margin-top: 50px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
font-weight: 800;
|
|
||||||
font-size: 26px;
|
|
||||||
color: #fff;
|
|
||||||
line-height: 30px;
|
|
||||||
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.center-container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
.left {
|
|
||||||
width: 52%;
|
|
||||||
height: 209px;
|
|
||||||
background: #5185ed;
|
|
||||||
border-radius: 8px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
|
|
||||||
.item {
|
|
||||||
padding: 0 15px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-around;
|
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
margin-left: -8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
|
||||||
color: #fff;
|
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: bold;
|
||||||
margin-left: 10px;
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.name-status {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.name {
|
||||||
|
display: flex;
|
||||||
|
.name-sub {
|
||||||
|
margin-left: 5px;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.status {
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.time {
|
||||||
|
color: #999;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.count-total {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 10px;
|
||||||
|
.count {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.total {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bt-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 10px;
|
||||||
|
.score {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
.btn {
|
||||||
|
padding: 5px 10px;
|
||||||
|
background: #409eff;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-data {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
justify-content: center;
|
||||||
}
|
margin-top: 100px;
|
||||||
}
|
.no-data-text {
|
||||||
|
margin-top: 10px;
|
||||||
.right {
|
color: #999;
|
||||||
width: 43%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
.right-top {
|
|
||||||
height: 98px;
|
|
||||||
background: #e7ac67;
|
|
||||||
border-radius: 8px;
|
|
||||||
position: relative;
|
|
||||||
// top-icon - 在当前位置的右下角
|
|
||||||
.top-icon {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.right-bottom {
|
|
||||||
height: 98px;
|
|
||||||
background: #73c2f7;
|
|
||||||
border-radius: 8px 8px 8px 8px;
|
|
||||||
position: relative;
|
|
||||||
// bottom-icon - 在当前位置的左下角
|
|
||||||
.bottom-icon {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.right-text {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 15px;
|
|
||||||
color: #fff;
|
|
||||||
margin: 5px 0 0 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.bottom {
|
|
||||||
margin-top: 20px;
|
|
||||||
width: 100%;
|
|
||||||
height: 120px;
|
|
||||||
background: #226de3;
|
|
||||||
border-radius: 8px;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.bottom-icon {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-text {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 30px;
|
|
||||||
color: #ffffff;
|
|
||||||
line-height: 120px;
|
|
||||||
margin: auto 20px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,213 @@
|
||||||
|
<template>
|
||||||
|
<view class="wrapper">
|
||||||
|
<u-navbar title="学习项目" @leftClick="leftClick" placeholder />
|
||||||
|
<div class="top-container">
|
||||||
|
<u-avatar :src="avatar" size="60" />
|
||||||
|
<div class="name">{{ name }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="title">{{ title }}</div>
|
||||||
|
<div class="center-container">
|
||||||
|
<div class="left">
|
||||||
|
<div class="item">
|
||||||
|
<u-icon name="/static/images/正确率.png" size="50" />
|
||||||
|
<div class="text">
|
||||||
|
<div>正确率</div>
|
||||||
|
<div>{{ correctRate }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<u-icon name="/static/images/累计作答.png" size="50" />
|
||||||
|
<div class="text">
|
||||||
|
<div>累计作答</div>
|
||||||
|
<div>{{ totalAnswer }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<u-icon name="/static/images/累计答对.png" size="50" />
|
||||||
|
<div class="text">
|
||||||
|
<div>累计答对</div>
|
||||||
|
<div>{{ totalCorrect }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="right-top" @click="handleExercises(1)">
|
||||||
|
<div class="right-text">顺序练习</div>
|
||||||
|
<u-icon class="top-icon" name="/static/images/顺序练习.png" width="84" height="73" />
|
||||||
|
</div>
|
||||||
|
<div class="right-bottom" @click="handleExercises(2)">
|
||||||
|
<div class="right-text">随机练习</div>
|
||||||
|
<u-icon class="bottom-icon" name="/static/images/随机练习.png" width="84" height="73" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 目前不要选择题库 -->
|
||||||
|
<!-- <div class="bottom">
|
||||||
|
<div class="bottom-text">选择题库</div>
|
||||||
|
<u-icon class="bottom-icon" name="/static/images/选择题库.png" width="140" height="100" />
|
||||||
|
</div> -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 头像
|
||||||
|
avatar: 'https://cdn.uviewui.com/uview/album/1.jpg',
|
||||||
|
// 姓名
|
||||||
|
name: '张三',
|
||||||
|
// 练习标题
|
||||||
|
title: '送配电线路架设(初级)',
|
||||||
|
// 正确率
|
||||||
|
correctRate: '80%',
|
||||||
|
// 累计作答
|
||||||
|
totalAnswer: 100,
|
||||||
|
// 累计答对
|
||||||
|
totalCorrect: 80
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleExercises(type) {
|
||||||
|
console.log('type', type)
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/YNEduApp/prac/exercises?type=${type}`
|
||||||
|
})
|
||||||
|
},
|
||||||
|
leftClick() {
|
||||||
|
const from = uni.getStorageSync('from')
|
||||||
|
uni.navigateTo({
|
||||||
|
url: from
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.wrapper {
|
||||||
|
height: 94vh;
|
||||||
|
background: url('/static/images/练习-bg.png') no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
padding: 20px;
|
||||||
|
|
||||||
|
.top-container {
|
||||||
|
margin-top: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 17px;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin-top: 50px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 26px;
|
||||||
|
color: #fff;
|
||||||
|
line-height: 30px;
|
||||||
|
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.left {
|
||||||
|
width: 52%;
|
||||||
|
height: 209px;
|
||||||
|
background: #5185ed;
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-around;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding: 0 15px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-left: -8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
margin-left: 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
width: 43%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.right-top {
|
||||||
|
height: 98px;
|
||||||
|
background: #e7ac67;
|
||||||
|
border-radius: 8px;
|
||||||
|
position: relative;
|
||||||
|
// top-icon - 在当前位置的右下角
|
||||||
|
.top-icon {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right-bottom {
|
||||||
|
height: 98px;
|
||||||
|
background: #73c2f7;
|
||||||
|
border-radius: 8px 8px 8px 8px;
|
||||||
|
position: relative;
|
||||||
|
// bottom-icon - 在当前位置的左下角
|
||||||
|
.bottom-icon {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-text {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 15px;
|
||||||
|
color: #fff;
|
||||||
|
margin: 5px 0 0 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bottom {
|
||||||
|
margin-top: 20px;
|
||||||
|
width: 100%;
|
||||||
|
height: 120px;
|
||||||
|
background: #226de3;
|
||||||
|
border-radius: 8px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.bottom-icon {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-text {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 30px;
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 120px;
|
||||||
|
margin: auto 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 903 B |
Binary file not shown.
|
After Width: | Height: | Size: 959 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Loading…
Reference in New Issue