~~~
export default {
data() {
return {
msg: "我是home 组件"
}
},
mounted() {
this.getPicList();
},
methods: {
getPicList() {
var params = {
picTypeId: '01',
serialNumber: '101030101001'
}
//拍摄地图图片
this.$axios.post(this.$api.test.getPic, params).then((res) => {
let {city, country, isExists} = res.data;
if (isExists) {
return this.$axios.post(this.$api.test.bookArticle, {
photographerId: 1
})
}
}).then((res1) => {
if (res1.data.book.length) {
return this.$axios.post(this.$api.test.introduce, {
photographerId: 1
})
}
}).then((data) => {
console.log(data);
})
}
}
}
~~~