|
@@ -73,11 +73,9 @@
|
|
|
<view class="tui-placeholder" v-else>请选择</view>
|
|
<view class="tui-placeholder" v-else>请选择</view>
|
|
|
<input v-model="form.province" name="province" hidden />
|
|
<input v-model="form.province" name="province" hidden />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">所在地址</view>
|
|
<view class="tui-title">所在地址</view>
|
|
|
- <view class="tui-input" v-if="form.address">{{ form.address }}</view>
|
|
|
|
|
- <view class="tui-placeholder" v-else>请填写详细地址</view>
|
|
|
|
|
- <input v-model="form.address" name="address" hidden />
|
|
|
|
|
|
|
+ <input v-model="form.address" placeholder-class="phcolor" class="tui-input" name="address" placeholder="请填写地址" />
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title ">门牌号</view>
|
|
<view class="tui-title ">门牌号</view>
|
|
@@ -110,8 +108,6 @@
|
|
|
</form>
|
|
</form>
|
|
|
<!-- 省市联动 -->
|
|
<!-- 省市联动 -->
|
|
|
<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
|
|
<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm"></simple-address>
|
|
|
- <!-- 选择地区 -->
|
|
|
|
|
- <app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -162,12 +158,10 @@ export default {
|
|
|
default:0,
|
|
default:0,
|
|
|
superWx:[]
|
|
superWx:[]
|
|
|
},
|
|
},
|
|
|
- showRegion: false,
|
|
|
|
|
region: {
|
|
region: {
|
|
|
- lat: 0,
|
|
|
|
|
- long: 0
|
|
|
|
|
|
|
+ lat: 10,
|
|
|
|
|
+ long: 11
|
|
|
},
|
|
},
|
|
|
- regionData: [],
|
|
|
|
|
cityPickerValueDefault: [0, 0],
|
|
cityPickerValueDefault: [0, 0],
|
|
|
img: [],
|
|
img: [],
|
|
|
headers:{token:''},
|
|
headers:{token:''},
|
|
@@ -220,8 +214,6 @@ export default {
|
|
|
Object.keys(this.form).forEach((i, index) => {
|
|
Object.keys(this.form).forEach((i, index) => {
|
|
|
this.form[i] = data[i]
|
|
this.form[i] = data[i]
|
|
|
})
|
|
})
|
|
|
- this.region.lat = data.lat
|
|
|
|
|
- this.region.long = data.long
|
|
|
|
|
|
|
|
|
|
// 营业时间初始化
|
|
// 营业时间初始化
|
|
|
this.visible = this.form.open == 1 ? true : false
|
|
this.visible = this.form.open == 1 ? true : false
|
|
@@ -270,24 +262,10 @@ export default {
|
|
|
this.end_time = '18:00'
|
|
this.end_time = '18:00'
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- selectRegion() {
|
|
|
|
|
- if (!this.form.city) {
|
|
|
|
|
- this.$msg('请先选择城市!')
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- this.showRegion = true
|
|
|
|
|
- },
|
|
|
|
|
_resultData(val) {
|
|
_resultData(val) {
|
|
|
console.log(val)
|
|
console.log(val)
|
|
|
this.form.img = val;
|
|
this.form.img = val;
|
|
|
},
|
|
},
|
|
|
- changeAreaFn(e) {
|
|
|
|
|
- this.form.address = e.title
|
|
|
|
|
- this.region.lat = e.location.lat
|
|
|
|
|
- this.region.long = e.location.lng
|
|
|
|
|
- this.form.showAddress = e.address
|
|
|
|
|
- },
|
|
|
|
|
- // 省市联动
|
|
|
|
|
openAddres() {
|
|
openAddres() {
|
|
|
this.$refs.simpleAddress.open()
|
|
this.$refs.simpleAddress.open()
|
|
|
},
|
|
},
|
|
@@ -295,8 +273,6 @@ export default {
|
|
|
this.form.province = e.provinceName
|
|
this.form.province = e.provinceName
|
|
|
this.form.city = e.cityName
|
|
this.form.city = e.cityName
|
|
|
this.form.address = ''
|
|
this.form.address = ''
|
|
|
- this.region.lat = 0
|
|
|
|
|
- this.region.long = 0
|
|
|
|
|
},
|
|
},
|
|
|
confirmFn() {
|
|
confirmFn() {
|
|
|
let hostFn = this.option.id ? update : add
|
|
let hostFn = this.option.id ? update : add
|
|
@@ -307,6 +283,7 @@ export default {
|
|
|
if(Array.isArray(this.form.superWx) && !this.$util.isEmpty(this.form.superWx)){
|
|
if(Array.isArray(this.form.superWx) && !this.$util.isEmpty(this.form.superWx)){
|
|
|
superWx = this.form.superWx[0]
|
|
superWx = this.form.superWx[0]
|
|
|
}
|
|
}
|
|
|
|
|
+ this.form.showAddress = this.form.city+this.form.address+this.form.floor
|
|
|
this.form = {...this.form,...this.region,superWx:superWx}
|
|
this.form = {...this.form,...this.region,superWx:superWx}
|
|
|
uni.showLoading({mask:true})
|
|
uni.showLoading({mask:true})
|
|
|
hostFn(this.form).then(res => {
|
|
hostFn(this.form).then(res => {
|