图片以文件方式上传
注意name="image"
<input type="file" @change="getFile" ref="file" name="image" id="file" class="imgChoose">
其中this.$http.post() 需要
npm install vue-resource
在main.js中引入resource插件
import VueResource from 'vue-resource';
Vue.use(VueResource)
图片以base64方式上传