This commit is contained in:
shijingjing
2022-04-28 18:10:44 +08:00
parent 99f9962338
commit 292c557180
3 changed files with 27 additions and 35 deletions

View File

@@ -112,42 +112,34 @@ export default {
current: img
})
},
submit() {
if (this.type == 0) { // 纳入审核
this.$http.post(`/app/apppreventionreturntopoverty/examine`,null,{
params: {
...this.form,
id: this.id,
}
}).then(res => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('reload')
setTimeout(() =>{
uni.navigateBack({
delta: 2
})
},600)
}
})
var url = `/app/apppreventionreturntopoverty/examine`
var params = {
...this.form,
id: this.id,
}
} else if (this.type == 1){ // 解除审核
this.$http.post(`/app/apppreventionreturntopoverty/relieve`,null,{
params: {
...this.form,
id: this.id,
}
}).then(res => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('reload')
setTimeout(() =>{
uni.navigateBack({
delta: 2
})
},600)
}
})
url = `/app/apppreventionreturntopoverty/relieve`
}
var formData = new FormData()
for (let key in params) {
formData.append(key, params[key])
}
this.$http.post(url,formData).then(res => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('reload')
setTimeout(() =>{
uni.navigateBack({
delta: 2
})
},600)
}
})
}
},
}