ZhangWenQiang преди 6 години
родител
ревизия
6023fdf377
променени са 10 файла, в които са добавени 483 реда и са изтрити 70 реда
  1. 139 0
      pages/agent/index.js
  2. 3 0
      pages/agent/index.json
  3. 44 0
      pages/agent/index.wxml
  4. 166 0
      pages/agent/index.wxss
  5. 38 14
      pages/index/index.js
  6. 1 1
      pages/index/index.wxml
  7. 24 0
      pages/index/index.wxss
  8. 3 8
      pages/search/index.js
  9. 8 3
      pages/search/index.wxml
  10. 57 44
      pages/search/index.wxss

+ 139 - 0
pages/agent/index.js

@@ -0,0 +1,139 @@
+// pages/agent/index.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    name: '',
+    contact: '',
+    sex: '',
+    year: ''
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    this.getNodePos();
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  },
+  imageLoad() {
+    var that = this
+    var query = wx.createSelectorQuery()
+    query.select('.agent1').boundingClientRect()
+    query.select('.agent2').boundingClientRect()
+    query.select('.agent3').boundingClientRect()
+    query.select('.agent4').boundingClientRect()
+    query.exec(function(res) {
+      console.log(res)
+      that.setData({
+        swiperH: res[0].height,
+        swiperH2: res[1].height,
+        swiperH3: res[2].height,
+        swiperH4: res[3].height
+      })
+    })
+  },
+  //获取位置
+  getNodePos() {
+    var query = wx.createSelectorQuery()
+    query.select('#agentJoin').boundingClientRect()
+    var that = this;
+    query.exec(function(res) {
+      console.log(res)
+      that.setData({
+        basePos: res[0].top + 500,
+      })
+    })
+  },
+
+  baoming(e) {
+    let top = e.currentTarget.dataset.top
+    wx.pageScrollTo({
+      scrollTop: top,
+      duration: 0
+    })
+  },
+  changeName: function(e) {
+    console.log("s", e.detail.value);
+    this.setData({
+      name: e.detail.value
+    })
+  },
+  changeContact: function(e) {
+    console.log("s", e.detail.value);
+    this.setData({
+      contact: e.detail.value
+    })
+  },
+  changeSex: function(e) {
+    console.log("s", e.detail.value);
+    this.setData({
+      sex: e.detail.value
+    })
+  },
+  changeYear: function(e) {
+    console.log("s", e.detail.value);
+    this.setData({
+      year: e.detail.value
+    })
+  },
+  submit() {
+    var name = this.data.name;
+    var contact = this.data.contact;
+    var sex = this.data.sex;
+    var year = this.data.year;
+    if (!name) {
+
+    }
+  }
+})

+ 3 - 0
pages/agent/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 44 - 0
pages/agent/index.wxml

@@ -0,0 +1,44 @@
+<!--pages/agent/index.wxml-->
+<view class='panel'>
+  <view class='agent'>
+    <image class='agent1' src='../../images/happyjob/agent.png' style='height:{{swiperH}}px' mode='widthFix' bindload='imageLoad'></image>
+  </view>
+  <view class='agent_1'>
+    <image class='agent2' src='../../images/happyjob/agent2.png' style='height:{{swiperH2}}px' mode='widthFix'></image>
+    <image class='baoming' src='../../images/happyjob/baoming.png' bindtap='baoming' data-top="{{basePos}}"></image>
+  </view>
+  <view class='agent'>
+    <image class='agent3' src='../../images/happyjob/agent3.png' style='height:{{swiperH3}}px' mode='widthFix'></image>
+  </view>
+  <view class='agent_4' id="agentJoin">
+    <image class='agent4' src='../../images/happyjob/agent4.png' style='height:{{swiperH4}}px' mode='widthFix'></image>
+    <view class='joinus'>加入我们</view>
+    <view class='name'>
+      <view class='left'>姓名:</view>
+      <view class='right'>
+        <input value='{{name}}' bindinput='changeName'></input>
+      </view>
+    </view>
+    <view class='contact'>
+      <view class='left'>联系方式:</view>
+      <view class='right'>
+        <input value='{{contact}}' bindinput='changeContact'></input>
+      </view>
+    </view>
+    <view class='sex'>
+      <view class='left'>性别:</view>
+      <view class='right'>
+        <input value='{{sex}}' bindinput='changeSex'></input>
+      </view>
+    </view>
+    <view class='year'>
+      <view class='left'>年龄:</view>
+      <view class='right'>
+        <input value='{{year}}' bindinput='changeYear'></input>
+      </view>
+    </view>
+    <view class='submit' bindtap='submit'>
+      提交
+    </view>
+  </view>
+</view>

+ 166 - 0
pages/agent/index.wxss

@@ -0,0 +1,166 @@
+/* pages/agent/index.wxss */
+
+.panel {
+  display: flex;
+  flex-direction: column;
+}
+
+.agent {
+  width: 100%;
+}
+
+.agent image {
+  width: 100%;
+}
+
+.agent_1 {
+  width: 100%;
+}
+
+.agent_1 image {
+  width: 100%;
+}
+
+.agent_1 .baoming {
+  position: fixed;
+  width: 263rpx;
+  height: 136rpx;
+  top: 80%;
+  right: 30rpx;
+}
+
+.agent_4 {
+  width: 100%;
+  position: relative;
+}
+
+.agent_4 image {
+  width: 100%;
+}
+
+.agent_4 .joinus {
+  position: absolute;
+  width: 100%;
+  top: 170rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 50rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(42, 49, 58, 1);
+}
+
+.agent_4 .name {
+  position: absolute;
+  width: 100%;
+  top: 300rpx;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 32rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(42, 49, 58, 1);
+}
+
+.agent_4 .name .left {
+  padding-left: 120rpx;
+  width: 26%;
+}
+
+.agent_4 .name .right {
+  width: 52%;
+  margin-right: 120rpx;
+  border-bottom: 2rpx solid #2a313a;
+}
+
+.agent_4 .contact {
+  position: absolute;
+  width: 100%;
+  top: 370rpx;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 32rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(42, 49, 58, 1);
+}
+
+.agent_4 .contact .left {
+  padding-left: 120rpx;
+  width: 26%;
+}
+
+.agent_4 .contact .right {
+  width: 52%;
+  margin-right: 120rpx;
+  border-bottom: 2rpx solid #2a313a;
+}
+
+.agent_4 .sex {
+  position: absolute;
+  width: 100%;
+  top: 440rpx;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 32rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(42, 49, 58, 1);
+}
+
+.agent_4 .sex .left {
+  padding-left: 120rpx;
+  width: 26%;
+}
+
+.agent_4 .sex .right {
+  width: 52%;
+  margin-right: 120rpx;
+  border-bottom: 2rpx solid #2a313a;
+}
+
+.agent_4 .year {
+  position: absolute;
+  width: 100%;
+  top: 510rpx;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 32rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(42, 49, 58, 1);
+}
+
+.agent_4 .year .left {
+  padding-left: 120rpx;
+  width: 26%;
+}
+
+.agent_4 .year .right {
+  width: 52%;
+  margin-right: 120rpx;
+  border-bottom: 2rpx solid #2a313a;
+}
+
+.submit {
+  position: absolute;
+  left: 29%;
+  right: 29%;
+  top: 640rpx;
+  height: 88rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 36rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(255, 255, 255, 1);
+  background: rgba(88, 140, 207, 1);
+  border: 6rpx solid rgba(40, 50, 60, 1);
+  border-radius: 24rpx;
+}

+ 38 - 14
pages/index/index.js

@@ -340,12 +340,12 @@ Page({
     const {
       index
     } = e.currentTarget.dataset
-    this.setData({
-      pageNo: 1,
-      filter: index,
-      list: [],
-      isScroll: true
-    })
+    // this.setData({
+    //   pageNo: 1,
+    //   filter: index,
+    //   list: [],
+    //   isScroll: true
+    // })
     this.workType(index)
   },
 
@@ -353,22 +353,46 @@ Page({
   workType(index) {
     switch (index) {
       case 0:
-        this.fullList();
+        wx.navigateTo({
+          url: '../fulltime/index',
+        })
         break;
       case 1:
-        this.parttimeList();
+        wx.navigateTo({
+          url: '../parttime/index',
+        })
         break;
       case 2:
-        this.rewardList();
+        wx.navigateTo({
+          url: '../reward/index',
+        })
         break;
       case 3:
-        this.welfareList();
+        wx.navigateTo({
+          url: '../jipin/index',
+        })
         break;
-      case 4:
-        this.goodMoneyList();
+    }
+  },
+
+  changeList2(e) {
+    const {
+      index
+    } = e.currentTarget.dataset
+    this.workType2(index)
+  },
+
+  workType2(index) {
+    switch (index) {
+      case 0:
+        wx.navigateTo({
+          url: '../fuli/index',
+        })
         break;
-      default:
-        this.fetchList();
+      case 1:
+        wx.navigateTo({
+          url: '../agent/index',
+        })
         break;
     }
   },

+ 1 - 1
pages/index/index.wxml

@@ -169,7 +169,7 @@
           </view>
         </view>
         <view class='two'>
-          <view class='limit'>
+          <view class='limit_1'>
             <block wx:if="{{item.specialWelfare}}">
               <i-tag wx:for="{{globalTools.splitStr1(item.specialWelfare,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class">
                 {{tag}}

+ 24 - 0
pages/index/index.wxss

@@ -295,6 +295,30 @@
   margin-left: 10rpx;
 }
 
+.box-item .two .limit_1 {
+  display: flex;
+  flex-direction: row;
+  flex-grow: 1;
+  overflow: hidden;
+  width: 80%;
+  color: #868b92;
+  flex-wrap: wrap;
+}
+
+.box-item .two .limit_1 image {
+  width: 18rpx;
+  height: 18rpx;
+  margin-right: 10rpx;
+}
+
+.box-item .two .limit_1 i-tag {
+  /* margin-left: 10rpx; */
+}
+
+.box-item .two .limit_1 text {
+  margin-left: 10rpx;
+}
+
 .box-item .two .time {
   color: #706f6f;
   font-size: 20rpx;

+ 3 - 8
pages/search/index.js

@@ -39,13 +39,8 @@ Page({
     console.log(e)
     let id = e.currentTarget.dataset.id
     let title = "删除提示"
-    let content = ""
-    if (id == 'all') {
-      id = null
-      content = "是否清除全部记录"
-    } else {
-      content = "是否清除选中记录"
-    }
+    let content = "";
+    content = "是否清除历史记录"
     wx.showModal({
       title: title,
       content: content,
@@ -53,7 +48,7 @@ Page({
         if (res.confirm) {
           wx.removeStorageSync("searchKey");
           showToast("删除成功");
-          wx.navigateBack();
+          this.onShow();
         }
       }
     })

+ 8 - 3
pages/search/index.wxml

@@ -1,6 +1,9 @@
+<!--pages/search/index.wxml-->
 <view class="header">
   <view class='search'>
-    <i-icon class="icon-search" type="search" size='24' color='#aaa' />
+    <view class='i_search'>
+      <image src='../../images/happyjob/search.png'></image>
+    </view>
     <input class='search-input' type='text' confirm-type="search" value="{{searchVal}}" bindinput='bindKeyInput' bindconfirm="toSearchPage" placeholder="请输入您要找的职位、企业名" auto-focus/>
   </view>
   <view class='cancel' bindtap='toSearchPage'>搜索</view>
@@ -8,8 +11,10 @@
 
 <view class='history topic'>
   <view class='topic-header'>
-    <view class='history-title'>搜索历史</view>
-    <i-icon class='trash' type="trash" size='24' color='#999' bindtap='delHistory' data-id="all" />
+    <view class='history-title'>搜索历史:</view>
+    <view>
+      <image src='../../images/happyjob/del.png' bindtap='delHistory'></image>
+    </view>
   </view>
   <view class='record-list'>
     <view class='record' wx:for="{{searchKey}}" wx:key="{{item.id}}" data-id="{{item.id}}" data-value="{{item.searchVal}}" bindtap='selectMsg' bindlongpress="delHistory">{{item.searchVal}}</view>

+ 57 - 44
pages/search/index.wxss

@@ -1,4 +1,6 @@
-.header{
+/* pages/search/index.wxss */
+
+.header {
   display: flex;
   justify-content: space-between;
   align-items: center;
@@ -7,78 +9,89 @@
   padding-left: 35rpx;
   box-sizing: border-box;
 }
-.icon-search{
+
+.icon-search {
   flex: 0 0 auto;
 }
-.cancel{
+
+.cancel {
   padding-left: 30rpx;
   padding-right: 30rpx;
-  color: #333 ;
+  color: #222;
 }
-.header .search{
+
+.header .search {
   display: flex;
   flex-grow: 1;
   align-items: center;
-  height: 70rpx;
-  background:#f7f9fd;
-  border-radius: 35rpx;
-  line-height: 70rpx;
+  height: 60rpx;
+  background: #eee;
+  border-radius: 30rpx;
+  line-height: 60rpx;
   font-size: 24rpx;
-  margin-left: 15rpx;
   padding-left: 10rpx;
-  color: #eee;
+  color: #999;
   box-sizing: border-box;
 }
-.search-icon{
-  width: 30rpx;
-  height: 30rpx;
+
+.search .i_search {
+  width: 24rpx;
+  height: 27rpx;
+  display: flex;
+  align-items: center;
+  margin-left: 26rpx;
 }
-.search-input{
+
+.search .i_search image {
+  width: 100%;
+  height: 100%;
+}
+
+.search .search-input {
   flex-grow: 1;
   color: #333;
+  margin-left: 13rpx;
 }
-/* .bot-dist{
-  border-bottom: 20rpx solid #EDEBEB;
-} */
-.topic{
-  padding: 0 40rpx;
+
+/* 搜索历史 */
+
+.topic {
+  padding: 0 30rpx;
   color: #333;
   font-size: 28rpx;
-  margin-top: 20rpx;
+  margin-top: 60rpx;
   box-sizing: border-box;
 }
-.topic .topic-header{
+
+.topic .topic-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   height: 80rpx;
 }
-.trash{
-  width: 32rpx;
+
+.topic-header .history-title {
+  font-family: SourceHanSansCN-Normal;
+  font-weight: 400;
+  color: rgba(34, 34, 34, 1);
+  font-size: 32rpx;
 }
-.record{
+
+.topic-header image {
+  width: 23rpx;
+  height: 31rpx;
+}
+
+.record {
   display: inline-block;
-  min-width: 150rpx;
-	height: 65rpx;
+  height: 65rpx;
   line-height: 65rpx;
   text-align: center;
-  padding: 0 10rpx;
+  padding: 0 20rpx;
   margin-right: 20rpx;
   margin-bottom: 20rpx;
-  font-size: 24rpx;
-  color: #323232;
-	background-color: #f0f5f6;
-	border-radius: 30px;
+  font-size: 26rpx;
+  color: #222;
+  background-color: #eee;
+  border-radius: 6rpx;
 }
-/* 搜索结果列表 */
-.search-list .li{
-  height: 90rpx;
-  line-height: 90rpx;
-  padding: 0 30rpx;
-  color: #333;
-  font-size: 28rpx;
-  border-bottom: 2rpx solid #eaeaea;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  white-space: nowrap;
-}