浏览代码

全职岗位开发

ZhangWenQiang 6 年之前
父节点
当前提交
7056147d06
共有 6 个文件被更改,包括 698 次插入1 次删除
  1. 2 1
      app.json
  2. 3 0
      pages/fuli/index.js
  3. 170 0
      pages/fulltime/index.js
  4. 10 0
      pages/fulltime/index.json
  5. 138 0
      pages/fulltime/index.wxml
  6. 375 0
      pages/fulltime/index.wxss

+ 2 - 1
app.json

@@ -44,7 +44,8 @@
     "pages/store-form/store-form",
     "pages/gdmap/index",
     "pages/agent/index",
-    "pages/fuli/index"
+    "pages/fuli/index",
+    "pages/fulltime/index"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 3 - 0
pages/fuli/index.js

@@ -137,6 +137,9 @@ Page({
       pageNo: 1, //当前分页
       isScroll: true, //是否可以滚动
       list: [],
+      selectId: -1, //选中筛选的条件
+      settleme: 0, //结算方式索引
+      settle: '', //结算方式
     })
     this.start();
     wx.stopPullDownRefresh();

+ 170 - 0
pages/fulltime/index.js

@@ -0,0 +1,170 @@
+// pages/fulltime/index.js
+import {
+  getFullList
+} from '../../services/index.js'
+import {
+  imgServerUrl,
+  imgServerUrl_new
+} from '../../config/config.js'
+var app = getApp();
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    list: [],
+    pageNo: 1, //当前分页
+    isScroll: true, //是否可以滚动
+    showNoMore: "没有更多信息...", //显示已无更多
+    cityCode: '320200',
+    cityName: '无锡',
+    selectId: -1, //选中筛选的条件
+    totalSalary: '', //薪资待遇排序(1:正序;2:倒序)
+    sort: '', //距离排序(1:正序;2:倒序)
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    if (app.globalData.userInfo) {
+      console.log('有info===', app.globalData)
+      this.start();
+    } else if (this.data.canIUse) {
+      // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
+      // 所以此处加入 callback 以防止这种情况
+      app.userInfoReadyCallback = res => {
+        console.log('userInfoReadyCallback===', res.userInfo)
+        app.globalData.userInfo = res.userInfo;
+        this.start();
+      }
+    } else {
+      // 在没有 open-type=getUserInfo 版本的兼容处理
+      wx.getUserInfo({
+        success: res => {
+          app.globalData.userInfo = res.userInfo
+          console.log('兼容处理===', app.globalData)
+          this.start();
+        }
+      })
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+  start() {
+    this.fullList();
+  },
+
+  //获取全职列表数据
+  fullList(params) {
+    if (!this.data.isScroll) {
+      return false
+    }
+    let paramsObj = {
+      totalSalary: this.data.totalSalary,
+      cityCode: this.data.cityCode,
+      pageNo: this.data.pageNo,
+      user_id: app.globalData.userId,
+      user_token: app.globalData.userToken
+    }
+    Object.assign(paramsObj);
+
+    getFullList(paramsObj).then(data => {
+      var pageNo = data.data.pageNo;
+      let setData = {}
+      // 是否可以滚动加载数据
+      if (data.data.isLast) {
+        setData.isScroll = false
+      }
+      if (data.data.fullPosition.length != 0) {
+        setData.list = this.data.list.concat(data.data.fullPosition)
+        setData.pageNo = pageNo;
+      } else {
+        setData.list = this.data.list;
+      }
+      this.setData({
+        ...setData
+      })
+
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+    this.setData({
+      pageNo: 1, //当前分页
+      isScroll: true, //是否可以滚动
+      list: [],
+      selectId: -1, //选中筛选的条件
+      totalSalary: '', //薪资待遇排序(1:正序;2:倒序)
+      sort: '', //距离排序(1:正序;2:倒序)
+    })
+    this.start();
+    wx.stopPullDownRefresh();
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+    var pageNo = this.data.pageNo + 1;
+    this.setData({
+      pageNo
+    })
+    this.fullList();
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  },
+  doSalay: function(e) {
+    var totalSalary;
+    if (this.data.totalSalary == 1) {
+      totalSalary = 2;
+    } else {
+      totalSalary = 1;
+    }
+    this.setData({
+      selectId: 0,
+      totalSalary: totalSalary,
+      sort: '', //重置
+      pageNo: 1, //当前分页
+      isScroll: true, //是否可以滚动
+      list: [],
+    })
+    console.log("totalSalary", this.data.totalSalary)
+    this.start();
+  },
+  doDistince: function(e) {
+    var sort;
+    if (this.data.sort == 1) {
+      sort = 2;
+    } else {
+      sort = 1;
+    }
+    this.setData({
+      selectId: 1,
+      sort: sort,
+      totalSalary: '', //重置
+    })
+    console.log("sort", this.data.sort)
+  }
+})

+ 10 - 0
pages/fulltime/index.json

@@ -0,0 +1,10 @@
+{
+  "usingComponents": {
+    "i-icon": "../../ui/icon/index",
+    "i-notice-bar": "../../ui/notice-bar/index",
+    "i-tag": "../../ui/tag/index",
+    "marquee": "../../ui/marquee/index"
+  },
+  "enablePullDownRefresh": true,
+  "navigationBarTitleText": "全职工作"
+}

+ 138 - 0
pages/fulltime/index.wxml

@@ -0,0 +1,138 @@
+<!--pages/fulltime/index.wxml-->
+<wxs src="../tools.wxs" module="globalTools" />
+<!-- 顶部筛选 -->
+<view class='head'>
+  <view class='map'>
+    <view class='location'>
+      <image src='../../images/happyjob/location.png'></image>
+    </view>
+    <text class='cityname'>{{cityName}}</text>
+  </view>
+  <view class='salay' bindtap='doSalay'>
+    <text class="salayname {{selectId==0?'active':''}}">薪资</text>
+    <view class='arrow'>
+      <block wx:if="{{selectId == 0}}">
+        <block wx:if="{{totalSalary == 2}}">
+          <image src='../../images/happyjob/selected.png'></image>
+        </block>
+        <block wx:else>
+          <image src='../../images/happyjob/selected1.png'></image>
+        </block>
+      </block>
+      <block wx:else>
+        <block wx:if="{{totalSalary == 2}}">
+          <image src='../../images/happyjob/no_selected.png'></image>
+        </block>
+        <block wx:else>
+          <image src='../../images/happyjob/no_selected1.png'></image>
+        </block>
+      </block>
+    </view>
+  </view>
+  <view class='salay' bindtap='doDistince'>
+    <text class="salayname {{selectId==1?'active':''}}">距离</text>
+    <view class='arrow'>
+      <block wx:if="{{selectId == 1}}">
+        <block wx:if="{{sort == 2}}">
+          <image src='../../images/happyjob/selected.png'></image>
+        </block>
+        <block wx:else>
+          <image src='../../images/happyjob/selected1.png'></image>
+        </block>
+      </block>
+      <block wx:else>
+        <block wx:if="{{sort == 2}}">
+          <image src='../../images/happyjob/no_selected.png'></image>
+        </block>
+        <block wx:else>
+          <image src='../../images/happyjob/no_selected1.png'></image>
+        </block>
+      </block>
+    </view>
+  </view>
+</view>
+
+<!-- 列表 -->
+<block wx:if="{{list.length !=0 }}">
+  <view class='box-body'>
+    <view class='box-item' wx:for="{{list}}" wx:key="hpPositionId" bindtap='toDetail' data-id="{{item.id}}" data-cate="{{item.positionCategory}}" hover-class="item-hover">
+      <view class='box-item-info'>
+        <view class='one'>
+          <view class='left'>
+            {{item.positionName}}
+          </view>
+          <view class='salary'>
+            <image src='../../images/happyjob/dollor.png'></image>
+            {{item.totalSalary?item.totalSalary:item.basicSalary}}
+          </view>
+        </view>
+        <view class='four'>
+          <view class='commpany'>{{item.hpCompany.companyName}}</view>
+          <view class='area'>
+            <image src='../../images/happyjob/address.png'></image>
+            <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
+          </view>
+        </view>
+        <view class='two'>
+          <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}}
+              </i-tag>
+            </block>
+            <block wx:if="{{item.accommodation}}">
+              <i-tag i-class="tag-class">
+                {{item.accommodation}}
+              </i-tag>
+            </block>
+            <block wx:if="{{item.socialSecurity}}">
+              <i-tag i-class="tag-class">
+                {{item.socialSecurity}}
+              </i-tag>
+            </block>
+            <block wx:if="{{item.workDinner}}">
+              <i-tag i-class="tag-class">
+                {{item.workDinner}}
+              </i-tag>
+            </block>
+            <block wx:if="{{item.regularBus}}">
+              <i-tag i-class="tag-class">
+                {{item.regularBus}}
+              </i-tag>
+            </block>
+          </view>
+          <view></view>
+        </view>
+        <view class='three'>
+          <block wx:if="{{item.positionCategory == 3}}">
+            <view class='fan' wx:if="{{item.reward}}">
+              <image src='../../images/happyjob/reward.png'></image>
+              <text>入职最高奖励 {{item.reward}}+{{item.platformAllowance}}元</text>
+            </view>
+            <view wx:else>
+            </view>
+          </block>
+          <block wx:else>
+            <view class='fan' wx:if="{{item.reward}}">
+              <image src='../../images/happyjob/reward.png'></image>
+              <text>入职最高奖励 {{item.reward}}元</text>
+            </view>
+            <view wx:else>
+            </view>
+          </block>
+          <view class='time'>
+            <image src='../../images/happyjob/time.png'></image>
+            <text>{{globalTools.subStr(item.updateDate)}}</text>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+  <view class="loading_no" hidden='{{isScroll}}'>{{showNoMore}}</view>
+</block>
+<block wx:else>
+  <view class='no_data'>
+    <image src="../../images/happyjob/no_data.png" class="white" />
+    <view class='no_text'>暂时还没有全职工作 看看其他的吧</view>
+  </view>
+</block>

+ 375 - 0
pages/fulltime/index.wxss

@@ -0,0 +1,375 @@
+/* pages/fulltime/index.wxss */
+
+page {
+  background-color: #f5f5f5;
+}
+
+/* 顶部筛选 */
+
+.head {
+  display: flex;
+  height: 100rpx;
+  width: 100%;
+  flex: 1 0 auto;
+  align-items: center;
+  background-color: #fff;
+  border-bottom: 2rpx solid #ddd;
+}
+
+.head .map {
+  display: flex;
+  white-space: nowrap;
+  flex-grow: 1;
+  font-size: 30rpx;
+  justify-content: center;
+  height: 40rpx;
+  align-items: center;
+  color: #525255;
+}
+
+.head .map .location {
+  display: flex;
+  align-items: center;
+  width: 20rpx;
+  height: 24rpx;
+  padding-right: 10rpx;
+}
+
+.map .location image {
+  width: 100%;
+  height: 100%;
+}
+
+.head .salay {
+  display: flex;
+  flex-grow: 1;
+  white-space: nowrap;
+  font-size: 26rpx;
+  height: 40rpx;
+  color: #868b92;
+  justify-content: center;
+  align-items: center;
+}
+
+.salay .salayname {
+  padding-right: 10rpx;
+}
+
+.salay .arrow {
+  display: flex;
+  width: 14rpx;
+  height: 8rpx;
+  align-items: center;
+}
+
+.salay .arrow image {
+  width: 100%;
+  height: 100%;
+}
+
+.salay .active {
+  color: #1e62a7;
+}
+
+/* 列表 */
+
+.box-body {
+  width: 100%;
+  overflow: hidden;
+}
+
+.box_title {
+  padding: 17rpx 0 17rpx 40rpx;
+  font-size: 28rpx;
+  color: #666;
+  border-bottom: 2rpx solid #ddd;
+}
+
+.box-item {
+  display: flex;
+  padding: 35rpx 40rpx 30rpx 40rpx;
+  font-size: 32rpx;
+  color: #232327;
+  box-sizing: border-box;
+  background-color: #fff;
+  border-bottom: 16rpx solid #f5f5f5;
+}
+
+.item-hover {
+  background: #f5f5f5;
+}
+
+.box-item .box-item-img {
+  display: flex;
+  flex: 0 0 auto;
+  width: 150rpx;
+  height: 150rpx;
+  border-radius: 6rpx;
+  background: #fff;
+}
+
+.box-item .box-item-info {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  flex-grow: 1;
+  box-sizing: border-box;
+  overflow: hidden;
+}
+
+.box-item .one {
+  display: flex;
+  justify-content: space-between;
+  color: #232327;
+  flex-direction: row;
+}
+
+.box-item .one .left {
+  display: flex;
+  flex-grow: 1;
+  align-items: center;
+  font-size: 32rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(35, 35, 39, 1);
+  width: 60%;
+}
+
+.box-item .one .salary {
+  font-size: 32rpx;
+  font-family: Arial-BoldMT;
+  font-weight: bold;
+  color: rgba(30, 98, 167, 1);
+}
+
+.box-item .one .salary image {
+  width: 18rpx;
+  height: 24rpx;
+}
+
+.box-item .two {
+  display: flex;
+  justify-content: space-between;
+  color: #909090;
+  font-size: 24rpx;
+  margin-top: 30rpx;
+  align-items: center;
+}
+
+.box-item .two .limit {
+  display: flex;
+  flex-direction: row;
+  flex-grow: 1;
+  overflow: hidden;
+  margin-right: 30rpx;
+  width: 80%;
+  color: #868b92;
+}
+
+.box-item .two .limit image {
+  width: 18rpx;
+  height: 18rpx;
+  margin-right: 10rpx;
+}
+
+.box-item .two .limit i-tag {
+  /* margin-left: 10rpx; */
+}
+
+.box-item .two .limit text {
+  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;
+}
+
+.tag-class {
+  background: #e2f4fe !important;
+  margin-right: 6rpx;
+  white-space: nowrap;
+  border: none !important;
+  background: rgba(245, 245, 245, 1) !important;
+  border-radius: 14px !important;
+  padding: 4rpx 10rpx;
+}
+
+.box-item .three {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 20rpx;
+  margin-top: 20rpx;
+}
+
+.box-item .three image {
+  width: 16rpx;
+  height: 19rpx;
+}
+
+.box-item .three .area {
+  color: #868b92;
+  font-size: 24rpx;
+}
+
+.box-item .three .area .area-name {
+  margin-left: 10rpx;
+  color: #868b92;
+  font-size: 24rpx;
+}
+
+.box-item .three .limit {
+  display: flex;
+  flex-grow: 1;
+  overflow: hidden;
+  margin-right: 10rpx;
+  width: 80%;
+  flex-direction: row;
+}
+
+.box-item .three .limit i-tag {
+  margin-left: 10rpx;
+}
+
+.box-item .three .time {
+  flex: 0 0 auto;
+  color: #868b92;
+}
+
+.box-item .three .time image {
+  width: 18rpx;
+  height: 18rpx;
+}
+
+.box-item .three .time text {
+  margin-left: 6rpx;
+  font-size: 20rpx;
+}
+
+.box-item .three .fan {
+  display: flex;
+  flex-direction: row;
+  color: #ff400e;
+  font-size: 20rpx;
+  align-items: center;
+}
+
+.box-item .three .fan image {
+  width: 24rpx;
+  height: 24rpx;
+  margin-right: 10rpx;
+}
+
+.box-item .four {
+  display: flex;
+  justify-content: space-between;
+  color: #909090;
+  font-size: 22rpx;
+  margin-top: 18rpx;
+  align-items: center;
+}
+
+.box-item .four .limit {
+  display: flex;
+  flex-direction: row;
+  flex-grow: 1;
+  overflow: hidden;
+  margin-right: 30rpx;
+  width: 80%;
+  color: #868b92;
+}
+
+.box-item .four .limit image {
+  width: 18rpx;
+  height: 18rpx;
+}
+
+.box-item .four .limit i-tag {
+  margin-left: 10rpx;
+}
+
+.box-item .four .limit text {
+  margin-left: 10rpx;
+}
+
+.box-item .four .time {
+  color: #706f6f;
+  font-size: 20rpx;
+}
+
+.box-item .four .commpany {
+  font-size: 22rpx;
+  color: #a0a4a9;
+}
+
+.box-item .four .area {
+  color: #868b92;
+  font-size: 24rpx;
+}
+
+.box-item .four .area image {
+  width: 16rpx;
+  height: 19rpx;
+}
+
+.box-item .four .area .area-name {
+  margin-left: 10rpx;
+  color: #868b92;
+  font-size: 22rpx;
+}
+
+.loading_no {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 60rpx;
+  font-size: 22rpx;
+  color: #696969;
+}
+
+/* 空白页 */
+
+.no_data {
+  width: 100%;
+  margin-top: 20%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  flex-direction: column;
+}
+
+.white {
+  width: 125px;
+  height: 125px;
+}
+
+.no_text {
+  color: #ccc;
+  font-size: 32rpx;
+  margin-top: 48rpx;
+}