lihongxiao 1 год назад
Родитель
Сommit
96a914c0bd
4 измененных файлов с 50 добавлено и 16 удалено
  1. 2 2
      manifest.json
  2. 3 2
      pages/login/register.vue
  3. 43 10
      pages/login/settled.vue
  4. 2 2
      store/index.js

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "本地生活",
     "appid" : "__UNI__E0EA6E1",
     "description" : "",
-    "versionName" : "0.0.1",
-    "versionCode" : 1,
+    "versionName" : "0.0.2",
+    "versionCode" : 2,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */

+ 3 - 2
pages/login/register.vue

@@ -231,9 +231,10 @@
 				}, 1000);
 			},
 			onSMSLogin() {
-			
 				let checkPhone = new RegExp(/^[1]([3-9])[0-9]{9}$/);
-			
+				uni.navigateTo({
+						url: '/pages/login/settled'
+					});
 				if(!this.phoneNo || this.phoneNo.length==0){
 				  this.$tip.toast('请填写手机号');
 				  return;

+ 43 - 10
pages/login/settled.vue

@@ -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>

+ 2 - 2
store/index.js

@@ -36,8 +36,8 @@ export default new Vuex.Store({
           if(response.data.code ==200){ 
             const result = response.data.result
             const userInfo = result.userInfo
-			uni.setStorageSync(ACCESS_TOKEN,result.token);
-			uni.setStorageSync(USER_INFO,userInfo);
+            uni.setStorageSync(ACCESS_TOKEN,result.token);
+            uni.setStorageSync(USER_INFO,userInfo);
             commit('SET_TOKEN', result.token)
             commit('SET_AVATAR', userInfo.avatar)
             commit('SET_NAME', { username: userInfo.username,realname: userInfo.realname})