新增投诉功能

This commit is contained in:
weipengfei 2023-09-23 15:43:52 +08:00
parent c3f74f0049
commit ba6095d987
2 changed files with 28 additions and 3 deletions

7
api/complaint.js Normal file
View File

@ -0,0 +1,7 @@
import oahttp from "@/utils/oahttp.js";
/**
* 发起投诉
*/
export const complaintFeedback = (data) => oahttp.post('/company/complaint_feedback', data)

View File

@ -6,20 +6,38 @@
placeholderStyle="font-size: 22rpx;" style="font-size: 28rpx;background-color: #eee;min-height: 100px;"
autoHeight maxlength="-1"></u--textarea>
</view>
<mybtn text="确认提交"></mybtn>
<mybtn text="确认提交" @click="modelShow=true"></mybtn>
<u-modal :show="modelShow" title="提示" content='确定提交吗' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="$u.throttle(submit, 1500)"></u-modal>
</view>
</template>
<script>
import { complaintFeedback } from "@/api/complaint.js"
import { Toast } from "../../libs/uniApi"
export default {
data() {
return {
content: ''
content: '',
modelShow: false
}
},
onLoad() {},
onShow() {},
methods: {},
methods: {
async submit(){
this.modelShow = false;
await complaintFeedback({
content: this.content
})
this.$nextTick(()=>{
Toast('提交成功');
this.$u.sleep(800).then(()=>{
uni.navigateBack();
})
})
}
},
}
</script>