houwei 4 年 前
コミット
9ff9da4ed4

+ 6 - 30
app.json

@@ -1,14 +1,15 @@
 {
   "pages": [
-    "pages/registrationSuccess/registrationSuccess",
-    "pages/activeDetail/activeDetail",
-    "pages/personal/personal",
+    "pages/index/index",
+    "pages/myActive/myActive",
+    "pages/InfoType/InfoType",
     "pages/targetInfo/targetInfo",
     "pages/personInfoDetail/personInfoDetail",
     "pages/personInfo/personInfo",
-    "pages/index/index",
+    "pages/personal/personal",
+    "pages/registrationSuccess/registrationSuccess",
+    "pages/activeDetail/activeDetail",
     "pages/red/red"
-   
   ],
   "window": {
     "backgroundTextStyle": "light",
@@ -54,31 +55,6 @@
     "van-notice-bar": "/miniprogram_npm/vant-weapp/notice-bar/index",
     "van-uploader": "/miniprogram_npm/vant-weapp/uploader/index"
   },
-  "tabBar": {
-    "color": "#a9b7b7",
-    "selectedColor": "#eb3f33",
-    "borderStyle": "black",
-    "list": [
-      {
-        "pagePath": "pages/index/index",
-        "text": "首页",
-        "selectedIconPath": "./images/active_bar1.png",
-        "iconPath": "./images/unactive_bar1.png"
-      },
-      {
-        "pagePath": "pages/red/red",
-        "text": "红娘",
-        "selectedIconPath": "./images/active_bar3.png",
-        "iconPath": "./images/unactive_bar3.png"
-      },
-      {
-        "pagePath": "pages/personal/personal",
-        "text": "我的",
-        "selectedIconPath": "./images/active_bar2.png",
-        "iconPath": "./images/unactive_bar2.png"
-      }
-    ]
-  },
   "style": "v2",
   "sitemapLocation": "sitemap.json"
 }

BIN
images/active_bar1.png


BIN
images/activeimg.png


BIN
images/activephoto.png


+ 80 - 0
pages/InfoType/InfoType.js

@@ -0,0 +1,80 @@
+// pages/InfoType/InfoType.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+  goMyinfo(){
+    wx.navigateTo({
+      url: '/pages/personInfo/personInfo',
+    })
+  },
+  goMyinfoDetail(){
+    wx.navigateTo({
+      url: '/pages/personInfoDetail/personInfoDetail',
+    })
+  },
+  goMyTargetInfo(){
+    wx.navigateTo({
+      url: '/pages/targetInfo/targetInfo',
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 4 - 0
pages/InfoType/InfoType.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "我的信息"
+}

+ 5 - 0
pages/InfoType/InfoType.wxml

@@ -0,0 +1,5 @@
+<view class="container1">
+	<view class="a1" bindtap="goMyinfo"><view class="left">我的个人信息</view><van-icon name="arrow" class="right"/></view>
+	<view class="a1" bindtap="goMyinfoDetail"><view class="left">我的个人详细信息</view><van-icon name="arrow" class="right"/></view>
+	<view class="a1" bindtap="goMyTargetInfo"><view class="left">我的择偶信息</view><van-icon name="arrow" class="right"/></view>
+</view>

+ 29 - 0
pages/InfoType/InfoType.wxss

@@ -0,0 +1,29 @@
+.container1 {
+  background: #fafafa;
+  height: 100vh;
+  width: 750prx;
+  padding-top: 20rpx;
+}
+
+.a1 {
+  background: #fff;
+  height: 80rpx;
+  line-height: 80rpx;
+  width: 650rpx;
+  margin-left: 50rpx;
+  margin-top: 20rpx;
+  font-size: 28rpx;
+  text-indent: 20rpx;
+  border-radius: 10rpx;
+}
+
+.left {
+  float: left;
+}
+
+.right {
+  float: right;
+  /* line-height: 80rpx; */
+  margin-right: 20rpx;
+  margin-top: 25rpx;
+}

+ 10 - 0
pages/index/index.js

@@ -40,4 +40,14 @@ Page({
       margintop: 0
     })
   },
+  goIndex(){
+    wx.navigateTo({
+      url: '/pages/index/index',
+    })
+  },
+  goMy(){
+    wx.navigateTo({
+      url: '/pages/personal/personal',
+    })
+  }
 })

+ 18 - 11
pages/index/index.wxml

@@ -1,15 +1,10 @@
-<view class="swiper-cont container-fill"> 
-  <view class="scroll-fullpage" bindtouchstart="scrollTouchstart" bindtouchend="scrollTouchend" style="transform:translateY(-{{scrollindex*100}}%);margin-top: {{margintop}}px"> 
-  <!-- 第一页 -->
+<view class="swiper-cont container-fill">
+	<!-- <view class="scroll-fullpage" bindtouchstart="scrollTouchstart" bindtouchend="scrollTouchend" style="transform:translateY(-{{scrollindex*100}}%);margin-top: {{margintop}}px"> 
     <view class="section section01 {{scrollindex==0?'active':''}}" style='background:red'> 
       <view class='cont'>
-        <!-- <view class='cont-body'> -->
-          <!-- <view>one</view> -->
           <image src="../../images/active_bar1.png" class='cont-body'></image>
-        <!-- </view> -->
       </view>
     </view> 
-  <!-- 第二页 -->
     <view class="section section02 {{scrollindex==1?'active':''}}" style='background:pink'> 
       <view class='cont'>
         <view class='cont-body'>
@@ -17,7 +12,6 @@
         </view>
       </view>
     </view> 
-  <!-- 第三页 -->
     <view class="section section03 {{scrollindex==2?'active':''}}" style='background:blue'>  
       <view class='cont'>
         <view class='cont-body'>
@@ -25,7 +19,6 @@
         </view>
       </view>
     </view>
-  <!-- 第四页 -->
     <view class="section section04 {{scrollindex==3?'active':''}}" style='background:green'> 
       <view class='cont'>
         <view class='cont-body'>
@@ -33,5 +26,19 @@
         </view>
       </view>
     </view>
-  </view> 
-</view> 
+  </view>  -->
+	<view class="tabbar">
+		<view class="tab1" bindtap="goIndex">
+			<image src="../../images/active_bar1.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+			<view style="color:#a342ff">首页</view>
+		</view>
+		<view class="tab1">
+			<image src="../../images/active_bar1.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+			<button id="red" type="primary" session-from="nickName={{userInfo.nickName}}|avatarUrl={{userInfo.avatarUrl}}" open-type="contact">红娘</button>
+		</view>
+		<view class="tab1" bindtap="goMy">
+			<image src="../../images/active_bar1.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+			<view>我的</view>
+		</view>
+	</view>
+</view>

+ 54 - 17
pages/index/index.wxss

@@ -1,26 +1,31 @@
-page{
-	height: 100%;
-	background: fff;
-	color: #282828;
+page {
+  height: 100%;
+  background: fff;
+  color: #282828;
 }
+
 .container {
-	flex: 1;
+  flex: 1;
   flex-direction: column;
- 	box-sizing: border-box;
+  box-sizing: border-box;
   padding: 0;
-  align-items:initial;
-  justify-content:first baseline;
+  align-items: initial;
+  justify-content: first baseline;
 }
-.container-fill{
-	height: 100%;
-	overflow: hidden;
+
+.container-fill {
+  height: 100%;
+  overflow: hidden;
 }
-.scroll-fullpage{
-	height: 100%;
+
+.scroll-fullpage {
+  height: 100%;
 }
-.section{
-	height: 100%;
+
+.section {
+  height: 100%;
 }
+
 .active .cont {
   -webkit-animation-duration: 1.8s;
   animation-duration: 1.8s;
@@ -29,16 +34,48 @@ page{
   -webkit-animation-name: fadeInUp;
   animation-name: fadeInUp;
 }
-.cont{
+
+.cont {
   width: 100%;
   height: 100%;
   margin: 0 auto;
   position: relative;
 }
+
 .cont .cont-body {
   width: 75%;
   position: absolute;
   left: 50%;
   top: 50%;
-  transform: translate(-50%,-50%);
+  transform: translate(-50%, -50%);
+}
+
+.tabbar {
+  width: 750rpx;
+  border: 1px solid #999;
+  height: 100rpx;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  display: flex;
+  font-size: 28rpx;
+}
+
+.tab1 {
+  height: 100rpx;
+  width: 250rpx;
+  text-align: center;
+  color: #999999;
+}
+#red{
+  background: none;
+  color: #999999;
+  font-weight: normal;
+  width:250rpx;
+  height: 100rpx;
+  /* border: 1px solid red; */
+  line-height:125rpx;
+  font-size: 28rpx;
+  position: absolute;
+  bottom: 0;
 }

+ 84 - 0
pages/myActive/myActive.js

@@ -0,0 +1,84 @@
+// pages/myActive/myActive.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    arr: [{
+      title: '月合红娘',
+      address: '吉林省长春市某某大厦',
+      remark: '请大家按照规定时间前来参与',
+      activeTime: '2020-02-20',
+      activeStatus: 0
+    }, {
+      title: '月合红娘',
+      address: '吉林省长春市某某大厦',
+      remark: '请大家按照规定时间前来参与',
+      activeTime: '2020-02-20',
+      activeStatus: 1
+    }, {
+      title: '月合红娘',
+      address: '吉林省长春市某某大厦',
+      remark: '请大家按照规定时间前来参与',
+      activeTime: '2020-02-20',
+      activeStatus: 2
+    }]
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 4 - 0
pages/myActive/myActive.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "我的活动"
+}

+ 27 - 0
pages/myActive/myActive.wxml

@@ -0,0 +1,27 @@
+<view wx:for="{{arr}}" class="box">
+	<view class="top">
+		<image src="../../images/activephoto.png" style="width:80rpx;height:80rpx;"></image>
+		<view class="text">
+			<view class="title">{{item.title}}</view>
+			<view class="remark">{{item.remark}}</view>
+		</view>
+		<view wx:if="{{item.activeStatus==0}}" class="btn btn1">未开始</view>
+		<view wx:if="{{item.activeStatus==1}}" class="btn btn2">进行中</view>
+    <view wx:if="{{item.activeStatus==2}}" class="btn btn3">已结束</view>
+	</view>
+	<image src="../../images/activeimg.png" class="img2"></image>
+	<view class="p1">
+	<van-icon name="clock-o" color="#a267ff" size="35rpx"/><view style="margin-left:15rpx">活动时间:{{item.activeTime}}</view>
+	</view>
+	<view class="p1">
+	<van-icon name="location-o" color="#a267ff" size="35rpx"/><view style="margin-left:15rpx">活动地点:{{item.address}}</view>
+	</view>
+	<!-- <button type="primary" size="40" session-from="nickName={{userInfo.nickName}}|avatarUrl={{userInfo.avatarUrl}}" open-type="contact">联系客服</button> -->
+	<!-- <view>{{item.photo}}</view>
+			<view>{{item.title}}</view>
+			<view>{{item.remark}}</view>
+			<view>{{item.activeStatus}}</view>
+			<view>{{item.img}}</view>
+			<view>{{item.activeTime}}</view>
+			<view>{{item.address}}</view> -->
+</view>

+ 59 - 0
pages/myActive/myActive.wxss

@@ -0,0 +1,59 @@
+/* pages/myActive/myActive.wxss */
+.box{
+  width: 650rpx;
+  height: 530rpx;
+  margin: 25rpx;
+  box-shadow:0 0 10rpx 10rpx #eceafa;
+  padding:25rpx
+}
+.top{
+  display: flex;
+}
+.text{
+  /* border: 1px solid red; */
+  width: 460rpx;
+}
+.title{
+  color: #999999;
+  font-size: 28rpx;
+  margin-left: 30rpx;
+}
+.remark{
+  color: #4d4d4d;
+  font-size: 28rpx;
+  margin-left: 30rpx;
+  margin-top: 10rpx;
+}
+.btn{
+  width:150rpx;
+  height:50rpx;
+  text-align: center;
+  font-weight: bold;
+  line-height: 50rpx;
+  font-size: 28rpx;
+  border-radius: 30rpx;
+  margin-top: 10rpx;
+}
+.btn1{
+  border: 1px solid #1bb610;
+  color: #1bb610;
+}
+.btn2{
+  border: 1px solid #216deb;
+  color: #216deb;
+}
+.btn3{
+  border: 1px solid #f1252e;
+  color: #f1252e;
+}
+.img2{
+  width: 100%;
+  height: 300rpx;
+  margin-top: 30rpx;
+}
+.p1{
+  display: flex;
+  color: #999999;
+  margin-top: 15rpx;
+  font-size: 28rpx;
+}

ファイルの差分が大きいため隠しています
+ 15 - 18
pages/personInfo/personInfo.js


+ 6 - 6
pages/personInfo/personInfo.wxml

@@ -24,13 +24,13 @@
 		<view class="block">
 			<view class='left'>年龄</view>
 			<view class='right'>
-				<input name="age" value="{{form.age}}" placeholder="未填写" placeholder-class="iconfont icon-jianjiaohao1 icon-tubiaozhizuo-1"></input>
+				<input name="age" disabled="true" value="{{form.age}}" placeholder="未填写" placeholder-class="iconfont icon-jianjiaohao1 icon-tubiaozhizuo-1"></input>
 			</view>
 		</view>
 		<view class="block">
 			<view class='left'>户籍</view>
 			<view class='right'>
-				<input name="adress" value="{{form.adress}}" placeholder="未填写" placeholder-class="iconfont icon-jianjiaohao1 icon-tubiaozhizuo-1"></input>
+				<input name="nativePlace" value="{{form.nativePlace}}" placeholder="未填写" placeholder-class="iconfont icon-jianjiaohao1 icon-tubiaozhizuo-1"></input>
 			</view>
 		</view>
 		<view class="block">
@@ -51,9 +51,9 @@
 		<view class="block">
 			<view class='left'>生日</view>
 			<view class='right'>
-				<picker mode='date' bindchange="birthPicker" name='birth' value="{{form.birth}}">
+				<picker mode='date' bindchange="birthdayPicker" name='birthday' value="{{form.birthday}}">
 					<view style="text-align:right">
-						<view wx:if="{{form.birth}}">{{form.birth}}</view>
+						<view wx:if="{{form.birthday}}">{{form.birthday}}</view>
 						<view wx:else class='placeStyle'>
 							<view class="redpoint"></view>
 							<view class="placetext">未选择</view>
@@ -66,9 +66,9 @@
 		<view class="block">
 			<view class='left'>星座</view>
 			<view class='right'>
-				<picker bindchange="starPicker" range="{{starArr}}" name='star' value="{{form.star}}">
+				<picker bindchange="constellationPicker" range="{{constellationArr}}" name='constellation' value="{{form.constellation}}">
 					<view style="text-align:right">
-						<view wx:if="{{form.star}}">{{form.star}}</view>
+						<view wx:if="{{form.constellation}}">{{form.constellation}}</view>
 						<view wx:else class='placeStyle'>
 							<view class="redpoint"></view>
 							<view class="placetext">未选择</view>

+ 320 - 189
pages/personInfoDetail/personInfoDetail.js

@@ -1,29 +1,30 @@
-// pages/personInfoDetail/personInfoDetail.js
+import WxValidate from '../../utils/WxValidate.js'
 Page({
-
-  /**
-   * 页面的初始数据
-   */
   data: {
     form: {
       height: '',
       weight: '',
       education: '',
-      wages: '',
-      maritalstatus: '',
-      ischild: '',
-      house: '',
-      car: '',
-      freetime: '',
-      worktime: '',
-      workplace:'',
-      workspacedetails:'',
-      parentsstatus:'',
-      dadworkplace:'',
-      momworkplace:'',
-      otherchild:'',
-      figure:'',
-      hobby:''
+      income: '',
+      marriage: '',
+      children: '',
+      assetHouse: '',
+      assetArea: '',
+      assetHouseLoan: '',
+      assetCar: '',
+      assetCarValue: '',
+      assetCarLoan: '',
+      isCommen: '',
+      controlTime: '',
+      workStatus: '',
+      companyNature: '',
+      company: '',
+      parents: '',
+      fatherWork: '',
+      motherWork: '',
+      composition: '',
+      motionState: '',
+      hobby: ''
     },
     heightArr: [
       '150以下',
@@ -40,8 +41,8 @@ Page({
       "50kg以下", "50-60", "60-70", "70-80", "80-90", "90-100", "100以上"
     ],
     educationArr: ["初中", "中专", "高中", "大专", "本科", "硕士", "博士"],
-    wagesArr: ["2000-5000", "5000-10000", "10000-20000", "20000以上"],
-    maritalstatusList: [{
+    incomeArr: ["2000-5000", "5000-10000", "10000-20000", "20000以上"],
+    marriageList: [{
         name: '未婚',
         value: '未婚',
         checked: true
@@ -52,7 +53,7 @@ Page({
         checked: false
       }
     ],
-    ischildArr: [{
+    childrenArr: [{
         name: '无',
         value: '无',
         checked: true
@@ -73,18 +74,14 @@ Page({
       }
     ],
     deposit: '',
-    housemultiArray: [
-      ['租房', '购房'],
-      ['80平以下', '80—120平', '120平以上'],
-      ['有贷款', '无贷款'],
-      ['与父母同住', '不与一起住']
-    ],
-    carmultiArray: [
-      ['有车', '无车'],
-      ['10万以下', '10-20万', '20-30万', '30-40万', '40-50万', '50-60万', '60-70万', '70-80万', '80-90万', '90-100万', '100万以上'],
-      ['有贷款', '无贷款']
-    ],
-    freetimeArr: [{
+    assetHouseArr: ['租房', '购房'],
+    assetAreaArr: ['80平以下', '80-120平', '120平以上'],
+    assetHouseLoanArr: ['有', '没有'],
+    assetCarArr: ['有', '没有'],
+    assetCarValueArr: ['10万以下', '10-20万', '20-30万', '30-40万', '40-50万', '50-60万', '60-70万', '70-80万', '80-90万', '90-100万', '100万以上'],
+    assetCarLoanArr: ['有贷款', '无贷款'],
+    isCommenArr: ['一起', '没有'],
+    controlTimeArr: [{
         name: '不限',
         value: '不限',
         checked: true
@@ -104,7 +101,7 @@ Page({
       }
     ],
     // 工作时间自由、朝九晚五、偶尔加班、经常加班、偶尔出差、经常出差、常有应酬
-    worktimeArr: [{
+    workStatusArr: [{
         name: '工作时间自由',
         value: '工作时间自由',
         checked: true
@@ -136,33 +133,34 @@ Page({
         checked: false
       }
     ],
-    workplaceArr: ['政府机关','事业单位','外企企业','世界500强','上市公司','国有企业','私营企业','个体'],
-    parentsstatusArr:[['爹妈比我都健康','世事无常'],['曾相爱','一直相爱']],
-    dadworkplaceArr:['退休','政府机关','事业单位','外企企业','世界500强','上市公司','国有企业','私营企业','个体'],
-    momworkplaceArr:['退休','政府机关','事业单位','外企企业','世界500强','上市公司','国有企业','私营企业','个体'],
-    otherchildArr:[{
-      name: '没有唯我独尊',
-      value: '没有唯我独尊',
-      checked: false
-    },
-    {
-      name: '有姐姐',
-      value: '偶有姐姐',
-      checked: false
-    }, {
-      name: '有哥哥',
-      value: '有哥哥',
-      checked: false
-    }, {
-      name: '有弟弟',
-      value: '有弟弟',
-      checked: false
-    }, {
-      name: '有妹妹',
-      value: '有妹妹',
-      checked: false
-    }],
-    figureArr:['龟息养生从不运动','三天打鱼偶尔运动','动如脱兔成天运动']
+    workplaceArr: ['政府机关', '事业单位', '外企企业', '世界500强', '上市公司', '国有企业', '私营企业', '个体'],
+    parentsArr: ['爹妈比我都健康,一直很恩爱', '爹妈比我都健康,离婚了', '世事无常'],
+    dadworkplaceArr: ['退休', '政府机关', '事业单位', '外企企业', '世界500强', '上市公司', '国有企业', '私营企业', '个体'],
+    momworkplaceArr: ['退休', '政府机关', '事业单位', '外企企业', '世界500强', '上市公司', '国有企业', '私营企业', '个体'],
+    otherchildArr: [{
+        name: '没有唯我独尊',
+        value: '没有唯我独尊',
+        checked: false
+      },
+      {
+        name: '有姐姐',
+        value: '偶有姐姐',
+        checked: false
+      }, {
+        name: '有哥哥',
+        value: '有哥哥',
+        checked: false
+      }, {
+        name: '有弟弟',
+        value: '有弟弟',
+        checked: false
+      }, {
+        name: '有妹妹',
+        value: '有妹妹',
+        checked: false
+      }
+    ],
+    figureArr: ['龟息养生从不运动', '三天打鱼偶尔运动', '动如脱兔成天运动']
   },
   heightPicker(e) {
     let height = 'form.height'
@@ -182,17 +180,17 @@ Page({
       [education]: this.data.educationArr[e.detail.value]
     })
   },
-  wagesPicker(e) {
-    let wages = 'form.wages'
+  incomePicker(e) {
+    let income = 'form.income'
     this.setData({
-      [wages]: this.data.wagesArr[e.detail.value]
+      [income]: this.data.incomeArr[e.detail.value]
     })
   },
-  maritalstatusChange: function (e) {
+  marriageChange: function (e) {
     console.log(e.detail.value)
-    const items = this.data.maritalstatusList
-    let checked = 'maritalstatusList[0].checked';
-    let checked1 = 'maritalstatusList[1].checked'
+    const items = this.data.marriageList
+    let checked = 'marriageList[0].checked';
+    let checked1 = 'marriageList[1].checked'
     this.setData({
       [checked]: false,
       [checked1]: false
@@ -204,16 +202,16 @@ Page({
       }
     }
     this.setData({
-      maritalstatusList: this.data.maritalstatusList
+      marriageList: this.data.marriageList
     })
-    let maritalstatus = 'form.maritalstatus'
+    let marriage = 'form.marriage'
     this.setData({
-      [maritalstatus]: e.detail.value
+      [marriage]: e.detail.value
     })
   },
-  ischildChange: function (e) {
+  childrenChange: function (e) {
     console.log(e.detail.value)
-    const items = this.data.ischildArr;
+    const items = this.data.childrenArr;
     const values = e.detail.value;
     for (let i = 0, lenI = items.length; i < lenI; ++i) {
       items[i].checked = false
@@ -225,55 +223,64 @@ Page({
       }
     }
     this.setData({
-      ischildArr: this.data.ischildArr
+      childrenArr: this.data.childrenArr
     })
-    let ischild = 'form.ischild'
+    let children = 'form.children'
     this.setData({
-      [ischild]: e.detail.value
+      [children]: e.detail.value
     })
   },
-  housePickerChange(e) {
+  assetHousePickerChange(e) {
+    console.log(e)
+    let assetHouse = 'form.assetHouse'
     this.setData({
-      housemultiIndex: e.detail.value
+      [assetHouse]: this.data.assetHouseArr[e.detail.value]
     })
-    let house = 'form.house'
+  },
+  assetAreaPickerChange(e) {
+    console.log(e)
+    let assetArea = 'form.assetArea'
     this.setData({
-      [house]: [this.data.housemultiArray[0][e.detail.value[0]], this.data.housemultiArray[1][e.detail.value[1]], this.data.housemultiArray[2][e.detail.value[2]], this.data.housemultiArray[3][e.detail.value[3]]]
+      [assetArea]: this.data.assetAreaArr[e.detail.value]
     })
   },
-  carPickerChange(e) {
-    let car = 'form.car'
+  assetHouseLoanPickerChange(e) {
+    console.log(e)
+    let assetHouseLoan = 'form.assetHouseLoan'
     this.setData({
-      [car]: [this.data.carmultiArray[0][e.detail.value[0]], this.data.carmultiArray[1][e.detail.value[1]], this.data.carmultiArray[2][e.detail.value[2]]]
+      [assetHouseLoan]: this.data.assetHouseLoanArr[e.detail.value]
     })
+  },
+  assetCarPickerChange(e) {
+    console.log(e)
+    let assetCar = 'form.assetCar'
     this.setData({
-      carmultiIndex: e.detail.value
+      [assetCar]: this.data.assetCarArr[e.detail.value]
     })
   },
-  carPickerColumnChange(e) {
+  assetCarValuePickerChange(e) {
     console.log(e)
-    if (e.detail.column == 0 && e.detail.value == 1) {
-      this.setData({
-        carmultiArray: [
-          ['有车', '无车'],
-          [],
-          []
-        ]
-      })
-    } else {
-      this.setData({
-        carmultiArray: [
-          ['有车', '无车'],
-          ['10万以下', '10-20万', '20-30万', '30-40万', '40-50万', '50-60万', '60-70万', '70-80万', '80-90万', '90-100万', '100万以上'],
-          ['有贷款', '无贷款']
-        ]
-      })
-
-    }
+    let assetCarValue = 'form.assetCarValue'
+    this.setData({
+      [assetCarValue]: this.data.assetCarValueArr[e.detail.value]
+    })
+  },
+  assetCarLoanPickerChange(e) {
+    console.log(e)
+    let assetCarLoan = 'form.assetCarLoan'
+    this.setData({
+      [assetCarLoan]: this.data.assetCarLoanArr[e.detail.value]
+    })
+  },
+  isCommenChange(e) {
+    let isCommen = 'form.isCommen'
+    this.setData({
+      [isCommen]: this.data.isCommenArr[e.detail.value]
+    })
   },
-  freetimeChange(e) {
+  controlTimeChange(e) {
     console.log(e.detail.value)
-    const items = this.data.freetimeArr;
+    const items = this.data.controlTimeArr;
     const values = e.detail.value;
     for (let i = 0, lenI = items.length; i < lenI; ++i) {
       items[i].checked = false
@@ -285,16 +292,16 @@ Page({
       }
     }
     this.setData({
-      freetimeArr: this.data.freetimeArr
+      controlTimeArr: this.data.controlTimeArr
     })
-    let freetime = 'form.freetime'
+    let controlTime = 'form.controlTime'
     this.setData({
-      [freetime]: e.detail.value
+      [controlTime]: e.detail.value
     })
   },
-  worktimeChange(e) {
+  workStatusChange(e) {
     console.log(e.detail.value)
-    const items = this.data.worktimeArr;
+    const items = this.data.workStatusArr;
     const values = e.detail.value;
     for (let i = 0, lenI = items.length; i < lenI; ++i) {
       items[i].checked = false
@@ -306,90 +313,35 @@ Page({
       }
     }
     this.setData({
-      worktimeArr: this.data.worktimeArr
+      workStatusArr: this.data.workStatusArr
     })
-    let worktime = 'form. worktime'
+    let workStatus = 'form. workStatus'
     this.setData({
-      [worktime]: e.detail.value
+      [workStatus]: e.detail.value
     })
   },
   workplacePicker: function (e) {
-    let workplace = 'form.workplace'
+    let companyNature = 'form.companyNature'
     this.setData({
-      [workplace]: this.data.workplaceArr[e.detail.value]
-    })
-    // console.log(e.detail.value)
-    // const items = this.data.workplaceArr
-    // let checked = 'workplaceArr[0].checked';
-    // let checked1 = 'workplaceArr[1].checked';
-    // let checked2 = 'workplaceArr[2].checked';
-    // let checked3 = 'workplaceArr[3].checked';
-    // let checked4 = 'workplaceArr[4].checked';
-    // let checked5 = 'workplaceArr[5].checked';
-    // let checked6 = 'workplaceArr[6].checked';
-    // let checked7 = 'workplaceArr[7].checked';
-    // this.setData({
-    //   [checked]: false,
-    //   [checked1]: false,
-    //   [checked2]: false,
-    //   [checked3]: false,
-    //   [checked4]: false,
-    //   [checked5]: false,
-    //   [checked6]: false,
-    //   [checked7]: false
-    // })
-    // for (let i = 0, lenI = items.length; i < lenI; ++i) {
-    //   if (items[i].value == e.detail.value) {
-    //     items[i].checked = true;
-    //     break
-    //   }
-    // }
-    // this.setData({
-    //   workplaceArr: this.data.workplaceArr
-    // })
-    // let workplace = 'form.workplace'
-    // this.setData({
-    //   [workplace]: e.detail.value
-    // })
-  },
-  parentsstatusChange(e) {
-    let parentsstatus = 'form.parentsstatus'
-    this.setData({
-      [parentsstatus]: [this.data.parentsstatusArr[0][e.detail.value[0]], this.data.parentsstatusArr[1][e.detail.value[1]]]
+      [companyNature]: this.data.workplaceArr[e.detail.value]
     })
+  },
+  parentsPicker(e) {
+    let parents = 'form.parents'
     this.setData({
-      parentsstatusmultiIndex: e.detail.value
+      [parents]: this.data.parentsArr[e.detail.value]
     })
   },
-  parentsstatusColumnChange(e) {
-    console.log(e)
-    if (e.detail.column == 0 && e.detail.value == 1) {
-      this.setData({
-        parentsstatusArr: [
-          ['爹妈比我都健康','世事无常'],
-          []
-        ]
-      })
-    } else {
-      this.setData({
-        parentsstatusArr: [
-          ['爹妈比我都健康','世事无常'],
-          ['曾相爱','一直相爱']
-        ]
-      })
-
-    }
-  },
   dadworkplacePicker: function (e) {
-    let dadworkplace = 'form.dadworkplace'
+    let fatherWork = 'form.fatherWork'
     this.setData({
-      [dadworkplace]: this.data.dadworkplaceArr[e.detail.value]
+      [fatherWork]: this.data.dadworkplaceArr[e.detail.value]
     })
   },
   momworkplacePicker: function (e) {
-    let momworkplace = 'form.momworkplace'
+    let motherWork = 'form.motherWork'
     this.setData({
-      [momworkplace]: this.data.momworkplaceArr[e.detail.value]
+      [motherWork]: this.data.momworkplaceArr[e.detail.value]
     })
   },
   otherchildChange: function (e) {
@@ -408,29 +360,208 @@ Page({
     this.setData({
       otherchildArr: this.data.otherchildArr
     })
-    let otherchild = 'form.otherchild'
+    let composition = 'form.composition'
     this.setData({
-      [otherchild]: e.detail.value
+      [composition]: e.detail.value
     })
   },
 
   figurePicker(e) {
-    let figure = 'form.figure'
+    let motionState = 'form.motionState'
     this.setData({
-      [figure]: this.data.figureArr[e.detail.value]
+      [motionState]: this.data.figureArr[e.detail.value]
     })
   },
   formSubmit(e) {
-    console.log(e.detail.value)
+    const params = e.detail.value
+    //校验表单
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0]
+      this.showModal(error)
+      return false
+    }
     wx.navigateTo({
       url: '/pages/targetInfo/targetInfo',
     })
   },
-  /**
-   * 生命周期函数--监听页面加载
-   */
+  //报错 
+  showModal(error) {
+    wx.showModal({
+      content: error.msg,
+      showCancel: false,
+    })
+  },
+  //验证函数
+  initValidate() {
+    const rules = {
+      height: {
+        required: true
+      },
+      weight:  {
+        required: true
+      },
+      education:  {
+        required: true
+      },
+      income:  {
+        required: true
+      },
+      marriage:  {
+        required: true
+      },
+      children:  {
+        required: true
+      },
+      assetHouse:  {
+        required: true
+      },
+      assetArea:  {
+        required: true
+      },
+      assetHouseLoan:  {
+        required: true
+      },
+      assetCar:  {
+        required: true
+      },
+      assetCarValue:  {
+        required: true
+      },
+      assetCarLoan:  {
+        required: true
+      },
+      isCommen:  {
+        required: true
+      },
+      controlTime:  {
+        required: true
+      },
+      workStatus:  {
+        required: true
+      },
+      companyNature:  {
+        required: true
+      },
+      company:  {
+        required: true
+      },
+      parents:  {
+        required: true
+      },
+      // fatherWork:  {
+      //   required: true
+      // },
+      // motherWork:  {
+      //   required: true
+      // },
+      composition:  {
+        required: true
+      },
+      motionState:  {
+        required: true
+      },
+      hobby:  {
+        required: true
+      }
+    }
+    const messages = {
+      // name: {
+      //   required: '请填写姓名',
+      //   minlength: '请输入正确的名称',
+      //   maxlength: '请输入正确的名称'
+      // },
+      // sex: {
+      //   required: '请选择性别'
+      // },
+      // age: {
+      //   required: '请填写年龄'
+      // },
+      // nativePlace: {
+      //   required: '请填写户籍地址'
+      // },
+      // nation: {
+      //   required: '请选择民族'
+      // },
+      // birthday: {
+      //   required: '请填写生日'
+      // },
+      // constellation: {
+      //   required: '请选择星座'
+      // }
+      height: {
+        required: '请选择身高'
+      },
+      weight:  {
+        required: '请选择体重'
+      },
+      education:  {
+        required: '请选择教育程度'
+      },
+      income:  {
+        required: '请选择收入'
+      },
+      marriage:  {
+        required: '请选择婚姻状态'
+      },
+      children:  {
+        required: '请选择有没有孩子'
+      },
+      assetHouse:  {
+        required: '请选择是否买房子'
+      },
+      assetArea:  {
+        required: '请选择房子多大面积'
+      },
+      assetHouseLoan:  {
+        required: '请选择房子贷款了没'
+      },
+      assetCar:  {
+        required: '请选择车子情况'
+      },
+      assetCarValue:  {
+        required: '请选择车子的价值'
+      },
+      assetCarLoan:  {
+        required: '请选择车子贷款了没'
+      },
+      isCommen:  {
+        required: '请选择是否与父母同住'
+      },
+      controlTime:  {
+        required: '请选择您的空闲时间'
+      },
+      workStatus:  {
+        required: '请选择您的工作状态'
+      },
+      companyNature:  {
+        required: '请选择您的单位性质'
+      },
+      company:  {
+        required: '请输入您的单位具体名称'
+      },
+      parents:  {
+        required: '请选择您的父母情况'
+      },
+      // fatherWork:  {
+      //   required: 
+      // },
+      // motherWork:  {
+      //   required: 
+      // },
+      composition:  {
+        required: '请选择有没有兄弟姐妹'
+      },
+      motionState:  {
+        required: '请选择您是否喜欢运动'
+      },
+      hobby:  {
+        required: '请填写您的爱好'
+      }
+    }
+    this.WxValidate = new WxValidate(rules, messages)
+  },
   onLoad: function (options) {
-
+    this.initValidate()
   },
 
   /**

+ 107 - 44
pages/personInfoDetail/personInfoDetail.wxml

@@ -48,9 +48,9 @@
 			<view class="block">
 				<view class='left' style="width:65%">一个月能挣多少米</view>
 				<view class='right' style="width:35%">
-					<picker bindchange="wagesPicker" range="{{wagesArr}}" name='wages' value="{{form.wages}}">
+					<picker bindchange="incomePicker" range="{{incomeArr}}" name='income' value="{{form.income}}">
 						<view style="text-align:right">
-							<view wx:if="{{form.wages}}">{{form.wages}}</view>
+							<view wx:if="{{form.income}}">{{form.income}}</view>
 							<view wx:else class='placeStyle'>
 								<view class="redpoint"></view>
 								<view class="placetext">未选择</view>
@@ -63,8 +63,8 @@
 			<view class="block">
 				<view class='left' style="width:50%">关于小红本本</view>
 				<view class='right' style="width:50%">
-					<radio-group class="parameter-wrap" bindchange="maritalstatusChange" name='maritalstatus' value="{{form.maritalstatus}}">
-						<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{maritalstatusList}}">
+					<radio-group class="parameter-wrap" bindchange="marriageChange" name='marriage' value="{{form.marriage}}">
+						<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{marriageList}}">
 							<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
 						</label>
 					</radio-group>
@@ -73,55 +73,103 @@
 			<view class="block">
 				<view class='left' style="width:30%">亲生的小祖宗</view>
 				<view class='right' style="width:70%">
-					<checkbox-group class="parameter-wrap" bindchange="ischildChange" name='ischild' value="{{form.ischild}}">
-						<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{ischildArr}}">
+					<checkbox-group class="parameter-wrap" bindchange="childrenChange" name='children' value="{{form.children}}">
+						<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{childrenArr}}">
 							<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
 						</label>
 					</checkbox-group>
 				</view>
 			</view>
 			<view class="block">
-				<view class='left' style="width:35%">这些年没少攒吧</view>
+				<view class='left' style="width:35%">房子情况</view>
 				<view class='right' style="width:65%">
-					<picker mode="multiSelector" bindchange="housePickerChange" bindcolumnchange="housePickerColumnChange" value="{{housemultiIndex}}" range="{{housemultiArray}}" name='house' value="{{form.house}}">
-						<view style="text-align:right">
-							<view wx:if="{{housemultiArray[0][housemultiIndex[0]]}}">{{housemultiArray[0][housemultiIndex[0]]}},{{housemultiArray[1][housemultiIndex[1]]}},{{housemultiArray[2][housemultiIndex[2]]}},{{housemultiArray[3][housemultiIndex[3]]}}</view>
-							<view wx:else class='placeStyle'>
-								<view class="redpoint"></view>
-								<view class="placetext">未选择</view>
-								<van-icon size="15px" name="arrow" />
-							</view>
+					<picker bindchange="assetHousePickerChange" range="{{assetHouseArr}}" name='assetHouse' value="{{form.assetHouse}}">
+						<view wx:if="{{form.assetHouse}}">{{form.assetHouse}}</view>
+						<view wx:else class='placeStyle'>
+							<view class="redpoint"></view>
+							<view class="placetext">未选择</view>
+							<van-icon size="15px" name="arrow" />
 						</view>
 					</picker>
 				</view>
 			</view>
 			<view class="block">
-				<view class='left' style="width:35%">车辆情况</view>
+				<view class='left' style="width:35%">房子多大啊</view>
 				<view class='right' style="width:65%">
-					<picker mode="multiSelector" bindchange="carPickerChange" bindcolumnchange="carPickerColumnChange" value="{{carmultiIndex}}" range="{{carmultiArray}}" name='car' value="{{form.car}}">
-						<view style="text-align:right">
-							<view wx:if="{{carmultiArray[0][carmultiIndex[0]]}}">{{carmultiArray[0][carmultiIndex[0]]}},{{carmultiArray[1][carmultiIndex[1]]}},{{carmultiArray[2][carmultiIndex[2]]}}</view>
-							<view wx:else class='placeStyle'>
-								<view class="redpoint"></view>
-								<view class="placetext">未选择</view>
-								<van-icon size="15px" name="arrow" />
-							</view>
+					<picker bindchange="assetAreaPickerChange" range="{{assetAreaArr}}" name='assetArea' value="{{form.assetArea}}">
+						<view wx:if="{{form.assetArea}}">{{form.assetArea}}</view>
+						<view wx:else class='placeStyle'>
+							<view class="redpoint"></view>
+							<view class="placetext">未选择</view>
+							<van-icon size="15px" name="arrow" />
+						</view>
+					</picker>
+				</view>
+			</view>
+			<view class="block">
+				<view class='left' style="width:35%">房子有贷款没</view>
+				<view class='right' style="width:65%">
+					<picker bindchange="assetHouseLoanPickerChange" range="{{assetHouseLoanArr}}" name='assetHouseLoan' value="{{form.assetHouseLoan}}">
+						<view wx:if="{{form.assetHouseLoan}}">{{form.assetHouseLoan}}</view>
+						<view wx:else class='placeStyle'>
+							<view class="redpoint"></view>
+							<view class="placetext">未选择</view>
+							<van-icon size="15px" name="arrow" />
+						</view>
+					</picker>
+				</view>
+			</view>
+			<view class="block">
+				<view class='left' style="width:35%">车子情况</view>
+				<view class='right' style="width:65%">
+					<picker bindchange="assetCarPickerChange" range="{{assetCarArr}}" name='assetCar' value="{{form.assetCar}}">
+						<view wx:if="{{form.assetCar}}">{{form.assetCar}}</view>
+						<view wx:else class='placeStyle'>
+							<view class="redpoint"></view>
+							<view class="placetext">未选择</view>
+							<van-icon size="15px" name="arrow" />
+						</view>
+					</picker>
+				</view>
+			</view>
+			<view class="block">
+				<view class='left' style="width:35%">车子多钱啊</view>
+				<view class='right' style="width:65%">
+					<picker bindchange="assetCarValuePickerChange" range="{{assetCarValueArr}}" name='assetCarValue' value="{{form.assetCarValue}}">
+						<view wx:if="{{form.assetCarValue}}">{{form.assetCarValue}}</view>
+						<view wx:else class='placeStyle'>
+							<view class="redpoint"></view>
+							<view class="placetext">未选择</view>
+							<van-icon size="15px" name="arrow" />
+						</view>
+					</picker>
+				</view>
+			</view>
+			<view class="block">
+				<view class='left' style="width:35%">车子有贷款没</view>
+				<view class='right' style="width:65%">
+					<picker bindchange="assetCarLoanPickerChange" range="{{assetCarLoanArr}}" name='assetCarLoan' value="{{form.assetCarLoan}}">
+						<view wx:if="{{form.assetCarLoan}}">{{form.assetCarLoan}}</view>
+						<view wx:else class='placeStyle'>
+							<view class="redpoint"></view>
+							<view class="placetext">未选择</view>
+							<van-icon size="15px" name="arrow" />
 						</view>
 					</picker>
 				</view>
 			</view>
 			<view class="block" style="height:160rpx;">
 				<view class='left' style="width:100%">啥时候方便我给你介绍个对象</view>
-				<checkbox-group class="parameter-wrap" bindchange="freetimeChange" name='freetime' value="{{form.freetime}}">
-					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{freetimeArr}}">
+				<checkbox-group class="parameter-wrap" bindchange="controlTimeChange" name='controlTime' value="{{form.controlTime}}">
+					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{controlTimeArr}}">
 						<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
 					</label>
 				</checkbox-group>
 			</view>
 			<view class="block" style="height:260rpx;">
 				<view class='left' style="width:100%">卖命主旋律</view>
-				<checkbox-group class="parameter-wrap" bindchange="worktimeChange" name='worktime' value="{{form.worktime}}">
-					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{worktimeArr}}">
+				<checkbox-group class="parameter-wrap" bindchange="workStatusChange" name='workStatus' value="{{form.workStatus}}">
+					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{workStatusArr}}">
 						<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
 					</label>
 				</checkbox-group>
@@ -129,9 +177,9 @@
 			<view class="block">
 				<view class='left' style="width:40%">卖命主阵地</view>
 				<view class='right' style="width:60%">
-					<picker bindchange="workplacePicker" range="{{workplaceArr}}" name='workplace' value="{{form.workplace}}">
+					<picker bindchange="workplacePicker" range="{{workplaceArr}}" name='companyNature' value="{{form.companyNature}}">
 						<view style="text-align:right">
-							<view wx:if="{{form.workplace}}">{{form.workplace}}</view>
+							<view wx:if="{{form.companyNature}}">{{form.companyNature}}</view>
 							<view wx:else class='placeStyle'>
 								<view class="redpoint"></view>
 								<view class="placetext">未选择</view>
@@ -144,15 +192,15 @@
 			<view class="block">
 				<view class='left' style="width:40%">具体卖命单位</view>
 				<view class='right' style="width:60%">
-					<input name="workspacedetails" value="{{form.workspacedetails}}" placeholder="未填写" placeholder-class="iconfont icon-jianjiaohao1 icon-tubiaozhizuo-1"></input>
+					<input name="company" value="{{form.company}}" placeholder="未填写" placeholder-class="iconfont icon-jianjiaohao1 icon-tubiaozhizuo-1"></input>
 				</view>
 			</view>
 			<view class="block">
-				<view class='left' style="width:35%">爹妈情况</view>
-				<view class='right' style="width:65%">
-					<picker mode="multiSelector" bindchange="parentsstatusChange" bindcolumnchange="parentsstatusColumnChange" value="{{parentsstatusmultiIndex}}" range="{{parentsstatusArr}}" name='parentsstatus' value="{{form.parentsstatus}}">
+				<view class='left' style="width:40%">爹妈情况</view>
+				<view class='right' style="width:60%">
+					<picker bindchange="parentsPicker" range="{{parentsArr}}" name='parents' value="{{form.parents}}">
 						<view style="text-align:right">
-							<view wx:if="{{parentsstatusArr[0][parentsstatusmultiIndex[0]]}}">{{parentsstatusArr[0][parentsstatusmultiIndex[0]]}},{{parentsstatusArr[1][parentsstatusmultiIndex[1]]}}</view>
+							<view wx:if="{{form.parents}}">{{form.parents}}</view>
 							<view wx:else class='placeStyle'>
 								<view class="redpoint"></view>
 								<view class="placetext">未选择</view>
@@ -162,12 +210,26 @@
 					</picker>
 				</view>
 			</view>
+			<view wx:if="{{form.parents!='世事无常'}}">
+			<view class="block">
+				<view class='left' style="width:35%">和父母一起住没</view>
+				<view class='right' style="width:65%">
+					<picker bindchange="isCommenChange" range="{{isCommenArr}}" name='isCommen' value="{{form.isCommen}}">
+						<view wx:if="{{form.isCommen}}">{{form.isCommen}}</view>
+						<view wx:else class='placeStyle'>
+							<view class="redpoint"></view>
+							<view class="placetext">未选择</view>
+							<van-icon size="15px" name="arrow" />
+						</view>
+					</picker>
+				</view>
+			</view>
 			<view class="block">
 				<view class='left' style="width:40%">爸比在哪高就</view>
 				<view class='right' style="width:60%">
-					<picker bindchange="dadworkplacePicker" range="{{dadworkplaceArr}}" name='dadworkplace' value="{{form.dadworkplace}}">
+					<picker bindchange="dadworkplacePicker" range="{{dadworkplaceArr}}" name='fatherWork' value="{{form.fatherWork}}">
 						<view style="text-align:right">
-							<view wx:if="{{form.dadworkplace}}">{{form.dadworkplace}}</view>
+							<view wx:if="{{form.fatherWork}}">{{form.fatherWork}}</view>
 							<view wx:else class='placeStyle'>
 								<view class="redpoint"></view>
 								<view class="placetext">未选择</view>
@@ -180,9 +242,9 @@
 			<view class="block">
 				<view class='left' style="width:40%">那么妈咪呢</view>
 				<view class='right' style="width:60%">
-					<picker bindchange="momworkplacePicker" range="{{momworkplaceArr}}" name='momworkplace' value="{{form.momworkplace}}">
+					<picker bindchange="momworkplacePicker" range="{{momworkplaceArr}}" name='motherWork' value="{{form.motherWork}}">
 						<view style="text-align:right">
-							<view wx:if="{{form.momworkplace}}">{{form.momworkplace}}</view>
+							<view wx:if="{{form.motherWork}}">{{form.motherWork}}</view>
 							<view wx:else class='placeStyle'>
 								<view class="redpoint"></view>
 								<view class="placetext">未选择</view>
@@ -192,20 +254,21 @@
 					</picker>
 				</view>
 			</view>
-				<view class="block" style="height:260rpx;">
+			</view>
+			<view class="block" style="height:260rpx;">
 				<view class='left' style="width:100%">家里有跟你争宠的没</view>
-				<checkbox-group class="parameter-wrap" bindchange="otherchildChange" name='otherchild' value="{{form.otherchild}}">
+				<checkbox-group class="parameter-wrap" bindchange="otherchildChange" name='composition' value="{{form.composition}}">
 					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{otherchildArr}}">
 						<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
 					</label>
 				</checkbox-group>
 			</view>
-					<view class="block">
+			<view class="block">
 				<view class='left' style="width:40%">你这身材可以啊</view>
 				<view class='right' style="width:60%">
-					<picker bindchange="figurePicker" range="{{figureArr}}" name='figure' value="{{form.figure}}">
+					<picker bindchange="figurePicker" range="{{figureArr}}" name='motionState' value="{{form.motionState}}">
 						<view style="text-align:right">
-							<view wx:if="{{form.figure}}">{{form.figure}}</view>
+							<view wx:if="{{form.motionState}}">{{form.motionState}}</view>
 							<view wx:else class='placeStyle'>
 								<view class="redpoint"></view>
 								<view class="placetext">未选择</view>

+ 19 - 5
pages/personal/personal.js

@@ -8,17 +8,17 @@ Page({
     tabArr: [{
       name: '我的信息',
       img: '../../images/icon1.png',
-      url: ''
+      url: '/pages/InfoType/InfoType'
     },{
       name: '我的活动',
       img: '../../images/icon2.png',
-      url: ''
+      url: '/pages/myActive/myActive'
     },{
-      name: '心动',
+      name: '心动11次',
       img: '../../images/icon3.png',
       url: ''
     },{
-      name: '被心动',
+      name: '被心动12次',
       img: '../../images/icon4.png',
       url: ''
     },{
@@ -31,7 +31,21 @@ Page({
       url: ''
     }]
   },
-
+  goTab(e){
+    wx.navigateTo({
+      url: e.currentTarget.dataset.src
+    })
+  },
+  goIndex(){
+    wx.navigateTo({
+      url: '/pages/index/index',
+    })
+  },
+  goMy(){
+    wx.navigateTo({
+      url: '/pages/personal/personal',
+    })
+  },
   /**
    * 生命周期函数--监听页面加载
    */

+ 16 - 2
pages/personal/personal.wxml

@@ -5,9 +5,23 @@
 	<view style="color:#111111;font-size:35rpx;text-align:center;margin-top:270rpx">某某某</view>
 </view>
 <view class="middle">
-	<view wx:for="{{tabArr}}" class="block">
-  <image src="{{item.img}}" style="width:91rpx;height:92rpx;margin-left:50rpx"></image>
+	<view wx:for="{{tabArr}}" class="block"  data-src="{{item.url}}" bindtap="goTab">
+  <image src="{{item.img}}" style="width:91rpx;height:92rpx;margin-left:30rpx"></image>
 		<view style="color:#6f7582;font-size:30rpx;margin-left:30rpx">{{item.name}}</view>
 	</view>
 </view>
+	<view class="tabbar">
+		<view class="tab1" bindtap="goIndex">
+			<image src="../../images/active_bar1.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+			<view>首页</view>
+		</view>
+		<view class="tab1">
+			<image src="../../images/active_bar1.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+			<view>红娘</view>
+		</view>
+		<view class="tab1" bindtap="goMy">
+			<image src="../../images/active_bar1.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+			<view style="color:#a342ff">我的</view>
+		</view>
+	</view>
 </view>

+ 17 - 0
pages/personal/personal.wxss

@@ -26,4 +26,21 @@
   display: flex;
   /* justify-content:space-around; */
   align-items: center;
+}
+.tabbar {
+  width: 750rpx;
+  border: 1px solid #999;
+  height: 100rpx;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  display: flex;
+  font-size: 28rpx;
+}
+
+.tab1 {
+  height: 100rpx;
+  width: 250rpx;
+  text-align: center;
+  color: #999999;
 }

+ 341 - 66
pages/targetInfo/targetInfo.js

@@ -1,23 +1,27 @@
-// pages/targetInfo/targetInfo.js
+import WxValidate from '../../utils/WxValidate.js'
 Page({
-
-  /**
-   * 页面的初始数据
-   */
   data: {
     form: {
-      stratage: '',
-      endage: '',
-      endage: '',
-      height: '',
+      ageMin: '',
+      ageMax: '',
+      heightMin: '',
+      heightMax: '',
       education: '',
-      wages: '',
-      isnative: '',
-      green:'',
-      star:'',
-      worktime:'',
-      workplace:'',
-
+      income: '',
+      nativePlace: '',
+      marriage: '',
+      assetHouse: '',
+      assetArea: '',
+      assetHouseLoan: '',
+      assetCar: '',
+      assetCarValue: '',
+      assetCarLoan: '',
+      constellation: '',
+      workStatus: '',
+      companyNature: '',
+      parents: '',
+      composition: '',
+      isCommen: ''
     },
     heightArr: [
       '都行',
@@ -27,21 +31,83 @@ Page({
       '165-170',
       '170-175',
       '175-185',
-      '185-190',
-      '差不多得了奥'
+      '185-190'
     ],
-    educationArr: ["都行", "初中", "中专", "高中", "大专", "本科", "硕士", "博士", "差不多得了奥"],
-    wagesArr: ["挣不挣都行", "2000-5000", "5000-10000", "10000-20000", "20000以上"],
-    isnativeArr: ['本地', '外地'],
-    greenArr: [
+    educationArr: ["都行", "初中", "中专", "高中", "大专", "本科", "硕士", "博士"],
+    incomeArr: ["挣不挣都行", "2000-5000", "5000-10000", "10000-20000", "20000以上"],
+    nativePlaceArr: ['咋的都行', '本地', '外地'],
+    marriageArr: [
       ["不行", "行"],
       []
     ],
-    starArr: [
-      "白羊座", "金牛座", "双子座", "巨蟹座", "狮子座", "处女座", "天秤座", "天蝎座", "射手座", "摩羯座", "水瓶座", "双鱼座。"
+    constellationArr: [{
+        name: '不限',
+        value: '不限',
+        checked: true
+      },
+      {
+        name: '白羊座',
+        value: '白羊座',
+        checked: false
+      },
+      {
+        name: '金牛座',
+        value: '金牛座',
+        checked: false
+      },
+      {
+        name: '双子座',
+        value: '双子座',
+        checked: false
+      },
+      {
+        name: '巨蟹座',
+        value: '巨蟹座',
+        checked: false
+      },
+      {
+        name: '狮子座',
+        value: '狮子座',
+        checked: false
+      },
+      {
+        name: '处女座',
+        value: '处女座',
+        checked: false
+      },
+      {
+        name: '天秤座',
+        value: '天秤座',
+        checked: false
+      },
+      {
+        name: '天蝎座',
+        value: '天蝎座',
+        checked: false
+      },
+      {
+        name: '射手座',
+        value: '射手座',
+        checked: false
+      },
+      {
+        name: '摩羯座',
+        value: '摩羯座',
+        checked: false
+      },
+      {
+        name: '水瓶座',
+        value: '水瓶座',
+        checked: false
+      },
+      {
+        name: '双鱼座',
+        value: '双鱼座',
+        checked: false
+      }
     ],
     // 工作时间自由、朝九晚五、偶尔加班、经常加班、偶尔出差、经常出差、常有应酬
-    worktimeArr: [{
+    workStatusArr: [{
         name: '工作时间自由',
         value: '工作时间自由',
         checked: true
@@ -73,14 +139,16 @@ Page({
         checked: false
       }
     ],
-    workplaceArr: ['政府机关','事业单位','外企企业','世界500强','上市公司','国有企业','私营企业','个体'],
-    isfirstArr: ['老几都行', '必须独苗一根'],
-  },
-  heightPicker(e) {
-    let height = 'form.height'
-    this.setData({
-      [height]: this.data.heightArr[e.detail.value]
-    })
+    assetHouseArr: ['租房', '购房'],
+    assetAreaArr: ['80平以下', '80-120平', '120平以上'],
+    assetHouseLoanArr: ['有', '没有'],
+    assetCarArr: ['有', '没有'],
+    assetCarValueArr: ['10万以下', '10-20万', '20-30万', '30-40万', '40-50万', '50-60万', '60-70万', '70-80万', '80-90万', '90-100万', '100万以上'],
+    assetCarLoanArr: ['有贷款', '无贷款'],
+    companyNatureArr: ['政府机关', '事业单位', '外企企业', '世界500强', '上市公司', '国有企业', '私营企业', '个体'],
+    parentsArr: ['均有退休金', '均无退休金', '父亲有退休金', '母亲有退休金'],
+    compositionArr: ['老几都行', '必须独苗一根'],
+    isCommenArr: ['愿意', '不愿意']
   },
   educationPicker(e) {
     let education = 'form.education'
@@ -88,32 +156,32 @@ Page({
       [education]: this.data.educationArr[e.detail.value]
     })
   },
-  wagesPicker(e) {
-    let wages = 'form.wages'
+  incomePicker(e) {
+    let income = 'form.income'
     this.setData({
-      [wages]: this.data.wagesArr[e.detail.value]
+      [income]: this.data.incomeArr[e.detail.value]
     })
   },
-  isnativePicker(e) {
-    let isnative = 'form.isnative'
+  nativePlacePicker(e) {
+    let nativePlace = 'form.nativePlace'
     this.setData({
-      [isnative]: this.data.isnativeArr[e.detail.value]
+      [nativePlace]: this.data.nativePlaceArr[e.detail.value]
     })
   },
-  greenChange(e) {
-    let green = 'form.green'
+  marriageChange(e) {
+    let marriage = 'form.marriage'
     this.setData({
-      [green]: [this.data.greenArr[0][e.detail.value[0]], this.data.greenArr[1][e.detail.value[1]]]
+      [marriage]: [this.data.marriageArr[0][e.detail.value[0]], this.data.marriageArr[1][e.detail.value[1]]]
     })
     this.setData({
-      greenmultiIndex: e.detail.value
+      marriagemultiIndex: e.detail.value
     })
   },
-  greenPickerColumnChange(e) {
+  marriagePickerColumnChange(e) {
     console.log(e)
     if (e.detail.column == 0 && e.detail.value == 1) {
       this.setData({
-        greenArr: [
+        marriageArr: [
           ["行", "不行"],
           ["有小祖宗不行", "有小祖宗也行"]
         ]
@@ -121,22 +189,58 @@ Page({
     }
     if (e.detail.column == 0 && e.detail.value == 0) {
       this.setData({
-        greenArr: [
+        marriageArr: [
           ["行", "不行"],
           []
         ]
       })
     }
   },
-  starPicker(e) {
-    let star = 'form.star'
+  assetHousePickerChange(e) {
+    console.log(e)
+    let assetHouse = 'form.assetHouse'
     this.setData({
-      [star]: this.data.starArr[e.detail.value]
+      [assetHouse]: this.data.assetHouseArr[e.detail.value]
     })
   },
-  worktimeChange(e) {
+  assetAreaPickerChange(e) {
+    console.log(e)
+    let assetArea = 'form.assetArea'
+    this.setData({
+      [assetArea]: this.data.assetAreaArr[e.detail.value]
+    })
+  },
+  assetHouseLoanPickerChange(e) {
+    console.log(e)
+    let assetHouseLoan = 'form.assetHouseLoan'
+    this.setData({
+      [assetHouseLoan]: this.data.assetHouseLoanArr[e.detail.value]
+    })
+  },
+  assetCarPickerChange(e) {
+    console.log(e)
+    let assetCar = 'form.assetCar'
+    this.setData({
+      [assetCar]: this.data.assetCarArr[e.detail.value]
+    })
+  },
+  assetCarValuePickerChange(e) {
+    console.log(e)
+    let assetCarValue = 'form.assetCarValue'
+    this.setData({
+      [assetCarValue]: this.data.assetCarValueArr[e.detail.value]
+    })
+  },
+  assetCarLoanPickerChange(e) {
+    console.log(e)
+    let assetCarLoan = 'form.assetCarLoan'
+    this.setData({
+      [assetCarLoan]: this.data.assetCarLoanArr[e.detail.value]
+    })
+  },
+  constellationPicker(e) {
     console.log(e.detail.value)
-    const items = this.data.worktimeArr;
+    const items = this.data.constellationArr;
     const values = e.detail.value;
     for (let i = 0, lenI = items.length; i < lenI; ++i) {
       items[i].checked = false
@@ -148,36 +252,207 @@ Page({
       }
     }
     this.setData({
-      worktimeArr: this.data.worktimeArr
+      constellationArr: this.data.constellationArr
     })
-    let worktime = 'form. worktime'
+    let constellation = 'form.constellation'
     this.setData({
-      [worktime]: e.detail.value
+      [constellation]: e.detail.value
     })
+
   },
-  workplacePicker: function (e) {
-    let workplace = 'form.workplace'
+  workStatusChange(e) {
+    console.log(e.detail.value)
+    const items = this.data.workStatusArr;
+    const values = e.detail.value;
+    for (let i = 0, lenI = items.length; i < lenI; ++i) {
+      items[i].checked = false
+      for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
+        if (items[i].value === values[j]) {
+          items[i].checked = true
+          break
+        }
+      }
+    }
+    this.setData({
+      workStatusArr: this.data.workStatusArr
+    })
+    let workStatus = 'form. workStatus'
     this.setData({
-      [workplace]: this.data.workplaceArr[e.detail.value]
+      [workStatus]: e.detail.value
     })
   },
-  isfirstPicker(e) {
-    let isfirst = 'form.isfirst'
+  companyNaturePicker: function (e) {
+    let companyNature = 'form.companyNature'
     this.setData({
-      [isfirst]: this.data.isfirstArr[e.detail.value]
+      [companyNature]: this.data.companyNatureArr[e.detail.value]
     })
   },
-  formSubmit(e){
-    console.log(e.detail.value)
+  parentsPicker(e) {
+    let parents = 'form.parents'
+    this.setData({
+      [parents]: this.data.parentsArr[e.detail.value]
+    })
+  },
+  compositionPicker(e) {
+    let composition = 'form.composition'
+    this.setData({
+      [composition]: this.data.compositionArr[e.detail.value]
+    })
+  },
+  isCommenPicker(e) {
+    let isCommen = 'form.isCommen'
+    this.setData({
+      [isCommen]: this.data.isCommenArr[e.detail.value]
+    })
+  },
+  formSubmit(e) {
+    const params = e.detail.value
+    //校验表单
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0]
+      this.showModal(error)
+      return false
+    }
     wx.switchTab({
       url: '/pages/index/index',
     })
   },
-  /**
-   * 生命周期函数--监听页面加载
-   */
+  showModal(error) {
+    wx.showModal({
+      content: error.msg,
+      showCancel: false,
+    })
+  },
+  //验证函数
+  initValidate() {
+    const rules = {
+      ageMin: {
+        required: true
+      },
+      ageMax:{
+        required: true
+      },
+      heightMin:{
+        required: true
+      },
+      heightMax:{
+        required: true
+      },
+      education:{
+        required: true
+      },
+      income:{
+        required: true
+      },
+      nativePlace:{
+        required: true
+      },
+      marriage:{
+        required: true
+      },
+      assetHouse:{
+        required: true
+      },
+      assetArea:{
+        required: true
+      },
+      assetHouseLoan:{
+        required: true
+      },
+      assetCar:{
+        required: true
+      },
+      assetCarValue:{
+        required: true
+      },
+      assetCarLoan:{
+        required: true
+      },
+      constellation:{
+        required: true
+      },
+      workStatus:{
+        required: true
+      },
+      companyNature:{
+        required: true
+      },
+      parents:{
+        required: true
+      },
+      composition:{
+        required: true
+      },
+      isCommen: {
+        required: true
+      }
+    }
+    const messages = {
+      ageMin: {
+        required: '请输入您能接受的最小年纪'
+      },
+      ageMax:{
+        required: '请输入您能接受的最大年纪'
+      },
+      heightMin:{
+        required: '请输入您能接受的最低身高'
+      },
+      heightMax:{
+        required: '请输入您能接受的最高身高'
+      },
+      education:{
+        required: '请输入您能接受的教育程度'
+      },
+      income:{
+        required: '请选择您能接受的收入'
+      },
+      nativePlace:{
+        required: '请选择本地或者外地'
+      },
+      marriage:{
+        required: '请选择您能接受的婚姻状态'
+      },
+      assetHouse:{
+        required: '请选择您可以接受的房子状态'
+      },
+      assetArea:{
+        required: '请选择您可以接受的房子面积'
+      },
+      assetHouseLoan:{
+        required: '请选择您可以接受的房子是否有贷款'
+      },
+      assetCar:{
+        required: '请选择您可以接受的车子状态'
+      },
+      assetCarValue:{
+        required: '请选择您可以接受的车子价值'
+      },
+      assetCarLoan:{
+        required: '请选择您是否可以接受的车子有贷款'
+      },
+      constellation:{
+        required: '请选择您的优先选择星座'
+      },
+      workStatus:{
+        required: '请选择您能接受的工作状态'
+      },
+      companyNature:{
+        required: '请选择您能接受的单位性质'
+      },
+      parents:{
+        required: '请选择您能接受的父母状态'
+      },
+      composition:{
+        required: '请选择您可以接受的家庭构成'
+      },
+      isCommen: {
+        required: '请选择您是否接受与父母同住'
+      }
+    }
+    this.WxValidate = new WxValidate(rules, messages)
+  },
   onLoad: function (options) {
-
+    this.initValidate()
   },
 
   /**

+ 130 - 36
pages/targetInfo/targetInfo.wxml

@@ -3,23 +3,15 @@
 		<view class="block" style="position:relative">
 			<view class='left' style="width:40%">多大岁数你能行</view>
 			<view style="position:absolute;right:0;top:0;width:200rpx;height:100%;display:flex;">
-				<input name="startage" value="{{form.startage}}" style="width:100rpx;height:80rpx;border-bottom:1px solid #999;text-align:center;"></input> 至
-				<input name="endage" value="{{form.endage}}" style="width:100rpx;height:80rpx;border-bottom:1px solid #999;text-align:center;"></input>
+				<input name="ageMin" value="{{form.ageMin}}" style="width:100rpx;height:80rpx;border-bottom:1px solid #999;text-align:center;"></input> 至
+				<input name="ageMax" value="{{form.ageMax}}" style="width:100rpx;height:80rpx;border-bottom:1px solid #999;text-align:center;"></input>
 			</view>
 		</view>
-		<view class="block">
+		<view class="block" style="position:relative">
 			<view class='left' style="width:50%">多高你能行</view>
-			<view class='right' style="width:50%">
-				<picker bindchange="heightPicker" range="{{heightArr}}" name='height' value="{{form.height}}">
-					<view style="text-align:right">
-						<view wx:if="{{form.height}}">{{form.height}}</view>
-						<view wx:else class='placeStyle'>
-							<view class="redpoint"></view>
-							<view class="placetext">未选择</view>
-							<van-icon size="15px" name="arrow" />
-						</view>
-					</view>
-				</picker>
+			<view style="position:absolute;right:0;top:0;width:200rpx;height:100%;display:flex;">
+				<input name="heightMin" value="{{form.heightMin}}" style="width:100rpx;height:80rpx;border-bottom:1px solid #999;text-align:center;"></input> 至
+				<input name="heightMax" value="{{form.heightMax}}" style="width:100rpx;height:80rpx;border-bottom:1px solid #999;text-align:center;"></input>
 			</view>
 		</view>
 		<view class="block">
@@ -40,9 +32,9 @@
 		<view class="block">
 			<view class='left' style="width:65%">人家一个月挣多少你能行</view>
 			<view class='right' style="width:35%">
-				<picker bindchange="wagesPicker" range="{{wagesArr}}" name='wages' value="{{form.wages}}">
+				<picker bindchange="incomePicker" range="{{incomeArr}}" name='income' value="{{form.income}}">
 					<view style="text-align:right">
-						<view wx:if="{{form.wages}}">{{form.wages}}</view>
+						<view wx:if="{{form.income}}">{{form.income}}</view>
 						<view wx:else class='placeStyle'>
 							<view class="redpoint"></view>
 							<view class="placetext">未选择</view>
@@ -55,9 +47,9 @@
 		<view class="block">
 			<view class='left' style="width:65%">人家住哪你还挑</view>
 			<view class='right' style="width:35%">
-				<picker bindchange="isnativePicker" range="{{isnativeArr}}" name='isnative' value="{{form.isnative}}">
+				<picker bindchange="nativePlacePicker" range="{{nativePlaceArr}}" name='nativePlace' value="{{form.nativePlace}}">
 					<view style="text-align:right">
-						<view wx:if="{{form.isnative}}">{{form.isnative}}</view>
+						<view wx:if="{{form.nativePlace}}">{{form.nativePlace}}</view>
 						<view wx:else class='placeStyle'>
 							<view class="redpoint"></view>
 							<view class="placetext">未选择</view>
@@ -70,9 +62,9 @@
 		<view class="block">
 			<view class='left' style="width:60%">人家有个小绿本你能不能行</view>
 			<view class='right' style="width:40%">
-				<picker mode="multiSelector" bindchange="greenChange" bindcolumnchange="greenPickerColumnChange" value="{{greenmultiIndex}}" range="{{greenArr}}" name='green' value="{{form.green}}">
+				<picker mode="multiSelector" bindchange="marriageChange" bindcolumnchange="marriagePickerColumnChange" value="{{marriagemultiIndex}}" range="{{marriageArr}}" name='marriage' value="{{form.marriage}}">
 					<view style="text-align:right">
-						<view wx:if="{{greenArr[0][greenmultiIndex[0]]}}">{{greenArr[0][greenmultiIndex[0]]}},{{greenArr[1][greenmultiIndex[1]]}}</view>
+						<view wx:if="{{marriageArr[0][marriagemultiIndex[0]]}}">{{marriageArr[0][marriagemultiIndex[0]]}},{{marriageArr[1][marriagemultiIndex[1]]}}</view>
 						<view wx:else class='placeStyle'>
 							<view class="redpoint"></view>
 							<view class="placetext">未选择</view>
@@ -82,25 +74,97 @@
 				</picker>
 			</view>
 		</view>
+
 		<view class="block">
-			<view class='left' style="width:65%">人家什么星座你能行</view>
-			<view class='right' style="width:35%">
-				<picker bindchange="starPicker" range="{{starArr}}" name='star' value="{{form.star}}">
-					<view style="text-align:right">
-						<view wx:if="{{form.star}}">{{form.star}}</view>
-						<view wx:else class='placeStyle'>
-							<view class="redpoint"></view>
-							<view class="placetext">未选择</view>
-							<van-icon size="15px" name="arrow" />
-						</view>
+			<view class='left' style="width:35%">房子挑不挑</view>
+			<view class='right' style="width:65%">
+				<picker bindchange="assetHousePickerChange" range="{{assetHouseArr}}" name='assetHouse' value="{{form.assetHouse}}">
+					<view wx:if="{{form.assetHouse}}">{{form.assetHouse}}</view>
+					<view wx:else class='placeStyle'>
+						<view class="redpoint"></view>
+						<view class="placetext">未选择</view>
+						<van-icon size="15px" name="arrow" />
+					</view>
+				</picker>
+			</view>
+		</view>
+		<view class="block">
+			<view class='left' style="width:35%">房子多大挑不</view>
+			<view class='right' style="width:65%">
+				<picker bindchange="assetAreaPickerChange" range="{{assetAreaArr}}" name='assetArea' value="{{form.assetArea}}">
+					<view wx:if="{{form.assetArea}}">{{form.assetArea}}</view>
+					<view wx:else class='placeStyle'>
+						<view class="redpoint"></view>
+						<view class="placetext">未选择</view>
+						<van-icon size="15px" name="arrow" />
+					</view>
+				</picker>
+			</view>
+		</view>
+		<view class="block">
+			<view class='left' style="width:35%">房子有贷款行不</view>
+			<view class='right' style="width:65%">
+				<picker bindchange="assetHouseLoanPickerChange" range="{{assetHouseLoanArr}}" name='assetHouseLoan' value="{{form.assetHouseLoan}}">
+					<view wx:if="{{form.assetHouseLoan}}">{{form.assetHouseLoan}}</view>
+					<view wx:else class='placeStyle'>
+						<view class="redpoint"></view>
+						<view class="placetext">未选择</view>
+						<van-icon size="15px" name="arrow" />
+					</view>
+				</picker>
+			</view>
+		</view>
+		<view class="block">
+			<view class='left' style="width:35%">对车啥要求</view>
+			<view class='right' style="width:65%">
+				<picker bindchange="assetCarPickerChange" range="{{assetCarArr}}" name='assetCar' value="{{form.assetCar}}">
+					<view wx:if="{{form.assetCar}}">{{form.assetCar}}</view>
+					<view wx:else class='placeStyle'>
+						<view class="redpoint"></view>
+						<view class="placetext">未选择</view>
+						<van-icon size="15px" name="arrow" />
+					</view>
+				</picker>
+			</view>
+		</view>
+		<view class="block">
+			<view class='left' style="width:45%">对车多钱有啥要求啊</view>
+			<view class='right' style="width:55%">
+				<picker bindchange="assetCarValuePickerChange" range="{{assetCarValueArr}}" name='assetCarValue' value="{{form.assetCarValue}}">
+					<view wx:if="{{form.assetCarValue}}">{{form.assetCarValue}}</view>
+					<view wx:else class='placeStyle'>
+						<view class="redpoint"></view>
+						<view class="placetext">未选择</view>
+						<van-icon size="15px" name="arrow" />
+					</view>
+				</picker>
+			</view>
+		</view>
+		<view class="block">
+			<view class='left' style="width:45%">车子有贷款行不</view>
+			<view class='right' style="width:55%">
+				<picker bindchange="assetCarLoanPickerChange" range="{{assetCarLoanArr}}" name='assetCarLoan' value="{{form.assetCarLoan}}">
+					<view wx:if="{{form.assetCarLoan}}">{{form.assetCarLoan}}</view>
+					<view wx:else class='placeStyle'>
+						<view class="redpoint"></view>
+						<view class="placetext">未选择</view>
+						<van-icon size="15px" name="arrow" />
 					</view>
 				</picker>
 			</view>
 		</view>
+		<view class="block" style="height:440rpx;">
+			<view class='left' style="width:100%">人家什么星座你能行</view>
+			<checkbox-group class="parameter-wrap" bindchange="constellationPicker" name='constellation' value="{{form.constellation}}">
+				<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{constellationArr}}">
+					<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
+				</label>
+			</checkbox-group>
+		</view>
 		<view class="block" style="height:320rpx;">
 			<view class='left' style="width:100%">人家什么节奏你不行</view>
-			<checkbox-group class="parameter-wrap" bindchange="worktimeChange" name='worktime' value="{{form.worktime}}">
-				<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{worktimeArr}}">
+			<checkbox-group class="parameter-wrap" bindchange="workStatusChange" name='workStatus' value="{{form.workStatus}}">
+				<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="{{item.value}}" wx:for="{{workStatusArr}}">
 					<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
 				</label>
 			</checkbox-group>
@@ -108,9 +172,9 @@
 		<view class="block">
 			<view class='left' style="width:40%">人家什么阵地你能行</view>
 			<view class='right' style="width:60%">
-				<picker bindchange="workplacePicker" range="{{workplaceArr}}" name='workplace' value="{{form.workplace}}">
+				<picker bindchange="companyNaturePicker" range="{{companyNatureArr}}" name='companyNature' value="{{form.companyNature}}">
 					<view style="text-align:right">
-						<view wx:if="{{form.workplace}}">{{form.workplace}}</view>
+						<view wx:if="{{form.companyNature}}">{{form.companyNature}}</view>
 						<view wx:else class='placeStyle'>
 							<view class="redpoint"></view>
 							<view class="placetext">未选择</view>
@@ -123,9 +187,39 @@
 		<view class="block">
 			<view class='left' style="width:65%">她/他是老几你能行</view>
 			<view class='right' style="width:35%">
-				<picker bindchange="isfirstPicker" range="{{isfirstArr}}" name='isfirst' value="{{form.isfirst}}">
+				<picker bindchange="compositionPicker" range="{{compositionArr}}" name='composition' value="{{form.composition}}">
+					<view style="text-align:right">
+						<view wx:if="{{form.composition}}">{{form.composition}}</view>
+						<view wx:else class='placeStyle'>
+							<view class="redpoint"></view>
+							<view class="placetext">未选择</view>
+							<van-icon size="15px" name="arrow" />
+						</view>
+					</view>
+				</picker>
+			</view>
+		</view>
+		<view class="block">
+			<view class='left' style="width:45%">父母经济</view>
+			<view class='right' style="width:55%">
+				<picker bindchange="parentsPicker" range="{{parentsArr}}" name='parents' value="{{form.parents}}">
+					<view style="text-align:right">
+						<view wx:if="{{form.parents}}">{{form.parents}}</view>
+						<view wx:else class='placeStyle'>
+							<view class="redpoint"></view>
+							<view class="placetext">未选择</view>
+							<van-icon size="15px" name="arrow" />
+						</view>
+					</view>
+				</picker>
+			</view>
+		</view>
+				<view class="block">
+			<view class='left' style="width:45%">是否愿意与父母同住</view>
+			<view class='right' style="width:55%">
+				<picker bindchange="isCommenPicker" range="{{isCommenArr}}" name='isCommen' value="{{form.isCommen}}">
 					<view style="text-align:right">
-						<view wx:if="{{form.isfirst}}">{{form.isfirst}}</view>
+						<view wx:if="{{form.isCommen}}">{{form.isCommen}}</view>
 						<view wx:else class='placeStyle'>
 							<view class="redpoint"></view>
 							<view class="placetext">未选择</view>

+ 0 - 0
utils/request.js


+ 25 - 94
utils/tool.js

@@ -1,104 +1,35 @@
-const app = require('../utils/util.js');
-const request = (url, data = {}, type = 'GET') => {
-  return new Promise((resolve, reject) => {
-    wx.request({
-      url: `${app.globalData.publicUrl}${url}`,
-      method: type,
-      data,
-      success({
-        data
-      }) {
-        resolve({
-          status: 0,
-          data,
-          msg: 'request请求成功获取到数据'
-        });
-      },
-      fail(error) {
-        reject({
-          status: 1,
-          msg: 'request请求失败'
-        })
-      }
-    });
-  });
-};
-const checkSessionAndLogin = () => {
-  return new Promise((resolve, reject) => {
-    wx.checkSession({
-      success() {
-        const sessionKey = wx.getStorageSync('sessionKey');
-        wx.request({
-          url: app.globalData.publicUrl + '/wx/student/inspectSession',
-          method: "post",
-          data: {
-            sessionKey: sessionKey
-          },
-          success: (res) => {
-            if (res.data.msg == 0) {
-              reject('error');
-            } else {
-              resolve(sessionKey);
-            }
-          }
-        })
-      },
-      fail() {
-        reject('error');
-      }
-    });
-  }).then(value => {
-    return new Promise((resolve, reject) => {
-      if (value != '') {
-        resolve({
-          status: 0,
-          sessionKey,
-          type: 'sessionKey',
-          msg: 'checkSession成功获取到sessionKey'
-        });
-      } else {
-        throw 1;
-      }
-    });
-  }).catch(reason => {
+const util = require('../utils/util.js');
+const openidStatus = () => {
+  console.log(wx.getStorageSync('openId'),'缓存里是否有openid')
+  if (wx.getStorageSync('openId')) {
+    return wx.getStorageSync('openId')
+  } else {
     return new Promise((resolve, reject) => {
       wx.login({
-        success(res) {
+        success: (res) => {
           if (res.code) {
-            resolve({
-              status: 0,
-              data: res.code,
-              type: 'code',
-              msg: '成功获取到code'
+            wx.request({
+              url: util.globalData.publicUrl + '/wx/getAppletOpenId',
+              method: "GET",
+              data: {
+                code: res.code
+              },
+              success: res => {
+                if (res.data.status == 200) {
+                  wx.setStorageSync('openId', res.data.data.openid)
+                  return res.data.data.openid;
+                }
+              }
             });
           } else {
-            reject({
-              status: 1,
-              msg: '获取sessionKey失败'
-            });
+            console.log('获取用户登录态失败!' + res.errMsg);
           }
         }
-      });
-    });
-  }).then(value => {
-      return new Promise(async (resolve, reject) => {
-        if (value.type == 'code') {
-          const url = '/wx/user/wx7e7a46e129d6cd0f/login';
-          const {
-            data
-          } = await request(url, {
-            code: value.data
-          }, 'GET');
-          wx.setStorageSync('sessionKey', data.sessionKey);
-          resolve(data.sessionKey);
-        } else {
-          resolve(value);
-        }
-      });
-    }
-  );
+      })
+    })
+  }
+ 
 };
 module.exports = {
-  request,
-  checkSessionAndLogin
+  openidStatus
 }

+ 5 - 18
utils/util.js

@@ -1,19 +1,6 @@
-const formatTime = date => {
-  const year = date.getFullYear()
-  const month = date.getMonth() + 1
-  const day = date.getDate()
-  const hour = date.getHours()
-  const minute = date.getMinutes()
-  const second = date.getSeconds()
-
-  return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
-}
-
-const formatNumber = n => {
-  n = n.toString()
-  return n[1] ? n : '0' + n
-}
-
+const globalData = {
+  publicUrl: 'https://info.windd.cn/test'
+};
 module.exports = {
-  formatTime: formatTime
-}
+  globalData: globalData
+}