Skip to content
Snippets Groups Projects
Commit d0d122a2 authored by LEE JEONG EUN's avatar LEE JEONG EUN
Browse files

Merge branch 'wfp' into 'master'

add return send

See merge request !20
parents 999e7b1f 93e5d604
Branches
No related tags found
1 merge request!20add return send
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<input type="file" label="photo input" @change="fileSeleted"> <input type="file" label="photo input" @change="fileSeleted">
<v-btn color="green" @click="sendFile">Send</v-btn> <v-btn color="green" @click="sendFile">Send</v-btn>
</v-flex> </v-flex>
{{result}}
<v-flex xs12 text-xs-right> <v-flex xs12 text-xs-right>
<v-btn class="mx-0 font-weight-light" color="success" @click="onClicked">작성 완료</v-btn> <v-btn class="mx-0 font-weight-light" color="success" @click="onClicked">작성 완료</v-btn>
</v-flex> </v-flex>
...@@ -52,7 +53,8 @@ export default { ...@@ -52,7 +53,8 @@ export default {
menu: false, menu: false,
modal: false, modal: false,
menu2: false, menu2: false,
image:null image:null,
result:''
} }
}, },
methods: { methods: {
...@@ -71,7 +73,6 @@ export default { ...@@ -71,7 +73,6 @@ export default {
console.log(`${key}`); console.log(`${key}`);
} }
this.$http.post('/finderboard',formData,config).then((response) => { this.$http.post('/finderboard',formData,config).then((response) => {
alert(response.data.message);
this.$router.push('/finderboard') this.$router.push('/finderboard')
}).catch((err) => { }).catch((err) => {
alert("Error = "+err.message) alert("Error = "+err.message)
...@@ -82,8 +83,6 @@ export default { ...@@ -82,8 +83,6 @@ export default {
this.file=event.target.files[0]; this.file=event.target.files[0];
}, },
sendFile: function(){ sendFile: function(){
alert("here is send!!")
var formData = new FormData(); var formData = new FormData();
var config={ var config={
header:{'Content-Type': 'multipart/form-data'} header:{'Content-Type': 'multipart/form-data'}
...@@ -93,7 +92,8 @@ export default { ...@@ -93,7 +92,8 @@ export default {
console.log(`${key}`); console.log(`${key}`);
} }
this.$http.post('/finderboard/image',formData,config).then((respose)=>{ this.$http.post('/finderboard/image',formData,config).then((respose)=>{
alert("=== "+respose.data.msg) this.result = respose.data.result;
}).catch((err)=>{ }).catch((err)=>{
alert(err.message); alert(err.message);
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment