张文飞 3 lat temu
rodzic
commit
d8219b1af8

+ 43 - 31
pages/homePage/homePage.vue

@@ -121,7 +121,7 @@
 					<text class="txt_tab">我的信息</text>
 				</view>
 			</view>
-			<view class="content_tuiguang">
+			<view class="content_tuiguang" v-if="userInfo.userId">
 				<view class="content_tuiguang_city">
 					<text class="city_num">{{userInfo.taskCount||0}}个</text>
 					<text class="city_num_desc">推广任务</text>
@@ -130,7 +130,7 @@
 						<image class="city_more" src="https://dm.static.elab-plus.com/yezhu/icon_ios_back%402x.png"
 							mode=""></image>
 					</view>
-
+			
 				</view>
 				<view class="content_tuiguang_money">
 					<text class="money_num">¥{{Number(userInfo.surplusTaskAmount).toFixed(2)||'0.00'}}</text>
@@ -144,6 +144,22 @@
 					</image>
 				</view>
 			</view>
+			<view class="content_tuiguang" style="height: auto;" v-else>
+				<view class="content_tuiguang_city">
+					<view class="city_list" style="margin-top: 30rpx;margin-bottom: 30rpx;" @click="showOptions(1)">
+						<text class="city_name">{{city}}</text>
+						<image class="city_more" src="https://dm.static.elab-plus.com/yezhu/icon_ios_back%402x.png"
+							mode=""></image>
+					</view>
+				</view>
+				<view class="content_tuiguang_money" >
+					<view class="money_list" style="margin-top: 30rpx;margin-bottom: 30rpx;" @click="showOptions(2)">
+						<text class="money_name" >{{typeName}}</text>
+						<image class="money_more" src="https://dm.static.elab-plus.com/yezhu/icon_ios_back%402x.png"
+							mode=""></image>
+					</view>
+				</view>
+			</view>
 			<view class="content_list">
 				<view class="content_title">
 					<view class="content_title_poi">
@@ -365,40 +381,36 @@
 				
 			},
 			async toYezhu(){
-				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 if(single.approvalStatus==2){
-							   uni.navigateTo({
-							   	url: '../ownerCertification/ownerCertification?mobile='+this.userInfo.phone
-							   })
-						   }
-					   }else{
+				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 if(single.approvalStatus==2){
 						   uni.navigateTo({
 						   	url: '../ownerCertification/ownerCertification?mobile='+this.userInfo.phone
 						   })
 					   }
-						
-					}else{
-						uni.showToast({
-							icon:"none",
-							title:ret.data.message
-						})
-					}
+				   }else{
+					   uni.navigateTo({
+					   	url: '../ownerCertification/ownerCertification?mobile='+this.userInfo.phone
+					   })
+				   }
+					
 				}else{
-					uni.$emit('unLogin')
+					uni.showToast({
+						icon:"none",
+						title:ret.data.message
+					})
 				}
 			},
 			setEnv(){

+ 49 - 10
pages/ownerCertification/ownerCertification.vue

@@ -92,7 +92,7 @@
 			<text class="tongyi">我已阅读并同意</text>
 			<text class="xieyi_text">《入驻协议》</text>
 	    </view>
-		<view class="btn_next" @click="addOrUpdate">
+		<view class="btn_next" @click="toRegist">
 			下一步
 		</view>
 		<dmAgreeement ref='agreement' @agree='agreeXieyi'></dmAgreeement>
@@ -264,6 +264,54 @@
 			inputRoomNo(e){
 				this.roomNo = e.detail.value
 			},
+			toRegist(){
+				if(this.mobileOld){
+					this.addOrUpdate();
+				}else{
+					this.toLogin();
+				}
+			},
+			async toLogin(){
+				if(!this.mobile){
+					uni.showToast({
+						icon:"none",
+						title:"请输入手机号"
+					})
+					return
+				}
+				
+				if(!this.verifity){
+					uni.showToast({
+						icon:"none",
+						title:"请输入验证码"
+					})
+					return
+				}
+				
+				let ret = await this.$myRequest({
+					url: "/authorizedPhone",
+					data: {
+						"code": this.verifity,
+						"phone": this.mobile,
+						"userId": getApp().globalData.userId,
+						"projectId": getApp().globalData.projectId||"",
+						"shareToken": getApp().globalData.shareToken||"",
+					}
+				});
+			    
+				if(ret.data.success){
+					let token = ret.data.single;
+					getApp().globalData.token = token;
+					uni.$emit('request');
+					this.addOrUpdate();
+				}else{
+					uni.showToast({
+						icon:"none",
+						title:ret.data.message
+					});
+				}
+			},
+			
 			async addOrUpdate() {
 				if(!this.name){
 					uni.showToast({
@@ -280,15 +328,6 @@
 					return
 				}
 				
-				if(!this.mobile){
-					if(!this.mobileOld){
-						uni.showToast({
-							icon:"none",
-							title:"请输入手机号"
-						})
-						return
-					}
-				}
 				
 				if(!this.houseId){
 					uni.showToast({

+ 7 - 1
pages/shareCardPage/shareCardPage.vue

@@ -46,6 +46,9 @@
 		},
 		methods:{
 			async  getShareCard(){
+				uni.showLoading({
+					title:"分享图片生成中"
+				})
 				let ret = await this.$myRequest({
 					url: "/share/shareCard",
 					data: {
@@ -55,7 +58,10 @@
 					}
 				})
 				if (ret.data.success) {
-					 this.shareUrl = ret.data.single
+					 this.shareUrl = ret.data.single;
+					 uni.hideLoading()
+				}else{
+					uni.hideLoading()
 				}
 			},
 			async queryProjectByH5(){