Commit 6bb6b52b authored by Damon's avatar Damon

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

parents 0008c12c fc58922f
......@@ -2,17 +2,24 @@
<view class="u-flex statis">
<view class="u-flex top">
<view class="u-flex avatar">
<view class="avatar-list" v-for="(item, index) in avatar" :key="index"
<view
class="avatar-list"
v-for="(item, index) in info.avatar"
:key="index"
><image :src="item" mode="scaleToFill"
/></view>
</view>
<view class="notice">
<u-notice-bar
mode="vertical"
mode="horizontal"
type="none"
:list="dynamic"
font-size="24"
:list="info.dynamic"
bg-color="#fff"
color="#2953FF"
:volume-icon="false"
autoplay
padding="0 10rpx"
></u-notice-bar>
</view>
</view>
......@@ -22,7 +29,7 @@
今日做题:
<u-count-to
:start-val="0"
:end-val="today"
:end-val="info.today"
:font-size="32"
color="#191C27"
></u-count-to>
......@@ -31,7 +38,7 @@
累计做题:
<u-count-to
:start-val="0"
:end-val="total"
:end-val="info.total"
:font-size="32"
color="#191C27"
></u-count-to>
......@@ -41,7 +48,7 @@
<view class="days-lists">
<u-count-to
:start-val="0"
:end-val="days"
:end-val="info.days"
:font-size="60"
color="#191C27"
></u-count-to>
......@@ -66,25 +73,18 @@
export default {
name: 'subjectStatistics',
props: {
days: {
type: Number,
default: 0,
},
today: {
type: Number,
default: 0,
},
total: {
type: Number,
default: 0,
},
dynamic: {
type: Array,
default: [],
},
avatar: {
type: Array,
default: [],
info: {
type: Object,
default() {
return {
days: 0,
today: 0,
total: 0,
dynamic: [],
avatar: [],
selected: {},
}
},
},
},
data() {
......@@ -95,14 +95,30 @@ export default {
},
computed: {
btnStyle() {
return {
padding: '0 90rpx',
}
return this.buttonDisabled
? {
width: '320rpx',
height: '104rpx',
fontSize: '32rpx',
fontWeight: 'bold',
backgroundColor: '#D2D5DE',
}
: {
width: '320rpx',
height: '104rpx',
fontSize: '32rpx',
fontWeight: 'bold',
backgroundColor: '#2953FF',
}
},
buttonDisabled() {
return this.$u.test.isEmpty(this.info.selected)
},
},
created() {},
methods: {
answer() {
if (this.buttonDisabled) return
this.$emit('answer')
},
},
......@@ -112,18 +128,16 @@ export default {
.statis {
flex-flow: column;
background: #fff;
padding: 10rpx;
border: 2rpx solid #ccc;
margin: 20rpx;
border-radius: 20rpx;
padding: 30rpx 30rpx 40rpx 30rpx;
border-radius: 24rpx;
.top {
width: 100%;
padding: 30rpx 30rpx 0 30rpx;
.avatar {
padding-right: 30rpx;
padding-right: 16rpx;
.avatar-list {
width: 40rpx;
height: 40rpx;
margin-left: -6rpx;
image {
width: 50rpx;
height: 50rpx;
......@@ -170,7 +184,7 @@ export default {
}
}
.bottom {
padding: 30rpx 10rpx;
margin-top: 54rpx;
}
}
</style>
This diff is collapsed.
......@@ -188,6 +188,7 @@ export default {
this.showPop = true
},
handleClickSubmit() {
if (this.buttonDisabled) return
this.showPop = false
},
baiduLocation(long, lat) {
......
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