提交反馈

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

@ -934,3 +934,13 @@ export async function getlivest() {
return false; 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="fankui">
<div class="label">意见反馈</div> <div class="label">意见反馈</div>
<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> </div>
<div class="sub">提交反馈</div> <div class="sub" @click="sub">提交反馈</div>
</div> </div>
<NavBottom class="navbottom"></NavBottom> <NavBottom class="navbottom"></NavBottom>
</div> </div>
@ -46,6 +46,7 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, ref } from "vue"; import { defineComponent, ref } from "vue";
import NavBottom from "@/components/NavBottom.vue"; import NavBottom from "@/components/NavBottom.vue";
import { feedback } from '@/api';
export default defineComponent({ export default defineComponent({
name: "Aboutus", name: "Aboutus",
components: { components: {
@ -53,13 +54,19 @@ export default defineComponent({
}, },
setup() { setup() {
const tabindex=ref(1) const tabindex=ref(1)
const value = ref("")
const tabchange: (e: number) => void = (e: number) => { const tabchange: (e: number) => void = (e: number) => {
console.log(e); console.log(e);
tabindex.value=e tabindex.value=e
}; };
function sub(){
feedback(value.value)
}
return { return {
tabchange, tabchange,
tabindex tabindex,
sub,
value
}; };
}, },
}); });
@ -147,6 +154,7 @@ export default defineComponent({
text-align: center; text-align: center;
margin-left:40px; margin-left:40px;
margin-bottom: 110px; margin-bottom: 110px;
margin-top: 80px;
} }
.navbottom { .navbottom {
padding-top: 68px; padding-top: 68px;