|
@@ -123,12 +123,6 @@ export default {
|
|
|
if (target <= 0) return 0
|
|
if (target <= 0) return 0
|
|
|
var p = Math.round(total / target * 100)
|
|
var p = Math.round(total / target * 100)
|
|
|
return Math.min(p, 100)
|
|
return Math.min(p, 100)
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- methods: {
|
|
|
|
|
- formatDate: function(dateStr) {
|
|
|
|
|
- if (!dateStr) return ''
|
|
|
|
|
- return String(dateStr).slice(0, 10)
|
|
|
|
|
},
|
|
},
|
|
|
deadlineText: function() {
|
|
deadlineText: function() {
|
|
|
if (!this.challenge || !this.challenge.respondDeadline) return ''
|
|
if (!this.challenge || !this.challenge.respondDeadline) return ''
|
|
@@ -139,6 +133,12 @@ export default {
|
|
|
if (diffDays < 0) return '(已超时)'
|
|
if (diffDays < 0) return '(已超时)'
|
|
|
if (diffDays === 0) return '(截止今天)'
|
|
if (diffDays === 0) return '(截止今天)'
|
|
|
return '(剩余 ' + diffDays + ' 天)'
|
|
return '(剩余 ' + diffDays + ' 天)'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ formatDate: function(dateStr) {
|
|
|
|
|
+ if (!dateStr) return ''
|
|
|
|
|
+ return String(dateStr).slice(0, 10)
|
|
|
},
|
|
},
|
|
|
memberPercent: function(value) {
|
|
memberPercent: function(value) {
|
|
|
var target = this.challenge && this.challenge.targetValue ? this.challenge.targetValue : 1
|
|
var target = this.challenge && this.challenge.targetValue ? this.challenge.targetValue : 1
|