Explorar o código

Merge branch 'feature_业主工会' of http://192.168.4.246:3000/elab-damai-h5/h5-elab-open-ownerUnion into feature_业主工会

王晓晨 %!s(int64=3) %!d(string=hai) anos
pai
achega
f70f09f919

+ 5 - 2
components/subComponents/dmLogin.vue

@@ -17,7 +17,7 @@
 					
 				</view>
 				<view class="item_right">
-					<input placeholder-class="item_right_name_placeholder" class="item_right_name" type="text" :value="verifity" placeholder="请输入" @blur='inputVerifity' @confirm='inputVerifity'/>
+					<input placeholder-class="item_right_name_placeholder" class="item_right_name" type="number" :value="verifity" placeholder="请输入" @blur='inputVerifity' @confirm='inputVerifity'/>
 					<view class="veritify" @click="getVeritify">
 						{{veritifyTxt}}
 					</view>
@@ -41,6 +41,7 @@
 
 <script>
 	import dmDialog from "./dmDialog.vue"
+	let app = getApp();
 	export default{
 		
 		data(){
@@ -148,7 +149,9 @@
 					data: {
 						"code": this.verifity,
 						"phone": this.mobile,
-						"userId": this.userId
+						"userId": this.userId,
+						"projectId": app.globalData.projectId,
+						"shareToken": app.globalData.shareToken,
 					}
 				});
 			    

+ 66 - 46
pages/homePage/homePage.vue

@@ -180,6 +180,7 @@
 
 		</view>
 		<login></login>
+		<login-notice></login-notice>
 		<dmMine ref='mine' :userInfo='userInfo'></dmMine>
 	</view>
 </template>
@@ -213,7 +214,7 @@
 					"room":"",
 					"sex":""
 				},
-				showGuide:false,
+				showGuide:true,
 				total:0,
 				pageNo:1,
 				pageSize:10,
@@ -278,61 +279,76 @@
 			async getUserInfo() {
 				let ret = await this.$myRequest({
 					url: "/user/userInfo",
-					data: {
-
-					},
+					data: {},
 					method: "GET"
 				});
 				if (ret.data.success) {
 					this.userInfo = ret.data.single || null;
+					this.showGuide = this.userInfo.userId?this.userInfo.ownersUnion?false:true:true;
 				}
 			},
 			// 调准项目详情
-			goDetailAction(e) {
-				uni.navigateTo({
-					url: '../houseDetail/houseDetail?projectId='+e.projectId
-				})
+			goDetailAction(e) {
+				if(this.userInfo.userId){
+					uni.navigateTo({
+						url: '../houseDetail/houseDetail?projectId='+e.projectId
+					})
+				}else{
+					uni.$emit('unLogin')
+				}
 			},
 			// 跳转至效果报表
 			goReportPage() {
-				uni.navigateTo({
-					url: '../reportPage/reportPage'
-				})
+				if(this.userInfo.userId){
+					uni.navigateTo({
+						url: '../reportPage/reportPage'
+					})
+				}else{
+					uni.$emit('unLogin')
+				}
 			},
 			toShouYiPage() {
-				uni.navigateTo({
-					url: '../revenueRankingPage/revenueRankingPage'
-				})
+				if(this.userInfo.userId){
+					uni.navigateTo({
+						url: '../revenueRankingPage/revenueRankingPage'
+					})
+				}else{
+					uni.$emit('unLogin')
+				}
+				
 			},
 			async toYezhu(){
-				let ret = await this.$myRequest({
-					url: "/user/regist/get",
-					data: {
-						"userId": app.globalData.userId,
-					},
-					method:"GET"
-				})
-				if (ret.data.success) {
-				   let single = ret.data.single||null;//:0待审核1通过2拒绝
-				   if(single){
-					   if(single.approvalStatus==0||single.approvalStatus==1){
-							uni.navigateTo({
-								url: '../certificationResultPage/certificationResultPage'
-							})
+				if(this.userInfo.userId){
+					let ret = await this.$myRequest({
+						url: "/user/regist/get",
+						data: {
+							"userId": app.globalData.userId,
+						},
+						method:"GET"
+					})
+					if (ret.data.success) {
+					   let single = ret.data.single||null;//:0待审核1通过2拒绝
+					   if(single){
+						   if(single.approvalStatus==0||single.approvalStatus==1){
+								uni.navigateTo({
+									url: '../certificationResultPage/certificationResultPage'
+								})
+						   }
+					   }else{
+						   uni.navigateTo({
+						   	url: '../ownerCertification/ownerCertification?mobile='+this.userInfo.phone
+						   })
 					   }
-				   }else{
-					   uni.navigateTo({
-					   	url: '../ownerCertification/ownerCertification'
-					   })
-				   }
-					
+						
+					}else{
+						uni.showToast({
+							icon:"none",
+							title:ret.data.message
+						})
+					}
 				}else{
-					uni.showToast({
-						icon:"none",
-						title:ret.data.message
-					})
+					uni.$emit('unLogin')
 				}
-				
 			},
 			setEnv(){
 				if (this.clickCount < 0) {
@@ -345,13 +361,17 @@
 				}
 			},
 			toShareCard(projectId,type){
-				let href = location.href;
-				if (href.indexOf("?")){
-					href = href.split('?')[0]
+				if(this.userInfo.userId){
+					let href = location.href;
+					if (href.indexOf("?")){
+						href = href.split('?')[0]
+					}
+					uni.navigateTo({
+						url:'../shareCardPage/shareCardPage?page='+href+"&projectId="+projectId+"&type="+type
+					})
+				}else{
+					uni.$emit('unLogin')
 				}
-				uni.navigateTo({
-					url:'../shareCardPage/shareCardPage?page='+href+"&projectId="+projectId+"&type="+type
-				})
 			},
 			toLogin(){
 				uni.$emit('login')
@@ -363,7 +383,7 @@
 				if(this.userInfo.userId){
 					this.$refs.mine.show()
 				}else{
-					uni.$emit('login')
+					uni.$emit('unLogin')
 				}
 				
 			}

+ 3 - 0
pages/ownerCertification/ownerCertification.vue

@@ -151,6 +151,9 @@
 				showInputVerifity:true
 			};
 		},
+		onLoad(param) {
+			this.mobileOld = param.mobile;
+		},
 		created() {
 			this.queryProjectBox();
 		},

+ 1 - 1
util/api.js

@@ -34,7 +34,7 @@ export const myRequest = (options) => {
 				uni.hideLoading()
 				uni.hideNavigationBarLoading();
 				uni.stopPullDownRefresh();
-				if(res.data.errorCode=='401'){
+				if(res.data.errorCode=='401'||res.data.message.indexOf('请登录')>-1){
 					uni.$emit('unLogin')
 				}
 				resolve(res)