填报增加loading

This commit is contained in:
aixianling
2023-01-05 14:46:56 +08:00
parent 7da86e1c5a
commit 544e291eb8
2 changed files with 9 additions and 6 deletions

View File

@@ -74,29 +74,31 @@ export default {
},
handleReject() {
if (this.check()) {
uni.showLoading({title: "提交中..."})
const {$route: {query: {taskDetailId}}, detail: fields} = this
this.$http.post("/app/appassessmentscorev2task/examine", {
taskDetailId, pass: false, fields
}).then(res => {
if (res?.code == 0) {
this.$u.toast("提交成功!")
setTimeout(()=>uni.reLaunch({url:"./AppRecoScore"}),1500)
setTimeout(() => uni.reLaunch({url: "./AppRecoScore"}), 1500)
}
})
}).finally(uni.hideLoading)
}
},
handlePass() {
if (this.check()) {
uni.showLoading({title: "提交中..."})
const {$route: {query: {taskDetailId}}, detail: fields} = this
this.$http.post("/app/appassessmentscorev2task/examine", {
taskDetailId, pass: true, fields
}).then(res => {
if (res?.code == 0) {
this.$u.toast("提交成功!")
setTimeout(()=>uni.reLaunch({url:"./AppRecoScore"}),1500)
setTimeout(() => uni.reLaunch({url: "./AppRecoScore"}), 1500)
}
})
}).finally(uni.hideLoading)
}
},
check() {
@@ -123,7 +125,7 @@ export default {
<style lang="scss" scoped>
.rsApproval {
.reject{
.reject {
font-family: PingFangSC-Medium, PingFang SC;
line-height: 112px;
text-align: center;

View File

@@ -99,6 +99,7 @@ export default {
} else return false
})) {
const {$route: {query: {taskDetailId, taskId}}, detail: fields} = this
uni.showLoading({title: "提交中..."})
this.$http.post("/app/appassessmentscorev2task/commit", {
taskDetailId, taskId, fields
}).then(res => {
@@ -106,7 +107,7 @@ export default {
this.$u.toast("提交成功!")
setTimeout(() => uni.navigateBack(), 1500)
}
})
}).finally(uni.hideLoading)
}
},
gotoApprove() {