like 与 admin name
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<template lang="pug">
|
||||
Nuxt
|
||||
.thread-wwwwwww
|
||||
Nuxt
|
||||
</template>
|
||||
|
@@ -68,7 +68,10 @@ export default {
|
||||
createpost() {
|
||||
console.log(this.post);
|
||||
this.$axios.post("/api/post", this.post).then((res) => {
|
||||
console.log(res.data);
|
||||
if (res.status === 200) {
|
||||
this.postlist.push(res.data);
|
||||
this.post.data = "";
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
|
@@ -9,12 +9,10 @@
|
||||
.tags
|
||||
span.tag test
|
||||
span.tag demo
|
||||
.content.main-width
|
||||
p {{ thread.data }}
|
||||
.content.main-width
|
||||
input.title(v-model="thread.title")
|
||||
textarea.data(v-model="thread.data", rows="32")
|
||||
button.submit(@click="submit") 发表
|
||||
.content.circumscription
|
||||
input.title(v-model="thread.title")
|
||||
textarea.data(v-model="thread.data", rows="32")
|
||||
button.submit(@click="submit") 发表
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -31,6 +29,9 @@ export default {
|
||||
return console.log("尚无内容");
|
||||
}
|
||||
this.$axios.post("/api/thread", this.thread).then((res) => {
|
||||
if (res.status === 200) {
|
||||
return this.$router.push("/");
|
||||
}
|
||||
console.log(res.data);
|
||||
});
|
||||
},
|
||||
|
3
pages/thread/index.vue
Normal file
3
pages/thread/index.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template lang="pug">
|
||||
.thread-index
|
||||
</template>
|
Reference in New Issue
Block a user