소스 검색

bug修改

twt 3 년 전
부모
커밋
69ee8a7ee8

+ 1 - 1
operatingCompany/pages/entryReport/signIn.vue

@@ -46,7 +46,7 @@
            this.shopId=opt.shopId;
 		   var that = this
 		   uni.getLocation({
-			//type: 'gcj02',
+			type: 'gcj02',
 		   	success(res) {
 				console.log(res)
 		   		that.lng = res.longitude;

+ 31 - 16
operatingCompany/pages/logIn/home.vue

@@ -1,21 +1,23 @@
 <template>
 	<view class="content">
-
-		<view class="zdyNav">
-			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
-			<view class="nav">
-				<view>欧洲维修</view>
-			</view>
-		</view>
-		<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
-		<view style="height: 44px;"></view>
-
-
-		<view class="homePg">
-			<view class="bg">
-				<view class="logIn" @click="logIn">立即登录</view>
-			</view>
-		</view>
+      <view>
+		  <view class="zdyNav">
+		  	<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
+		  	<view class="nav">
+		  		<view>欧洲维修</view>
+		  	</view>
+		  </view>
+		  <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
+		  <view style="height: 44px;"></view>
+		  
+		  
+		  <view class="homePg">
+		  	<view class="bg">
+		  		<view class="logIn" @click="logIn">立即登录</view>
+		  	</view>
+		  </view>
+	  </view>
+		
 
 	</view>
 </template>
@@ -29,6 +31,19 @@
 		},
 		onLoad() {
 			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
+			var userId = uni.getStorageSync("logInData").uid;
+			if (userId) {
+				var type = uni.getStorageSync("logInData").type;
+				if(type==1){
+					uni.navigateTo({
+						url:'../index/index'
+					})
+				}else if(type==2){
+					uni.navigateTo({
+						url:'../shop/shopIndex/index'
+					})
+				}
+			}
 		},
 		methods: {
 

+ 10 - 2
operatingCompany/pages/logIn/logIn.vue

@@ -62,6 +62,7 @@
 				codeValue: '',
 				code_time: 0, // 倒计时
 				iStatusBarHeight: '',
+				sendFlag:true,
 			}
 		},
 		onLoad() {
@@ -84,7 +85,12 @@
 			},
 			// 发送验证码
 			send() {
+				if(!this.sendFlag){
+					return false;
+				}
 				console.log('发送验证码');
+				this.sendFlag=false;
+				var that=this;
 				this.$http('accompany/superusers/sendSms', {
 					phone: this.phoneValue,
 
@@ -97,6 +103,7 @@
 
 							}
 						})
+						this.sendFlag=true
 					} else {
 						this.code_time = 60
 						let coder = setInterval(() => {
@@ -104,7 +111,8 @@
 								this.code_time--
 							}
 							if (this.code_time == 0) {
-								clearInterval(coder)
+								clearInterval(coder);
+								that.sendFlag=true
 							}
 						}, 1000)
 					}
@@ -280,6 +288,6 @@
 		color: #999999;
 	}
 	.codeINput{
-		width: 350rpx;
+		width: 280rpx;
 	}
 </style>

+ 1 - 1
operatingCompany/pages/shop/shopIndex/editWorkDetail.vue

@@ -67,7 +67,7 @@
 		    uploadImg(){
 				var that=this;
 				uni.chooseImage({
-					sourceType: ['album'],
+					sourceType: ['album','camera'],
 					count:9, 
 				    success: (chooseImageRes) => {
 				        const tempFilePaths = chooseImageRes.tempFilePaths;