diff --git a/src/apps/AppVillagersCircle/Reject.vue b/src/apps/AppVillagersCircle/Reject.vue index 63097ff8..20064221 100644 --- a/src/apps/AppVillagersCircle/Reject.vue +++ b/src/apps/AppVillagersCircle/Reject.vue @@ -17,7 +17,7 @@ export default { return { value: '', id: '', - pass: '', + pass: '', // 0 驳回发布信息 1 驳回发布评论 flag: '', // 0 驳回信息 1 驳回评论 }; }, @@ -32,9 +32,8 @@ export default { }, methods: { submit() { - - if(this.flag == 0) { - this.$http.post('/app/appvillagercircleinfo/examine',null, { + let url = ['/app/appvillagercircleinfo/examine','/app/appvillagercirclecomment/examine'] + this.$http.post(url[this.flag],null, { params: { id: this.id, pass: this.pass, @@ -47,23 +46,6 @@ export default { uni.navigateBack({delta: 2}) },600) }) - } - if(this.flag == 1) { - this.$http.post('/app/appvillagercirclecomment/examine',null, { - params: { - id: this.id, - pass: this.pass, - opinion: this.value - } - }).then(() => { - this.$u.toast('保存成功') - uni.$emit('update') - setTimeout(()=>{ - uni.navigateBack({delta: 2}) - },600) - }) - } - } }, };