Merge pull request '提交反馈' (#74) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/74
This commit is contained in:
luyuan 2020-10-26 10:27:17 +08:00
commit 9fdb7e0f17
2 changed files with 21 additions and 3 deletions

View File

@ -934,3 +934,13 @@ export async function getlivest() {
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;