DEBUG
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
.name {{ account.name }}
|
||||
input#img_add(type="file", accept="image/*", @change="upload($event)")
|
||||
// multiple="multiple",
|
||||
input#bg(type="file", accept="image/*", @change="upload_bg($event)")
|
||||
.content.main-width
|
||||
p account
|
||||
NuxtLink.button(to="/account/setting") 账户设置
|
||||
@@ -23,7 +24,15 @@ export default {
|
||||
upload(event) {
|
||||
let data = new FormData();
|
||||
let option = { headers: { "Content-Type": "multipart/form-data" } };
|
||||
data.append("img", event.target.files[0]);
|
||||
data.append("avatar", event.target.files[0]);
|
||||
this.$axios.post("/api/account", data, option).then((res) => {
|
||||
console.log(res.data);
|
||||
});
|
||||
},
|
||||
upload_bg(event) {
|
||||
let data = new FormData();
|
||||
let option = { headers: { "Content-Type": "multipart/form-data" } };
|
||||
data.append("background", event.target.files[0]);
|
||||
this.$axios.post("/api/account", data, option).then((res) => {
|
||||
console.log(res.data);
|
||||
});
|
||||
|
@@ -1,4 +1,34 @@
|
||||
<template lang="pug">
|
||||
.thread-wwwwwww
|
||||
.thread-index
|
||||
.circumscription
|
||||
//ModelBox
|
||||
//p 下载安装, 查看文档, 提问讨论, 开发
|
||||
.ceremony
|
||||
.circumscription
|
||||
ThreadList(:data="data")
|
||||
ul
|
||||
li 除去阅览以外, 还可以做一些什么
|
||||
li 如翻页, 如发表
|
||||
li
|
||||
NuxtLink(to="/thread/create")
|
||||
button 新议题
|
||||
//NuxtLink(to="/index") NASAS
|
||||
//NuxtLink(to="/index/hCG7UKzSRgCzyd8Y") |NASAS
|
||||
Nuxt
|
||||
footer.footer
|
||||
p
|
||||
b Kana
|
||||
.github
|
||||
a(href="https://github.com/InvisibleFuture/kana")
|
||||
span.fab.fa-github
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
asyncData({ $axios }) {
|
||||
return $axios.get("/api/thread").then((res) => {
|
||||
return { data: res.data };
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@@ -20,7 +20,7 @@ Drawer
|
||||
//)
|
||||
// i.fas.fa-magic
|
||||
// | Editor
|
||||
PostList(:data="postlist")
|
||||
PostList(:data.sync="postlist")
|
||||
.post-create(v-if="account.online")
|
||||
img.avatar(:src="account.avatar")
|
||||
.content
|
||||
|
@@ -1,3 +1,3 @@
|
||||
<template lang="pug">
|
||||
.thread-index
|
||||
</template>
|
||||
</template>
|
||||
|
@@ -4,10 +4,12 @@
|
||||
img.avatar(:src="user.avatar")
|
||||
h1
|
||||
span.name {{ user.name }}
|
||||
span.admin(v-if="user.gid === 1") Admin
|
||||
span.admin(v-if="user.gid === 1")
|
||||
i.fas.fa-user-shield
|
||||
.content
|
||||
p USER
|
||||
p {{ user }}
|
||||
ModelBoxNone
|
||||
p 没有公开的资源..
|
||||
//p {{ user }}
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -36,4 +38,14 @@ export default {
|
||||
overflow: hidden
|
||||
.name
|
||||
color: #ffffff
|
||||
.admin
|
||||
margin: 0 .5rem
|
||||
font-size: 1.2rem
|
||||
color: #ffffff
|
||||
background: #ff9988
|
||||
border-radius: .25rem
|
||||
//padding: 0 .5rem
|
||||
>.content
|
||||
padding: 4rem
|
||||
text-align: center
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user