引用vue
Vue.http.options.emulateJSON = true;
Vue.http.options.headers = { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' };
变为formdata获取值
export default {
data() {
return {
seller:{}
};
},
created(){
var jsonStr = JSON.stringify( {"type_img":1});
var token = md5(jsonStr + timestamp)+timestamp;
this.$http.post("http://ap.jvjiewang.com/Home/Users/alert_img",{jsonStr:jsonStr,token:token},{emulateJSON: true})
.then((response)=>{
response=response.body;
console.log("123");
console.log(response);
},
(error)=>{
console.log("123");
console.log(error);
}
);
}
}
父级元素传值给子元素
传值
子元素获取值
渲染值