提交反馈

This commit is contained in:
luyuan 2020-10-26 10:26:49 +08:00
parent 84ae9da438
commit 52d5c30bfc
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
2 changed files with 21 additions and 3 deletions

View File

@ -933,4 +933,14 @@ export async function getlivest() {
} else {
return false;
}
}
export async function feedback(text: string) {
const res = await post<any>("feedback",{desc:text})
// todo 返回参数错误
if(res.code == 0){
message.success(res.msg)
}else{
message.error(res.msg)
}
}

View File

@ -33,11 +33,11 @@
<div class="fankui">
<div class="label">意见反馈</div>
<div>
<a-textarea v-model:value="value" placeholder="Basic usage" :rows="10" />
<a-textarea v-model:value="value" placeholder="请输入您的意见反馈" :rows="10" />
</div>
</div>
<div class="sub">提交反馈</div>
<div class="sub" @click="sub">提交反馈</div>
</div>
<NavBottom class="navbottom"></NavBottom>
</div>
@ -46,6 +46,7 @@
<script lang="ts">
import { defineComponent, ref } from "vue";
import NavBottom from "@/components/NavBottom.vue";
import { feedback } from '@/api';
export default defineComponent({
name: "Aboutus",
components: {
@ -53,13 +54,19 @@ export default defineComponent({
},
setup() {
const tabindex=ref(1)
const value = ref("")
const tabchange: (e: number) => void = (e: number) => {
console.log(e);
tabindex.value=e
};
function sub(){
feedback(value.value)
}
return {
tabchange,
tabindex
tabindex,
sub,
value
};
},
});
@ -147,6 +154,7 @@ export default defineComponent({
text-align: center;
margin-left:40px;
margin-bottom: 110px;
margin-top: 80px;
}
.navbottom {
padding-top: 68px;