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