|
|
@@ -60,13 +60,23 @@
|
|
|
<div class="tui-placeholder" v-else style="width:280upx;">请选择城市</div>
|
|
|
<button class="admin-button-com blue small" @click.stop="onHere">我在昆明</button>
|
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <!-- <tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">所在地址</div>
|
|
|
<input v-model="form.address" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="address" placeholder="请填写地址" />
|
|
|
- </tui-list-cell>
|
|
|
+ </tui-list-cell> -->
|
|
|
+ <tui-list-cell v-if="hasMap == 0" class="line-cell" :hover="false">
|
|
|
+ <view class="tui-title">所在地址</view>
|
|
|
+ <input v-model="form.address" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="address" @input="modifyShow" placeholder="请填写地址" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell v-else class="line-cell" :hover="false" :arrow="true" @click="selectRegion">
|
|
|
+ <view class="tui-title">所在地址</view>
|
|
|
+ <view v-if="form.address" class="tui-input">{{ form.address }}</view>
|
|
|
+ <view v-else class="tui-placeholder">请填写地址</view>
|
|
|
+ <input v-model="form.address" name="address" hidden />
|
|
|
+ </tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" >
|
|
|
<div class="tui-title">楼号门牌</div>
|
|
|
- <input v-model="form.floor" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="floor" placeholder="选填" />
|
|
|
+ <input v-model="form.floor" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="floor" placeholder="选填" @input="modifyShow" />
|
|
|
</tui-list-cell>
|
|
|
</view>
|
|
|
|
|
|
@@ -99,7 +109,8 @@
|
|
|
|
|
|
<!-- 省市联动 -->
|
|
|
<simple-address ref="simpleAddress" :pickerValueDefault="cityPickerValueDefault" @onConfirm="onCityConfirm" ></simple-address>
|
|
|
-
|
|
|
+ <!-- 选择地区 -->
|
|
|
+ <app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
|
|
|
</form>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -113,18 +124,16 @@ import AppUploader from "@/components/app-uploader";
|
|
|
const form = require("@/utils/formValidation.js");
|
|
|
import {getIntroduce,applyRegister} from "@/api/official";
|
|
|
import {getAuthCode} from "@/api/apply";
|
|
|
-import { replaceClientId } from '@/api/admin'
|
|
|
import { mapGetters,mapActions } from "vuex"
|
|
|
//图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
|
|
|
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
|
|
-import { mapResolve } from "@/api/map";
|
|
|
-import util from '@/utils/util';
|
|
|
import { APIHOST } from '@/config'
|
|
|
import { getShopInfo} from "@/utils/auth";
|
|
|
import { getDictionaries } from '@/api/mini'
|
|
|
import { checkShop } from '@/api/shop'
|
|
|
import { ghsInfo } from "@/api/ghs/index";
|
|
|
import { getMobile } from "@/api/auth";
|
|
|
+import {getHasMap} from "@/api/express"
|
|
|
export default {
|
|
|
name: "apply-data",
|
|
|
components: {
|
|
|
@@ -151,12 +160,13 @@ export default {
|
|
|
licenseNo: "",
|
|
|
license: "",
|
|
|
floor: "",
|
|
|
- longitude: 10,
|
|
|
- latitude: 11,
|
|
|
+ longitude: 0,
|
|
|
+ latitude: 0,
|
|
|
showAddress:"",
|
|
|
authCode:"",
|
|
|
cover:''
|
|
|
},
|
|
|
+ showRegion: false,
|
|
|
cityPickerValueDefault: [0, 0],
|
|
|
adminName: "",
|
|
|
logo: '',
|
|
|
@@ -167,7 +177,8 @@ export default {
|
|
|
currentImgData: [],
|
|
|
isHd:1,
|
|
|
uploadImgUrl:APIHOST+'/upload/save-file',
|
|
|
- fillMobile:0
|
|
|
+ fillMobile:0,
|
|
|
+ hasMap:0
|
|
|
};
|
|
|
},
|
|
|
computed:{
|
|
|
@@ -179,6 +190,9 @@ export default {
|
|
|
// #ifdef APP-PLUS
|
|
|
this.fillMobile = 1
|
|
|
// #endif
|
|
|
+ getHasMap().then(res=>{
|
|
|
+ this.hasMap = res.data.hasMap
|
|
|
+ })
|
|
|
},
|
|
|
onUnload(){
|
|
|
clearInterval(this.INT)
|
|
|
@@ -300,6 +314,30 @@ export default {
|
|
|
imgDeleteFn(res){
|
|
|
this.form.cover=''
|
|
|
},
|
|
|
+ selectRegion() {
|
|
|
+ if (!this.form.city) {
|
|
|
+ this.$msg('请先选择城市!')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.showRegion = true
|
|
|
+ },
|
|
|
+ modifyShow(){
|
|
|
+ this.form.showAddress = this.form.city+this.form.address+this.form.floor
|
|
|
+ },
|
|
|
+ changeAreaFn(e) {
|
|
|
+ let locationStr = e.location
|
|
|
+ let fruits = locationStr.split(",").map(fruit => fruit.trim())
|
|
|
+
|
|
|
+ this.form.latitude = fruits[1]
|
|
|
+ this.form.longitude = fruits[0]
|
|
|
+ this.form.showAddress = e.address
|
|
|
+ this.form.address = e.name
|
|
|
+
|
|
|
+ // 提取地区信息,按遇到第一个"市"字后,把"市"后面的字符串作为地区
|
|
|
+ const districtStr = e.district || '';
|
|
|
+ const cityIndex = districtStr.indexOf('市');
|
|
|
+ this.form.dist = cityIndex !== -1 ? districtStr.substring(cityIndex + 1) : districtStr;
|
|
|
+ },
|
|
|
formSubmit (e) {
|
|
|
let rules = [
|
|
|
{ name: "name", rule: ["required"], msg: ["请填写名称"] },
|