caiyuqin 4 месяцев назад
Родитель
Сommit
427b330ecd
1 измененных файлов с 20 добавлено и 22 удалено
  1. 20 22
      pages/login/settled.vue

+ 20 - 22
pages/login/settled.vue

@@ -19,7 +19,7 @@
 				<view :class="tab == '3' ? 'color' : ''">门店信息</view>
 			</view>
 		</view>
-		<status v-else  :obj='form.localMerchantInfoExamine|| {}'></status>
+		<status v-if='form.localMerchantInfoExamine.status!=null && merchantId'  :obj='form.localMerchantInfoExamine|| {}'></status>
 		<view v-if="tab == 1" :class="!merchantId?'tab-top':'tab-padding'">
 			<form>
 
@@ -192,10 +192,9 @@
 						<input placeholder="请输入店铺面积" style="width: 200rpx !important;" v-model="form.storeExtent"
 							name="input" placeholder-class="phone-placeholder"></input>㎡
 					</view>
-					<view class="cu-form-group address-box" :style="{ display: mapIsHidden }"
-						@click="selectAddress">
+					<view class="cu-form-group address-box"  @click="selectAddress">
 						<view class="title"><span>*</span>地理位置</view>
-						<tdmap :allowSelection="false" :showCoordinates="false" :key="mapKey" style="height: 300rpx;"></tdmap>
+						<tdmap :allowSelection="false" :showCoordinates="false" :key="mapKey" style="height: 300rpx;pointer-events: none"></tdmap>
 					</view>
 				</view>
 				<view class="borderRadiu">
@@ -350,6 +349,7 @@
 					leaderName:"",
 					storePhone:"",
 					categoryId: '',
+					localMerchantInfoExamine:{status:null}
 				},
 				formName: {
 					// name: '姓名',
@@ -459,12 +459,9 @@
 			//选择位置
 			selectAddress() {
 				let data=this.form.localMerchantInfoExamine
-				if(data && data.status==2 || !this.merchantId){
-					uni.navigateTo({
-							url: '/pages/store/selectTdMap?url=' + '/pages/store/editStore'
-						})
-					}
-				
+			  uni.navigateTo({
+					url: '/pages/store/selectTdMap?url=' + '/pages/store/editStore'
+				})
 			},
 			//选择主题类型
 			confirmLocality(data) {
@@ -908,6 +905,12 @@
 					}
 					this.title = '店铺信息'
 					this.getInfo()
+					//审核通过跳转首页
+					if(data.localMerchantInfoExamine && data.localMerchantInfoExamine.status==1){
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					}
 				})
 			},
 			openClass(){
@@ -943,6 +946,9 @@
 					//放入session
 					const result = res.data.result
 					const userInfo = result.userInfo
+					userInfo.merchantId=result.localMerchantInfo.id
+					userInfo.merchantName=result.localMerchantInfo.storeName
+					
 					uni.setStorageSync(ACCESS_TOKEN, result.token);
 					uni.setStorageSync(USER_INFO, userInfo);
 					this.$store.commit('SET_TOKEN', result.token)
@@ -951,20 +957,12 @@
 						realname: userInfo.realname
 					})
 					this.$store.commit('SET_AVATAR', userInfo.avatar)
-					// #ifdef APP-PLUS
-					uni.switchTab({
-						url: '/pages/index/index'
-					})
-					// #endif
-					// #ifndef APP-PLUS
-					uni.showToast({
+						uni.showToast({
 						icon: 'none',
-						title: '登录成功'
-					})
-					this.$Router.replaceAll({
-						name: 'index'
+						title: res.data.message
 					})
-					// #endif
+					this.merchantId= result.localMerchantInfo.id
+					await  this.getInfoBus()
 				} else {
 					uni.showToast({
 						icon: 'none',