ZhangWenQiang il y a 6 ans
Parent
commit
a67b293c3d
5 fichiers modifiés avec 76 ajouts et 20 suppressions
  1. 1 6
      pages/jianli/index.js
  2. 2 2
      pages/jianli/index.wxml
  3. 34 0
      pages/jianli/index.wxss
  4. 38 11
      pages/user-job/index.js
  5. 1 1
      pages/user-job/index.wxml

+ 1 - 6
pages/jianli/index.js

@@ -164,10 +164,5 @@ Page({
         url: '../user-education/index?hpUserResumeId=' + this.data.hpUserResumeId,
       })
     }
-  },
-  onError(err) {
-    app.aldstat.sendEvent('报错', {
-      'err': err
-    });
-  },
+  }
 })

+ 2 - 2
pages/jianli/index.wxml

@@ -15,7 +15,7 @@
 
     <view class='card-bd'>
       <view class="flex person-panel">
-        <image class="avatar" src="{{userResume.headImg}}" mode="widthFix" />
+        <image class="avatar" src="{{userResume.headImg}}"/>
         <view class="info">
           <view class="flex">
             <text class="name">{{userResume.realName}}</text>
@@ -58,7 +58,7 @@
       <view class='form qiuzhi'>
         <view class='row'>
           <text class="label">期望行业</text>
-          <block wx:if="{{userResume.expectationPosition}}">{{expectationPosition[userResume.expectationPosition]}}</block>
+          <block wx:if="{{userResume.expectationPosition}}"><block wx:for="{{globalTools.splitStr1(userResume.expectationPosition,',')}}" wx:key="id">{{expectationPosition[item]}} </block></block>
         </view>
         <view class='row'>
           <text class="label">期望地址</text>

+ 34 - 0
pages/jianli/index.wxss

@@ -5,9 +5,11 @@
   width: 100%;
   z-index: -1;
 }
+
 .card.mgT70 {
   margin-top: 70rpx;
 }
+
 .card {
   margin: 47rpx 30rpx;
   border: 1px solid #eaeaea;
@@ -19,6 +21,7 @@
   font-size: #323232;
   background: #fff;
 }
+
 .card-hd {
   display: flex;
   justify-content: space-between;
@@ -28,30 +31,38 @@
   padding: 30rpx 40rpx 30rpx 0;
   box-sizing: border-box;
 }
+
 .noBorder {
   border: none;
 }
+
 .card-hd-title {
   display: flex;
   align-items: center;
 }
+
 .card-hd-title .icon {
   margin-right: 20rpx;
 }
+
 .icon {
   width: 20px;
 }
+
 .extra {
   float: right;
 }
+
 .card-bd {
   padding: 20rpx;
   font-size: 14px;
   box-sizing: border-box;
 }
+
 .input-padding {
   padding: 35rpx 35rpx 35rpx 0;
 }
+
 .input {
   height: 75rpx;
   line-height: 75rpx;
@@ -61,71 +72,90 @@
   font-size: 12px;
   box-sizing: border-box;
 }
+
 .row {
   padding: 4px 0;
 }
+
 .qiuzhi {
   /* margin-left: 40rpx;
   border-bottom: 1px solid #eaeaea; */
 }
+
 .qiuzhi .row {
   margin-bottom: 16rpx;
 }
+
 .qiuzhi .row:last-child {
   margin-bottom: 10rpx;
 }
+
 .qiuzhi .row .label {
   color: #909090;
   margin-right: 30rpx;
 }
+
 .padLeft {
   margin-left: -40rpx;
 }
+
 .strong {
   color: #333;
 }
+
 .flex {
   display: flex;
 }
+
 .justify-between {
   justify-content: space-between;
 }
+
 .align-center {
   align-items: center;
 }
+
 .icon-edit {
   width: 36rpx;
 }
+
 .icon-box {
   width: 20px;
   margin-right: 20rpx;
 }
+
 .icon-sex {
   width: 27rpx;
   margin-left: 20rpx;
 }
+
 .contact {
   margin-bottom: 10rpx;
 }
+
 .icon-iphone {
   width: 18rpx;
   margin-right: 10rpx;
 }
+
 .icon-email {
   width: 27rpx;
   margin-right: 10rpx;
 }
+
 .avatar {
   width: 84rpx;
   height: 84rpx;
   margin-right: 40rpx;
   border-radius: 50%;
 }
+
 .name {
   font-size: 30rpx;
   color: #323232;
   margin-bottom: 10rpx;
 }
+
 .tag {
   padding: 0 20rpx;
   background: #f8f8f8;
@@ -134,15 +164,19 @@
   margin-right: 20rpx;
   border-radius: 4rpx;
 }
+
 .person-panel {
   padding: 30rpx 20rpx 30rpx 0;
 }
+
 .email {
   margin-right: 30rpx;
 }
+
 .size10 {
   font-size: 20rpx;
 }
+
 .color90 {
   color: #909090;
 }

+ 38 - 11
pages/user-job/index.js

@@ -57,8 +57,10 @@ Page({
       }
     ],
     expectationPosition: ["普工", "客服", "销售", "服务员", "物流仓储", "司机", "才艺技能", "文员助理", "快递配送", "促销导购", "展会演出", "家教培训", "模特", "贸易采购", "厨师", "编辑", "线上推广", "设计", "技工", "保洁", "其它"],
-    region: [], //省市区
-    regionCode: [], //省市区code
+    region: {
+      code:[],
+      value:[]
+    }, //省市区
     name: '',
     expectationPositionIndex: 0,
     salaryIndex: 0,
@@ -76,6 +78,31 @@ Page({
       hpUserResumeId: hpUserResumeId
     })
 
+    if (hpUserResumeId) {
+      let userResume = wx.getStorageSync('userResume')
+      
+      this.data.region.code = this.data.region.code.concat(userResume.expectationProvinceId);
+      this.data.region.code = this.data.region.code.concat(userResume.expectationCityId);
+      this.data.region.code = this.data.region.code.concat(userResume.expectationCountryId);
+      var expectationArray = userResume.expectationPosition.split(",");
+      var lengthSalary = this.data.salaryList.length;
+      var salaryIndex;
+      for (var i = 0; i < lengthSalary;i++){
+        if (userResume.expectationSalary == this.data.salaryList[i].hightNum){
+          salaryIndex = i;
+        }
+      }
+      console.log("ggg", this.data.region)
+      if (userResume.id) {
+        this.setData({
+          hpUserResumeId: userResume.id,
+          expectationPositionIndex: expectationArray,
+          salaryIndex: salaryIndex,
+          region: this.data.region
+        })
+      }
+    }
+
   },
 
   //改变薪资水平
@@ -92,10 +119,11 @@ Page({
   },
   //改变期望地点
   bindRegionChange(e) {
-    console.log('picker发送选择改变,携带值为', e.detail.value)
+    console.log('picker发送选择改变,携带值为', e.detail)
+    this.data.region.code = e.detail.code;
+    this.data.region.value = e.detail.value;
     this.setData({
-      region: e.detail.value,
-      regionCode: e.detail.code
+      region: this.data.region
     })
   },
   //提交
@@ -108,17 +136,16 @@ Page({
       expectationPositionIndex,
       salaryIndex,
       region,
-      regionCode,
       hpUserResumeId,
       salaryList
     } = this.data
     let paramsObj = {
       expectationPosition: expectationPositionIndex,
       expectationSalary: salaryList[salaryIndex].expectationSalary,
-      expectationProvinceId: regionCode[0],
-      expectationCityId: regionCode[1],
-      expectationCountryId: regionCode[2],
-      expectationAddress: region[0] + region[1] + region[2],
+      expectationProvinceId: region.code[0],
+      expectationCityId: region.code[1],
+      expectationCountryId: region.code[2],
+      expectationAddress: region.value[0] + region.value[1] + region.value[2],
       user_id: app.globalData.userId,
       user_token: app.globalData.userToken
     }
@@ -136,7 +163,7 @@ Page({
     let {
       region
     } = this.data
-    if (region.length == 0) {
+    if (region.value.length == 0) {
       showToast('请选择期望地点');
       return false
     }

+ 1 - 1
pages/user-job/index.wxml

@@ -33,7 +33,7 @@
       <view class='list-content border'>
         <picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
           <view class="picker">
-            {{region[0]}},{{region[1]}},{{region[2]}}
+            {{region.value[0]}},{{region.value[1]}},{{region.value[2]}}
           </view>
         </picker>
       </view>