|
|
@@ -233,8 +233,8 @@
|
|
|
<view class="title">所在地区</view>
|
|
|
<input disabled="true" @mousedown="$refs.picker.show()" placeholder="请选择所在地区" ref="inputRef"
|
|
|
name="input" v-model="form.locality"></input>
|
|
|
- <text class='cuIcon-right' style="color: #C7C6CA ;" @click="$refs.picker.show()"></text>
|
|
|
- <w-picker :visible.sync="visible" ref="picker" mode="region" :value="form.locality"
|
|
|
+ <text class='cuIcon-right' style="color: #C7C6CA ;" @click="$refs.picker.show();mapIsHidden='none'"></text>
|
|
|
+ <w-picker class="picker-style" :visible.sync="visible" ref="picker" mode="region" :value="form.locality"
|
|
|
@confirm="onConfirm($event, 'region')"></w-picker>
|
|
|
</view>
|
|
|
<view class="cu-form-group">
|
|
|
@@ -243,8 +243,8 @@
|
|
|
</view>
|
|
|
<view class="customize">
|
|
|
<view class="title">地理位置</view>
|
|
|
- <view class=" booder-top" style="padding-bottom: 16upx;">
|
|
|
- <map style="width: 100%; height: 218upx;" :latitude="latitude" scale="14"
|
|
|
+ <view class=" booder-top" style="padding-bottom: 16upx" :style="{'display':mapIsHidden}">
|
|
|
+ <map style="width: 100%; height: 218upx;" :latitude="latitude" scale="14" zIndex="100"
|
|
|
:longitude="longitude" :markers="markers" @tap="handleMarkerTap"></map>
|
|
|
</view>
|
|
|
|
|
|
@@ -299,6 +299,7 @@
|
|
|
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { watch } from 'vue'
|
|
|
import configService from '../../common/service/config.service'
|
|
|
import regionPicker from "../../components/w-picker/region-picker.vue"
|
|
|
// import aMap from "./map.vue"
|
|
|
@@ -310,6 +311,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ mapIsHidden: false,
|
|
|
latitude: 37.827066,
|
|
|
longitude: 112.34988,
|
|
|
title: '申请入驻',
|
|
|
@@ -329,10 +331,21 @@ export default {
|
|
|
country: null,
|
|
|
locality: '',
|
|
|
address: null,
|
|
|
- // headPhoto: null,
|
|
|
+ headPhoto:'',
|
|
|
passWord: uni.getStorageSync('password'),
|
|
|
phone: uni.getStorageSync('phone'),
|
|
|
},
|
|
|
+ formName:{
|
|
|
+ headPhoto:'门头照片',
|
|
|
+ name: '姓名',
|
|
|
+ corporateName: '公司名称',
|
|
|
+ creditCode: '统一代码',
|
|
|
+ legalPerson: '法人姓名',
|
|
|
+ legalPersonCode: '法人证件号',
|
|
|
+ storeName: '门店名称',
|
|
|
+ locality: '所在地区',
|
|
|
+ address: '门店地址',
|
|
|
+ },
|
|
|
tab: 1,
|
|
|
supplierOption: [],
|
|
|
businessLicenseImg: '',
|
|
|
@@ -340,7 +353,6 @@ export default {
|
|
|
identityTwoImg: '',
|
|
|
visible: false,
|
|
|
index: -1,
|
|
|
- country: '',
|
|
|
// markers:[{
|
|
|
// latitude: 37.827066,
|
|
|
// longitude: 112.34988,
|
|
|
@@ -351,6 +363,15 @@ export default {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ visible(val){
|
|
|
+ if(!val){
|
|
|
+ this.mapIsHidden='block'
|
|
|
+ console.log(this.mapIsHidden);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
onShow() {
|
|
|
this.markers = uni.getStorageSync('address') ?
|
|
|
[Object.assign(uni.getStorageSync('address'), { iconPath: '../../static/boiaoji.png' })]
|
|
|
@@ -448,6 +469,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
onConfirm(e) {
|
|
|
+ this.mapIsHidden=false
|
|
|
this.form.locality = e.result
|
|
|
this.form.country = e.value[e.value.length - 1]
|
|
|
},
|
|
|
@@ -563,13 +585,18 @@ export default {
|
|
|
this.$tip.alert('请上传营业执照!')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
- this.$tip.alert('请填写所有信息!')
|
|
|
+ this.$tip.alert(`请填写${this.formName[j]}!`)
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- this.$http.post('/merchant/app/add', { ...this.form, source: 2, headPhoto: this.form.headPhoto.join(',') , longitude: this.markers[0].longitude, latitude: this.markers[0].latitude }).then(res => {
|
|
|
+ let data= {
|
|
|
+ ...this.form,
|
|
|
+ source: 2,
|
|
|
+ headPhoto: this.form.headPhoto.join(',') ,
|
|
|
+ longitude: this.markers.length>0?this.markers[0].longitude:'',
|
|
|
+ latitude: this.markers.length>0?this.markers[0].latitude :''
|
|
|
+ }
|
|
|
+ this.$http.post('/merchant/app/add',data ).then(res => {
|
|
|
if (res.data.success) {
|
|
|
this.$tip.success(res.data.result || '成功')
|
|
|
this.$Router.push({ name: "login" })
|
|
|
@@ -787,4 +814,10 @@ page {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.picker-style{
|
|
|
+ .w-picker-cnt .visible{
|
|
|
+ position: absolute;
|
|
|
+ z-index: 100000;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|