Commit 6547261b authored by Damon's avatar Damon

Merge branch 'dev-v1.0.0' of git.banshouhui.com:wuzhenzhe/study into dev-v1.0.0

parents b3cf3c85 2ebefd8a
<template> <template>
<view class="u-flex statis"> <view class="statis">
<image class="background-image" :src="meiriyilianImage"></image>
<view class="content-view">
<view class="u-flex top"> <view class="u-flex top">
<view class="u-flex avatar"> <view class="u-flex avatar">
<view <view
...@@ -13,10 +15,9 @@ ...@@ -13,10 +15,9 @@
<u-notice-bar <u-notice-bar
mode="horizontal" mode="horizontal"
type="none" type="none"
font-size="24" font-size="26"
:list="info.dynamic" :list="info.dynamic"
bg-color="#fff" color="#FFFFFF"
color="#2953FF"
:volume-icon="false" :volume-icon="false"
autoplay autoplay
padding="0 10rpx" padding="0 10rpx"
...@@ -24,49 +25,27 @@ ...@@ -24,49 +25,27 @@
</view> </view>
</view> </view>
<view class="u-flex center"> <view class="u-flex center">
<view class="u-flex topics"> <view v-for="(value, key) in detailLabels" :key="key" class="item-view">
<view class="topics-lists"> <view v-if="key == 'total'" class="line-view"></view>
今日做题: <view class="left-view">
<u-count-to <view class="count-view">{{ info[key] }}</view>
:start-val="0" <view>{{ value }}</view>
:end-val="info.today"
:font-size="32"
color="#191C27"
></u-count-to>
</view> </view>
<view class="topics-lists"> <view v-if="key == 'total'" class="line-view"></view>
累计做题:
<u-count-to
:start-val="0"
:end-val="info.total"
:font-size="32"
color="#191C27"
></u-count-to>
</view>
</view>
<view class="u-flex days">
<view class="days-lists">
<u-count-to
:start-val="0"
:end-val="info.days"
:font-size="60"
color="#191C27"
></u-count-to>
<text class="unit">Days</text>
</view>
<view class="days-lists">累计坚持</view>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
<u-button <view
:custom-style="btnStyle" class="bottom-button"
type="primary" type="primary"
shape="circle" shape="circle"
@click="answer" @click="$u.throttle(answer, 500)"
>去练习</u-button ><image class="button-image" :src="lianxianniuImage"></image
>每日一练</view
> >
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -94,25 +73,23 @@ export default { ...@@ -94,25 +73,23 @@ export default {
} }
}, },
computed: { computed: {
btnStyle() { detailLabels() {
return this.buttonDisabled return {
? { today: '今日做题',
width: '320rpx', total: '累计做题',
height: '104rpx', days: '累计天数',
fontSize: '32rpx',
fontWeight: 'bold',
backgroundColor: '#D2D5DE',
}
: {
width: '320rpx',
height: '104rpx',
fontSize: '32rpx',
fontWeight: 'bold',
backgroundColor: '#2953FF',
} }
}, },
buttonDisabled() { avatars() {
return this.$u.test.isEmpty(this.info.selected) return this.info.avatar.length > 4
? this.info.avatar.slice(0, 4)
: this.info.avatar
},
meiriyilianImage() {
return process.uniEnv.qn_base_url + 'meiriyilianquyu.png'
},
lianxianniuImage() {
return process.uniEnv.qn_base_url + 'lianxianniu.png'
}, },
}, },
created() {}, created() {},
...@@ -126,22 +103,39 @@ export default { ...@@ -126,22 +103,39 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.statis { .statis {
flex-flow: column; // flex-flow: column;
background: #fff; // background: #fff;
padding: 30rpx 30rpx 40rpx 30rpx; // padding: 30rpx 30rpx 40rpx 30rpx;
border-radius: 24rpx; border-radius: 24rpx;
overflow: hidden;
position: relative;
box-shadow: 0px 10px 16px rgba(29, 53, 155, 0.2);
margin-bottom: 56rpx;
z-index: 0;
height: 472rpx;
.background-image {
position: absolute;
z-index: -1;
height: 472rpx;
width: 702rpx;
}
.content-view {
padding: 40rpx 30rpx;
.top { .top {
width: 100%; width: 100%;
margin-left: 6rpx; margin-left: 15rpx;
display: flex;
align-items: center;
.avatar { .avatar {
padding-right: 16rpx;
.avatar-list { .avatar-list {
width: 40rpx; margin-left: -15rpx;
height: 40rpx; display: flex;
margin-left: -6rpx; justify-content: flex-start;
align-items: center;
image { image {
width: 50rpx; width: 44rpx;
height: 50rpx; height: 44rpx;
border: 2rpx solid #ccc; border: 2rpx solid #ccc;
background: #fff; background: #fff;
border-radius: 50%; border-radius: 50%;
...@@ -157,34 +151,56 @@ export default { ...@@ -157,34 +151,56 @@ export default {
.center { .center {
width: 100%; width: 100%;
justify-content: space-around; justify-content: space-around;
padding-top: 20rpx; padding-top: 56rpx;
.days { padding-bottom: 66rpx;
flex-flow: column; .item-view {
flex: 1; display: flex;
.days-lists { align-items: center;
color: #9ea5bb; justify-content: center;
padding: 5rpx 0rpx; .left-view {
.unit { text-align: center;
color: #5a6073; color: #ffffff;
font-size: 36rpx; font-size: 26rpx;
width: 240rpx;
.count-view {
font-weight: bold; font-weight: bold;
padding-left: 10rpx; font-size: 48rpx;
} margin-bottom: 6rpx;
} }
} }
.topics { .line-view {
flex-flow: column; width: 2rpx;
flex: 1; background-color: #ffffff;
border-right: 2rpx solid #e8ebf3; height: 70rpx;
.topics-lists {
width: 100%;
padding: 10rpx 0rpx;
color: #9ea5bb;
} }
} }
} }
.bottom { .bottom {
margin-top: 54rpx; display: flex;
justify-content: center;
align-items: center;
.bottom-button {
display: flex;
justify-content: center;
align-items: center;
position: relative;
overflow: hidden;
z-index: 0;
border-radius: 52rpx;
font-size: 32rpx;
font-weight: bold;
color: #2953ff;
height: 104rpx;
width: 400rpx;
.button-image {
width: 400rpx;
height: 104rpx;
position: absolute;
z-index: -1;
}
}
}
} }
} }
</style> </style>
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
></u-navbar> ></u-navbar>
<view class="content"> <view class="content">
<view class="exam-title-view" @click="$u.throttle(handleSelect, 500)"> <view class="exam-title-view" @click="$u.throttle(handleSelect, 500)">
<image class="titleImage" :src="imageUrl"></image>
<text>{{ title }}</text> <text>{{ title }}</text>
<u-icon class="icon-view" name="arrow-up-fill"></u-icon> <u-icon class="icon-view" name="arrow-up-fill"></u-icon>
</view> </view>
...@@ -19,33 +18,30 @@ ...@@ -19,33 +18,30 @@
<text>您还未选择题库,请先选择题库</text> <text>您还未选择题库,请先选择题库</text>
</view> </view>
<view v-else class="detail-view"> <view v-else class="detail-view">
<view class="detail-item" <view
><image class="detail-image" :src="imageUrl"></image v-for="(item, index) in detailItems"
><text>{{ selected.location }}</text></view :key="index"
> :class="['detail-item', { 'pass-text': item.key == 'pass' }]"
<view class="detail-item" ><image
><image class="detail-image" :src="imageUrl"></image>通过率:<text class="detail-image"
class="pass-text" :style="item.imageStyle"
>{{ selected.pass }}</text :src="item.image"
></view ></image
><text v-if="item.title" class="detail-title">{{ item.title }}</text
><text class="detail-text">{{ selected[item.key] }}</text></view
> >
</view> </view>
<view class="tip-card-view"> <SubjectStatistics
<view class="tip-card-message"> :info="info"
<image class="tip-image" :src="imageUrl"></image @answer="handleAnswer"
><text>绑卡或者购买该题库后,即可刷题或模拟考试</text> ></SubjectStatistics>
</view>
</view>
<view class="exam-mark"> <view class="exam-mark">
<view v-for="(item, index) in marks" :key="index"> <view v-for="(item, index) in marks" :key="index" class="list-view">
<image class="exam-image" :src="item.image"></image> <image class="exam-image" :src="item.image"></image>
<view class="right-view">
<view>{{ item.name }}</view> <view>{{ item.name }}</view>
<view class="exam-count" <view class="label-view">{{ item.label }}</view>
><view>{{ </view>
item.allValue ? item.value + '/' + item.allValue : item.value
}}</view
><view class="exam-fen" v-if="index == 1">分</view></view
>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
</view> </view>
...@@ -62,20 +58,10 @@ ...@@ -62,20 +58,10 @@
<view>{{ item.title }}</view> <view>{{ item.title }}</view>
</view> </view>
</view> </view>
<view class="daily-practice" @click="$u.throttle(handleClickFile, 500)"> <view class="bottom-view">
<view class="daily-practice-left"> <image class="bottom-image" :src="mokaodashiImage"></image>
<image :src="imageUrl" class="file-image"></image> <view>想要轻松考过,首选模考大师</view>
<text>每日一练</text>
</view>
<view class="daily-practice-right">
<text>累计打卡{{ info.days }}天</text>
<u-icon class="arrow-right" name="arrow-right"></u-icon>
</view>
</view> </view>
<SubjectStatistics
:info="info"
@answer="handleAnswer"
></SubjectStatistics>
</view> </view>
<ExperiencePop :visible.sync="visible" /> <ExperiencePop :visible.sync="visible" />
</view> </view>
...@@ -93,7 +79,8 @@ export default { ...@@ -93,7 +79,8 @@ export default {
selected: { selected: {
key: 0, key: 0,
name: '熔化焊接与热切割作业', name: '熔化焊接与热切割作业',
location: '广东省试题', location: '黑龙江省题',
count: '899',
pass: '96%', pass: '96%',
}, },
} }
...@@ -108,20 +95,20 @@ export default { ...@@ -108,20 +95,20 @@ export default {
noExam() { noExam() {
return this.$u.test.isEmpty(this.selected.name) return this.$u.test.isEmpty(this.selected.name)
}, },
mokaodashiImage() {
return process.uniEnv.qn_base_url + 'mokaodashi.png'
},
marks() { marks() {
return [ return [
{ {
key: 'all',
name: '全部试题', name: '全部试题',
value: 0, label: '题库进阶练习',
allValue: 999, image: process.uniEnv.qn_base_url + 'quanbushiti.png',
image: this.imageUrl,
}, },
{ {
key: 'moni', name: '模拟考试',
name: '模拟', label: '真题模拟强化',
value: 999, image: process.uniEnv.qn_base_url + 'monishiti.png',
image: this.imageUrl,
}, },
] ]
}, },
...@@ -131,7 +118,7 @@ export default { ...@@ -131,7 +118,7 @@ export default {
today: 0, today: 0,
total: 0, total: 0,
dynamic: ['2分钟前 李**完成了“高空作业习题”练习'], dynamic: ['2分钟前 李**完成了“高空作业习题”练习'],
avatar: [this.imageUrl, this.imageUrl, this.imageUrl], avatar: [this.imageUrl, this.imageUrl, this.imageUrl, this.imageUrl],
selected: this.selected, selected: this.selected,
} }
}, },
...@@ -141,36 +128,51 @@ export default { ...@@ -141,36 +128,51 @@ export default {
pathName: 'pages/xxx/xxx', pathName: 'pages/xxx/xxx',
title: '专项练习', title: '专项练习',
value: '', value: '',
icon: this.imageUrl, icon: process.uniEnv.qn_base_url + 'zhuanxiang.png',
imageStyle: 'width:60rpx;height:60rpx', imageStyle: 'width:72rpx;height:64rpx',
}, },
{ {
pathName: 'pages/xxx/xxx', pathName: 'pages/xxx/xxx',
title: '我的错题', title: '错题记录',
value: '', value: '',
icon: this.imageUrl, icon: process.uniEnv.qn_base_url + 'cuotijilu.png',
imageStyle: 'width:60rpx;height:60rpx', imageStyle: 'width:62rpx;height:64rpx',
}, },
{ {
pathName: 'pages/xxx/xxx', pathName: 'pages/xxx/xxx',
title: '收藏的题', title: '收藏的题',
value: '', value: '',
icon: this.imageUrl, icon: process.uniEnv.qn_base_url + 'shoucangdeti.png',
imageStyle: 'width:60rpx;height:60rpx', imageStyle: 'width:76rpx;height:64rpx',
}, },
{ {
pathName: 'pages/xxx/xxx', pathName: 'pages/xxx/xxx',
title: '我的成绩', title: '试题搜索',
value: '', value: '',
icon: this.imageUrl, icon: process.uniEnv.qn_base_url + 'sousuoshiti.png',
imageStyle: 'width:60rpx;height:60rpx', imageStyle: 'width:62rpx;height:64rpx',
},
]
}, },
detailItems() {
return [
{ {
pathName: 'pages/xxx/xxx', title: '',
title: '搜索试题', key: 'location',
value: '', image: process.uniEnv.qn_base_url + 'quyu.png',
icon: this.imageUrl, imageStyle: 'width:24rpx;height:28rpx',
imageStyle: 'width:60rpx;height:60rpx', },
{
title: '通过率:',
key: 'pass',
image: process.uniEnv.qn_base_url + 'gailv.png',
imageStyle: 'width:28rpx;height:28rpx',
},
{
title: '题目数:',
key: 'count',
image: process.uniEnv.qn_base_url + 'timushu.png',
imageStyle: 'width:28rpx;height:30rpx',
}, },
] ]
}, },
...@@ -237,14 +239,14 @@ export default { ...@@ -237,14 +239,14 @@ export default {
height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-color: #f8fafd; background-color: #f7f9fc;
background-image: linear-gradient(to top, #f8fafd 0%, #e9f3ff 50%); background-image: linear-gradient(to top, #f8fafd 0%, #e9f3ff 50%);
background-size: 100% 520rpx; background-size: 100% 520rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
.content { .content {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
padding: 16rpx 24rpx; padding: 16rpx 24rpx 50rpx 24rpx;
.exam-title-view { .exam-title-view {
color: #191c27; color: #191c27;
font-weight: bold; font-weight: bold;
...@@ -269,68 +271,52 @@ export default { ...@@ -269,68 +271,52 @@ export default {
margin-top: 22rpx; margin-top: 22rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
.tip-card-view {
display: flex;
justify-content: center;
align-items: center;
.tip-card-message {
font-size: 26rpx;
color: #2953ff;
border-radius: 12rpx 12rpx 0 0;
border-width: 2rpx 2rpx 0 2rpx;
border-style: solid;
border-color: #2953ff;
width: 640rpx;
line-height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
height: 60rpx;
.tip-image {
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
}
}
}
.detail-view { .detail-view {
display: flex; display: flex;
align-items: center; align-items: flex-start;
margin-top: 22rpx; margin-top: 14rpx;
margin-bottom: 40rpx; margin-bottom: 36rpx;
.detail-item { .detail-item {
color: #9ea5bb; color: #9ea5bb;
font-size: 28rpx; font-size: 28rpx;
margin-right: 40rpx; margin-right: 30rpx;
display: flex; display: flex;
align-items: center; align-items: flex-start;
.detail-title {
color: #9ea5bb;
}
.detail-image { .detail-image {
width: 28rpx;
height: 28rpx;
margin-right: 10rpx; margin-right: 10rpx;
margin-top: 4rpx;
}
.detail-text {
word-break: break-all;
max-width: 140rpx;
} }
.pass-text { &.pass-text {
color: #2953ff; color: #2953ff;
} }
} }
} }
.sub-content { .sub-content {
display: flex; display: flex;
justify-content: space-around; justify-content: space-between;
align-items: center; align-items: center;
margin: 60rpx 0; margin: 60rpx 0 160rpx 0;
.sub-content-item { .sub-content-item {
color: #5a6073; color: #5a6073;
font-size: 26rpx; font-size: 26rpx;
display: flex; display: flex;
justify-content: center; justify-content: space-between;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 152rpx;
height: 176rpx;
background-color: #ffffff;
border-radius: 16rpx;
padding: 30rpx 0;
.sub-image { .sub-image {
width: 60rpx; margin-bottom: 20rpx;
height: 60rpx;
margin-bottom: 14rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -338,73 +324,45 @@ export default { ...@@ -338,73 +324,45 @@ export default {
} }
} }
.exam-mark { .exam-mark {
height: 280rpx;
border-radius: 24rpx;
background-image: linear-gradient(to top right, #2953ff 0%, #2272ff 50%);
box-shadow: 0px 10px 16px rgba(29, 53, 155, 0.2);
font-size: 28rpx;
text-align: center;
position: relative;
display: flex; display: flex;
justify-content: space-around;
align-items: center; align-items: center;
color: #ffffff; justify-content: space-between;
padding-top: 14rpx; .list-view {
width: 340rpx;
height: 136rpx;
border-radius: 16rpx;
display: flex;
align-items: center;
background-color: #ffffff;
.exam-image { .exam-image {
width: 50rpx; width: 96rpx;
height: 54rpx; height: 96rpx;
margin-bottom: 10rpx; padding-left: 24rpx;
padding-right: 16rpx;
} }
.exam-count { .right-view {
display: flex; color: #191c27;
align-items: flex-end; font-size: 32rpx;
font-weight: bold; font-weight: bold;
margin-top: 24rpx; .label-view {
font-size: 52rpx; color: #9ea5bb;
.exam-fen {
font-size: 28rpx;
font-weight: 400; font-weight: 400;
padding-bottom: 10rpx; font-size: 26rpx;
padding-left: 10rpx; margin-top: 4rpx;
} }
} }
.line-view {
position: absolute;
left: auto;
right: auto;
top: auto;
bottom: auto;
height: 160rpx;
width: 2rpx;
background-color: #ffffff;
} }
} }
.daily-practice { .bottom-view {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
margin-bottom: 30rpx; justify-content: center;
.daily-practice-left {
color: #191c27;
font-weight: bold;
font-size: 32rpx;
display: flex;
align-items: center;
.file-image {
width: 34rpx;
height: 34rpx;
flex-shrink: 0;
margin-right: 16rpx;
}
}
.daily-practice-right {
color: #191c27;
font-size: 26rpx; font-size: 26rpx;
.arrow-right { color: #adbdd4;
color: #9ea5bb; .bottom-image {
font-size: 28rpx; width: 56rpx;
margin-left: 2rpx; height: 56rpx;
} margin-right: 14rpx;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment