|
@@ -388,7 +388,6 @@ function init() {
|
|
postId: data.postId
|
|
postId: data.postId
|
|
}
|
|
}
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- initTaskDetail()
|
|
|
|
switch (res.code.toString()) {
|
|
switch (res.code.toString()) {
|
|
case "0":
|
|
case "0":
|
|
data.srcContentId = res.data.srcContentId
|
|
data.srcContentId = res.data.srcContentId
|
|
@@ -397,16 +396,21 @@ function init() {
|
|
// data.status = 'error'
|
|
// data.status = 'error'
|
|
// return
|
|
// return
|
|
// }
|
|
// }
|
|
-
|
|
|
|
|
|
+ data.detail = JSON.parse(res.data.postBizData)
|
|
// 未开始
|
|
// 未开始
|
|
- if (res.data.postType == 0) {
|
|
|
|
|
|
+ if (data.detail.status == 0) {
|
|
data.status = 'not-open'
|
|
data.status = 'not-open'
|
|
}
|
|
}
|
|
|
|
|
|
// 进行中
|
|
// 进行中
|
|
- if (res.data.postType == 1) {
|
|
|
|
|
|
+ if (data.detail.status == 1) {
|
|
|
|
+
|
|
|
|
+ if(data.detail.totalCount == data.detail.finishCount){
|
|
|
|
+ data.status = 'close'
|
|
|
|
+ data.close_title = 'Better luck next time!'
|
|
|
|
+ return
|
|
|
|
+ }
|
|
data.status = 'opened'
|
|
data.status = 'opened'
|
|
- data.detail = JSON.parse(res.data.postBizData)
|
|
|
|
if (data.detail.myReceived) {
|
|
if (data.detail.myReceived) {
|
|
data.status = 'opened'
|
|
data.status = 'opened'
|
|
if (data.detail.myReceived.taskFinishStatus == 1) {
|
|
if (data.detail.myReceived.taskFinishStatus == 1) {
|
|
@@ -431,9 +435,10 @@ function init() {
|
|
getValidity()
|
|
getValidity()
|
|
}
|
|
}
|
|
console.log(data.detail)
|
|
console.log(data.detail)
|
|
|
|
+ initTaskDetail()
|
|
}
|
|
}
|
|
// 已结束
|
|
// 已结束
|
|
- if (res.data.postType == 2) {
|
|
|
|
|
|
+ if (data.detail.status == 2) {
|
|
data.status = 'close'
|
|
data.status = 'close'
|
|
}
|
|
}
|
|
break
|
|
break
|