张文飞 преди 3 години
родител
ревизия
2e9ff9e0da

+ 13 - 5
App.vue

@@ -1,6 +1,13 @@
 <script>
+	const config = require('./static/config.js');
 	export default {
 		onLaunch: function() {
+			let href = location.href;
+			if(!href.startsWith("https://open.weixin.qq.com")){
+				href = encodeURIComponent(href);
+				let url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+config.appid+"&redirect_uri="+href+"&response_type=code&scope=snsapi_base&state=123&connect_redirect=1#wechat_redirect"
+				window.location.href = url;
+			}
 			let BASE_URL = "";
 			var env ='';
 			let res = uni.getStorageSync('env') || '1'
@@ -41,10 +48,6 @@
 			}
 			this.globalData.BASE_URL = BASE_URL;
 			this.globalData.env = env;
-			
-			let plat = uni.getSystemInfoSync().platform;
-			this.globalData.platform = plat
-			let userInfo = uni.getStorageSync('userInfo');//获得保存在本地的用户信息
 		},
 		onShow: function() {
 			let token = this.$cache.get('_token_owner_union');
@@ -63,12 +66,17 @@
 		methods: {
 			getThemeInfo() {
 			
+			},
+			getQueryString(name){
+				var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
+				return reg.test(location.href) ? unescape(RegExp.$2.replace(/\+/g, " ")) : ""
 			},
 			async regist() {
+				let code  = this.getQueryString('code');
 				let ret = await this.$myRequest({
 					url: "/regist",
 					data: {
-						"code": "o08gpwOfRgwnhh1WCBYGLbaszur8",
+						"code": code,
 						"shareToken": ""
 					}
 				});

+ 8 - 3
components/subComponents/dmLogin.vue

@@ -23,14 +23,14 @@
 					</view>
 				</view>
 			</view>
-			<view class="agreement">
+			<view class="agreement"  @click="agreeXieYI">
 				<image class="icon_agree" v-if="agree" src="../../static/icons/icon_yezhu_selected.png" mode=""></image>
 				<image class="icon_agree" v-else src="../../static/icons/icon_yezhu_unselected.png" mode=""></image>
 				
 				我已阅读并同意
-				<text class="agreement_">《用户使用协议》</text>
+				<text class="agreement_" @click="yonghuxy">《用户使用协议》</text>
-				<text class="agreement_">《隐私政策》</text>
+				<text class="agreement_" @click="ysxieyi">《隐私政策》</text>
 			</view>
 			<view class="confirm" @click="toLogin">
 				确认
@@ -56,6 +56,11 @@
 			}
 		},
 		methods:{
+			yonghuxy(){},
+			ysxieyi(){},
+			agreeXieYI(){
+				this.agree = !this.agree
+			},
 			show() {
 				this.$refs.popView.show()
 			},

+ 118 - 0
components/subComponents/dmMine.vue

@@ -0,0 +1,118 @@
+<template>
+	<dmDialog ref='popView' :isShowTitle="true" title="我的信息" :isShowClose="true" :isShowConfirm="false" >
+		<view class="content">
+			<image class="img_head" :src="userInfo.head" mode=""></image>
+			<view class="item_info">
+				<text class="info_title">用户名</text>
+				<text class="info_name">{{userInfo.name}}</text>
+			</view>
+			<view class="item_info">
+				<text class="info_title">性别</text>
+				<text class="info_name">{{userInfo.sex}}</text>
+			</view>
+			<view class="item_info">
+				<text class="info_title">手机</text>
+				<text class="info_name">{{userInfo.phone}}</text>
+			</view>
+			<view class="item_info">
+				<text class="info_title">证件号</text>
+				<text class="info_name">{{userInfo.cardNo}}</text>
+			</view>
+			<view class="item_info">
+				<text class="info_title">房间信息</text>
+				<text class="info_name">{{userInfo.room}}</text>
+			</view>
+			
+		</view>
+	</dmDialog>
+</template>
+
+<script>
+	let app = getApp();
+	import dmDialog from "./dmDialog.vue"
+	export default{
+		props:{
+			userInfo:{
+				"userId": "",
+				"name": null,
+				"head": null,
+				"curlevel": null,
+				"curIncome": null,
+				"nextLevel": null,
+				"nextIncome": null,
+				"ownersUnion": false,
+				"totalIncome": null,
+				"taskCount": null,
+				"surplusTaskAmount": null,
+				"cardNo":"",
+				"phone":"",
+				"room":"",
+				"sex":""
+			}
+		},
+		data(){
+			return {
+			}
+		},
+		methods:{
+			show() {
+				this.$refs.popView.show()
+			},
+			knowAction(){
+				this.$refs.popView.hide()
+			},
+			
+		},
+		mounted() {
+			
+		},
+		
+		components:{
+			dmDialog
+		}
+		
+	}
+</script>
+
+<style scoped lang="scss">
+	.content{
+		width: 100%;
+		margin-top: 30rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		
+		.img_head{
+			width: 168rpx;
+			height: 168rpx;
+			border-radius: 50%;
+			margin-bottom: 76rpx;
+			margin-top: 50rpx;
+		}
+		.item_info{
+			width: 100%;
+			display: flex;
+			align-items: center;
+			margin-bottom: 48rpx;
+			padding-left: 60rpx;
+			box-sizing: border-box;
+			padding-right: 20rpx;
+			.info_title{
+				font-size: 28rpx;
+				font-family: Verdana, Verdana-Regular;
+				font-weight: 400;
+				text-align: left;
+				color: #b1b1b1;
+				min-width: 200rpx;
+			}
+			.info_name{
+				font-size: 28rpx;
+				font-family: Verdana, Verdana-Regular;
+				font-weight: 400;
+				text-align: left;
+				color: #262626;
+			}
+		}
+	}
+
+</style>

+ 2 - 1
manifest.json

@@ -129,7 +129,8 @@
             "enable" : true
         },
         "router" : {
-            "base" : "./"
+            "base" : "./",
+            "mode" : "history"
         }
     },
     "mp-qq" : {

+ 2 - 0
pages/certificationResultPage/certificationResultPage.vue

@@ -15,6 +15,8 @@
 			</view>
 			<image class="renzheng_img" src="../../static/icons/icon_renzheng_pass.png" mode=""></image>
 		</view>
+		<login-notice></login-notice>
+		<login></login>
 	</view>
 </template>
 

+ 26 - 8
pages/homePage/homePage.vue

@@ -95,7 +95,7 @@
 					<image class="icon_tab" src="https://dm.static.elab-plus.com/yezhu/icon_report.png" mode=""></image>
 					<text class="txt_tab">效果报表</text>
 				</view>
-				<view class="tab_item">
+				<view class="tab_item" @click="showMine">
 					<image class="icon_tab" src="https://dm.static.elab-plus.com/yezhu/icon_myinfo.png" mode=""></image>
 					<text class="txt_tab">我的信息</text>
 				</view>
@@ -138,7 +138,7 @@
 							<text class="hongbao_money">完成邀请,可获得 ¥1/人</text>
 						</view>
 					</view>
-					<view class="hongbao_right">
+					<view class="hongbao_right" @click="toShareCard('',1)">
 						邀请好友
 					</view>
 				</view>
@@ -157,11 +157,11 @@
 						</view>
 						<view class="house_num">
 							<image src="https://dm.static.elab-plus.com/yezhu/icon_family.png" mode=""></image>
-							<text>{{item.cusGroup}}</text>
+							<text>{{item.projectLayout}}</text>
 						</view>
 						<text class="house_desc">{{item.shareRemark}}</text>
 					</view>
-					<view class="item_share" @click="toShareCard(item,2)">
+					<view class="item_share" @click="toShareCard(item.projectId,2)">
 						<image class="icon_share" src="https://dm.static.elab-plus.com/yezhu/icon_small_share.png"
 							mode=""></image>
 						<text class="icon_text">分享</text>
@@ -174,11 +174,13 @@
 		</view>
 		<login-notice></login-notice>
 		<login></login>
+		<dmMine ref='mine' :userInfo='userInfo'></dmMine>
 	</view>
 </template>
 
 <script>
 	import levelView from '@/components/leve-view/leve-view.vue';
+	import dmMine from '@/components/subComponents/dmMine.vue'
 	let app = getApp();
 	export default {
 		data() {
@@ -199,7 +201,11 @@
 					"ownersUnion": false,
 					"totalIncome": null,
 					"taskCount": null,
-					"surplusTaskAmount": null
+					"surplusTaskAmount": null,
+					"cardNo":"",
+					"phone":"",
+					"room":"",
+					"sex":""
 				},
 				showGuide:false,
 				total:0,
@@ -315,9 +321,17 @@
 					this.clickCount--;
 				}
 			},
-			toShareCard(item,type){
+			toShareCard(projectId,type){
+				let href = location.href;
+				if (href.indexOf("?")){
+					href = href.split('?')[0]
+				}
+				let projectPath = href;
+				if(type==2){
+					projectPath = href + "pages/houseDetail/houseDetail"
+				}
 				uni.navigateTo({
-					url:'../shareCardPage/shareCardPage?page='+item.xcxPage+"&projectId="+item.projectId+"&type="+type
+					url:'../shareCardPage/shareCardPage?page='+projectPath+"&projectId="+projectId+"&type="+type
 				})
 			},
 			toLogin(){
@@ -325,10 +339,14 @@
 			},
 			upLoadView(isShow){
 				this.showGuide = isShow;
+			},
+			showMine(){
+				this.$refs.mine.show()
 			}
 		},
 		components: {
-			levelView
+			levelView,
+			dmMine
 		}
 	}
 </script>

+ 2 - 1
pages/houseDetail/houseDetail.vue

@@ -50,7 +50,8 @@
 			<view class="text" style="margin-top: 6rpx;font-size: 12rpx;font-family: PingFang SC, PingFang SC-Semibold;font-weight: 400;text-align: center;color: #ffffff;">返回</view>
 			<view class="text" style="margin-top: -2rpx;;font-size: 12rpx;font-family: PingFang SC, PingFang SC-Semibold;font-weight: 400;text-align: center;color: #ffffff;">任务大厅</view>
 		</view>
-		
+		<login-notice></login-notice>
+		<login></login>
 	</view>
 </template>
 

+ 2 - 1
pages/ownerCertification/ownerCertification.vue

@@ -99,7 +99,8 @@
 		<dmPickerView ref="genderPicker" :options="genderList" :value="gender" @confirm="confirm" title="筛选时间维度"></dmPickerView>
 	    <dmPickerView ref="housePicker" :options="houseList" :value="houseId" @confirm="houseConfirm" title="筛选时间维度"></dmPickerView>
 	    <dmPickerView ref="certificateTypePicker" :options="certificateTypeList" :value="certificateType" @confirm="certificateTypeConfirm" title="筛选时间维度"></dmPickerView>
-	       
+	    <login-notice></login-notice>
+	    <login></login>
 	</view>
 </template>
 

+ 2 - 0
pages/revenueRankingPage/revenueRankingPage.vue

@@ -58,6 +58,8 @@
 				<text>返回\n任务大厅</text>
 			</view>
 		</view>
+		<login-notice></login-notice>
+		<login></login>
 	</view>
 </template>
 

+ 11 - 0
static/config.js

@@ -0,0 +1,11 @@
+/**
+ * appid配置文件
+ */
+var config = function() {
+	var result = {
+		appid:"wx55d4c9f89b3b743f"
+	};
+    return result;
+}
+
+module.exports = config();