Merge pull request '邓洁 : 地址转为经纬度函数' (#46) from dj into master
Reviewed-on: http://git.feashow.cn/odjbin/city-store-transfer/pulls/46
This commit is contained in:
@@ -51,8 +51,8 @@
|
||||
methods: {
|
||||
getBanner(){
|
||||
this.$api.getBanner().then(res=>{
|
||||
console.log('lunbo',res.data.data);
|
||||
this.swiperList = res.data.data.map(item=>item.img)
|
||||
console.log('轮播图',res.data.data);
|
||||
this.swiperList = res.data.data.map(item=>this.$api.imgUrl+item.img)
|
||||
})
|
||||
},
|
||||
getNotice(){
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</u-form-item>
|
||||
<u-form-item label="地址" label-position="top" border-bottom="true" prop="place">
|
||||
<u-input v-model="form.place" placeholder="请输入店铺地址" placeholder-class="input-class" border="none"
|
||||
@change="change"></u-input>
|
||||
@change="changeAddress"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="行业" label-position="top" border-bottom="true" class="picker">
|
||||
<text @click="show2 = true" class="checktext">请选择行业类型</text>
|
||||
@@ -132,13 +132,30 @@
|
||||
console.log("失败信息:" + JSON.stringify(errors))
|
||||
// uni.$u.toast('校验失败')
|
||||
})
|
||||
}
|
||||
},
|
||||
changeAddress(e) {
|
||||
console.log('changeAddress', e);
|
||||
// this.getAddressList(e)
|
||||
},
|
||||
getAddressList(value) {
|
||||
var that = this
|
||||
uni.request({
|
||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/?address=' + value + '&key=' +
|
||||
that.$api.key,
|
||||
success(res) {
|
||||
console.log('diz', res.data.result.location);
|
||||
console.log('lat', res.data.result.location.lat);
|
||||
console.log('lng', res.data.result.location.lng);
|
||||
},
|
||||
fail(err) {
|
||||
console.log('请求区域失败:', err);
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
onReady() {
|
||||
this.$refs.uForm.setRules(this.rules)
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@ const toast = {
|
||||
}
|
||||
const apiService = {
|
||||
serverHost,
|
||||
imgUrl:'https://spsp.feashow.com/',
|
||||
key:'ZRKBZ-Q7FWL-GVZPK-MCRBU-4XFB5-ATBDB',
|
||||
uploadImgUrl: serverHost + `/upload/image/`,
|
||||
//登录接口
|
||||
|
||||
Reference in New Issue
Block a user