浏览代码

✨ feat: 添加经纬度

GuYun-D 1 年之前
父节点
当前提交
710d06b008
共有 2 个文件被更改,包括 14 次插入2 次删除
  1. 7 1
      src/views/moblie/mEnterprise.vue
  2. 7 1
      src/views/moblie/mUinitBusiness.vue

+ 7 - 1
src/views/moblie/mEnterprise.vue

@@ -80,7 +80,8 @@
             </div>
             <div class="inputItem arrow" style="margin-top: 20px;">
               <div class="labelTit"><label><i>*</i>请选择地址</label></div>
-              <div class="input" style="background-color: #a4a4a41f;  overflow: hidden; white-space: nowrap; " @click="show1 = true">
+              <div class="input" style="background-color: #a4a4a41f;  overflow: hidden; white-space: nowrap; "
+                @click="show1 = true">
                 {{ fieldValue || '请选择地区' }}
               </div>
               <!-- <span class="iconfont">&#xe6ab;</span> -->
@@ -387,6 +388,8 @@ export default {
         perCapita: '', // 人均
         advertisement: [], // 广告图
         invitationCode: localStorage.getItem('INVITATION_CODE'), // 邀请码
+        longitude: "",
+        latitude: ''
       },
       show1: false,
       show2: false,
@@ -810,6 +813,9 @@ export default {
         }
       }
       if (selectedOptions.length === 4) {
+        const addeessInfo = selectedOptions[3]
+        this.personalForm.latitude = addeessInfo.latitude
+        this.personalForm.longitude = addeessInfo.longitude
         this.personalForm.shopAdressProvince = selectedOptions[0].name
         this.personalForm.shopAdressCity = selectedOptions[1].name
         this.show1 = false

+ 7 - 1
src/views/moblie/mUinitBusiness.vue

@@ -89,7 +89,8 @@
             </div>
             <div class="inputItem arrow" style="margin-top: 20px;">
               <div class="labelTit"><label><i>*</i>请选择地址</label></div>
-              <div class="input" style="background-color: #a4a4a41f; overflow: hidden; white-space: nowrap; " @click="show1 = true">
+              <div class="input" style="background-color: #a4a4a41f; overflow: hidden; white-space: nowrap; "
+                @click="show1 = true">
                 {{ fieldValue || '请选择地区' }}
               </div>
               <!-- <span class="iconfont">&#xe6ab;</span> -->
@@ -413,6 +414,8 @@ export default {
         perCapita: "", // 人均消费
         invitationCode: localStorage.getItem('INVITATION_CODE'), // 邀请码
         advertisement: [],
+        longitude: "",
+        latitude: ''
       },
       show1: false,
       show3: false,
@@ -867,6 +870,9 @@ export default {
         }
       }
       if (selectedOptions.length === 4) {
+        const addeessInfo = selectedOptions[3]
+        this.personalForm.latitude = addeessInfo.latitude
+        this.personalForm.longitude = addeessInfo.longitude
         this.fieldValue = addresString
         this.personalForm.shopAdressProvince = selectedOptions[0].name
         this.personalForm.shopAdressCity = selectedOptions[1].name