houwei 4 vuotta sitten
vanhempi
commit
22b41564a5

BIN
images/active_bar4.png


BIN
images/lb2.jpg


BIN
images/lb2.png


BIN
images/show.jpg


BIN
images/show.png


BIN
images/unactive_bar4.png


+ 1 - 0
pages/InfoType/InfoType.js

@@ -64,6 +64,7 @@ Page({
       }
     })
   },
+
   /**
    * 生命周期函数--监听页面加载
    */

+ 1 - 1
pages/InfoType/InfoType.json

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

+ 1 - 1
pages/InfoType/InfoType.wxml

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

+ 1 - 1
pages/InfoType/InfoType.wxss

@@ -26,4 +26,4 @@
   /* line-height: 80rpx; */
   margin-right: 20rpx;
   margin-top: 25rpx;
-}
+}

+ 76 - 42
pages/index/index.js

@@ -9,11 +9,13 @@ Page({
     isTargetInfo: false,
     letterStatus: true,
     lbArr: [{
-        src: '../../images/lb2.png'
-      },
-      // {src:'../../images/lb2.png'},
-      // {src:'../../images/lb2.png'}
-    ]
+      src: '../../images/lb2.jpg'
+    }],
+    userInfo: '',
+    ysf: {
+      title: '注册页',
+      config: ''
+    }
   },
   // 轮播
   handleChange: function (e) {
@@ -62,21 +64,8 @@ Page({
       success: (res) => {
         console.log(res)
         if (res.data.code == 0) {
-          console.log(res.data.actives)
-          // let deleteArr = []
-          // let primaryArr = []
-          // for (let i = 0; i < res.data.actives.length; i++) {
-          //   if (res.data.actives[i].activeStatus == -1) {
-          //     deleteArr.push(res.data.actives[i])
-          //     // res.data.actives.splice(i, 1);
-          //   }else{
-          //     primaryArr.push(res.data.actives[i])
-          //   }
-          // }
-          // console.log(primaryArr)
-          // console.log(deleteArr)
           this.setData({
-            arr:res.data.actives
+            arr: res.data.actives
           })
         }
       },
@@ -84,23 +73,11 @@ Page({
         wx.hideLoading();
       }
     })
-    // wx.request({
-    //   url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/actives',
-    //   method: "get",
-    //   data: {
-    //     activeStatus: 1
-    //   },
-    //   success: (res) => {
-    //     if (res.data.code == 0) {
-    //       this.setData({
-    //         arr1: res.data.actives
-    //       })
-    //     }
-    //   },
-    //   complete() {
-    //     wx.hideLoading();
-    //   }
-    // })
+  },
+  goInfo() {
+    wx.redirectTo({
+      url: '/pages/personInfo/personInfo',
+    })
   },
   goMy() {
     wx.redirectTo({
@@ -135,22 +112,79 @@ Page({
     }
     console.log(this.data.letterStatus)
   },
+  getInfos() {
+    wx.request({
+      url: app.globalData.publicUrl + '/wx/member/' + this.data.openid + '/info',
+      method: "get",
+      success: (res) => {
+        if (res.data.code == 0) {
+          let config='ysf.config';
+          let sex1 = '';
+          if(res.data.info.sex==0){
+            sex1='女'
+          }else{
+            sex1='男'
+          }
+          console.log(sex1)
+          this.setData({
+            myInfo: res.data.info,
+            [config]:JSON.stringify({
+              "uid": res.data.id, // 用户唯一标识
+              "level": 1, // vip等级
+              "data": JSON.stringify([{
+                  "index": 0,
+                  "key": "name",
+                  "label": "姓名",
+                  "value": res.data.info.name
+                },
+                {
+                  "index": 1,
+                  "key": "createTime",
+                  "label": "创建时间",
+                  "value": res.data.info.createTime
+                },
+                {
+                  "index": 2,
+                  "key": "sex",
+                  "label": "性别",
+                  "value": sex1
+                },
+                {
+                  "index": 3,
+                  "key": "tel",
+                  "label": "电话",
+                  "value": res.data.info.tel
+                }
+              ])
+            })
+          })
+          console.log(this.data.ysf.config)
+        }
+      }
+    })
+  },
   onLoad(options) {
-    this.getletterStauts();
-    wx.showLoading();
     tool.openidStatus().then(result => {
       this.setData({
         openid: result[0],
         sessionkey: result[1],
       })
       this.getActivies();
-      if (options.id) {
-        this.getIntroduce(options.id);
-      }
+      this.getInfos()
     })
+    if (options.id) {
+      this.getIntroduce(options.id);
+    }
   },
   onShow() {
-    this.getActivies();
     this.getletterStauts();
+    tool.isLogin().then(res => {
+      console.log(res.rawData)
+      this.setData({
+        userInfo: JSON.parse(res.rawData)
+      })
+    }).catch(err => {
+      console.log(err)
+    })
   }
 })

+ 14 - 5
pages/index/index.wxml

@@ -6,13 +6,15 @@
 			</swiper-item>
 		</block>
 	</swiper>
-	<image src="../../images/show.png" style="width:750rpx;margin-left:0rpx;height:200rpx;margin-top:20rpx" bindtap="goShare"></image>
+	<!-- <view style="width:100%;height:100rpx;border:1px solid red">
+	<view>{{userInfo}}</view>
+	<view>{{ysf}}</view>
+	</view> -->
+	
+	<image src="../../images/show.jpg" style="width:750rpx;margin-left:0rpx;height:200rpx;margin-top:20rpx" bindtap="goShare"></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>
-	<!-- <image wx:if='{{arr.length==0&&arr1.length==0}}' src="../../images/empty.png" style="width:320rpx;height:320rpx;margin-left:215rpx"></image>
-	<view wx:if='{{arr.length==0&&arr1.length==0}}' style="color:#999;width:750rpx;height:320rpx;top:550rpx;left:0rpx;text-align:center">近期还没有活动呦</view> -->
-
 	<image wx:if='{{arr.length==0}}' bindtap="goActiveDefault" style="width:750rpx;height:280rpx" src="../../images/activeDefault0.jpg"></image>
 	<view wx:for="{{arr}}" wx:key="index" class="box" bindtap="goActive" data-activeStatus='{{item.activeStatus}}' data-id='{{item.id}}' data-openId='{{item.openId}}'>
 		<view class="top">
@@ -71,7 +73,14 @@
 	</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>
+		<!-- <button type="primary" id="red" session-from="nickName={{userInfo.nickName}}|avatarUrl={{userInfo.avatarUrl}}" open-type="contact">客服</button> -->
+		<button type="primary" id="red" session-from="nickName={{userInfo.nickName}}|avatarUrl={{userInfo.avatarUrl}}|foreignid={{userInfo.foreignid}}|referrerTitle={{ysf.title}}|ysf.config={{ysf.config}}"
+        open-type="contact"
+        >客服</button>
+	</view>
+		<view class="tab1" bindtap="goInfo">
+		<image src="../../images/unactive_bar4.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+		<view>注册</view>
 	</view>
 	<view class="tab1" bindtap="goMy">
 		<image src="../../images/unactive_bar3.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>

+ 1 - 0
pages/index/index.wxss

@@ -132,6 +132,7 @@ page {
   font-size: 28rpx;
   position: absolute;
   bottom: 0;
+  left: 155rpx;
 }
 .xin{
   width: 600rpx;

+ 15 - 0
pages/personInfo/personInfo.js

@@ -492,6 +492,21 @@ Page({
       }
     })
   },
+  goInfo(){
+    wx.redirectTo({
+      url: '/pages/InfoType/InfoType',
+    })
+  },
+  goMy() {
+    wx.redirectTo({
+      url: '/pages/personal/personal',
+    })
+  },
+  goIndex() {
+    wx.redirectTo({
+      url: '/pages/index/index',
+    })
+  },
   // goxy() {
   //   wx.navigateTo({
   //     url: '/pages/infoAgreement/infoAgreement',

+ 21 - 10
pages/personInfo/personInfo.wxml

@@ -1,4 +1,4 @@
-<view class="container" style="margin-bottom:100rpx">
+<view class="container" style="margin-bottom:150rpx">
 	<view class="card_bj">
 		<view class="p1">身份证上传</view>
 		<view class="p2">注:上传横向且清晰的</view>
@@ -7,7 +7,6 @@
 		<view class="p4">方向为横向</view> -->
 		<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>
@@ -102,13 +101,25 @@
 				<span wx:else>确认,快去完善详细信息吧</span>
 			</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> -->
 	</form>
+</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}}|foreignid={{userInfo.foreignid}}|referrerTitle={{ysf.title}}|ysf.config= {{ysf.config}}"
+        open-type="contact"
+        >客服</button>
+	</view>
+		<view class="tab1">
+		<image src="../../images/active_bar4.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+		<view style="color:#a342ff">注册</view>
+	</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>

+ 44 - 2
pages/personInfo/personInfo.wxss

@@ -1,7 +1,6 @@
 .block {
   height: 80rpx;
   line-height: 80rpx;
-  /* border-bottom: 1px solid #999; */
   margin-top: 50rpx;
 }
 .card_bj{
@@ -169,4 +168,47 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
   width: 130rpx;
   height: 60rpx;
   z-index: 99999;
-} */
+} */
+.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;
+  left: 155rpx;
+}
+.xin{
+  width: 600rpx;
+  height: 900rpx;
+  /* margin-left: 75rpx; */
+  margin-top: 50rpx;
+  /* position: absolute; */
+  /* position: fixed; */
+  /* top: 50rpx; */
+}

+ 20 - 13
pages/personInfoDetail/personInfoDetail.js

@@ -586,7 +586,7 @@ Page({
             for (let i = 0; i < resControlTime.length; i++) {
               for (let j = 0; j < result[1].length; j++) {
                 if (resControlTime[i] == result[1][j]) {
-                  resControlTimeIndexArr.push(i)
+                  resControlTimeIndexArr.push(j)
                 }
               }
             }
@@ -595,10 +595,12 @@ Page({
               resControlTimeLabel.push(result[0][resControlTimeIndexArr[i]])
             }
             for (let i = 0; i < resControlTimeLabel.length; i++) {
-              if (resControlTimeLabel[i] == controlTimeArr[i].value) {
-                controlTimeArr[i].checked = true;
+              for (let j = 0; j < controlTimeArr.length; j++) {
+              if (resControlTimeLabel[i] == controlTimeArr[j].value) {
+                controlTimeArr[j].checked = true;
               }
             }
+            }
             this.setData({
               [controlTime]: resControlTimeLabel
             })
@@ -624,7 +626,7 @@ Page({
             for (let i = 0; i < resWorkStatus.length; i++) {
               for (let j = 0; j < result[1].length; j++) {
                 if (resWorkStatus[i] == result[1][j]) {
-                  resWorkStatusIndexArr.push(i)
+                  resWorkStatusIndexArr.push(j)
                 }
               }
             }
@@ -633,10 +635,12 @@ Page({
               resWorkStatusLabel.push(result[0][resWorkStatusIndexArr[i]])
             }
             for (let i = 0; i < resWorkStatusLabel.length; i++) {
-              if (resWorkStatusLabel[i] == workStatusArr[i].value) {
-                workStatusArr[i].checked = true;
+              for (let j = 0; j< workStatusArr.length; j++) {
+              if (resWorkStatusLabel[i] == workStatusArr[j].value) {
+                workStatusArr[j].checked = true;
               }
             }
+            }
             this.setData({
               [workStatus]: resWorkStatusLabel
             })
@@ -742,7 +746,7 @@ Page({
             for (let i = 0; i < resComposition.length; i++) {
               for (let j = 0; j < result[1].length; j++) {
                 if (resComposition[i] == result[1][j]) {
-                  resCompositionIndexArr.push(i)
+                  resCompositionIndexArr.push(j)
                 }
               }
             }
@@ -751,10 +755,12 @@ Page({
               resCompositionLabel.push(result[0][resCompositionIndexArr[i]])
             }
             for (let i = 0; i < resCompositionLabel.length; i++) {
-              if (resCompositionLabel[i] == compositionArr[i].value) {
-                compositionArr[i].checked = true;
+              for (let j = 0; j < compositionArr.length; j++) {
+              if (resCompositionLabel[i] == compositionArr[j].value) {
+                compositionArr[j].checked = true;
               }
             }
+            }
             this.setData({
               [composition]: resCompositionLabel
             })
@@ -798,7 +804,7 @@ Page({
             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)
+                  reshobbyIndexArr.push(j)
                 }
               }
             }
@@ -807,10 +813,12 @@ Page({
               reshobbyLabel.push(result[0][reshobbyIndexArr[i]])
             }
             for (let i = 0; i < reshobbyLabel.length; i++) {
-              if (reshobbyLabel[i] == hobbyArr[i].value) {
-                hobbyArr[i].checked = true;
+              for (let j = 0; j < hobbyArr.length; j++) {
+              if (reshobbyLabel[i] == hobbyArr[j].value) {
+                hobbyArr[j].checked = true;
               }
             }
+            }
             this.setData({
               [hobby]: reshobbyLabel
             })
@@ -1091,7 +1099,6 @@ Page({
           targetStatus: false
         })
       })
-      // this.getTargetInfostatus();
     })
   },
   // 上传头像

+ 14 - 4
pages/personal/personal.js

@@ -3,17 +3,21 @@ const tool = require('../../utils/tool.js');
 Page({
   data: {
     avatarUrl: '../../images/morenImg.png',
-    tabArr: [{
+    tabArr: [
+      {
         name: '我的信息',
         img: '../../images/icon1.jpg',
         url: '/pages/InfoType/InfoType'
-      }, {
+      }, 
+      {
         name: '我的活动',
         img: '../../images/icon6.jpg',
         url: '/pages/myActive/myActive'
-      }, {
+      },
+      {
         name: '心动0次',
-        img: '../../images/icon3.jpg'
+        img: '../../images/icon3.jpg',
+        url: ''
       }, {
         name: '被心动0次',
         img: '../../images/icon7.jpg',
@@ -45,6 +49,11 @@ Page({
       })
     }
   },
+  goInfo(){
+    wx.redirectTo({
+      url: '/pages/personInfo/personInfo',
+    })
+  },
   goIndex() {
     wx.redirectTo({
       url: '/pages/index/index',
@@ -109,6 +118,7 @@ Page({
   },
   getInfos() {
     tool.isLogin().then(res => {
+      console.log(res)
       this.setData({
         avatarUrl: res.userInfo.avatarUrl,
         nick: res.userInfo.nickName,

+ 7 - 1
pages/personal/personal.wxml

@@ -23,7 +23,13 @@
 	</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>
+		<button type="primary" id="red" session-from="nickName={{userInfo.nickName}}|avatarUrl={{userInfo.avatarUrl}}|foreignid={{userInfo.foreignid}}|referrerTitle={{ysf.title}}|ysf.config= {{ysf.config}}"
+        open-type="contact"
+        >客服</button>
+	</view>
+		<view class="tab1" bindtap="goInfo" bindtap="goInfo">
+		<image src="../../images/unactive_bar4.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>
+		<view>注册</view>
 	</view>
 	<view class="tab1" bindtap="goMy">
 		<image src="../../images/active_bar3.png" style="width:40rpx;height:40rpx;padding-top:10rpx"></image>

+ 1 - 0
pages/personal/personal.wxss

@@ -101,4 +101,5 @@ page {
   font-size: 28rpx;
   position: absolute;
   bottom: 0;
+  left: 155rpx;
 }

+ 3 - 3
pages/share/share.js

@@ -91,14 +91,14 @@ Page({
         const ctx = wx.createCanvasContext('myCanvasId');
         ctx.drawImage(this.data.bj, 0, 0, 355, 392); //里面的参数无非就是图片放置的位置即图片的横纵坐标,图片的宽高
         ctx.drawImage(res.tempFilePath, 96, 110, 148, 148);
-        let strArr = ['月老给你第一条红线 你遛狗了','第二条红线 你拔河了', '现在他给你第三条 千万别去公园甩鞭子了 行不?','扫码脱单吧'];
+        let strArr = ['谁没对象给谁','码上有对象'];
         ctx.setFillStyle("#999");
-        ctx.setFontSize(16); //字大小
+        ctx.setFontSize(18); //字大小
         ctx.setTextAlign('center'); //是否居中显示,参考点画布中线
         // let leftPositionAarr = []
         for (let i = 0; i < strArr.length; i++) {
           console.log(i);
-          ctx.fillText(strArr[i], 180,295 + i * 25);
+          ctx.fillText(strArr[i], 170,300 + i * 30);
         }
         ctx.draw();
         setTimeout(() => {

+ 42 - 30
pages/targetInfo/targetInfo.js

@@ -32,16 +32,16 @@ Page({
     marriageArr: [],
     constellationArr: [],
     workStatusArr: [],
-    assetHouseArr: ['咋的都行','租房', '购房'],
+    assetHouseArr: ['咋的都行', '租房', '购房'],
     assetHouseAreaArr: [],
     // assetHouseLoanArr: ['有', '没有', '咋的都行'],
-    assetCarArr: ['咋的都行','有', '没有'],
+    assetCarArr: ['咋的都行', '有', '没有'],
     assetCarValueArr: [],
     // assetCarLoanArr: ['不行', '行', '咋的都行'],
     companyNatureArr: [],
     parentAssetsArr: [],
     compositionArr: [],
-    isCommonArr: ['愿意', '不愿意', '咋的都行']
+    isCommonArr: ['咋的都行','愿意', '不愿意',]
   },
   ageMinChange(e) {
     let ageMin = 'form.ageMin'
@@ -238,6 +238,7 @@ Page({
     })
   },
   isCommonPicker(e) {
+    console.log(e)
     let isCommon = 'form.isCommon'
     this.setData({
       [isCommon]: e.detail.value,
@@ -272,7 +273,7 @@ Page({
         let parentAssets = 'form.parentAssets';
         let isCommon = 'form.isCommon';
         let id = 'form.id'
-        if (res.data.code==0) {
+        if (res.data.code == 0) {
           this.setData({
             [ageMin]: res.data.standard.ageMin,
             [ageMax]: res.data.standard.ageMax,
@@ -304,7 +305,7 @@ Page({
             nativePlaceArr: ['咋的都行'].concat(result[0]),
             nativePlaceArrValue: ['0'].concat(result[1]),
           })
-          if (res.data.code==0) {
+          if (res.data.code == 0) {
             for (let i = 0; i < ['0'].concat(result[1]).length; i++) {
               if (res.data.standard.nativePlace == ['0'].concat(result[1])[i]) {
                 this.setData({
@@ -321,7 +322,7 @@ Page({
             marriageArr: ['咋的都行'].concat(result[0]),
             marriageArrValue: ['0'].concat(result[1]),
           })
-          if (res.data.code==0) {
+          if (res.data.code == 0) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
               if (res.data.standard.marriage == ['0'].concat(result[1])[i]) {
                 this.setData({
@@ -333,15 +334,15 @@ Page({
           }
         })
         tool.formDetails('he_education').then(result => {
-          let oArr=[];
-          for(let i=0;i<result[0].length;i++){
+          let oArr = [];
+          for (let i = 0; i < result[0].length; i++) {
             oArr.push(result[0][i].concat('以上'))
           }
           this.setData({
             educationArr: ['咋的都行'].concat(oArr),
             educationArrValue: ['0'].concat(result[1]),
           })
-          if (res.data.code==0) {
+          if (res.data.code == 0) {
             for (let i = 0; i < ['0'].concat(result[1]).length; i++) {
               if (res.data.standard.education == ['0'].concat(result[1])[i]) {
                 this.setData({
@@ -357,7 +358,7 @@ Page({
             incomeArr: ['咋的都行'].concat(result[0]),
             incomeArrValue: ['0'].concat(result[1])
           })
-          if (res.data.code==0) {
+          if (res.data.code == 0) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
               if (res.data.standard.income == ['0'].concat(result[1])[i]) {
                 this.setData({
@@ -371,9 +372,9 @@ Page({
         tool.formDetails('he_asset_house').then(result => {
           this.setData({
             assetHouseArr: ['咋的都行'].concat(result[0]),
-            assetHouseArrValue:  ['0'].concat(result[1])
+            assetHouseArrValue: ['0'].concat(result[1])
           })
-          if (res.data.code==0) {
+          if (res.data.code == 0) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
               if (res.data.standard.assetHouse == ['0'].concat(result[1])[i]) {
                 this.setData({
@@ -399,7 +400,7 @@ Page({
             assetHouseAreaArr: ['咋的都行'].concat(result[0]),
             assetHouseAreaArrValue: ['0'].concat(result[1])
           })
-          if (res.data.code==0) {
+          if (res.data.code == 0) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
               if (res.data.standard.assetHouseArea == ['0'].concat(result[1])[i]) {
                 this.setData({
@@ -415,7 +416,7 @@ Page({
             assetCarValueArr: ['咋的都行'].concat(result[0]),
             assetCarValueArrValue: ['0'].concat(result[1])
           })
-          if (res.data.code==0) {
+          if (res.data.code == 0) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
               if (res.data.standard.assetCarValue == ['0'].concat(result[1])[i]) {
                 this.setData({
@@ -435,23 +436,30 @@ Page({
             })
           })
           console.log(result);
-          if (res.data.code==0&&res.data.standard.constellation) {
+          if (res.data.code == 0 && res.data.standard.constellation) {
             let resComposition = res.data.standard.constellation.split(",");
+            console.log(resComposition, '我是拆分完的星座值')
             let resCompositionIndexArr = [];
             for (let i = 0; i < resComposition.length; i++) {
               for (let j = 0; j < result[1].length; j++) {
                 if (resComposition[i] == result[1][j]) {
-                  resCompositionIndexArr.push(i)
+                  console.log(i)
+                  console.log(j)
+                  resCompositionIndexArr.push(j)
                 }
               }
             }
+            console.log(resCompositionIndexArr)
             let resCompositionLabel = [];
             for (let i = 0; i < resCompositionIndexArr.length; i++) {
               resCompositionLabel.push(result[0][resCompositionIndexArr[i]])
             }
+            console.log(constellationArr)
             for (let i = 0; i < resCompositionLabel.length; i++) {
-              if (resCompositionLabel[i] == constellationArr[i].value) {
-                constellationArr[i].checked = true;
+              for (let j = 0; j < constellationArr.length; j++) {
+                if (resCompositionLabel[i] == constellationArr[j].name) {
+                  constellationArr[j].checked = true;
+                }
               }
             }
             this.setData({
@@ -473,13 +481,13 @@ Page({
               'checked': false
             })
           })
-          if (res.data.code==0&&res.data.standard.workStatus) {
+          if (res.data.code == 0 && res.data.standard.workStatus) {
             let resWorkStatus = res.data.standard.workStatus.split(",");
             let resWorkStatusIndexArr = [];
             for (let i = 0; i < resWorkStatus.length; i++) {
               for (let j = 0; j < result[1].length; j++) {
                 if (resWorkStatus[i] == result[1][j]) {
-                  resWorkStatusIndexArr.push(i)
+                  resWorkStatusIndexArr.push(j)
                 }
               }
             }
@@ -488,10 +496,12 @@ Page({
               resWorkStatusLabel.push(result[0][resWorkStatusIndexArr[i]])
             }
             for (let i = 0; i < resWorkStatusLabel.length; i++) {
-              if (resWorkStatusLabel[i] == workStatusArr[i].value) {
-                workStatusArr[i].checked = true;
+              for (let j = 0; j < workStatusArr.length; j++) {
+              if (resWorkStatusLabel[i] == workStatusArr[j].value) {
+                workStatusArr[j].checked = true;
               }
             }
+            }
             this.setData({
               [workStatus]: resWorkStatusLabel
             })
@@ -510,13 +520,13 @@ Page({
               'checked': false
             })
           })
-          if (res.data.code==0&&res.data.standard.companyNature) {
+          if (res.data.code == 0 && 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)
+                  recompanyNatureIndexArr.push(j)
                 }
               }
             }
@@ -525,10 +535,12 @@ Page({
               rescompanyNatureLabel.push(result[0][recompanyNatureIndexArr[i]])
             }
             for (let i = 0; i < rescompanyNatureLabel.length; i++) {
-              if (rescompanyNatureLabel[i] == companyNatureArr[i].value) {
-                companyNatureArr[i].checked = true;
+              for (let j = 0; j < companyNatureArr.length; j++) {
+              if (rescompanyNatureLabel[i] == companyNatureArr[j].value) {
+                companyNatureArr[j].checked = true;
               }
             }
+            }
             this.setData({
               [companyNature]: rescompanyNatureLabel
             })
@@ -544,7 +556,7 @@ Page({
             compositionArr: ['咋的都行'].concat(result[0]),
             compositionArrValue: ['0'].concat(result[1])
           })
-          if (res.data.code==0) {
+          if (res.data.code == 0) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
               if (res.data.standard.composition == ['0'].concat(result[1])[i]) {
                 this.setData({
@@ -560,7 +572,7 @@ Page({
             parentAssetsArr: ['咋的都行'].concat(result[0]),
             parentAssetsArrValue: ['0'].concat(result[1])
           })
-          if (res.data.code==0) {
+          if (res.data.code == 0) {
             for (let i = 0; i < [''].concat(result[1]).length; i++) {
               if (res.data.standard.parentAssets == ['0'].concat(result[1])[i]) {
                 this.setData({
@@ -587,7 +599,7 @@ Page({
     }
     let constellation = 'form.constellation'
     let workStatus = 'form.workStatus'
-    let companyNature='form.companyNature'
+    let companyNature = 'form.companyNature'
     let indexArr = [];
     for (let i = 0; i < params.constellation.length; i++) {
       indexArr.push(this.data.constellationArrLabel.indexOf(params.constellation[i]))
@@ -630,7 +642,7 @@ Page({
     this.setData({
       [constellation]: str.slice(0, str.length - 1),
       [workStatus]: str2.slice(0, str2.length - 1),
-      [companyNature]:str3.slice(0, str3.length - 1)
+      [companyNature]: str3.slice(0, str3.length - 1)
     })
     console.log(this.data.form)
     wx.request({

+ 0 - 12
utils/tool.js

@@ -80,18 +80,6 @@ const isLogin = () => {
         }
       }
     })
-    // wx.request({
-    //   url: util.globalData.publicUrl + '/wx/member/' + wx.getStorageSync('openId') + '/info',
-    //   method: "get",
-    //   success: (res) => {
-    //     console.log(res)
-    //     if (res.data.code == 0 && res.data.info.avatar) {
-    //       resolve(res.data.info.avatar);
-    //     } else {
-    //       reject(res)
-    //     }
-    //   }
-    // })
   })
 };
 // 判断是否完善个人信息