houwei 4 anos atrás
pai
commit
e4d87256c9
52 arquivos alterados com 1915 adições e 728 exclusões
  1. 11 30
      app.json
  2. BIN
      images/add_top.png
  3. BIN
      images/empty.png
  4. BIN
      images/ewm.png
  5. BIN
      images/icon7.png
  6. BIN
      images/icon8.png
  7. BIN
      images/isJoin.png
  8. BIN
      images/photo.jpg
  9. BIN
      images/tuijian.png
  10. 29 22
      pages/InfoType/InfoType.js
  11. 32 23
      pages/activeDetail/activeDetail.js
  12. 3 5
      pages/activeDetail/activeDetail.wxml
  13. 99 0
      pages/addRights/addRights.js
  14. 4 0
      pages/addRights/addRights.json
  15. 24 0
      pages/addRights/addRights.wxml
  16. 114 0
      pages/addRights/addRights.wxss
  17. 35 6
      pages/index/index.js
  18. 58 36
      pages/index/index.wxml
  19. 66 16
      pages/index/index.wxss
  20. 66 0
      pages/infoAgreement/infoAgreement.js
  21. 4 0
      pages/infoAgreement/infoAgreement.json
  22. 9 0
      pages/infoAgreement/infoAgreement.wxml
  23. 5 0
      pages/infoAgreement/infoAgreement.wxss
  24. 136 0
      pages/isAgree/isAgree.js
  25. 4 0
      pages/isAgree/isAgree.json
  26. 6 0
      pages/isAgree/isAgree.wxml
  27. 29 0
      pages/isAgree/isAgree.wxss
  28. 3 0
      pages/myActive/myActive.js
  29. 3 1
      pages/myActive/myActive.wxml
  30. 2 1
      pages/onSiteActivity/onSiteActivity.js
  31. 43 0
      pages/paylists/paylists.js
  32. 4 0
      pages/paylists/paylists.json
  33. 16 0
      pages/paylists/paylists.wxml
  34. 58 0
      pages/paylists/paylists.wxss
  35. 156 123
      pages/personInfo/personInfo.js
  36. 22 6
      pages/personInfo/personInfo.wxml
  37. 42 5
      pages/personInfo/personInfo.wxss
  38. 233 84
      pages/personInfoDetail/personInfoDetail.js
  39. 20 32
      pages/personInfoDetail/personInfoDetail.wxml
  40. 61 30
      pages/personal/personal.js
  41. 14 1
      pages/personal/personal.wxml
  42. 39 2
      pages/personal/personal.wxss
  43. 1 1
      pages/registrationSuccess/registrationSuccess.js
  44. 1 1
      pages/registrationSuccess/registrationSuccess.wxml
  45. 77 89
      pages/share/share.js
  46. 0 3
      pages/share/share.wxml
  47. 47 7
      pages/sign/sign.js
  48. 9 3
      pages/sign/sign.wxml
  49. 23 1
      pages/sign/sign.wxss
  50. 242 142
      pages/targetInfo/targetInfo.js
  51. 21 16
      pages/targetInfo/targetInfo.wxml
  52. 44 42
      utils/tool.js

+ 11 - 30
app.json

@@ -1,20 +1,26 @@
 {
   "pages": [
     "pages/index/index",
-    "pages/targetInfo/targetInfo",
+    "pages/infoAgreement/infoAgreement",
+    "pages/personInfo/personInfo",
    
+    "pages/share/share",
+    "pages/targetInfo/targetInfo",
     "pages/personInfoDetail/personInfoDetail",
+    "pages/isAgree/isAgree",
+    "pages/paylists/paylists",
+    "pages/addRights/addRights",
+    "pages/sign/sign",
     "pages/onSiteActivity/onSiteActivity",
     "pages/activeDetail/activeDetail",
     "pages/personal/personal",
-    "pages/personInfo/personInfo",
+    
     "pages/complaint/complaint",
-    "pages/share/share",
     "pages/myActive/myActive",
     "pages/InfoType/InfoType",
     "pages/registrationSuccess/registrationSuccess",
-    "pages/service/service",
-    "pages/sign/sign"
+    "pages/service/service"
+    
   ],
   "window": {
     "backgroundTextStyle": "light",
@@ -60,31 +66,6 @@
     "van-notice-bar": "/miniprogram_npm/vant-weapp/notice-bar/index",
     "van-uploader": "/miniprogram_npm/vant-weapp/uploader/index"
   },
-  "tabBar": {
-    "color": "#a9b7b7",
-    "selectedColor": "#ad66ff",
-    "borderStyle": "black",
-    "list": [
-      {
-        "pagePath": "pages/index/index",
-        "text": "首页",
-        "selectedIconPath": "./images/active_bar1.png",
-        "iconPath": "./images/unactive_bar1.png"
-      },
-      {
-        "pagePath": "pages/service/service",
-        "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/add_top.png


BIN
images/empty.png


BIN
images/ewm.png


BIN
images/icon7.png


BIN
images/icon8.png


BIN
images/isJoin.png


BIN
images/photo.jpg


BIN
images/tuijian.png


+ 29 - 22
pages/InfoType/InfoType.js

@@ -5,43 +5,43 @@ Page({
    * 页面的初始数据
    */
   data: {
-
+    // status:true
   },
   goMyinfo() {
-    // if (this.data.arr.length == 0) {
+    if (!this.data.status) {
       wx.navigateTo({
         url: '/pages/personInfo/personInfo',
       })
-    // } else {
-    //   wx.showModal({
-    //     title: '您当前有正在参加的活动,暂时不可修改个人信息哦',
-    //     showCancel: false
-    //   })
-    // }
+    } else {
+      wx.showModal({
+        title: '您当前有正在参加的活动,暂时不可修改个人信息哦',
+        showCancel: false
+      })
+    }
   },
   goMyinfoDetail() {
-    // if (this.data.arr.length == 0) {
+    if (!this.data.status) {
       wx.navigateTo({
         url: '/pages/personInfoDetail/personInfoDetail',
       })
-    // } else {
-    //   wx.showModal({
-    //     title: '您当前有正在参加的活动,暂时不可修改个人信息哦',
-    //     showCancel: false
-    //   })
-    // }
+    } else {
+      wx.showModal({
+        title: '您当前有正在参加的活动,暂时不可修改个人信息哦',
+        showCancel: false
+      })
+    }
   },
   goMyTargetInfo() {
-    // if (this.data.arr.length == 0) {
+    if (!this.data.status) {
       wx.navigateTo({
         url: '/pages/targetInfo/targetInfo',
       })
-    // } else {
-    //   wx.showModal({
-    //     title: '您当前有正在参加的活动,暂时不可修改目标信息哦',
-    //     showCancel: false
-    //   })
-    // }
+    } else {
+      wx.showModal({
+        title: '您当前有正在参加的活动,暂时不可修改目标信息哦',
+        showCancel: false
+      })
+    }
   },
   getActivies() {
     wx.request({
@@ -53,6 +53,13 @@ Page({
           this.setData({
             arr: res.data.actives
           })
+          for (let i = 0; i < res.data.actives.length; i++) {
+            if (res.data.actives[i].activeStatus == 1) {
+              this.setData({
+                status: false
+              })
+            }
+          }
         }
       }
     })

+ 32 - 23
pages/activeDetail/activeDetail.js

@@ -2,17 +2,19 @@ const app = require('../../utils/util.js');
 const tool = require('../../utils/tool.js');
 Page({
   data: {},
-  baoming() {
-    tool.isLogin().then(result => {
-      console.log('我登录成功了')
-      tool.isFinishInfo().then(result2 => {
-        tool.isFinishTargetInfo().then(redult3 => {}).catch(err => {
+  isOk() {
+    tool.isFinishInfo().then(result => {
+      console.log('我完善信息了')
+      tool.isLogin().then(result2 => {
+        tool.isFinishTargetInfo().then(redult3 => {
+          this.baoming()
+        }).catch(err => {
           wx.showModal({
             title: '您还未完善择偶信息',
             showCancel: false,
             success(res) {
               if (res.confirm) {
-                wx.switchTab({
+                wx.navigateTo({
                   url: '/pages/targetInfo/targetInfo',
                 })
               }
@@ -22,12 +24,12 @@ Page({
         })
       }).catch(err => {
         wx.showModal({
-          title: '您还未完善个人信息',
+          title: '您还未登陆',
           showCancel: false,
           success(res) {
             if (res.confirm) {
-              wx.switchTab({
-                url: '/pages/personInfo/personInfo',
+              wx.redirectTo({
+                url: '/pages/personal/personal',
               })
             }
           }
@@ -36,44 +38,52 @@ Page({
       })
     }).catch(err => {
       wx.showModal({
-        title: '您还未登录',
+        title: '您还未完善个人信息',
         showCancel: false,
         success(res) {
           if (res.confirm) {
-            wx.switchTab({
-              url: '/pages/personal/personal',
+            wx.navigateTo({
+              url: '/pages/personInfo/personInfo',
             })
           }
         }
       })
       return false;
     })
+  },
+  baoming() {
     wx.request({
       url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.id + '/enter',
       method: "get",
       success: (res) => {
         if (res.data.code == 0) {
-          console.log(res, '报名成功了')
-          
-          // wx.redirectTo({
-          //   url: '/pages/registrationSuccess/registrationSuccess',
-          // })
-        }else{
           wx.requestSubscribeMessage({
             tmplIds: ['YNGZW3voCNtjvTkhi2xbbVinJkjFKcILEG7uFC_xz2Y'],
             success(res) {
-              console.log(res)
+              console.log(res, '成功了');
+              wx.redirectTo({
+                url: '/pages/registrationSuccess/registrationSuccess',
+              })
+            },
+            fail(res1) {
+              console.log(res1, '失败了')
+              wx.redirectTo({
+                url: '/pages/registrationSuccess/registrationSuccess',
+              })
             }
           })
         }
       }
     })
   },
+
   async onLoad(options) {
+    console.log(options)
     tool.openidStatus().then(result => {
       this.setData({
         openid: result[0],
-        sessionkey: result[1]
+        sessionkey: result[1],
+        activeOpenid: options.openId
       })
       this.getActivies(options.id);
     })
@@ -91,10 +101,9 @@ Page({
             planCount: res.data.activeRoll.planCount,
             activeStart: res.data.activeRoll.activeStart,
             address: res.data.activeRoll.address,
-            remark: res.data.activeRoll.remark,
-            openId: id2
+            remark: res.data.activeRoll.remark
           })
-          console.log(this.data.openId)
+          console.log(this.data.isOpenid)
         }
       }
     })

+ 3 - 5
pages/activeDetail/activeDetail.wxml

@@ -1,6 +1,6 @@
 <view style="background:#fff">
 	<image src="../../images/activeimg.png" style="width:690rpx;height:360rpx;margin-left:35rpx"></image>
-	<image src="../../images/remarked.png" class="remarkImg"  wx:if="{{openId!='null'}}"></image>
+	<image src="../../images/remarked.png" class="remarkImg" wx:if="{{activeOpenid !='null'}}"></image>
 	<view class="line">
 		<van-icon name="like-o" size="40rpx" color="#906cff" style="margin-left:35rpx;margin-bottom:35rpx" />
 		<p style='margin-left:35rpx'>已报名{{actualCount}}/{{planCount}}</p>
@@ -22,9 +22,7 @@
 	<view style="color:#999999;margin:35rpx;font-size:30rpx">
 		{{remark}}
 	</view>
-	<!-- wx:if="{{openId=='null'}}" -->
-	<view class="btn_area" wx:if="{{openId=='null'}}">
-		<view class="btn" bindtap="baoming">报名</view>
-		<!-- <view class="btn" wx:else>已报名</view> -->
+	<view class="btn_area" wx:if="{{!activeOpenid||activeOpenid=='null'}}">
+		<view class="btn" bindtap="isOk">报名</view>
 	</view>
 </view>

+ 99 - 0
pages/addRights/addRights.js

@@ -0,0 +1,99 @@
+// pages/addRights/addRights.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    items: [{
+        name: '1',
+        value: '¥1999',
+        oldvalue: '原价:¥2500',
+        text: '立刻脱单',
+        checked: true
+      },
+      {
+        name: '2',
+        value: '¥399',
+        oldvalue: '原价:¥450',
+        text: '即将脱单',
+        checked: false
+      },
+      {
+        name: '3',
+        value: '¥199',
+        oldvalue: '原价:¥250',
+        text: '可能脱单',
+        checked: false
+      }
+    ]
+  },
+  radioChange(e) {
+    const items = this.data.items
+    const values = e.detail.value
+    for (let i = 0, lenI = items.length; i < lenI; ++i) {
+      items[i].checked = false;
+      if (values == items[i].name) {
+        items[i].checked = true
+      }
+    }
+    this.setData({
+      items: this.data.items
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 4 - 0
pages/addRights/addRights.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "增加权益"
+}

+ 24 - 0
pages/addRights/addRights.wxml

@@ -0,0 +1,24 @@
+<image src='../../images/add_top.png' class='img1'></image>
+<!-- <view class="">推荐</view> -->
+<image src="../../images/tuijian.png" class="tuijian"></image>
+<radio-group bindchange="radioChange">
+	<label wx:for="{{items}}">
+		<view class="{{item.checked?'radio_box1':'radio_box'}}">
+			<radio style="margin-left:30rpx;margin-top:50rpx;font-size:50rpx" color="#b186fb" value="{{item.name}}" checked="{{item.checked}}"></radio>
+			<view class="p p1">{{item.value}} </view>
+			<view class="p p2">{{item.oldvalue}} </view>
+			<view class="p p3">{{item.text}} </view>
+			<view class="p p4">查看详情</view>
+		</view>
+	</label>
+</radio-group>
+<view class="notice">
+	<view>注意事项</view>
+	<view>*占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字</view>
+	<view>*占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占</view>
+	<view>*位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字占位文字</view>
+</view>
+<view class="btn-area">
+	<view style="font-size:35rpx;line-height:75rpx">立即购买</view>
+  <view style="font-size:25rpx"><checkbox value="agree" checked="true"/>同意并遵守《月合权益购买协议》</view>
+</view>

+ 114 - 0
pages/addRights/addRights.wxss

@@ -0,0 +1,114 @@
+.img1 {
+  width: 750rpx;
+  height: 391rpx;
+}
+
+.radio_box {
+  width: 650rpx;
+  border: 1px solid #f0ece9;
+  margin-left: 50rpx;
+  height: 200rpx;
+  margin-top: 30rpx;
+  border-radius: 10rpx;
+  position: relative;
+}
+
+.radio_box1 {
+  width: 650rpx;
+  border: 1px solid #eda2a1;
+  background: #fff4f4;
+  margin-left: 50rpx;
+  height: 200rpx;
+  margin-top: 30rpx;
+  border-radius: 10rpx;
+  position: relative;
+}
+
+.p {
+  position: absolute;
+}
+
+.p1 {
+  color: #fd4b49;
+  font-size: 48rpx;
+  font-weight: 800;
+  top: 40rpx;
+  left: 90rpx;
+}
+
+.p2 {
+  color: #fd4b49;
+  font-size: 25rpx;
+  /* font-weight: 800; */
+  top: 110rpx;
+  left: 100rpx;
+  text-decoration: line-through;
+}
+
+.p3 {
+  color: #fd4b49;
+  font-size: 35rpx;
+  font-weight: 600;
+  top: 60rpx;
+  left: 260rpx;
+}
+
+.p4 {
+  color: #a342ff;
+  border: 1px solid #a342ff;
+  border-radius: 5rpx;
+  top: 70rpx;
+  right: 20rpx;
+  font-size: 28rpx;
+  padding: 5rpx 10rpx;
+}
+
+.notice {
+  width: 650rpx;
+  background: #fafafa;
+  color: #999999;
+  font-size: 28rpx;
+  padding: 50rpx;
+  margin-top: 50rpx;
+  line-height: 50rpx;
+}
+
+.btn-area {
+  background: -webkit-linear-gradient(left, #c58aff, #9080f5);
+  width: 750rpx;
+  height: 150rpx;
+  text-align: center;
+  color: #fff;
+}
+checkbox .wx-checkbox-input {
+  border-radius: 50%;
+  width: 46rpx;
+  height: 46rpx;
+  background-color: #f5f5f5;
+  border: 1rpx solid rgb(122, 122, 122)
+}
+checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+  border: 1rpx solid #fff;
+  background: #fff;
+}
+checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
+  border-radius: 50%;
+  width: 40rpx;
+  height: 40rpx;
+  line-height: 40rpx;
+  text-align: center;
+  font-size: 30rpx;
+  color: #b186fb;
+  background: transparent;
+  transform: translate(-50%, -50%) scale(1);
+  -webkit-transform: translate(-50%, -50%) scale(1);
+
+}
+.tuijian{
+  position: absolute;
+  top: 400rpx;
+  left: 40rpx;
+  width: 130rpx;
+  height: 60rpx;
+  z-index: 99999;
+}

+ 35 - 6
pages/index/index.js

@@ -38,6 +38,9 @@ Page({
             arr: res.data.actives
           })
         }
+      },
+      complete(){
+        wx.hideLoading();
       }
     })
     wx.request({
@@ -51,21 +54,47 @@ Page({
           this.setData({
             arr1: res.data.actives
           })
-          wx.hideLoading();
         }
-      }
+      },
+      complete(){
+        wx.hideLoading();
+      } 
     })
   },
-  async onShow() {
-    wx.showLoading({
-      title: '加载中',
+  goMy() {
+    wx.redirectTo({
+      url: '/pages/personal/personal',
+    })
+  },
+  getIntroduce() {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/introduce',
+      method: "get",
+      data: {
+        introduce: this.data.introduceId
+      },
+      success: (res) => {
+        console.log(res, '获取推荐人')
+      }
     })
+  },
+  onLoad(options) {
+    wx.showLoading();
     tool.openidStatus().then(result => {
       this.setData({
         openid: result[0],
-        sessionkey: result[1]
+        sessionkey: result[1],
       })
       this.getActivies();
+      if (options.id) {
+        this.setData({
+          introduceId: options.id
+        })
+        this.getIntroduce();
+      }
     })
+  },
+  onShow(){
+    this.getActivies();
   }
 })

+ 58 - 36
pages/index/index.wxml

@@ -7,45 +7,67 @@
 		</block>
 	</swiper>
 	<image src="../../images/show.png" style="width:650rpx;margin-left:50rpx;height:200rpx"></image>
-	<view style="display:flex;margin-left:30rpx;margin-top:30rpx;margin-bottom:30rpx"><view style='width:10rpx;height:45rpx;background-color:#986aff;margin-right:20rpx;border-radius:10rpx'></view>近期活动</view>
-	<view wx:for="{{arr}}" wx:key="index" class="box" bindtap="goActive" data-id='{{item.id}}' data-openId='{{item.openId}}'>
-		<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.openId==null}}" class="btn btn1">报名</view>
-			<view wx:else class="btn btn2">已报名</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>
+	<view style="display:flex;margin-left:30rpx;margin-top:30rpx;margin-bottom:30rpx">
+		<view style='width:10rpx;height:45rpx;background-color:#986aff;margin-right:20rpx;border-radius:10rpx'></view>近期活动
 	</view>
-	<view wx:for="{{arr1}}" wx:key="index" class="box" bindtap="goActive" data-id='{{item.id}}' data-openId='{{item.openId}}'>
-		<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 style="margin-bottom:150rpx">
+		<view wx:for="{{arr}}" wx:key="index" class="box" bindtap="goActive" data-id='{{item.id}}' data-openId='{{item.openId}}'>
+			<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.openId==null}}" class="btn btn1">报名</view>
+				<view wx:if="{{item.enterStatus==0}}" class="btn btn1">审核中</view>
+				<view wx:if="{{item.enterStatus==1}}" class="btn btn1">审核通过</view>
+				<view wx:if="{{item.enterStatus==-1}}" class="btn btn1">审核失败</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>
-			<view wx:if="{{item.openId==null}}" class="btn btn1">报名</view>
-			<view wx:else class="btn btn2">已报名</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 wx:for="{{arr1}}" wx:key="index" class="box" bindtap="goActive" data-id='{{item.id}}' data-openId='{{item.openId}}'>
+			<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.openId==null}}" class="btn btn1">报名</view>
+				<view wx:if="{{item.enterStatus==0}}" class="btn btn1">审核中</view>
+				<view wx:if="{{item.enterStatus==1}}" class="btn btn1">审核通过</view>
+				<view wx:if="{{item.enterStatus==-1}}" class="btn btn1">审核失败</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>
 		</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/unactive_bar2.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+		<button type="primary" id="red" session-from="nickName={{userInfo.nickName}}|avatarUrl={{userInfo.avatarUrl}}" open-type="contact">客服</button>
+	</view>
+	<view class="tab1" bindtap="goMy">
+		<image src="../../images/unactive_bar3.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+		<view>我的</view>
+	</view>
+</view>

+ 66 - 16
pages/index/index.wxss

@@ -1,13 +1,17 @@
 page {
   background: #f7f7f7;
+  padding-bottom:1rpx;
 }
+
 .imageContainer {
   width: 100%;
   height: 420rpx;
 }
+
 .item {
   height: 500rpx;
 }
+
 .itemImg {
   position: absolute;
   width: 100%;
@@ -18,41 +22,48 @@ page {
   top: 30rpx;
   padding-left: 10rpx;
 }
+
 .active {
   opacity: 1;
   z-index: 10;
   height: 400rpx;
-  top:10rpx;
+  top: 10rpx;
   transition: all .15s ease-in 0s;
 }
-.box{
+
+.box {
   width: 650rpx;
   height: 530rpx;
   margin: 25rpx;
-  box-shadow:0 0 10rpx 10rpx #eceafa;
-  padding:25rpx
+  box-shadow: 0 0 10rpx 10rpx #eceafa;
+  padding: 25rpx;
 }
-.top{
+
+.top {
   display: flex;
 }
-.text{
+
+.text {
   /* border: 1px solid red; */
   width: 460rpx;
 }
-.title{
+
+.title {
   color: #999999;
   font-size: 28rpx;
   margin-left: 30rpx;
 }
-.remark{
+
+.remark {
   color: #4d4d4d;
   font-size: 28rpx;
   margin-left: 30rpx;
   margin-top: 10rpx;
 }
-.btn{
-  width:150rpx;
-  height:50rpx;
+
+.btn {
+  width: 150rpx;
+  height: 50rpx;
   text-align: center;
   font-weight: bold;
   line-height: 50rpx;
@@ -60,26 +71,65 @@ page {
   border-radius: 30rpx;
   margin-top: 10rpx;
 }
-.btn1{
+
+.btn1 {
   border: 1px solid #1bb610;
   color: #1bb610;
 }
-.btn2{
+
+.btn2 {
   border: 1px solid #216deb;
   color: #216deb;
 }
-.btn3{
+
+.btn3 {
   border: 1px solid #f1252e;
   color: #f1252e;
 }
-.img2{
+
+.img2 {
   width: 100%;
   height: 300rpx;
   margin-top: 30rpx;
 }
-.p1{
+
+.p1 {
   display: flex;
   color: #999999;
   margin-top: 15rpx;
   font-size: 28rpx;
+}
+
+.tabbar {
+  width: 750rpx;
+  box-shadow: 0px 0px 10px rgba(0, 0, 0, .4);
+  /* border: 1px solid #999; */
+  height: 100rpx;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  display: flex;
+  font-size: 28rpx;
+  background: #fff;
+  z-index: 999;
+}
+
+.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;
 }

+ 66 - 0
pages/infoAgreement/infoAgreement.js

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

+ 4 - 0
pages/infoAgreement/infoAgreement.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": ""
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 9 - 0
pages/infoAgreement/infoAgreement.wxml


+ 5 - 0
pages/infoAgreement/infoAgreement.wxss

@@ -0,0 +1,5 @@
+.text{
+  font-size: 30rpx;
+  text-indent: 60rpx;
+  line-height: 55rpx;
+}

+ 136 - 0
pages/isAgree/isAgree.js

@@ -0,0 +1,136 @@
+const app = require('../../utils/util.js');
+const tool = require('../../utils/tool.js');
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    console.log(options)
+    tool.openidStatus().then(result => {
+      this.setData({
+        openid: result[0],
+        sessionkey: result[1],
+        activeId: options.activeId,
+        name: options.activeName
+      })
+    })
+  },
+  sure() {
+    wx.showLoading({
+      title: '加载中',
+    })
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.activeId + '/confirm',
+      method: "get",
+      success: (res) => {
+        console.log(res)
+        if (res.data.code == 0) {
+          wx.showModal({
+            title: '您已确认参与活动啦',
+            content: '请按照规定时间前来参加活动呦',
+            showCancel: false,
+            success(res) {
+              if (res.confirm) {
+                wx.redirectTo({
+                  url: '/pages/index/index',
+                })
+              }
+            }
+          })
+        }
+      },
+      complete() {
+        wx.hideLoading({})
+      }
+    })
+  },
+  esc() {
+    wx.showLoading({
+      title: '加载中',
+    })
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.activeId + '/cancel',
+      method: "get",
+      data: {
+        enterStatus: 0
+      },
+      success: (res) => {
+        console.log(res)
+        if (res.data.code == 0) {
+          wx.hideLoading()
+          wx.showModal({
+            title: '下次再见啦',
+            content: '很遗憾您不想参加此次活动',
+            showCancel: false,
+            success(res) {
+              if (res.confirm) {
+                wx.redirectTo({
+                  url: '/pages/index/index',
+                })
+              }
+            }
+          })
+        }
+      },
+      complete() {
+        wx.hideLoading()
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 4 - 0
pages/isAgree/isAgree.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "参加活动"
+}

+ 6 - 0
pages/isAgree/isAgree.wxml

@@ -0,0 +1,6 @@
+<view style="text-align:center;font-size:28rpx">
+	<image src='../../images/isJoin.png' style='width:407rpx;height:410rpx;margin:100rpx 175rpx'></image>
+	<view class="p1">是否参加{{name}}活动</view>
+	<view class="p2" bindtap="sure">确认参加活动</view>
+	<view class="p3" bindtap="esc">我不想去</view>
+</view>

+ 29 - 0
pages/isAgree/isAgree.wxss

@@ -0,0 +1,29 @@
+/* pages/isAgree/isAgree.wxss */
+.p2{
+  width: 300rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  /* margin-top: 35rpx; */
+  border-radius: 35rpx;
+  /* margin-left: 75rpx; */
+  background: -webkit-linear-gradient(left, #bd64ff, #8873ff);
+  color: white;
+  text-align: center;
+  position: absolute;
+  top: 705rpx;
+  left: 225rpx;
+}
+.p3{
+  width: 300rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+  /* margin-top: 35rpx; */
+  border-radius: 35rpx;
+  /* margin-left: 75rpx; */
+  background: #dcdcdc;
+  color: #666666;
+  text-align: center;
+  position: absolute;
+  top: 815rpx;
+  left: 225rpx;
+}

+ 3 - 0
pages/myActive/myActive.js

@@ -18,6 +18,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   getActivies() {
+    wx.showLoading();
     wx.request({
       url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/myActive',
       method: "get",
@@ -28,6 +29,8 @@ Page({
             arr: res.data.actives
           })
         }
+      },complete(){
+        wx.hideLoading()
       }
     })
   },

+ 3 - 1
pages/myActive/myActive.wxml

@@ -16,4 +16,6 @@
 	<view class="p1">
 	<van-icon name="location-o" color="#a267ff" size="35rpx"/><view style="margin-left:15rpx">活动地点:{{item.address}}</view>
 	</view>
-</view>
+</view>
+<image wx:if='{{arr.length==0}}' src="../../images/empty.png" style="position:fixed;width:320rpx;height:320rpx;top:200rpx;left:215rpx"></image>
+<view wx:if='{{arr.length==0}}'  style="position:fixed;width:750rpx;height:320rpx;top:550rpx;left:0rpx;text-align:center">您还没有可以参与的活动呦</view>

+ 2 - 1
pages/onSiteActivity/onSiteActivity.js

@@ -98,7 +98,7 @@ Page({
                 myNum: res.data.members[i].activeNumber
               })
               // 删除自己
-            //  res.data.members.splice(i,1);
+             res.data.members.splice(i,1);
             }
           }
           this.setData({
@@ -109,6 +109,7 @@ Page({
     })
   },
   async onLoad(options) {
+   
     tool.openidStatus().then(result => {
       this.setData({
         openid: result[0],

+ 43 - 0
pages/paylists/paylists.js

@@ -0,0 +1,43 @@
+//logs.js
+const util = require('../../utils/util.js')
+
+Page({
+  data: {
+    arr: [
+      {
+        name:'韩式辣酱',
+        status:'立即脱单',
+        title:'全年五十次权益',
+        time:'2020-09-09 15:52',
+        number:'9',
+        money:'199999',
+        // class:'one',
+      },
+      {
+        name:'韩式辣酱',
+        status:'可能脱单',
+        title:'全年五十次权益',
+        time:'2020-09-09 15:52',
+        number:'已使用',
+        money:'27799',
+        // class:'two',
+      },
+      {
+        name:'韩式辣酱',
+        status:'即将脱单',
+        title:'全年五十次权益',
+        time:'2020-09-09 15:52',
+        number:'已使用',
+        money:'27799',
+        // class:'two',
+      }
+  ]
+  },
+  // onLoad: function () {
+  //   this.setData({
+  //     logs: (wx.getStorageSync('logs') || []).map(log => {
+  //       return util.formatTime(new Date(log))
+  //     })
+  //   })
+  // }
+})

+ 4 - 0
pages/paylists/paylists.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "订单列表"
+}

+ 16 - 0
pages/paylists/paylists.wxml

@@ -0,0 +1,16 @@
+<view class="content">
+  <view wx:for="{{arr}}" wx:key="index" class="replybox">
+    <view class="text_body">
+      <text class="name">{{item.name}}</text>
+      <text class="status">{{item.status}}</text>
+      <text class="number one">{{item.number}}</text>
+      <view class="title">{{item.title}}</view>
+      <view class="time">购买时间:{{item.time}}</view>
+    </view>
+    <view class="line"></view>
+    <view class="money_body">
+        <text>实付 </text>
+        <text style="color:#ff2c2c;font-size:45rpx;">¥{{item.money}}</text>
+    </view>
+	</view>
+</view>

+ 58 - 0
pages/paylists/paylists.wxss

@@ -0,0 +1,58 @@
+page{
+  background: #fafafa;
+}
+.replybox{
+  background: #fff;
+  width: 94%;
+  margin: 20rpx 3%;
+  border-radius: 10px;
+}
+.text_body{
+  padding: 30rpx 40rpx;
+}
+.name{
+  font-size: 35rpx;
+  font-weight: 600;
+}
+.status{
+  background: #fad398;
+  border-radius: 5px;
+  padding: 0rpx 10rpx;
+  margin-left: 20rpx;
+  color: #724119;
+  font-size: 25rpx;
+}
+.one{
+  background: #8ee34e;
+  color: #fff;
+}
+.two{
+  background: #e7e7e7;
+  color: #8b8b8b;
+}
+.number{
+  float: right;
+  width: 110rpx;
+  text-align: center;
+  border-radius: 5px;
+  padding: 0rpx 8rpx;
+  font-size: 28rpx;
+}
+.title{
+  color: #4d4d4d;
+  font-size: 28rpx;
+  padding: 20rpx 0;
+}
+.time{
+  color: #666666;
+  font-size: 28rpx;
+}
+.line{
+  width:100%;
+  height:2rpx;
+  background:#eeeeee;
+}
+.money_body{
+  padding: 20rpx 30rpx;
+  text-align: right;
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 156 - 123
pages/personInfo/personInfo.js


+ 22 - 6
pages/personInfo/personInfo.wxml

@@ -1,8 +1,13 @@
-<view class="container">
+<view class="container" style="margin-bottom:100rpx">
 	<view class="card_bj">
 		<view class="p1">身份证上传</view>
 		<view class="p2">上传身份证头像面</view>
-		<image class="cardimg" mode="aspectFit" src="{{imgsrc}}" bindtap="uploadCard"></image>
+		<image class="cardimg" mode="aspectFit" src="{{imgsrc}}" data-type='card' bindtap="uploadCard"></image>
+	</view>
+	<view class="card_bj">
+		<view class="p1">照片上传</view>
+		<view class="p2">上传本人照片呦</view>
+		<image class="cardimg" mode="aspectFit" src="{{photo}}" data-type='photo' bindtap="uploadCard"></image>
 	</view>
 	<form bindsubmit='formSubmit'>
 		<view style="display:none">
@@ -11,6 +16,9 @@
 		<view style="display:none">
 			<input name="idCard" type="text" value="{{form.idCard}}"></input>
 		</view>
+		<view style="display:none">
+			<input name="photoUrl" type="text" value="{{form.photoUrl}}"></input>
+		</view>
 		<view class="block">
 			<view class='left'>姓名</view>
 			<view class='right'>
@@ -30,7 +38,7 @@
 		<view class="block">
 			<view class='left'>年龄</view>
 			<view class='right'>
-				<input name="age" disabled="true" value="{{form.age}}" placeholder="未填写" placeholder-class="iconfont icon-jianjiaohao1 icon-tubiaozhizuo-1"></input>
+				<input name="age" value="{{form.age}}" placeholder="未填写" placeholder-class="iconfont icon-jianjiaohao1 icon-tubiaozhizuo-1"></input>
 			</view>
 		</view>
 		<view class="block">
@@ -74,7 +82,7 @@
 			<view class='right'>
 				<picker bindchange="constellationPicker" range="{{constellationArr}}" name='constellation' value="{{form.constellation}}">
 					<view style="text-align:right">
-						<view wx:if="{{form.constellation}}">{{form.constellation}}</view>
+						<view wx:if="{{constellationLabel}}">{{constellationLabel}}</view>
 						<view wx:else class='placeStyle'>
 							<view class="redpoint"></view>
 							<view class="placetext">未选择</view>
@@ -85,8 +93,16 @@
 			</view>
 		</view>
 		<view class="btn-area">
-			<button form-type="submit" id="sunbmit">确认,去完善详细信息</button>
-			<!-- <button form-type="reset">Reset重置</button> -->
+			<button form-type="submit" id="sunbmit">提交信息</button>
+		</view>
+		<view style="font-size:25rpx;display:flex;margin-left:120rpx">
+			<checkbox-group bindchange="change">
+				<label class="checkbox">
+					<checkbox value="cb" />
+				</label>
+			</checkbox-group>
+			<p bindtap='goxy'>同意并遵守《月合权益购买协议》</p>
 		</view>
+		<!-- <checkbox value="agree" checked="true"/><p bindtap='goxy'>同意并遵守《月合权益购买协议》</p></view> -->
 	</form>
 </view>

+ 42 - 5
pages/personInfo/personInfo.wxss

@@ -112,10 +112,47 @@
   line-height: 60rpx!important;
   border-radius: 50rpx!important;
   font-weight: normal!important;
-  margin: 60rpx 75rpx;
+  margin: 60rpx 75rpx 10rpx 75rpx;
+
 }
-/* .seachInput{
-  display: flex;
-  justify-content: center;
-  align-items: center;
+
+/* .btn-area {
+  background: -webkit-linear-gradient(left, #c58aff, #9080f5);
+  width: 750rpx;
+  height: 150rpx;
+  text-align: center;
+  color: #fff;
+}*/
+checkbox .wx-checkbox-input {
+  border-radius: 50%;
+  width: 36rpx;
+  height: 36rpx;
+  background-color: #f5f5f5;
+  border: 1rpx solid rgb(122, 122, 122)
+}
+checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+  border: 1rpx solid #fff;
+  background: #fff;
+  border: 1rpx solid rgb(122, 122, 122)
+}
+checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
+  border-radius: 50%;
+  width: 30rpx;
+  height: 30rpx;
+  line-height: 30rpx;
+  text-align: center;
+  font-size: 30rpx;
+  color: #b186fb;
+  background: transparent;
+  transform: translate(-50%, -50%) scale(1);
+  -webkit-transform: translate(-50%, -50%) scale(1);
+  /* border: 1rpx solid rgb(122, 122, 122) */
+} 
+ /*.tuijian{
+  position: absolute;
+  top: 400rpx;
+  left: 40rpx;
+  width: 130rpx;
+  height: 60rpx;
+  z-index: 99999;
 } */

+ 233 - 84
pages/personInfoDetail/personInfoDetail.js

@@ -30,8 +30,7 @@ Page({
       parentAssets: '',
       composition: '',
       motionState: '',
-      hobby: '',
-      // photoUrl: ''
+      hobby: ''
     },
     heightArr: [],
     weightArr: [],
@@ -54,7 +53,8 @@ Page({
     matherWorkArr: [],
     parentAssetsArr: [],
     compositionArr: [],
-    motionStateArr: []
+    motionStateArr: [],
+    hobbyArr: []
   },
   phoneChange(e) {
     let phone = 'form.phone'
@@ -260,14 +260,42 @@ Page({
   figurePicker(e) {
     let motionState = 'form.motionState'
     this.setData({
-      [motionState]: e.detail.value,
       motionStateLabel: this.data.motionStateArr[e.detail.value],
+      [motionState]:this.data.motionStateArrValue[e.detail.value]
+     
     })
   },
   hobbyChange(e) {
+    console.log(e.detail.value)
+    const items = this.data.hobbyArr;
+    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
+        }
+      }
+    }
+    console.log(this.data.hobbyArrLabel)
+    let indexArr = [];
+    for (let i = 0; i < e.detail.value.length; i++) {
+      indexArr.push(this.data.hobbyArrLabel.indexOf(e.detail.value[i]))
+    }
+    let value = [];
+    for (let i = 0; i < indexArr.length; i++) {
+      value.push(this.data.hobbyArrValue[indexArr[i]])
+    }
+    let str = '';
+    for (let i = 0; i < value.length; i++) {
+      str += value[i] + ','
+    }
     let hobby = 'form.hobby'
     this.setData({
-      [hobby]: e.detail.value
+      hobbyArr: this.data.hobbyArr,
+      [hobby]: str.slice(0, str.length - 1)
+      // [hobby]: e.detail.value
     })
   },
   // 获取手机号
@@ -288,18 +316,23 @@ Page({
         },
         method: "POST",
         success: (res) => {
-          console.log(res.data.phoneNumber, '我是解析的手号');
+          console.log(res, '我是解析的手号');
           let phone = 'form.phone'
-          this.setData({
-            [phone]: res.data.phoneNumber
-          })
+          if (res.data.phoneNumber) {
+            this.setData({
+              [phone]: res.data.phoneNumber
+            })
+          } else {
+            this.setData({
+              [phone]: 0
+            })
+          }
         }
       })
     }
-    // console.log(e.detail.iv)
-    // console.log(e.detail.encryptedData)
   },
   getInfos() {
+    wx.showLoading();
     wx.request({
       url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/info',
       method: "get",
@@ -335,7 +368,7 @@ Page({
             heightArr: result[0],
             heightArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.height) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.height) {
                 this.setData({
@@ -351,7 +384,7 @@ Page({
             weightArr: result[0],
             weightArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.weight) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.weight) {
                 this.setData({
@@ -367,7 +400,7 @@ Page({
             educationArr: result[0],
             educationArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.education) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.education) {
                 this.setData({
@@ -383,7 +416,7 @@ Page({
             incomeArr: result[0],
             incomeArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.income) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.income) {
                 this.setData({
@@ -399,7 +432,7 @@ Page({
             marriageList: result[0],
             marriageListValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.marriage) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.marriage) {
                 this.setData({
@@ -415,7 +448,7 @@ Page({
             childrenArr: result[0],
             childrenArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.children) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.children) {
                 this.setData({
@@ -431,7 +464,7 @@ Page({
             assetHouseArr: result[0],
             assetHouseArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.assetHouse) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.assetHouse) {
                 this.setData({
@@ -448,7 +481,7 @@ Page({
             assetAreaArr: result[0],
             assetAreaArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.assetHouseArea) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.assetHouseArea) {
                 this.setData({
@@ -465,7 +498,7 @@ Page({
             assetHouseLoanArr: result[0],
             assetHouseLoanArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.assetHouseLoan) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.assetHouseLoan) {
                 this.setData({
@@ -481,7 +514,7 @@ Page({
             assetCarArr: result[0],
             assetCarArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.assetCar) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.assetCar) {
                 this.setData({
@@ -498,7 +531,7 @@ Page({
             assetCarValueArr: result[0],
             assetCarValueArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.assetCarValue) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.assetCarValue) {
                 this.setData({
@@ -514,7 +547,7 @@ Page({
             assetCarLoanArr: result[0],
             assetCarLoanArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.assetCarLoan) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.assetCarLoan) {
                 this.setData({
@@ -533,8 +566,7 @@ Page({
               'checked': false
             })
           })
-
-          if (res.data.info) {
+          if (res.data.info.controlTime) {
             let resControlTime = res.data.info.controlTime.split(",");
             let resControlTimeIndexArr = [];
             for (let i = 0; i < resControlTime.length; i++) {
@@ -571,7 +603,7 @@ Page({
               'checked': false
             })
           })
-          if (res.data.info) {
+          if (res.data.info.workStatus) {
             let resWorkStatus = res.data.info.workStatus.split(",");
             let resWorkStatusIndexArr = [];
             for (let i = 0; i < resWorkStatus.length; i++) {
@@ -601,7 +633,7 @@ Page({
           })
         })
         tool.formDetails('he_company_nature').then(result => {
-          if (res.data.info) {
+          if (res.data.info.companyNature) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.companyNature) {
                 this.setData({
@@ -610,6 +642,8 @@ Page({
                 })
               }
             }
+          }
+          if (res.data.info.fatherWork) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.fatherWork) {
                 this.setData({
@@ -618,6 +652,8 @@ Page({
                 })
               }
             }
+          }
+          if (res.data.info.matherWork) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.matherWork) {
                 this.setData({
@@ -650,7 +686,7 @@ Page({
             parentsArr: result[0],
             parentsArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.parents) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.parents) {
                 this.setData({
@@ -666,13 +702,12 @@ Page({
             parentAssetsArr: result[0],
             parentAssetsArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.parentAssets) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.parentAssets) {
                 this.setData({
                   parentAssetsLabel: result[0][i],
                   [parentAssets]: result[1][i],
-
                 })
               }
             }
@@ -686,7 +721,7 @@ Page({
               'checked': false
             })
           })
-          if (res.data.info) {
+          if (res.data.info.composition) {
             let resComposition = res.data.info.composition.split(",");
             let resCompositionIndexArr = [];
             for (let i = 0; i < resComposition.length; i++) {
@@ -720,9 +755,9 @@ Page({
           console.log(result)
           this.setData({
             motionStateArr: result[0],
-            motionStateValue: result[1]
+            motionStateArrValue: result[1]
           })
-          if (res.data.info) {
+          if (res.data.info.motionState) {
             for (let i = 0; i < result[0].length; i++) {
               if (result[1][i] == res.data.info.motionState) {
                 console.log(i)
@@ -734,12 +769,93 @@ Page({
             }
           }
         })
+        tool.formDetails('he_hobby').then(result => {
+          let hobbyArr = result[0].map((item, index) => {
+            return Object.assign({}, {
+              'name': item,
+              'value': item,
+              'checked': false
+            })
+          })
+          if (res.data.info.hobby) {
+            let reshobby = res.data.info.hobby.split(",");
+            let reshobbyIndexArr = [];
+            for (let i = 0; i < reshobby.length; i++) {
+              for (let j = 0; j < result[1].length; j++) {
+                if (reshobby[i] == result[1][j]) {
+                  reshobbyIndexArr.push(i)
+                }
+              }
+            }
+            let reshobbyLabel = [];
+            for (let i = 0; i < reshobbyIndexArr.length; i++) {
+              reshobbyLabel.push(result[0][reshobbyIndexArr[i]])
+            }
+            for (let i = 0; i < reshobbyLabel.length; i++) {
+              if (reshobbyLabel[i] == hobbyArr[i].value) {
+                hobbyArr[i].checked = true;
+              }
+            }
+            this.setData({
+              [hobby]: reshobbyLabel
+            })
+          }
+          this.setData({
+            hobbyArr: hobbyArr,
+            hobbyArrLabel: result[0],
+            hobbyArrValue: result[1]
+          })
+        })
+        // tool.formDetails('he_hobby').then(result=>{
+        //   console.log(result)
+        //   let hobbyArr = result[0].map((item, index) => {
+        //     return Object.assign({}, {
+        //       'name': item,
+        //       'value': item,
+        //       'checked': false
+        //     })
+        //   })
+        //   if (res.data.info.hobby) {
+        //     let resHobby = res.data.info.hobby.split(",");
+        //     let resHobbyIndexArr = [];
+        //     for (let i = 0; i < resHobby.length; i++) {
+        //       for (let j = 0; j < result[1].length; j++) {
+        //         if (resHobby[i] == result[1][j]) {
+        //           resHobbyIndexArr.push(i)
+        //         }
+        //       }
+        //     }
+        //     let resHobbyLabel = [];
+        //     for (let i = 0; i < resHobbyIndexArr.length; i++) {
+        //       resHobbyLabel.push(result[0][resHobbyIndexArr[i]])
+        //     }
+        //     for (let i = 0; i < resHobbyLabel.length; i++) {
+        //       if (resHobbyLabel[i] == hobbyArr[i].value) {
+        //         hobbyArr[i].checked = true;
+        //       }
+        //     }
+        //     this.setData({
+        //       [hobby]: resHobbyLabel
+        //     })
+        //   }
+        //   this.setData({
+        //     hobbyArr: hobbyArr,
+        //     HobbyLabel: result[0],
+        //     HobbyValue: result[1]
+        //   })
+        //   console.log(result[0])
+        //   console.log(this.data.HobbyLabel)
+        // })
+      },
+      complete: () => {
+        wx.hideLoading()
       }
     })
   },
   // 提交
   formSubmit(e) {
     console.log(e)
+    console.log(this.data.HobbyLabel)
     const params = e.detail.value
     let controlTime = 'form.controlTime';
     let workStatus = 'form.workStatus';
@@ -770,6 +886,8 @@ Page({
       str2 += value2[i] + ','
     }
 
+
+    console.log(this.data.compositionArrLabel)
     let indexArr3 = [];
     for (let i = 0; i < params.composition.length; i++) {
       indexArr3.push(this.data.compositionArrLabel.indexOf(params.composition[i]))
@@ -782,11 +900,11 @@ Page({
     for (let i = 0; i < value3.length; i++) {
       str3 += value3[i] + ','
     }
-
     this.setData({
       [controlTime]: str.slice(0, str.length - 1),
       [workStatus]: str2.slice(0, str2.length - 1),
       [composition]: str3.slice(0, str3.length - 1),
+      // [hobby]: str4.slice(0, str4.length - 1)
     })
     console.log(this.data.form)
     //校验表单
@@ -810,8 +928,8 @@ Page({
             showCancel: false,
             success(res) {
               if (res.confirm) {
-                wx.navigateTo({
-                  url: '/pages/targetInfo/targetInfo',
+                wx.redirectTo({
+                  url: '/pages/InfoType/InfoType',
                 })
               }
             }
@@ -854,21 +972,21 @@ Page({
       assetHouse: {
         required: true
       },
-      assetHouseArea: {
-        required: true
-      },
-      assetHouseLoan: {
-        required: true
-      },
+      // assetHouseArea: {
+      //   required: true
+      // },
+      // assetHouseLoan: {
+      //   required: true
+      // },
       assetCar: {
         required: true
       },
-      assetCarValue: {
-        required: true
-      },
-      assetCarLoan: {
-        required: true
-      },
+      // assetCarValue: {
+      //   required: true
+      // },
+      // assetCarLoan: {
+      //   required: true
+      // },
       isCommon: {
         required: true
       },
@@ -902,70 +1020,70 @@ Page({
     }
     const messages = {
       phone: {
-        required: '请输入联系方式'
+        required: '请输入联系方式'
       },
       height: {
-        required: '请选择身高'
+        required: '请选择身高'
       },
       weight: {
-        required: '请选择体重'
+        required: '请选择体重'
       },
       education: {
-        required: '请选择教育程度'
+        required: '请选择教育程度'
       },
       income: {
-        required: '请选择收入'
+        required: '请选择收入'
       },
       marriage: {
-        required: '请选择婚姻状态'
+        required: '请选择婚姻状态'
       },
       children: {
-        required: '请选择有没有孩子'
+        required: '请选择有没有孩子'
       },
       assetHouse: {
-        required: '请选择是否买房子'
-      },
-      assetHouseArea: {
-        required: '请选择房子多大面积'
-      },
-      assetHouseLoan: {
-        required: '请选择房子贷款了没'
+        required: '请选择是否买房子呦'
       },
+      // assetHouseArea: {
+      //   required: '请选择房子多大面积'
+      // },
+      // assetHouseLoan: {
+      //   required: '请选择房子贷款了没'
+      // },
       assetCar: {
-        required: '请选择车子情况'
-      },
-      assetCarValue: {
-        required: '请选择车子的价值'
-      },
-      assetCarLoan: {
-        required: '请选择车子贷款了没'
+        required: '请选择车子情况呦'
       },
+      // assetCarValue: {
+      //   required: '请选择车子的价值'
+      // },
+      // assetCarLoan: {
+      //   required: '请选择车子贷款了没'
+      // },
       isCommon: {
-        required: '请选择是否与父母同住'
+        required: '请选择是否与父母同住'
       },
       controlTime: {
-        required: '请选择您的空闲时间'
+        required: '请选择您的空闲时间'
       },
       workStatus: {
-        required: '请选择您的工作状态'
+        required: '请选择您的工作状态'
       },
       companyNature: {
-        required: '请选择您的单位性质'
+        required: '请选择您的单位性质'
       },
       company: {
-        required: '请输入您的单位具体名称'
+        required: '请输入您的单位具体名称'
       },
       parents: {
-        required: '请选择您的父母情况'
+        required: '请选择您的父母情况'
       },
       composition: {
-        required: '请选择有没有兄弟姐妹'
+        required: '请选择有没有兄弟姐妹'
       },
       motionState: {
-        required: '请选择您是否喜欢运动'
+        required: '请选择您是否喜欢运动'
       },
       hobby: {
-        required: '请填写您的爱好'
+        required: '请选择您的爱好呦'
       }
       // photoUrl: {
       //   required: '请上传您的照片'
@@ -982,15 +1100,46 @@ Page({
       })
       // this.getForm();
       this.getInfos();
-      wx.getUserInfo({
-        success: (res) => {
+      wx.getSetting({
+        success: res => {
           console.log(res)
-          this.setData({
-            rawData: res.rawData,
-            signature: res.signature
-          })
+          if (res.authSetting['scope.userInfo']) {
+            // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
+            wx.getUserInfo({
+              success: res => {
+                this.setData({
+                  rawData: res.rawData,
+                  signature: res.signature
+                })
+                if (this.userInfoReadyCallback) {
+                  this.userInfoReadyCallback(res)
+                }
+              }
+            })
+          } else {
+            // wx.showModal({
+            //   title: '您还未登录',
+            //   showCancel: false,
+            //   success(res) {
+            //     if (res.confirm) {
+            //       wx.redirectTo({
+            //         url: '/pages/personal/personal',
+            //       })
+            //     }
+            //   }
+            // });
+          }
         }
       })
+      // wx.getUserInfo({
+      //   success: (res) => {
+      //     console.log(res)
+      //     this.setData({
+      //       rawData: res.rawData,
+      //       signature: res.signature
+      //     })
+      //   }
+      // })
     })
   },
   // 上传头像

+ 20 - 32
pages/personInfoDetail/personInfoDetail.wxml

@@ -98,8 +98,8 @@
 				</view>
 			</view>
 			<view class="block">
-				<view class='left' style="width:35%">房子情况</view>
-				<view class='right' style="width:65%">
+				<view class='left' style="width:45%">这些年没少攒吧(房)</view>
+				<view class='right' style="width:55%">
 					<picker bindchange="assetHousePickerChange" range="{{assetHouseArr}}" name='assetHouse' value="{{form.assetHouse}}">
 						<view wx:if="{{assetHouseLabel}}">{{assetHouseLabel}}</view>
 						<view wx:else class='placeStyle'>
@@ -110,7 +110,7 @@
 					</picker>
 				</view>
 			</view>
-			<view class="block">
+			<view class="block" wx:if="{{assetHouseLabel!='租房'}}">
 				<view class='left' style="width:35%">房子多大啊</view>
 				<view class='right' style="width:65%">
 					<picker bindchange="assetAreaPickerChange" range="{{assetAreaArr}}" name='assetHouseArea' value="{{form.assetHouseArea}}">
@@ -123,7 +123,7 @@
 					</picker>
 				</view>
 			</view>
-			<view class="block">
+			<view class="block" wx:if="{{assetHouseLabel!='租房'}}">
 				<view class='left' style="width:35%">房子有贷款没</view>
 				<view class='right' style="width:65%">
 					<picker bindchange="assetHouseLoanPickerChange" range="{{assetHouseLoanArr}}" name='assetHouseLoan' value="{{form.assetHouseLoan}}">
@@ -137,8 +137,8 @@
 				</view>
 			</view>
 			<view class="block">
-				<view class='left' style="width:35%">车子情况</view>
-				<view class='right' style="width:65%">
+				<view class='left' style="width:45%">这些年没少攒吧(车)</view>
+				<view class='right' style="width:55%">
 					<picker bindchange="assetCarPickerChange" range="{{assetCarArr}}" name='assetCar' value="{{form.assetCar}}">
 						<view wx:if="{{assetCarLabel}}">{{assetCarLabel}}</view>
 						<view wx:else class='placeStyle'>
@@ -149,7 +149,7 @@
 					</picker>
 				</view>
 			</view>
-			<view class="block">
+			<view class="block" wx:if="{{assetCarLabel!='无'}}">
 				<view class='left' style="width:35%">车子多钱啊</view>
 				<view class='right' style="width:65%">
 					<picker bindchange="assetCarValuePickerChange" range="{{assetCarValueArr}}" name='assetCarValue' value="{{form.assetCarValue}}">
@@ -162,7 +162,7 @@
 					</picker>
 				</view>
 			</view>
-			<view class="block">
+			<view class="block" wx:if="{{assetCarLabel!='无'}}">
 				<view class='left' style="width:35%">车子有贷款没</view>
 				<view class='right' style="width:65%">
 					<picker bindchange="assetCarLoanPickerChange" range="{{assetCarLoanArr}}" name='assetCarLoan' value="{{form.assetCarLoan}}">
@@ -176,15 +176,15 @@
 				</view>
 			</view>
 			<view class="block" style="height:160rpx;">
-				<view class='left' style="width:100%">啥时候方便我给你介绍个对象</view>
+				<view class='left' style="width:100%">啥时候方便我给你介绍个对象(多选)</view>
 				<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="index" 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>
+			<view class="block" style="height:280rpx;">
+				<view class='left' style="width:100%">卖命主旋律(多选)</view>
 				<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="index" wx:for="{{workStatusArr}}">
 						<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
@@ -289,7 +289,7 @@
 				</view>
 			</view>
 			<view class="block" style="height:260rpx;">
-				<view class='left' style="width:100%">家里有跟你争宠的没</view>
+				<view class='left' style="width:100%">家里有跟你争宠的没(多选)</view>
 				<checkbox-group class="parameter-wrap" bindchange="compositionChange" name='composition' value="{{form.composition}}">
 					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="index" wx:for="{{compositionArr}}">
 						<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
@@ -311,26 +311,14 @@
 					</picker>
 				</view>
 			</view>
-			<view class="block">
-				<view class='left' style="width:40%">喜欢铜鼓点啥</view>
-				<view class='right' style="width:60%">
-					<input name="hobby" value="{{form.hobby}}" bindblur="hobbyChange" placeholder="未填写" placeholder-class="iconfont icon-jianjiaohao1 icon-tubiaozhizuo-1"></input>
-				</view>
-			</view>
-			<!-- <view class="block" style="height:350rpx">
-				<view class='left' style="width:40%">上传一张您的照片吧</view>
-				<view class='right' style="width:59%;color:#656565;height:80rpx" bindtap="uploadPhoto">
-					<image wx:if='{{form.photoUrl}}' mode="aspectFit" src="{{form.photoUrl}}" style="width:200rpx;height:350rpx;"></image>
-					<view wx:else class='placeStyle'>
-						<view class="redpoint"></view>
-						<view class="placetext">未上传</view>
-						<van-icon size="15px" name="arrow" />
-					</view>
-				</view>
+			<view class="block" style="height:260rpx;">
+				<view class='left' style="width:100%">喜欢铜鼓点啥(多选  )</view>
+					<checkbox-group class="parameter-wrap" bindchange="hobbyChange" name='hobby' value="{{form.hobby}}">
+					<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="index" wx:for="{{hobbyArr}}">
+						<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
+					</label>
+				</checkbox-group>
 			</view>
-			<view style="display:none">
-			<input name='photoUrl' value="{{form.photoUrl}}"></input>
-			</view> -->
-			<button form-type="submit" id="sunbmit">确认,去填写择偶意向</button>
+			<button form-type="submit" id="sunbmit">提交个人详细信息</button>
 		</form>
 	</view>

+ 61 - 30
pages/personal/personal.js

@@ -20,16 +20,21 @@ Page({
         img: '../../images/icon4.png',
         url: ''
       },
-      //  {
-      //   name: '投诉',
-      //   img: '../../images/icon5.png',
-      //   url: '/pages/complaint/complaint'
+      // {
+      //   name: '增加权益',
+      //   img: '../../images/icon7.png',
+      //   url: '/pages/addRights/addRights'
       // }, 
       {
         name: '推荐好友',
         img: '../../images/icon6.png',
         url: '/pages/share/share'
-      }
+      },
+      // {
+      //   name: '我的订单',
+      //   img: '../../images/icon8.png',
+      //   url: '/pages/paylists/paylists'
+      // }
     ]
   },
   goTab(e) {
@@ -37,6 +42,11 @@ Page({
       url: e.currentTarget.dataset.src
     })
   },
+  goIndex() {
+    wx.redirectTo({
+      url: '/pages/index/index',
+    })
+  },
   onShareAppMessage: function (options) {
     console.log(options)
     var that = this;
@@ -69,9 +79,6 @@ Page({
     // 返回shareObj
     return shareObj;
   },
-  /**
-   * 生命周期函数--监听页面加载
-   */
   bindGetUserInfo: function (e) {
     console.log(e.detail.userInfo)
     this.setData({
@@ -79,28 +86,33 @@ Page({
       avatarUrl: e.detail.userInfo.avatarUrl
     })
     this.upload(e.detail.userInfo.nickName, e.detail.userInfo.avatarUrl);
-    // 直接跳转页面(拒绝了授权)
-    // wx.reLaunch({
-    //   url: '/pages/menu/homePage/homePage',
-    // })
   },
   getNick() {
-    wx.getSetting({
-      success: (res) => {
-        if (res.authSetting['scope.userInfo']) {
-          wx.getUserInfo({
-            success: (res) => {
-              this.setData({
-                nick: res.userInfo.nickName,
-                avatarUrl: res.userInfo.avatarUrl
-              })
-            }
-          })
-        } else {
-          console.log(res)
-        }
-      }
-    })
+    // if (wx.getStorageSync('nick') && wx.getStorageSync('avatarUrl')) {
+    //   this.setData({
+    //     nick: wx.getStorageSync('nick'),
+    //     avatarUrl: wx.getStorageSync('avatarUrl')
+    //   })
+    // } else {
+    // wx.getSetting({
+    //   success: (res) => {
+    //     if (res.authSetting['scope.userInfo']) {
+    //       wx.getUserInfo({
+    //         success: (res) => {
+    //           this.setData({
+    //             nick: res.userInfo.nickName,
+    //             avatarUrl: res.userInfo.avatarUrl
+    //           })
+    //           wx.setStorageSync('nick', res.userInfo.nickName)
+    //           wx.setStorageSync('avatarUrl', res.userInfo.avatarUrl)
+    //         }
+    //       })
+    //     } else {
+    //       console.log(res)
+    //     }
+    //   }
+    // })
+    // }
   },
   upload(nickName, avatar) {
     const form = {
@@ -179,17 +191,36 @@ Page({
     // console.log(e.detail.iv)
     // console.log(e.detail.encryptedData)
   },
+  getInfos() {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/info',
+      method: "get",
+      success: (res) => {
+        console.log(res, '我是获取的信息')
+        if (res.data.code == 0) {
+          if (res.data.info.nickName && res.data.info.avatar) {
+            this.setData({
+              nick: res.data.info.nickName,
+              avatarUrl: res.data.info.avatar
+            })
+            wx.setStorageSync('nick', res.data.info.nickName)
+            wx.setStorageSync('avatarUrl', res.data.info.avatar)
+          }
+        }
+      }
+    })
+  },
   async onShow() {
     tool.openidStatus().then(result => {
       this.setData({
         openid: result[0],
         sessionkey: result[1]
       })
-      this.getNick();
+      // this.getNick();
+      this.getInfos();
       this.getTimes();
     })
   },
-
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 14 - 1
pages/personal/personal.wxml

@@ -7,7 +7,6 @@
 			<button wx:else open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo" id="login_btn">
 				[点击登陆账户]
 			</button>
-			<!-- <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button> -->
 		</view>
 	</view>
 	<view class="middle">
@@ -16,4 +15,18 @@
 			<view style="color:#6f7582;font-size:30rpx;margin-left:30rpx">{{item.name}}</view>
 		</view>
 	</view>
+</view>
+<view class="tabbar">
+	<view class="tab1" bindtap="goIndex">
+		<image src="../../images/unactive_bar1.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+		<view >首页</view>
+	</view>
+	<view class="tab1">
+		<image src="../../images/unactive_bar2.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+		<button type="primary" id="red" session-from="nickName={{userInfo.nickName}}|avatarUrl={{userInfo.avatarUrl}}" open-type="contact">客服</button>
+	</view>
+	<view class="tab1" bindtap="goMy">
+		<image src="../../images/active_bar3.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+		<view style="color:#a342ff">我的</view>
+	</view>
 </view>

+ 39 - 2
pages/personal/personal.wxss

@@ -1,8 +1,12 @@
 .bj {
+ 
+  margin-bottom: 150rpx;
+  /* height: 100vh; */
+}
+page {
   background: #fafafa;
-  height: 100vh;
+  padding-bottom:1rpx;
 }
-
 .top {
   width: 750rpx;
   height: 380rpx;
@@ -65,4 +69,37 @@
 }
 #login_btn{
   background: rgba(0,0,0,0);
+}
+.tabbar {
+  width: 750rpx;
+  box-shadow: 0px 0px 10px rgba(0, 0, 0, .4);
+  /* border: 1px solid #999; */
+  height: 100rpx;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  display: flex;
+  font-size: 28rpx;
+  background: #fff;
+  z-index: 999;
+}
+
+.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;
 }

+ 1 - 1
pages/registrationSuccess/registrationSuccess.js

@@ -12,7 +12,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-
+   
   },
 
   /**

+ 1 - 1
pages/registrationSuccess/registrationSuccess.wxml

@@ -1,5 +1,5 @@
 <view style="text-align:center;line-height:60rpx">
 <image src='../../images/gou.png' class='img1'></image>
 <view>报名成功</view>
-<view>请按照活动时间到达现场</view>
+<view>请留意审核消息</view>
 <image src='../../images/di.png' class='img2'></image></view>

+ 77 - 89
pages/share/share.js

@@ -1,114 +1,102 @@
 const app = require('../../utils/util.js');
+const tool = require('../../utils/tool.js');
 Page({
   data: {
     codeImg: '../../images/ewm.png',
     bj: '../../images/ewmbj.png'
   },
   save() {
+    console.log('我调取save了')
     wx.saveImageToPhotosAlbum({
       filePath: this.data.imagePath,
-      success:(data)=> {
-        console.log(data)
-        let fileMgr = wx.getFileSystemManager()
-        fileMgr.unlink({
-          filePath: this.data.imagePath,
-          success() {
-            wx.showToast({
-              title: '已保存',
-              duration: 2000
-            })
-          }
+      success(res) {
+        wx.showToast({
+          title: '图片保存成功!',
+          icon: 'none'
         })
       },
-      fail(err) {
-        if (err.errMsg === "saveImageToPhotosAlbum:fail:auth denied" || err.errMsg === "saveImageToPhotosAlbum:fail auth deny" || err.errMsg === "saveImageToPhotosAlbum:fail authorize no response") {
-          wx.showModal({
-            title: '提示',
-            content: '需要您授权保存相册',
-            showCancel: false,
-            success: modalSuccess => {
-              wx.openSetting({
-                success(settingdata) {
-                  if (settingdata.authSetting['scope.writePhotosAlbum']) {
-                    console.log('获取权限成功,给出再次点击图片保存到相册的提示。')
-                  } else {
-                    console.log('获取权限失败,给出不给权限就无法正常使用的提示')
-                  }
-                }
-              })
-            }
-          })
+      fail: (res) => {
+        console.log(res)
+        if (res.errMsg === "saveImageToPhotosAlbum:fail auth deny" || res.errMsg === "saveImageToPhotosAlbum:fail:auth denied") {
+          this.doAuth()
         }
       }
     })
   },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function (options) {
-    wx.showLoading();
-    console.log('1111111')
-    const ctx = wx.createCanvasContext('myCanvasId');
-    ctx.drawImage(this.data.bj, 0, 0, 302, 256); //里面的参数无非就是图片放置的位置即图片的横纵坐标,图片的宽高
-    ctx.drawImage(this.data.codeImg, 88, 114, 114, 114);
-    ctx.draw();
-    this.save();
-    setTimeout(() => {
-      wx.canvasToTempFilePath({
-        canvasId: 'myCanvasId',
-        success: (res) => {
-          var tempFilePath = res.tempFilePath;
-          this.setData({
-            imagePath: tempFilePath
+  // 获取授权
+  doAuth() {
+    wx.showModal({
+      title: '获取授权',
+      content: '您是否同意重新授权保存图片',
+      cancelText: '不同意',
+      confirmText: '同意',
+      confirmColor: '#21c0ae',
+      success: function (res) {
+        if (res.confirm) { // 点击确认
+          wx.openSetting({
+            success(settingdata) {
+              if (settingdata.authSetting["scope.writePhotosAlbum"]) {
+                console.log("获取权限成功,再次点击图片保存到相册")
+              } else {
+                console.log("获取权限失败")
+              }
+            },
+            fail: function (res) {
+              console.log(res)
+            }
           })
-          wx.hideLoading();
-        },
-        fail: (res) => {
-          console.log(res);
-          wx.hideLoading();
         }
-      });
-    }, 200);
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow: function () {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide: function () {
-
-  },
-  onUnload: function () {
-
+      }
+    })
   },
-  onPullDownRefresh: function () {
-
+  getEwm() {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/share',
+      method: "get",
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res.data.qrcode, '我是获取的二维码')
+          this.draw(res.data.qrcode);
+        }
+      }
+    })
   },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom: function () {
+  draw(qrcode) {
+    wx.downloadFile({
+      url: qrcode,
+      success: (res) => {
+        const ctx = wx.createCanvasContext('myCanvasId');
+        ctx.drawImage(this.data.bj, 0, 0, 302, 256); //里面的参数无非就是图片放置的位置即图片的横纵坐标,图片的宽高
+        ctx.drawImage(res.tempFilePath, 88, 114, 114, 114);
+        ctx.draw();
+        setTimeout(() => {
+          wx.canvasToTempFilePath({
+            canvasId: 'myCanvasId',
+            success: (res) => {
+              var tempFilePath = res.tempFilePath;
+              this.setData({
+                imagePath: tempFilePath
+              })
+            },
+            fail: (res) => {
+              console.log(res);
+            }
+          });
+        }, 200);
+      }
+    })
 
   },
-
   /**
-   * 用户点击右上角分享
+   * 生命周期函数--监听页面加载
    */
-  onShareAppMessage: function () {
-
+  onLoad: function (options) {
+    tool.openidStatus().then(result => {
+      this.setData({
+        openid: result[0],
+        sessionkey: result[1]
+      })
+      this.getEwm();
+    })
   }
 })

+ 0 - 3
pages/share/share.wxml

@@ -1,7 +1,4 @@
 <view style="position:relative">
-	<!-- <image src='{{bj}}' style="width:604rpx;height:512rpx;margin:100rpx 73rpx" />
-	<image src="{{codeImg}}" style="position:absolute;top:328rpx;left:248rpx;width:220rpx;height:220rpx;"/> -->
-
 	<canvas canvas-id="myCanvasId" style="width:604rpx;height:512rpx;margin:100rpx auto 30rpx auto;"></canvas>
 	<button id="sunbmit" bindtap="save">保存二维码</button>
 </view>

+ 47 - 7
pages/sign/sign.js

@@ -1,15 +1,55 @@
+const tool = require('../../utils/tool.js');
+const app = require('../../utils/util.js');
 Page({
   data: {
 
   },
-  go(){
-
-  }, 
-  /**
-   * 生命周期函数--监听页面加载
-   */
+  go() {
+    wx.navigateTo({
+      url: '/pages/onSiteActivity/onSiteActivity',
+    })
+  },
+  getNum() {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.activeId + '/members',
+      method: "get",
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res.data.members, '我获取人员名单')
+          for (let i = 0; i < res.data.members.length; i++) {
+            if (res.data.members[i].openId == this.data.openid) {
+              this.setData({
+                myNum: res.data.members[i].activeNumber
+              })
+            }
+          }
+        }
+      }
+    })
+  },
+  sign(){
+    // /wx/actives/{openId}/{activeId}/sign
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/actives/' + this.data.openid + '/' + this.data.activeId + '/sign',
+      method: "get",
+      success: (res) => {
+        if (res.data.code == 0) {
+          console.log(res.data, '我签到成功了');
+          this.getNum();
+        }
+      }
+    })
+  },
   onLoad: function (options) {
-
+    console.log(options)
+    tool.openidStatus().then(result => {
+      this.setData({
+        openid: result[0],
+        sessionkey: result[1],
+        activeId:options.id
+      })
+      this.sign();
+    })
   },
 
   /**

+ 9 - 3
pages/sign/sign.wxml

@@ -1,3 +1,9 @@
-<!--pages/sign/sign.wxml-->
-<text>签到成功 您的号码是1号</text>
-<button bindtap="go">进入现场活动</button>
+
+<!-- <text>签到成功 您的号码是1号</text>
+<button bindtap="go">进入现场活动</button> -->
+<view style="text-align:center;line-height:60rpx">
+<image src='../../images/gou.png' class='img1'></image>
+<view>签到成功</view>
+<view>您的号码牌是{{myNum}}号</view>
+<button bindtap="go" id="go">进入现场活动</button>
+<image src='../../images/di.png' class='img2'></image></view>

+ 23 - 1
pages/sign/sign.wxss

@@ -1 +1,23 @@
-/* pages/sign/sign.wxss */
+.img1{
+  width: 524rpx;
+  height: 524rpx;
+  margin:0rpx 113rpx
+}
+.img2{
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 750rpx;
+  height: 300rpx;
+}
+#go{
+  width:500rpx;
+  background: -webkit-linear-gradient(left, #bd64ff, #8873ff);
+  color: #fff;
+  height: 90rpx!important;
+  line-height: 60rpx!important;
+  border-radius: 50rpx!important;
+  font-weight: normal!important;
+  margin: 75rpx 125rpx;
+  font-size: 30rpx;
+}

+ 242 - 142
pages/targetInfo/targetInfo.js

@@ -14,10 +14,10 @@ Page({
       marriage: '',
       assetHouse: '',
       assetHouseArea: '',
-      assetHouseLoan: '',
+      // assetHouseLoan: '',
       assetCar: '',
       assetCarValue: '',
-      assetCarLoan: '',
+      // assetCarLoan: '',
       constellation: '',
       workStatus: '',
       companyNature: '',
@@ -28,19 +28,19 @@ Page({
     },
     educationArr: [],
     incomeArr: [],
-    nativePlaceArr: ['外地', '本地', '咋的都行'],
-    marriageArr: ["不行", "行", '咋的都行'],
+    nativePlaceArr: [],
+    marriageArr: [],
     constellationArr: [],
     workStatusArr: [],
     assetHouseArr: ['租房', '购房', '咋的都行'],
     assetHouseAreaArr: [],
-    assetHouseLoanArr: ['有', '没有', '咋的都行'],
-    assetCarArr: ['有', '没有', '咋的都行'],
+    // assetHouseLoanArr: ['有', '没有', '咋的都行'],
+    assetCarArr: ['咋的都行','有', '没有'],
     assetCarValueArr: [],
-    assetCarLoanArr: ['不行', '行', '咋的都行'],
+    // assetCarLoanArr: ['不行', '行', '咋的都行'],
     companyNatureArr: [],
     parentAssetsArr: [],
-    compositionArr: ['老几都行', '必须独苗一根'],
+    compositionArr: [],
     isCommonArr: ['愿意', '不愿意', '咋的都行']
   },
   ageMinChange(e) {
@@ -84,24 +84,16 @@ Page({
   nativePlacePicker(e) {
     let nativePlace = 'form.nativePlace';
     this.setData({
-      nativePlaceLabel: this.data.nativePlaceArr[e.detail.value]
+      nativePlaceLabel: this.data.nativePlaceArr[e.detail.value],
+      [nativePlace]: this.data.nativePlaceArrValue[e.detail.value],
     })
-    if (e.detail.value != 2) {
-      this.setData({
-        [nativePlace]: e.detail.value
-      })
-    }
   },
   marriageChange(e) {
     let marriage = 'form.marriage';
     this.setData({
-      marriageLabel: this.data.marriageArr[e.detail.value]
+      marriageLabel: this.data.marriageArr[e.detail.value],
+      [marriage]: this.data.marriageArrValue[e.detail.value]
     })
-    if (e.detail.value != 2) {
-      this.setData({
-        [marriage]: e.detail.value
-      })
-    }
   },
   assetHousePickerChange(e) {
     let assetHouse = 'form.assetHouse';
@@ -121,27 +113,30 @@ Page({
       [assetHouseArea]: this.data.assetHouseAreaArrValue[e.detail.value]
     })
   },
-  assetHouseLoanPickerChange(e) {
-    let assetHouseLoan = 'form.assetHouseLoan';
-    this.setData({
-      assetHouseLoanLabel: this.data.assetHouseLoanArr[e.detail.value]
-    })
-    if (e.detail.value != 2) {
-      this.setData({
-        [assetHouseLoan]: e.detail.value
-      })
-    }
-  },
+  // assetHouseLoanPickerChange(e) {
+  //   let assetHouseLoan = 'form.assetHouseLoan';
+  //   this.setData({
+  //     assetHouseLoanLabel: this.data.assetHouseLoanArr[e.detail.value]
+  //   })
+  //   if (e.detail.value != 2) {
+  //     this.setData({
+  //       [assetHouseLoan]: e.detail.value
+  //     })
+  //   }
+  // },
   assetCarPickerChange(e) {
+    console.log(e.detail.value)
+    console.log(this.data.assetCarArr[e.detail.value])
     let assetCar = 'form.assetCar';
     this.setData({
-      assetCarLabel: this.data.assetCarArr[e.detail.value]
+      assetCarLabel: this.data.assetCarArr[e.detail.value],
+      [assetCar]: e.detail.value
     })
-    if (e.detail.value != 2) {
-      this.setData({
-        [assetCar]: e.detail.value
-      })
-    }
+    // if (e.detail.value != 2) {
+    //   this.setData({
+    //     [assetCar]: e.detail.value
+    //   })
+    // }
   },
   assetCarValuePickerChange(e) {
     let assetCarValue = 'form.assetCarValue'
@@ -150,17 +145,17 @@ Page({
       [assetCarValue]: this.data.assetCarValueArrValue[e.detail.value]
     })
   },
-  assetCarLoanPickerChange(e) {
-    let assetCarLoan = 'form.assetCarLoan';
-    this.setData({
-      assetCarLoanLabel: this.data.assetCarLoanArr[e.detail.value]
-    })
-    if (e.detail.value != 2) {
-      this.setData({
-        [assetCarLoan]: e.detail.value
-      })
-    }
-  },
+  // assetCarLoanPickerChange(e) {
+  //   let assetCarLoan = 'form.assetCarLoan';
+  //   this.setData({
+  //     assetCarLoanLabel: this.data.assetCarLoanArr[e.detail.value]
+  //   })
+  //   if (e.detail.value != 2) {
+  //     this.setData({
+  //       [assetCarLoan]: e.detail.value
+  //     })
+  //   }
+  // },
   constellationPicker(e) {
     console.log(e.detail.value)
     const items = this.data.constellationArr;
@@ -200,10 +195,27 @@ Page({
     })
   },
   companyNaturePicker: function (e) {
+    // let companyNature = 'form.companyNature'
+    // this.setData({
+    //   companyNatureLabel: this.data.companyNatureArr[e.detail.value],
+    //   [companyNature]: this.data.companyNatureArrValue[e.detail.value]
+    // })
+    console.log(e.detail.value)
+    const items = this.data.companyNatureArr;
+    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
+        }
+      }
+    }
     let companyNature = 'form.companyNature'
     this.setData({
-      companyNatureLabel: this.data.companyNatureArr[e.detail.value],
-      [companyNature]: this.data.companyNatureArrValue[e.detail.value]
+      companyNatureArr: this.data.companyNatureArr,
+      [companyNature]: e.detail.value
     })
   },
   parentAssetsPicker(e) {
@@ -216,8 +228,8 @@ Page({
   compositionPicker(e) {
     let composition = 'form.composition'
     this.setData({
-      [composition]: e.detail.value,
-      compositionLabel: this.data.compositionArr[e.detail.value],
+      [composition]: this.data.compositionArrValue[e.detail.value],
+      compositionLabel: this.data.compositionArr[e.detail.value]
     })
   },
   isCommonPicker(e) {
@@ -228,53 +240,53 @@ Page({
     })
   },
   getInfos() {
+    wx.showLoading();
     wx.request({
       url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/standard',
       method: "get",
       success: (res) => {
         console.log(res.data.standard, '我是获取的信息')
-      
-          let ageMin = 'form.ageMin';
-          let ageMax = 'form.ageMax';
-          let heightMin = 'form.heightMin';
-          let heightMax = 'form.heightMax';
-          let income = 'form.income';
-          let nativePlace = 'form.nativePlace';
-          let education = 'form.education';
-          let marriage = 'form.marriage';
-          let assetHouse = 'form.assetHouse';
-          let assetHouseArea = 'form.assetHouseArea';
-          let assetHouseLoan = 'form.assetHouseLoan';
-          let assetCar = 'form.assetCar';
-          let assetCarValue = 'form.assetCarValue';
-          let assetCarLoan = 'form.assetCarLoan';
-          let constellation = 'form.constellation';
-          let workStatus = 'form.workStatus';
-          let companyNature = 'form.companyNature';
-          let composition = 'form.composition';
-          let parentAssets = 'form.parentAssets';
-          let isCommon = 'form.isCommon';
-          let id = 'form.id'
-          if (res.data.standard) {
+        let ageMin = 'form.ageMin';
+        let ageMax = 'form.ageMax';
+        let heightMin = 'form.heightMin';
+        let heightMax = 'form.heightMax';
+        let income = 'form.income';
+        let nativePlace = 'form.nativePlace';
+        let education = 'form.education';
+        let marriage = 'form.marriage';
+        let assetHouse = 'form.assetHouse';
+        let assetHouseArea = 'form.assetHouseArea';
+        // let assetHouseLoan = 'form.assetHouseLoan';
+        let assetCar = 'form.assetCar';
+        let assetCarValue = 'form.assetCarValue';
+        // let assetCarLoan = 'form.assetCarLoan';
+        let constellation = 'form.constellation';
+        let workStatus = 'form.workStatus';
+        let companyNature = 'form.companyNature';
+        let composition = 'form.composition';
+        let parentAssets = 'form.parentAssets';
+        let isCommon = 'form.isCommon';
+        let id = 'form.id'
+        if (res.data.standard) {
           this.setData({
             [ageMin]: res.data.standard.ageMin,
             [ageMax]: res.data.standard.ageMax,
             [heightMin]: res.data.standard.heightMin,
             [heightMax]: res.data.standard.heightMax,
-            nativePlaceLabel: this.data.nativePlaceArr[res.data.standard.nativePlace],
-            [nativePlace]: res.data.standard.nativePlace,
-            marriageLabel: this.data.marriageArr[res.data.standard.marriage],
-            [marriage]: res.data.standard.marriage,
+            // nativePlaceLabel: this.data.nativePlaceArr[res.data.standard.nativePlace],
+            // [nativePlace]: res.data.standard.nativePlace,
+            // marriageLabel: this.data.marriageArr[res.data.standard.marriage],
+            // [marriage]: res.data.standard.marriage,
             assetHouseLabel: this.data.assetHouseArr[res.data.standard.assetHouse],
             [assetHouse]: res.data.standard.assetHouse,
             assetHouseAreaLabel: this.data.assetHouseAreaArr[res.data.standard.assetHouseArea],
             [assetHouseArea]: res.data.standard.assetHouseArea,
-            assetHouseLoanLabel: this.data.assetHouseLoanArr[res.data.standard.assetHouseLoan],
-            [assetHouseLoan]: res.data.standard.assetHouseLoan,
+            // assetHouseLoanLabel: this.data.assetHouseLoanArr[res.data.standard.assetHouseLoan],
+            // [assetHouseLoan]: res.data.standard.assetHouseLoan,
             assetCarLabel: this.data.assetCarArr[res.data.standard.assetCar],
             [assetCar]: res.data.standard.assetCar,
-            assetCarLoanLabel: this.data.assetCarLoanArr[res.data.standard.assetCarLoan],
-            [assetCarLoan]: res.data.standard.assetCarLoan,
+            // assetCarLoanLabel: this.data.assetCarLoanArr[res.data.standard.assetCarLoan],
+            // [assetCarLoan]: res.data.standard.assetCarLoan,
             compositionLabel: this.data.compositionArr[res.data.standard.composition],
             [composition]: res.data.standard.composition,
             isCommonLabel: this.data.isCommonArr[res.data.standard.isCommon],
@@ -282,15 +294,47 @@ Page({
             [id]: res.data.standard.id
           })
         }
-        tool.formDetails('he_education').then(result => {
+        tool.formDetails('he_is_no').then(result => {
+          this.setData({
+            nativePlaceArr: ['咋的都行'].concat(result[0]),
+            nativePlaceArrValue: ['0'].concat(result[1]),
+          })
+          if (res.data.standard.nativePlace) {
+            for (let i = 0; i < ['0'].concat(result[1]).length; i++) {
+              if (res.data.standard.nativePlace == ['0'].concat(result[1])[i]) {
+                this.setData({
+                  nativePlaceLabel: ['咋的都行'].concat(result[0])[i],
+                  [nativePlace]: res.data.standard.nativePlace
+                })
+              }
+            }
+          }
+        })
+        tool.formDetails('he_divorce').then(result => {
           console.log(result)
           this.setData({
-            educationArr: ['咋的都行'].concat(result[0]),
-            educationArrValue: [''].concat(result[1]),
+            marriageArr: ['咋的都行'].concat(result[0]),
+            marriageArrValue: ['0'].concat(result[1]),
           })
-          if (res.data.standard) {
+          if (res.data.standard.marriage) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
-              if (res.data.standard.education == [''].concat(result[1])[i]) {
+              if (res.data.standard.marriage == ['0'].concat(result[1])[i]) {
+                this.setData({
+                  marriageLabel: ['咋的都行'].concat(result[0])[i],
+                  [marriage]: res.data.standard.marriage
+                })
+              }
+            }
+          }
+        })
+        tool.formDetails('he_education').then(result => {
+          this.setData({
+            educationArr: ['咋的都行'].concat(result[0]),
+            educationArrValue: ['0'].concat(result[1]),
+          })
+          if (res.data.standard.education) {
+            for (let i = 0; i < ['0'].concat(result[1]).length; i++) {
+              if (res.data.standard.education == ['0'].concat(result[1])[i]) {
                 this.setData({
                   educationLabel: ['咋的都行'].concat(result[0])[i],
                   [education]: res.data.standard.education
@@ -302,11 +346,11 @@ Page({
         tool.formDetails('he_income').then(result => {
           this.setData({
             incomeArr: ['咋的都行'].concat(result[0]),
-            incomeArrValue: [''].concat(result[1])
+            incomeArrValue: ['0'].concat(result[1])
           })
           if (res.data.standard) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
-              if (res.data.standard.income == [''].concat(result[1])[i]) {
+              if (res.data.standard.income == ['0'].concat(result[1])[i]) {
                 this.setData({
                   incomeLabel: ['咋的都行'].concat(result[0])[i],
                   [income]: res.data.standard.income
@@ -318,11 +362,11 @@ Page({
         tool.formDetails('he_asset_house_area').then(result => {
           this.setData({
             assetHouseAreaArr: ['咋的都行'].concat(result[0]),
-            assetHouseAreaArrValue: [''].concat(result[1])
+            assetHouseAreaArrValue: ['0'].concat(result[1])
           })
           if (res.data.standard) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
-              if (res.data.standard.assetHouseArea == [''].concat(result[1])[i]) {
+              if (res.data.standard.assetHouseArea == ['0'].concat(result[1])[i]) {
                 this.setData({
                   assetHouseAreaLabel: ['咋的都行'].concat(result[0])[i],
                   [assetHouseArea]: res.data.standard.assetHouseArea
@@ -334,11 +378,11 @@ Page({
         tool.formDetails('he_asset_car_value').then(result => {
           this.setData({
             assetCarValueArr: ['咋的都行'].concat(result[0]),
-            assetCarValueArrValue: [''].concat(result[1])
+            assetCarValueArrValue: ['0'].concat(result[1])
           })
           if (res.data.standard) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
-              if (res.data.standard.assetCarValue == [''].concat(result[1])[i]) {
+              if (res.data.standard.assetCarValue == ['0'].concat(result[1])[i]) {
                 this.setData({
                   assetCarValueLabel: ['咋的都行'].concat(result[0])[i],
                   [assetCarValue]: res.data.standard.assetCarValue
@@ -421,21 +465,56 @@ Page({
             workStatusArr: workStatusArr,
             workStatusArrLabel: result[0],
             workStatusArrValue: result[1],
-
           })
-
         })
         tool.formDetails('he_company_nature').then(result => {
+          let companyNatureArr = result[0].map((item, index) => {
+            return Object.assign({}, {
+              'name': item,
+              'value': item,
+              'checked': false
+            })
+          })
+          if (res.data.standard.companyNature) {
+            let rescompanyNature = res.data.standard.companyNature.split(",");
+            let recompanyNatureIndexArr = [];
+            for (let i = 0; i < rescompanyNature.length; i++) {
+              for (let j = 0; j < result[1].length; j++) {
+                if (rescompanyNature[i] == result[1][j]) {
+                  recompanyNatureIndexArr.push(i)
+                }
+              }
+            }
+            let rescompanyNatureLabel = [];
+            for (let i = 0; i < recompanyNatureIndexArr.length; i++) {
+              rescompanyNatureLabel.push(result[0][recompanyNatureIndexArr[i]])
+            }
+            for (let i = 0; i < rescompanyNatureLabel.length; i++) {
+              if (rescompanyNatureLabel[i] == companyNatureArr[i].value) {
+                companyNatureArr[i].checked = true;
+              }
+            }
+            this.setData({
+              [companyNature]: rescompanyNatureLabel
+            })
+          }
           this.setData({
-            companyNatureArr: result[0],
-            companyNatureArrValue: result[1]
+            companyNatureArr: companyNatureArr,
+            companyNatureArrLabel: result[0],
+            companyNatureArrValue: result[1],
           })
-          if (res.data.standard) {
+        })
+        tool.formDetails('he_composition_agree').then(result => {
+          this.setData({
+            compositionArr: ['咋的都行'].concat(result[0]),
+            compositionArrValue: ['0'].concat(result[1])
+          })
+          if (res.data.standard.composition) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
-              if (res.data.standard.companyNature == [''].concat(result[1])[i]) {
+              if (res.data.standard.composition == ['0'].concat(result[1])[i]) {
                 this.setData({
-                  companyNatureLabel: ['咋的都行'].concat(result[0])[i],
-                  [companyNature]: res.data.standard.companyNature
+                  compositionLabel: ['咋的都行'].concat(result[0])[i],
+                  [composition]: res.data.standard.composition
                 })
               }
             }
@@ -444,11 +523,11 @@ Page({
         tool.formDetails('he_parent_assets').then(result => {
           this.setData({
             parentAssetsArr: ['咋的都行'].concat(result[0]),
-            parentAssetsArrValue: [''].concat(result[1])
+            parentAssetsArrValue: ['0'].concat(result[1])
           })
           if (res.data.standard) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
-              if (res.data.standard.parentAssets == [''].concat(result[1])[i]) {
+              if (res.data.standard.parentAssets == ['0'].concat(result[1])[i]) {
                 this.setData({
                   parentAssetsLabel: ['咋的都行'].concat(result[0])[i],
                   [parentAssets]: res.data.standard.parentAssets
@@ -457,20 +536,23 @@ Page({
             }
           }
         })
-
+      },
+      complete: () => {
+        wx.hideLoading()
       }
     })
   },
   formSubmit(e) {
     const params = e.detail.value
     //校验表单
-    // if (!this.WxValidate.checkForm(params)) {
-    //   const error = this.WxValidate.errorList[0]
-    //   this.showModal(error)
-    //   return false
-    // }
+    if (!this.WxValidate.checkForm(params)) {
+      const error = this.WxValidate.errorList[0]
+      this.showModal(error)
+      return false
+    }
     let constellation = 'form.constellation'
     let workStatus = 'form.workStatus'
+    let companyNature='form.companyNature'
     let indexArr = [];
     for (let i = 0; i < params.constellation.length; i++) {
       indexArr.push(this.data.constellationArrLabel.indexOf(params.constellation[i]))
@@ -497,9 +579,23 @@ Page({
       str2 += value2[i] + ','
     }
 
+    let indexArr3 = [];
+    for (let i = 0; i < params.companyNature.length; i++) {
+      indexArr3.push(this.data.companyNatureArrLabel.indexOf(params.companyNature[i]))
+    }
+    let value3 = [];
+    for (let i = 0; i < indexArr3.length; i++) {
+      value3.push(this.data.companyNatureArrValue[indexArr3[i]])
+    }
+    let str3 = '';
+    for (let i = 0; i < value3.length; i++) {
+      str3 += value3[i] + ','
+    }
+
     this.setData({
       [constellation]: str.slice(0, str.length - 1),
-      [workStatus]: str2.slice(0, str2.length - 1)
+      [workStatus]: str2.slice(0, str2.length - 1),
+      [companyNature]:str3.slice(0, str3.length - 1)
     })
     console.log(this.data.form)
     wx.request({
@@ -517,7 +613,7 @@ Page({
             showCancel: false,
             success(res) {
               if (res.confirm) {
-                wx.switchTab({
+                wx.redirectTo({
                   url: '/pages/index/index',
                 })
               }
@@ -566,18 +662,18 @@ Page({
       assetHouseArea: {
         required: true
       },
-      assetHouseLoan: {
-        required: true
-      },
+      // assetHouseLoan: {
+      //   required: true
+      // },
       assetCar: {
         required: true
       },
       assetCarValue: {
         required: true
       },
-      assetCarLoan: {
-        required: true
-      },
+      // assetCarLoan: {
+      //   required: true
+      // },
       constellation: {
         required: true
       },
@@ -599,69 +695,73 @@ Page({
     }
     const messages = {
       ageMin: {
-        required: '请输入您能接受的最小年纪'
+        required: '请输入您能接受的最小年纪'
       },
       ageMax: {
-        required: '请输入您能接受的最大年纪'
+        required: '请输入您能接受的最大年纪'
       },
       heightMin: {
-        required: '请输入您能接受的最低身高'
+        required: '请输入您能接受的最低身高'
       },
       heightMax: {
-        required: '请输入您能接受的最高身高'
+        required: '请输入您能接受的最高身高'
       },
       education: {
-        required: '请输入您能接受的教育程度'
+        required: '请输入您能接受的教育程度'
       },
       income: {
-        required: '请选择您能接受的收入'
+        required: '请选择您能接受的收入'
       },
       nativePlace: {
-        required: '请选择本地或者外地'
+        required: '请选择本地或者外地'
       },
       marriage: {
-        required: '请选择您能接受的婚姻状态'
+        required: '请选择您能接受的婚姻状态'
       },
       assetHouse: {
-        required: '请选择您可以接受的房子状态'
+        required: '请选择您可以接受的房子状态'
       },
       assetHouseArea: {
-        required: '请选择您可以接受的房子面积'
-      },
-      assetHouseLoan: {
-        required: '请选择您可以接受的房子是否有贷款'
+        required: '请选择您可以接受的房子面积呦'
       },
+      // assetHouseLoan: {
+      //   required: '请选择您可以接受的房子是否有贷款'
+      // },
       assetCar: {
-        required: '请选择您可以接受的车子状态'
+        required: '请选择您可以接受的车子状态'
       },
       assetCarValue: {
-        required: '请选择您可以接受的车子价值'
-      },
-      assetCarLoan: {
-        required: '请选择您是否可以接受的车子有贷款'
+        required: '请选择您可以接受的车子价值呦'
       },
+      // assetCarLoan: {
+      //   required: '请选择您是否可以接受的车子有贷款'
+      // },
       constellation: {
-        required: '请选择您的优先选择星座'
+        required: '请选择您的优先选择星座'
       },
       workStatus: {
-        required: '请选择您能接受的工作状态'
+        required: '请选择您能接受的工作状态'
       },
       companyNature: {
-        required: '请选择您能接受的单位性质'
+        required: '请选择您能接受的单位性质'
       },
       parentAssets: {
-        required: '请选择您能接受的父母状态'
+        required: '请选择您能接受的父母经济状态'
       },
       composition: {
-        required: '请选择您可以接受的家庭构成'
+        required: '请选择您可以接受的家庭构成'
       },
       isCommon: {
-        required: '请选择您是否接受与父母同住'
+        required: '请选择您是否接受与父母同住'
       }
     }
     this.WxValidate = new WxValidate(rules, messages)
   },
   async onLoad(options) {
+
+    // tool.formDetails('he_composition_agree').then(result => {
+    //   console.log(result)
+    // })
     this.initValidate()
     tool.openidStatus().then(result => {
       this.setData({

+ 21 - 16
pages/targetInfo/targetInfo.wxml

@@ -45,7 +45,7 @@
 			</view>
 		</view>
 		<view class="block">
-			<view class='left' style="width:65%">人家住哪你还挑</view>
+			<view class='left' style="width:65%">人家必须是本地的么</view>
 			<view class='right' style="width:35%">
 				<picker bindchange="nativePlacePicker" range="{{nativePlaceArr}}" name='nativePlace' value="{{form.nativePlace}}">
 					<view style="text-align:right">
@@ -60,7 +60,7 @@
 			</view>
 		</view>
 		<view class="block">
-			<view class='left' style="width:60%">人家有个小绿本你能不能行</view>
+			<view class='left' style="width:60%">人家离过你行不</view>
 			<view class='right' style="width:40%">
 					<picker bindchange="marriageChange" range="{{marriageArr}}" name='marriage' value="{{form.marriage}}">
 					<view style="text-align:right">
@@ -104,7 +104,7 @@
 				</picker>
 			</view>
 		</view>
-		<view class="block">
+		<!-- <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}}">
@@ -118,7 +118,7 @@
 					</view>
 				</picker>
 			</view>
-		</view>
+		</view> -->
 		<view class="block">
 			<view class='left' style="width:35%">对车啥要求</view>
 			<view class='right' style="width:65%">
@@ -149,7 +149,7 @@
 				</picker>
 			</view>
 		</view>
-		<view class="block">
+		<!-- <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}}">
@@ -163,27 +163,32 @@
 					</view>
 				</picker>
 			</view>
-		</view>
+		</view> -->
 		<view class="block" style="height:440rpx;">
-			<view class='left' style="width:100%">人家什么星座你能行</view>
+			<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="index" 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>
+		<view class="block" style="height:340rpx;">
+			<view class='left' style="width:100%">人家什么节奏你不行(多选)</view>
 			<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="index" wx:for="{{workStatusArr}}">
 					<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
 				</label>
 			</checkbox-group>
 		</view>
-		<view class="block">
-			<view class='left' style="width:40%">人家什么阵地你能行</view>
-			<view class='right' style="width:60%">
-				<picker bindchange="companyNaturePicker" range="{{companyNatureArr}}" name='companyNature' value="{{form.companyNature}}">
+		<view class="block" style="height:320rpx">
+			<view class='left' style="width:100%">人家什么阵地你能行</view>
+			<!-- <view class='right' style="width:60%"> -->
+				<checkbox-group class="parameter-wrap" bindchange="companyNaturePicker" name='companyNature' value="{{form.companyNature}}">
+				<label class="checkbox my-choosebox {{ item.checked?'checkboxbox':''}}" wx:for-index="idx" wx:key="index" wx:for="{{companyNatureArr}}">
+					<checkbox value="{{item.value}}" checked="{{item.checked}}" />{{item.name}}
+				</label>
+			</checkbox-group>
+				<!-- <picker bindchange="companyNaturePicker" range="{{companyNatureArr}}" name='companyNature' value="{{form.companyNature}}">
 					<view style="text-align:right">
 						<view wx:if="{{companyNatureLabel}}">{{companyNatureLabel}}</view>
 						<view wx:else class='placeStyle'>
@@ -192,8 +197,8 @@
 							<van-icon size="15px" name="arrow" />
 						</view>
 					</view>
-				</picker>
-			</view>
+				</picker> -->
+			<!-- </view> -->
 		</view>
 		<view class="block">
 			<view class='left' style="width:65%">她/他是老几你能行</view>
@@ -241,7 +246,7 @@
 			</view>
 		</view>
 		<view class="btn-area">
-			<button form-type="submit" id="sunbmit">进入月合红娘</button>
+			<button form-type="submit" id="sunbmit">提交择偶信息</button>
 		</view>
 	</form>
 </view>

+ 44 - 42
utils/tool.js

@@ -4,29 +4,31 @@ const openidStatus = () => {
     // if (wx.getStorageSync('openId')) {
     //   resolve([wx.getStorageSync('openId'), wx.getStorageSync('sessionKey')]);
     // } else {
-    wx.login({
-      success: (res) => {
-        if (res.code) {
-          wx.request({
-            url: util.globalData.publicUrl + '/wx/user/wxbfa171fdd4000e03/login',
-            method: "GET",
-            data: {
-              code: res.code
-            },
-            success: res => {
-              console.log(res)
-              if (res.statusCode == 200) {
-                wx.setStorageSync('openId', res.data.openid)
-                wx.setStorageSync('sessionKey', res.data.sessionKey)
-                resolve([res.data.openid, res.data.sessionKey]);
+      wx.login({
+        success: (res) => {
+          if (res.code) {
+            wx.request({
+              url: util.globalData.publicUrl + '/wx/user/wxbfa171fdd4000e03/login',
+              method: "GET",
+              data: {
+                code: res.code
+              },
+              success: res => {
+                console.log(res.data.openid,'我是wx.login的openid')
+                console.log(res.data.sessionKey,'我是wx.login的sessionKey')
+                if (res.statusCode == 200) {
+                  wx.setStorageSync('openId', res.data.openid)
+                  wx.setStorageSync('sessionKey', res.data.sessionKey)
+                  resolve([res.data.openid, res.data.sessionKey]);
+                }
               }
-            }
-          });
-        } else {
-          reject(res.errMsg);
+            });
+          } else {
+            reject(res.errMsg);
+          }
         }
-      }
-    })
+      })
+    // }
   })
 };
 
@@ -96,26 +98,26 @@ const isFinishInfo = () => {
   })
 };
 const isFinishTargetInfo = () => {
-    return new Promise((resolve, reject) => {
-      wx.request({
-        url: util.globalData.publicUrl + '/wx/member/' + wx.getStorageSync('openId') + '/standard',
-        method: "get",
-        success: (res) => {
-          console.log(res)
-          if (res.data.code == 0) {
-            resolve(res.data.standard);
-          } else {
-            reject(res.data.code)
-          }
+  return new Promise((resolve, reject) => {
+    wx.request({
+      url: util.globalData.publicUrl + '/wx/member/' + wx.getStorageSync('openId') + '/standard',
+      method: "get",
+      success: (res) => {
+        console.log(res)
+        if (res.data.code == 0) {
+          resolve(res.data.standard);
+        } else {
+          reject(res.data.code)
         }
-      })
+      }
     })
-  };
-  module.exports = {
-    openidStatus,
-    formDetails,
-    formatTime,
-    isLogin,
-    isFinishInfo,
-    isFinishTargetInfo
-  }
+  })
+};
+module.exports = {
+  openidStatus,
+  formDetails,
+  formatTime,
+  isLogin,
+  isFinishInfo,
+  isFinishTargetInfo
+}