|
@@ -129,10 +129,10 @@
|
|
|
</view> -->
|
|
</view> -->
|
|
|
<view class="li ddflex">
|
|
<view class="li ddflex">
|
|
|
<view class="label">所在地区</view>
|
|
<view class="label">所在地区</view>
|
|
|
- <view :class="['item flex', city ? 'active' : '']" @click="chooseLocation()">
|
|
|
|
|
- <!-- <pickerAddress class="picker flex" @change="bindAddressChange" :disabled="true" @click="chooseLocation()"> -->
|
|
|
|
|
|
|
+ <view :class="['item flex', city ? 'active' : '']">
|
|
|
|
|
+ <pickerAddress class="picker flex" @change="bindAddressChange">
|
|
|
<view :class="city?'':'placeholder'">{{ city ? city : '请选择地区' }}</view>
|
|
<view :class="city?'':'placeholder'">{{ city ? city : '请选择地区' }}</view>
|
|
|
- <!-- </pickerAddress> -->
|
|
|
|
|
|
|
+ </pickerAddress>
|
|
|
</view>
|
|
</view>
|
|
|
<image src="../../static/images/rico.png" class="rico"></image>
|
|
<image src="../../static/images/rico.png" class="rico"></image>
|
|
|
<!-- <picker class="picker flex">
|
|
<!-- <picker class="picker flex">
|
|
@@ -140,9 +140,9 @@
|
|
|
<image src="../../static/images/rico.png" class="rico"></image>
|
|
<image src="../../static/images/rico.png" class="rico"></image>
|
|
|
</picker> -->
|
|
</picker> -->
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="li ddflex">
|
|
|
|
|
|
|
+ <view class="li ddflex" @click="chooseLocation()">
|
|
|
<view class="label">地址</view>
|
|
<view class="label">地址</view>
|
|
|
- <input v-model="address" placeholder="填写街道地址" placeholder-class="placeholder" class="ipt flex" />
|
|
|
|
|
|
|
+ <input :disabled="true" v-model="address" placeholder="填写街道地址" placeholder-class="placeholder" class="ipt flex" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bot">
|
|
<view class="bot">
|
|
@@ -321,11 +321,14 @@ export default {
|
|
|
// 裁剪完成时,返回截取图片的临时路径
|
|
// 裁剪完成时,返回截取图片的临时路径
|
|
|
copperSuccess(tempFilePathObj) {
|
|
copperSuccess(tempFilePathObj) {
|
|
|
let that = this
|
|
let that = this
|
|
|
- let tempFilePath = tempFilePathObj.path
|
|
|
|
|
|
|
+ let tempFilePath = tempFilePathObj.base64
|
|
|
|
|
+ tempFilePath = tempFilePath.replace('data:image/png;base64,','')
|
|
|
|
|
+ tempFilePath = tempFilePath.replace('data:image/jpeg;base64,','')
|
|
|
|
|
+ console.log(tempFilePath)
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
|
title:'上传中'
|
|
title:'上传中'
|
|
|
})
|
|
})
|
|
|
- req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
|
|
|
|
|
|
|
+ req.postRequest('/api/nocheck/uploadBase64', {fileString:tempFilePath}, res => {
|
|
|
that.avatar = res.src;
|
|
that.avatar = res.src;
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
this.copperShow = false
|
|
this.copperShow = false
|
|
@@ -376,6 +379,7 @@ export default {
|
|
|
var promise = Promise.all(
|
|
var promise = Promise.all(
|
|
|
tempFilePaths.map(tempFilePath => {
|
|
tempFilePaths.map(tempFilePath => {
|
|
|
return new Promise(function(resolve, reject) {
|
|
return new Promise(function(resolve, reject) {
|
|
|
|
|
+ console.log(tempFilePath)
|
|
|
req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
|
|
req.uploadFile('/api/nocheck/upload', tempFilePath, res => {
|
|
|
that.wechatCode = res.src;
|
|
that.wechatCode = res.src;
|
|
|
resolve()
|
|
resolve()
|
|
@@ -527,6 +531,7 @@ export default {
|
|
|
bindAddressChange(data) {
|
|
bindAddressChange(data) {
|
|
|
this.morCity = data.ids;
|
|
this.morCity = data.ids;
|
|
|
this.city = data.data[0] + data.data[1] + data.data[2];
|
|
this.city = data.data[0] + data.data[1] + data.data[2];
|
|
|
|
|
+ this.city = this.city.replace(/\s/g,'')
|
|
|
this.areaCode = data.ids[2];
|
|
this.areaCode = data.ids[2];
|
|
|
},
|
|
},
|
|
|
chooseLocation() {
|
|
chooseLocation() {
|
|
@@ -535,6 +540,8 @@ export default {
|
|
|
success: function(res) {
|
|
success: function(res) {
|
|
|
if (res.name) {
|
|
if (res.name) {
|
|
|
tha.address = res.name;
|
|
tha.address = res.name;
|
|
|
|
|
+ this.longitude = res.longitude
|
|
|
|
|
+ this.latitude = res.latitude
|
|
|
tha.reverseGeocoder(res);
|
|
tha.reverseGeocoder(res);
|
|
|
console.log('地址数据》》》:', res);
|
|
console.log('地址数据》》》:', res);
|
|
|
}
|
|
}
|
|
@@ -551,12 +558,14 @@ export default {
|
|
|
output: 'jsonp'
|
|
output: 'jsonp'
|
|
|
}).then(data => {
|
|
}).then(data => {
|
|
|
console.log('解析后的地址地址数据:', data);
|
|
console.log('解析后的地址地址数据:', data);
|
|
|
- data = data.result
|
|
|
|
|
- this.city = data.ad_info.province+data.ad_info.city+data.ad_info.district
|
|
|
|
|
- this.areaCode = data.ad_info.adcode;
|
|
|
|
|
- this.morCity = [this.areaCode.substring(0,2)+'0000',this.areaCode.substring(0,4)+'00',this.areaCode]
|
|
|
|
|
- this.longitude = data.location.lng
|
|
|
|
|
- this.latitude = data.location.lat
|
|
|
|
|
|
|
+ if(data){
|
|
|
|
|
+ data = data.result
|
|
|
|
|
+ this.city = data.ad_info.province+data.ad_info.city+data.ad_info.district
|
|
|
|
|
+ this.areaCode = data.ad_info.adcode;
|
|
|
|
|
+ this.morCity = [this.areaCode.substring(0,2)+'0000',this.areaCode.substring(0,4)+'00',this.areaCode]
|
|
|
|
|
+ this.longitude = data.location.lng
|
|
|
|
|
+ this.latitude = data.location.lat
|
|
|
|
|
+ }
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
console.log(err);
|
|
console.log(err);
|
|
|
});
|
|
});
|
|
@@ -566,11 +575,13 @@ export default {
|
|
|
QQMapWX.reverseGeocoder(location, data => {
|
|
QQMapWX.reverseGeocoder(location, data => {
|
|
|
console.log('解析后的地址地址数据:', data);
|
|
console.log('解析后的地址地址数据:', data);
|
|
|
|
|
|
|
|
- this.city = data.ad_info.province+data.ad_info.city+data.ad_info.district
|
|
|
|
|
- this.areaCode = data.ad_info.adcode;
|
|
|
|
|
- this.morCity = [this.areaCode.substring(0,2)+'0000',this.areaCode.substring(0,4)+'00',this.areaCode]
|
|
|
|
|
- this.longitude = data.location.lng
|
|
|
|
|
- this.latitude = data.location.lat
|
|
|
|
|
|
|
+ if(data){
|
|
|
|
|
+ this.city = data.ad_info.province+data.ad_info.city+data.ad_info.district
|
|
|
|
|
+ this.areaCode = data.ad_info.adcode;
|
|
|
|
|
+ this.morCity = [this.areaCode.substring(0,2)+'0000',this.areaCode.substring(0,4)+'00',this.areaCode]
|
|
|
|
|
+ this.longitude = data.location.lng
|
|
|
|
|
+ this.latitude = data.location.lat
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
//#endif
|
|
//#endif
|
|
|
},
|
|
},
|