소스 검색

1.3上线 1. 页面优化 2.接口优化 3.功能优化

wangxin 6 년 전
부모
커밋
cfefe160a0
100개의 변경된 파일20098개의 추가작업 그리고 2507개의 파일을 삭제
  1. 5 1
      api/api.js
  2. 29 12
      app.json
  3. 21 17
      app.wxss
  4. 138 0
      components/send-code/send-code.js
  5. 4 0
      components/send-code/send-code.json
  6. 32 0
      components/send-code/send-code.wxml
  7. 124 0
      components/send-code/send-code.wxss
  8. 523 404
      components/wxa-plugin-canvas/index/index.js
  9. BIN
      images/happyjob/activity.png
  10. BIN
      images/happyjob/bg.png
  11. BIN
      images/happyjob/collect.png
  12. BIN
      images/happyjob/collected.png
  13. BIN
      images/happyjob/detail_share.jpg
  14. BIN
      images/happyjob/down.png
  15. BIN
      images/happyjob/fanxian.png
  16. BIN
      images/happyjob/fuli.png
  17. BIN
      images/happyjob/gift.png
  18. BIN
      images/happyjob/index_down.png
  19. BIN
      images/happyjob/index_hot.png
  20. BIN
      images/happyjob/index_offline.png
  21. BIN
      images/happyjob/index_position.png
  22. BIN
      images/happyjob/index_up.png
  23. BIN
      images/happyjob/jianzhi.png
  24. BIN
      images/happyjob/jipin.png
  25. BIN
      images/happyjob/keyboard_del.png
  26. BIN
      images/happyjob/login_laozhang.png
  27. BIN
      images/happyjob/login_logo.png
  28. BIN
      images/happyjob/login_xiaobai.png
  29. BIN
      images/happyjob/position_address.png
  30. BIN
      images/happyjob/position_company.png
  31. BIN
      images/happyjob/position_dec.png
  32. BIN
      images/happyjob/position_detail.png
  33. BIN
      images/happyjob/position_empty.png
  34. BIN
      images/happyjob/position_gift.png
  35. BIN
      images/happyjob/position_warn.png
  36. BIN
      images/happyjob/positon_bus.png
  37. BIN
      images/happyjob/quanmin.png
  38. BIN
      images/happyjob/quanzhi.png
  39. BIN
      images/happyjob/search_clear.png
  40. BIN
      images/happyjob/share-close.png
  41. BIN
      images/happyjob/share-fuli.jpeg
  42. BIN
      images/happyjob/share-save.png
  43. BIN
      images/happyjob/share-wechat.png
  44. BIN
      images/happyjob/share.png
  45. BIN
      images/happyjob/share_img_fulltime.jpeg
  46. BIN
      images/happyjob/sign_background.png
  47. BIN
      images/happyjob/sign_button.png
  48. BIN
      images/happyjob/sort_down.png
  49. BIN
      images/happyjob/sort_null.png
  50. BIN
      images/happyjob/sort_up.png
  51. BIN
      images/happyjob/up.png
  52. BIN
      images/tabs/home.png
  53. BIN
      images/tabs/home1.png
  54. BIN
      images/tabs/mine.png
  55. BIN
      images/tabs/mine1.png
  56. BIN
      images/tabs/pintuan.png
  57. BIN
      images/tabs/pintuan1.png
  58. 7 0
      pages/apply-list/index.js
  59. 0 88
      pages/apply-list/index.less
  60. 170 79
      pages/apply-list/index.wxml
  61. 111 64
      pages/apply-list/index.wxss
  62. 76 0
      pages/bus-detail/bus-detail.js
  63. 0 0
      pages/bus-detail/bus-detail.json
  64. 5 0
      pages/bus-detail/bus-detail.wxml
  65. 16 0
      pages/bus-detail/bus-detail.wxss
  66. 59 25
      pages/check-iphone/index.js
  67. 3 2
      pages/check-iphone/index.json
  68. 3 2
      pages/check-iphone/index.wxml
  69. 16395 1375
      pages/city/city.js
  70. 139 48
      pages/city/index.js
  71. 1 1
      pages/city/index.json
  72. 31 9
      pages/city/index.wxml
  73. 229 71
      pages/city/index.wxss
  74. 7 0
      pages/collection-list/index.js
  75. 168 79
      pages/collection-list/index.wxml
  76. 110 64
      pages/collection-list/index.wxss
  77. 76 0
      pages/company-desc/company-desc.js
  78. 3 0
      pages/company-desc/company-desc.json
  79. 6 0
      pages/company-desc/company-desc.wxml
  80. 16 0
      pages/company-desc/company-desc.wxss
  81. 0 2
      pages/config.less
  82. 271 10
      pages/detail/index.js
  83. 2 1
      pages/detail/index.json
  84. 269 63
      pages/detail/index.wxml
  85. 24 0
      pages/detail/index.wxs
  86. 377 88
      pages/detail/index.wxss
  87. 2 2
      pages/document/pt.wxml
  88. BIN
      pages/expense/images/return-fee.png
  89. BIN
      pages/expense/images/tixing.png
  90. BIN
      pages/expense/images/wages-close.png
  91. 147 0
      pages/expense/pages/return-fee/detail.js
  92. 5 0
      pages/expense/pages/return-fee/detail.json
  93. 46 0
      pages/expense/pages/return-fee/detail.wxml
  94. 121 0
      pages/expense/pages/return-fee/detail.wxss
  95. 118 0
      pages/expense/pages/return-fee/index.js
  96. 5 0
      pages/expense/pages/return-fee/index.json
  97. 28 0
      pages/expense/pages/return-fee/index.wxml
  98. 79 0
      pages/expense/pages/return-fee/index.wxss
  99. 97 0
      pages/expense/pages/wages/detail.js
  100. 0 0
      pages/expense/pages/wages/detail.json

+ 5 - 1
api/api.js

@@ -65,7 +65,11 @@ const url = {
   getMpMemberCompaignsActivity: "/f/api/mpCompaigns/getMpMemberCompaignsActivity", //用户兑换活动列表
   saveMpOrder: '/f/api/order/saveMpOrder', // 生成订单
   wxPayOrder: '/f/api/sys/minaPay/wxPayOrder.do', // 微信小程序支付
-
+  myPayRollList: '/f/api/payroll/myPayRollList', //用户薪资查询列表接口
+  myPayRollDetail: '/f/api/payroll/myPayRollDetail', // 我的薪资详情
+  myHpAgencyFeeList: '/f/api/hpAgencyFee/myHpAgencyFeeList', // 返费列表
+  myHpAgencyFeeDetail: '/f/api/hpAgencyFee/myHpAgencyFeeDetail', // 返费详情
+  confirmHpAgencyFee: "/f/api/hpAgencyFee/confirmHpAgencyFee", // 入职奖励
   /** +++++++++++++++++++++++++++  废弃接口 ++++++++++++++++++++++++++++++++++++++ */
   // userLogin: '/wxAppletsLogin/wxVoteLogin', // post ,根据微信CODE获取微信用户信息
   // userLogin: '/f/api/wxAppletsLogin/decodeUserInfo',

+ 29 - 12
app.json

@@ -7,6 +7,8 @@
   "pages": [
     "pages/index/index",
     "pages/detail/index",
+    "pages/company-desc/company-desc",
+    "pages/bus-detail/bus-detail",
     "pages/search/index",
     "pages/pt/index",
     "pages/pt-share/pt-share",
@@ -24,7 +26,6 @@
     "pages/share/index",
     "pages/wallet/index",
     "pages/check-iphone/index",
-    "pages/wages/index",
     "pages/bind-pt/index",
     "pages/recommend/index",
     "pages/recommend-iphone/index",
@@ -58,17 +59,33 @@
     "pages/select-info/index",
     "pages/jinali-info/index",
     "pages/payment-details/payment-details",
-    "pages/integral/integral",
-    "pages/task/task",
-    "pages/integral-rule/integral-rule",
-    "pages/gift/gift",
-    "pages/gift-detail/gift-detail",
-    "pages/exchange-record/exchange-record",
-    "pages/exchange-detail/exchange-detail",
-    "pages/integral-pay/integral-pay",
     "pages/withdrawal/withdrawal",
     "pages/withdrawal-result/withdrawal-result"
   ],
+  "subpackages": [
+    {
+      "root": "pages/integral",
+      "pages": [
+        "pages/integral/integral",
+        "pages/task/task",
+        "pages/integral-rule/integral-rule",
+        "pages/gift/gift",
+        "pages/gift-detail/gift-detail",
+        "pages/exchange-record/exchange-record",
+        "pages/exchange-detail/exchange-detail",
+        "pages/integral-pay/integral-pay"
+      ]
+    },
+    {
+      "root": "pages/expense",
+      "pages": [
+        "pages/wages/index",
+        "pages/wages/detail",
+        "pages/return-fee/index",
+        "pages/return-fee/detail"
+      ]
+    }
+  ],
   "window": {
     "backgroundTextStyle": "light",
     "navigationBarBackgroundColor": "#fff",
@@ -81,19 +98,19 @@
     "list": [
       {
         "pagePath": "pages/index/index",
-        "text": "首页",
+        "text": "",
         "iconPath": "/images/tabs/home.png",
         "selectedIconPath": "/images/tabs/home1.png"
       },
       {
         "pagePath": "pages/pt/index",
-        "text": "拼工",
+        "text": "",
         "iconPath": "/images/tabs/pintuan.png",
         "selectedIconPath": "/images/tabs/pintuan1.png"
       },
       {
         "pagePath": "pages/mine/index",
-        "text": "我的",
+        "text": "",
         "iconPath": "/images/tabs/mine.png",
         "selectedIconPath": "/images/tabs/mine1.png"
       }

+ 21 - 17
app.wxss

@@ -1,22 +1,26 @@
+.noborder::after {
+  border: 0 !important;
+}
+
+.radius {
+  border-radius: 8px !important;
+}
 
-.noborder::after{
-    border: 0!important;
+.distance {
+  margin: 0 30px !important;
+  box-sizing: border-box;
 }
-.radius{
-    border-radius: 8px!important;
-} 
-.distance{
-    margin: 0 30px!important;
-    box-sizing: border-box;
+
+.primary {
+  background: #2278a8 !important;
 }
-.primary{
-  background: #2278a8!important;
+
+i-count-down {
+  display: inline-block;
 }
-i-count-down{
-    display: inline-block;
+
+.text-overflow {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
 }
-.text-overflow{
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
-}

+ 138 - 0
components/send-code/send-code.js

@@ -0,0 +1,138 @@
+// components/send-code/send-code.js
+let setInter = null;
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+    phone: {
+      type: String,
+      value: ' '
+    },
+    url: {
+      type: String,
+      value: ''
+    },
+    reset: {
+      type: String,
+    }
+  },
+  observers: {
+    'reset': function() {
+      this.setData({
+        code: []
+      })
+    }
+  },
+  /**
+   * 组件的初始数据
+   */
+  data: {
+    up: true,
+    speed: 1000,
+    countdown: '点击发送验证码',
+    code: [],
+    numbers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 0],
+    keybord: [],
+    time: 60
+  },
+  ready() {
+    // this.countdown();
+    const arr = this.data.numbers;
+    const nums = [];
+    for (let i = 0; i < 4; i++) {
+      nums.push(arr.slice(i * 3, (i + 1) * 3))
+    }
+    this.setData({
+      keybord: nums,
+      up: false
+    })
+
+  },
+  detached() {
+    clearInterval(setInter)
+  },
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+    keyboard(e) {
+      const {
+        value
+      } = e.currentTarget.dataset;
+      const code = this.data.code;
+      if (code.length < 6) {
+        code.push(value);
+        this.setData({
+          code
+        })
+        if (code.length === 6) {
+          this.triggerEvent('done', {
+            code: this.data.code.join('')
+          })
+          // wx.navigateTo({
+          //   url: this.data.url,
+          //   success: () => {
+          //     this.setData({
+          //       code: []
+          //     })
+          //   }
+          // })
+        }
+      }
+    },
+    del() {
+      const code = this.data.code;
+      code.pop();
+      this.setData({
+        code
+      })
+    },
+    send() {
+      const time = this.data.time;
+      if (time === 60) {
+        this.countdown();
+        this.setData({
+          up: false
+        })
+        this.triggerEvent('send')
+      }
+    },
+    cancel() {
+      this.setData({
+        up: true
+      })
+    },
+    showFlash(e) {
+      this.setData({
+        up: false
+      })
+    },
+    countdown() {
+      let _time = this.data.time;
+      _time--;
+      this.setData({
+        time: _time,
+        countdown: `${_time}s后重新发送`
+      })
+      setInter = setInterval(() => {
+        let _time = this.data.time;
+        if (_time > 1) {
+          _time--;
+          this.setData({
+            time: _time,
+            countdown: `${_time}s后重新发送`
+          })
+        } else {
+          clearInterval(setInter);
+          this.setData({
+            time: 60,
+            countdown: `重新发送`
+          }, _ => {
+            setInter = null;
+          })
+        }
+      }, this.data.speed)
+    }
+  }
+})

+ 4 - 0
components/send-code/send-code.json

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

+ 32 - 0
components/send-code/send-code.wxml

@@ -0,0 +1,32 @@
+<!--components/send-code/send-code.wxml-->
+<view class="container">
+  <view class="header">
+    <view class="title">请输入短信验证码:</view>
+    <view class="phone">已发送验证码至{{phone}}</view>
+  </view>
+  <view class="content">
+    <view class="nums">
+      <view wx:for='{{6}}' wx:key='index' class="nums-content" data-value="{{code[index]}}" bindtap="showFlash">
+        <text>{{code[index]}}</text>
+        <view class="flash" wx:if='{{!up}}' hidden="{{index !== code.length}}"></view>
+      </view>
+    </view>
+    <view class="bar">
+      <view wx:for='{{6}}' wx:key='index'></view>
+    </view>
+  </view>
+  <view class="count {{time===60?'time':''}}" bindtap="send">{{countdown}}</view>
+  <view class="keyboard {{up||'up'}}">
+    <block wx:for='{{keybord}}' wx:key='index' wx:for-index='key'>
+      <view class="board" wx:for='{{item}}' wx:key='index' wx:if='{{key<3}}' data-value='{{item}}' bindtap='keyboard'>{{item}}</view>
+      <block wx:if='{{key === 3}}'>
+        <view class="board del" bindtap="cancel">取消</view>
+        <view class="board" wx:for='{{keybord[3]}}' wx:key='index' data-value='{{item}}' bindtap="keyboard">{{item}}</view>
+        <view class="board del" bindtap="del">
+          <image src="/images/happyjob/keyboard_del.png"></image>
+        </view>
+      </block>
+    </block>
+
+  </view>
+</view>

+ 124 - 0
components/send-code/send-code.wxss

@@ -0,0 +1,124 @@
+/* components/send-code/send-code.wxss */
+
+.container {
+  padding: 30rpx;
+}
+
+.header {
+  color: #333;
+  font-size: 36rpx;
+}
+
+.phone {
+  color: #666;
+  font-size: 28rpx;
+  margin: 15rpx 0;
+}
+
+.content {
+  width: 100%;
+  margin-top: 75rpx;
+}
+
+.bar, .nums {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.nums-content {
+  height: 70rpx;
+  width: 68rpx;
+  text-align: center;
+  font-size: 68rpx;
+  font-weight: 600;
+  color: #333;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.flash {
+  width: 4rpx;
+  height: 60rpx;
+  background: #327ae1;
+  opacity: 0;
+  animation: flash 1s infinite steps(1);
+}
+
+.bar {
+  margin-top: 30rpx;
+}
+
+.bar view {
+  width: 68rpx;
+  height: 4rpx;
+  background: #ccc;
+}
+
+.count {
+  color: #666;
+  font-size: 28rpx;
+  margin-top: 30rpx;
+  text-align: right;
+}
+
+.keyboard {
+  width: 100%;
+  position: fixed;
+  left: 0;
+  bottom: -490rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  flex-wrap: wrap;
+  border-top: 2rpx solid #ddd;
+  transition: bottom 600ms;
+}
+
+.board {
+  flex: 1;
+  flex-basis: 33%;
+  height: 120rpx;
+  font-size: 36rpx;
+  line-height: 120rpx;
+  text-align: center;
+  background: #fff;
+  border-right: 1rpx solid #ddd;
+  border-bottom: 1rpx solid #ddd;
+}
+
+.board:nth-child(3n) {
+  border-right: none;
+}
+
+.del {
+  font-size: 32rpx;
+  background: #f5f5f5;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.board image {
+  width: 60rpx;
+  height: 60rpx;
+}
+
+@keyframes flash {
+  0%, 100% {
+    opacity: 0;
+  }
+
+  50% {
+    opacity: 1;
+  }
+}
+
+.time {
+  color: #327ae1;
+}
+
+.up {
+  bottom: 0;
+}

+ 523 - 404
components/wxa-plugin-canvas/index/index.js

@@ -1,433 +1,552 @@
 const main = {
-    /**
-     * 渲染块
-     * @param {Object} params
-     */
-    drawBlock({ text, width = 0, height, x, y, paddingLeft = 0, paddingRight = 0, borderWidth, backgroundColor, borderColor, borderRadius = 0, opacity = 1 }) {
-        // 判断是否块内有文字
-        let blockWidth = 0; // 块的宽度
-        let textX = 0;
-        let textY = 0;
-        let wid = 750;
-        if (typeof text !== 'undefined') {
-            // 如果有文字并且块的宽度小于文字宽度,块的宽度为 文字的宽度 + 内边距
-            const textWidth = this._getTextWidth(typeof text.text === 'string' ? text : text.text);
-            blockWidth = textWidth > width ? textWidth : width;
-            blockWidth += paddingLeft + paddingLeft;
+  /**
+   * 渲染块
+   * @param {Object} params
+   */
+  drawBlock({
+    text,
+    width = 0,
+    height,
+    x,
+    y,
+    paddingLeft = 0,
+    paddingRight = 0,
+    borderWidth,
+    backgroundColor,
+    borderColor,
+    borderRadius = 0,
+    opacity = 1,
+    block,
+    beyond
+  }) {
+    // 判断是否块内有文字
+    let blockWidth = 0; // 块的宽度
+    let totalWidth = 0;
+    let textX = 0;
+    let textY = 0;
+    let wid = 750;
+    if (typeof text !== 'undefined') {
+      console.log(text)
+      // 如果有文字并且块的宽度小于文字宽度,块的宽度为 文字的宽度 + 内边距
+      const textWidth = this._getTextWidth(typeof text.text === 'string' ? text : text.text);
+      blockWidth = textWidth > width ? textWidth : width;
+      blockWidth += paddingLeft + paddingLeft;
 
-            const { textAlign = 'left', text: textCon } = text;
-            textY = height / 2 + y; // 文字的y轴坐标在块中线
-            if (textAlign === 'left') {
-                // 如果是右对齐,那x轴在块的最左边
-                textX = x + paddingLeft;
-            } else if (textAlign === 'center') {
-                textX = blockWidth / 2 + x;
-            } else {
-                textX = x + blockWidth - paddingRight;
-            }
-        } else {
-            blockWidth = width;
-        }
+      const {
+        textAlign = 'left', text: textCon
+      } = text;
+      textY = height / 2 + y; // 文字的y轴坐标在块中线
+      if (textAlign === 'left') {
+        // 如果是右对齐,那x轴在块的最左边
+        textX = x + paddingLeft;
+      } else if (textAlign === 'center') {
+        textX = blockWidth / 2 + x;
+      } else {
+        textX = x + blockWidth - paddingRight;
+      }
+    } else {
+      blockWidth = width;
+    }
 
-        if (backgroundColor) {
-            // 画面
-            this.ctx.save();
-            this.ctx.setGlobalAlpha(opacity);
-            this.ctx.setFillStyle(backgroundColor);
-            if (borderRadius > 0) {
-                // 画圆角矩形
-                this._drawRadiusRect(x, y, blockWidth, height, borderRadius);
-                this.ctx.fill();
-            } else {
-                this.ctx.fillRect(this.toPx(x), this.toPx(y), this.toPx(blockWidth), this.toPx(height));
-            }
-            this.ctx.restore();
+    if (backgroundColor) {
+      // 画面
+      this.ctx.save();
+      this.ctx.setGlobalAlpha(opacity);
+      this.ctx.setFillStyle(backgroundColor);
+      if (borderRadius > 0) {
+        // 画圆角矩形
+        this._drawRadiusRect(x, y, blockWidth, height, borderRadius);
+        this.ctx.fill();
+      } else {
+        this.ctx.fillRect(this.toPx(x), this.toPx(y), this.toPx(blockWidth), this.toPx(height));
+      }
+      this.ctx.restore();
+    }
+    if (borderWidth) {
+      // 画线
+      this.ctx.save();
+      this.ctx.setGlobalAlpha(opacity);
+      this.ctx.setStrokeStyle(borderColor);
+      this.ctx.setLineWidth(this.toPx(borderWidth));
+      if (borderRadius > 0) {
+        // 画圆角矩形边框
+        this._drawRadiusRect(x, y, blockWidth, height, borderRadius);
+        this.ctx.stroke();
+      } else {
+        this.ctx.strokeRect(this.toPx(x), this.toPx(y), this.toPx(blockWidth), this.toPx(height));
+      }
+      this.ctx.restore();
+    }
+
+    if (text) {
+      this.drawText(Object.assign(text, {
+        x: textX,
+        y: textY
+      }))
+    }
+    if (block && width) {
+      let blockWidth = x;
+      for (let i = 0; i < block.length; i++) {
+        let val = block[i];
+        if (blockWidth + (beyond.width || 0) < width) {
+          this.drawBlock({
+            ...val,
+            x: blockWidth
+          })
+        } else {
+          if (beyond) {
+            this.drawBlock({
+              ...beyond,
+              x: blockWidth
+            })
+          }
+         break
         }
-        if (borderWidth) {
-            // 画线
-            this.ctx.save();
-            this.ctx.setGlobalAlpha(opacity);
-            this.ctx.setStrokeStyle(borderColor);
-            this.ctx.setLineWidth(this.toPx(borderWidth));
-            if (borderRadius > 0) {
-                // 画圆角矩形边框
-                this._drawRadiusRect(x, y, blockWidth, height, borderRadius);
-                this.ctx.stroke();
-            } else {
-                this.ctx.strokeRect(this.toPx(x), this.toPx(y), this.toPx(blockWidth), this.toPx(height));
-            }
-            this.ctx.restore();
+        if (typeof val.text !== 'undefined') {
+          const textWidth = this._getTextWidth(typeof val.text.text === 'string' ? val.text : val.text.text);
+          blockWidth += textWidth > (val.width || 0) ? textWidth : (val.width || 0);
+          blockWidth += val.paddingLeft * 2;
+          blockWidth += val.marginLeft;
         }
+      }
+      // block.forEach((val, key) => {
 
-        if (text) {
-            this.drawText(Object.assign(text, { x: textX, y: textY }))
-        }
-    },
+      // })
+    }
+  },
 
-    /**
-     * 渲染文字
-     * @param {Object} params
-     */
-    drawText(params) {
-        const { x, y, fontSize, color, baseLine, textAlign, text, opacity = 1, width, lineNum, lineHeight } = params;
-        if (Object.prototype.toString.call(text) === '[object Array]') {
-            let preText = { x, y, baseLine };
-            text.forEach(item => {
-                preText.x += item.marginLeft || 0;
-                const textWidth = this._drawSingleText(Object.assign(item, {
-                    ...preText,
-                }));
-                preText.x += textWidth + (item.marginRight || 0); // 下一段字的x轴为上一段字x + 上一段字宽度
-            })
-        } else {
-            this._drawSingleText(params);
-        }
-    },
+  /**
+   * 渲染文字
+   * @param {Object} params
+   */
+  drawText(params) {
+    const {
+      x,
+      y,
+      fontSize,
+      color,
+      baseLine,
+      textAlign,
+      text,
+      opacity = 1,
+      width,
+      lineNum,
+      lineHeight
+    } = params;
+    if (Object.prototype.toString.call(text) === '[object Array]') {
+      let preText = {
+        x,
+        y,
+        baseLine
+      };
+      text.forEach(item => {
+        preText.x += item.marginLeft || 0;
+        const textWidth = this._drawSingleText(Object.assign(item, {
+          ...preText,
+        }));
+        preText.x += textWidth + (item.marginRight || 0); // 下一段字的x轴为上一段字x + 上一段字宽度
+      })
+    } else {
+      this._drawSingleText(params);
+    }
+  },
 
-    /**
-     * 渲染图片
-     */
-    drawImage(data) {
-        const { imgPath, x, y, w, h, sx, sy, sw, sh, borderRadius = 0, borderWidth = 0, borderColor } = data;
-        this.ctx.save();
-        if (borderRadius > 0) {
-            this._drawRadiusRect(x, y, w, h, borderRadius);
-            this.ctx.clip();
-            this.ctx.drawImage(imgPath, this.toPx(sx), this.toPx(sy), this.toPx(sw), this.toPx(sh), this.toPx(x), this.toPx(y), this.toPx(w), this.toPx(h));
-            if (borderWidth > 0) {
-                this.ctx.setStrokeStyle(borderColor);
-                this.ctx.setLineWidth(this.toPx(borderWidth));
-                this.ctx.stroke();
-            }
-        } else {
-            this.ctx.drawImage(imgPath, this.toPx(sx), this.toPx(sy), this.toPx(sw), this.toPx(sh), this.toPx(x), this.toPx(y), this.toPx(w), this.toPx(h));
-        }
-        this.ctx.restore();
-    },
-    /**
-     * 渲染线
-     * @param {*} param0
-     */
-    drawLine({ startX, startY, endX, endY, color, width }) {
-        this.ctx.save();
-        this.ctx.beginPath();
-        this.ctx.setStrokeStyle(color);
-        this.ctx.setLineWidth(this.toPx(width));
-        this.ctx.moveTo(this.toPx(startX), this.toPx(startY));
-        this.ctx.lineTo(this.toPx(endX), this.toPx(endY));
+  /**
+   * 渲染图片
+   */
+  drawImage(data) {
+    const {
+      imgPath,
+      x,
+      y,
+      w,
+      h,
+      sx,
+      sy,
+      sw,
+      sh,
+      borderRadius = 0,
+      borderWidth = 0,
+      borderColor
+    } = data;
+    this.ctx.save();
+    if (borderRadius > 0) {
+      this._drawRadiusRect(x, y, w, h, borderRadius);
+      this.ctx.clip();
+      this.ctx.drawImage(imgPath, this.toPx(sx), this.toPx(sy), this.toPx(sw), this.toPx(sh), this.toPx(x), this.toPx(y), this.toPx(w), this.toPx(h));
+      if (borderWidth > 0) {
+        this.ctx.setStrokeStyle(borderColor);
+        this.ctx.setLineWidth(this.toPx(borderWidth));
         this.ctx.stroke();
-        this.ctx.closePath();
-        this.ctx.restore();
-    },
-    downloadResource(images = []) {
-        const drawList = [];
-        this.drawArr = [];
-        images.forEach((image, index) => drawList.push(this._downloadImageAndInfo(image, index)));
-        return Promise.all(drawList);
-    },
-    initCanvas(w, h, debug) {
-        return new Promise((resolve) => {
-            this.setData({
-                pxWidth: this.toPx(w),
-                pxHeight: this.toPx(h),
-                debug,
-            }, resolve);
-        });
+      }
+    } else {
+      this.ctx.drawImage(imgPath, this.toPx(sx), this.toPx(sy), this.toPx(sw), this.toPx(sh), this.toPx(x), this.toPx(y), this.toPx(w), this.toPx(h));
     }
+    this.ctx.restore();
+  },
+  /**
+   * 渲染线
+   * @param {*} param0
+   */
+  drawLine({
+    startX,
+    startY,
+    endX,
+    endY,
+    color,
+    width
+  }) {
+    this.ctx.save();
+    this.ctx.beginPath();
+    this.ctx.setStrokeStyle(color);
+    this.ctx.setLineWidth(this.toPx(width));
+    this.ctx.moveTo(this.toPx(startX), this.toPx(startY));
+    this.ctx.lineTo(this.toPx(endX), this.toPx(endY));
+    this.ctx.stroke();
+    this.ctx.closePath();
+    this.ctx.restore();
+  },
+  downloadResource(images = []) {
+    const drawList = [];
+    this.drawArr = [];
+    images.forEach((image, index) => drawList.push(this._downloadImageAndInfo(image, index)));
+    return Promise.all(drawList);
+  },
+  initCanvas(w, h, debug) {
+    return new Promise((resolve) => {
+      this.setData({
+        pxWidth: this.toPx(w),
+        pxHeight: this.toPx(h),
+        debug,
+      }, resolve);
+    });
+  }
 }
 const handle = {
-    /**
-     * 画圆角矩形
-     */
-    _drawRadiusRect(x, y, w, h, r) {
-        const br = r / 2;
-        this.ctx.beginPath();
-        this.ctx.moveTo(this.toPx(x + br), this.toPx(y));    // 移动到左上角的点
-        this.ctx.lineTo(this.toPx(x + w - br), this.toPx(y));
-        this.ctx.arc(this.toPx(x + w - br), this.toPx(y + br), this.toPx(br), 2 * Math.PI * (3 / 4), 2 * Math.PI * (4 / 4))
-        this.ctx.lineTo(this.toPx(x + w), this.toPx(y + h - br));
-        this.ctx.arc(this.toPx(x + w - br), this.toPx(y + h - br), this.toPx(br), 0, 2 * Math.PI * (1 / 4))
-        this.ctx.lineTo(this.toPx(x + br), this.toPx(y + h));
-        this.ctx.arc(this.toPx(x + br), this.toPx(y + h - br), this.toPx(br), 2 * Math.PI * (1 / 4), 2 * Math.PI * (2 / 4))
-        this.ctx.lineTo(this.toPx(x), this.toPx(y + br));
-        this.ctx.arc(this.toPx(x + br), this.toPx(y + br), this.toPx(br), 2 * Math.PI * (2 / 4), 2 * Math.PI * (3 / 4))
-    },
-    /**
-     * 计算文本长度
-     * @param {Array|Object}} text 数组 或者 对象
-     */
-    _getTextWidth(text) {
-        let texts = [];
-        if (Object.prototype.toString.call(text) === '[object Object]') {
-            texts.push(text);
-        } else {
-            texts = text;
-        }
-        let width = 0;
-        texts.forEach(({ fontSize, text, marginLeft = 0, marginRight = 0 }) => {
-            this.ctx.setFontSize(this.toPx(fontSize));
-            width += this.ctx.measureText(text).width + marginLeft + marginRight;
-        })
+  /**
+   * 画圆角矩形
+   */
+  _drawRadiusRect(x, y, w, h, r) {
+    const br = r / 2;
+    this.ctx.beginPath();
+    this.ctx.moveTo(this.toPx(x + br), this.toPx(y)); // 移动到左上角的点
+    this.ctx.lineTo(this.toPx(x + w - br), this.toPx(y));
+    this.ctx.arc(this.toPx(x + w - br), this.toPx(y + br), this.toPx(br), 2 * Math.PI * (3 / 4), 2 * Math.PI * (4 / 4))
+    this.ctx.lineTo(this.toPx(x + w), this.toPx(y + h - br));
+    this.ctx.arc(this.toPx(x + w - br), this.toPx(y + h - br), this.toPx(br), 0, 2 * Math.PI * (1 / 4))
+    this.ctx.lineTo(this.toPx(x + br), this.toPx(y + h));
+    this.ctx.arc(this.toPx(x + br), this.toPx(y + h - br), this.toPx(br), 2 * Math.PI * (1 / 4), 2 * Math.PI * (2 / 4))
+    this.ctx.lineTo(this.toPx(x), this.toPx(y + br));
+    this.ctx.arc(this.toPx(x + br), this.toPx(y + br), this.toPx(br), 2 * Math.PI * (2 / 4), 2 * Math.PI * (3 / 4))
+  },
+  /**
+   * 计算文本长度
+   * @param {Array|Object}} text 数组 或者 对象
+   */
+  _getTextWidth(text) {
+    let texts = [];
+    if (Object.prototype.toString.call(text) === '[object Object]') {
+      texts.push(text);
+    } else {
+      texts = text;
+    }
+    let width = 0;
+    texts.forEach(({
+      fontSize,
+      text,
+      marginLeft = 0,
+      marginRight = 0
+    }) => {
+      this.ctx.setFontSize(this.toPx(fontSize));
+      width += this.ctx.measureText(text).width + marginLeft + marginRight;
+    })
 
-        return this.toRpx(width);
-    },
-    /**
-     * 渲染一段文字
-     */
-    _drawSingleText({ x, y, fontSize, color, baseLine, textAlign = 'left', text, opacity = 1, textDecoration = 'none',
-    width, lineNum = 1, lineHeight = 0 }) {
-        this.ctx.save();
-        this.ctx.beginPath();
-        this.ctx.setGlobalAlpha(opacity);
-        this.ctx.setFontSize(this.toPx(fontSize));
-        this.ctx.setFillStyle(color);
-        this.ctx.setTextBaseline(baseLine);
-        this.ctx.setTextAlign(textAlign);
-        let textWidth = this.toRpx(this.ctx.measureText(text).width);
-        const textArr = [];
-        if (textWidth > width) {
-            // 文本宽度 大于 渲染宽度
-            const unitTextWidth = +(textWidth / text.length).toFixed(2);
-            const unitLineNum = width / unitTextWidth;  // 一行文本数量
-            for (let i = 0; i <= text.length; i += unitLineNum) {  // 将文字转为数组,一行文字一个元素
-                const resText = text.slice(i, i + unitLineNum);
-                resText !== '' && textArr.push(resText);
-                if (textArr.length === lineNum) {
-                    break;
-                }
-            }
-            if (textArr.length * unitLineNum < text.length) {
-                const moreTextWidth = this.ctx.measureText('...').width;
-                const moreTextNum = Math.ceil(moreTextWidth / unitTextWidth);
-                const reg = new RegExp(`.{${moreTextNum}}$`);
-                textArr[textArr.length - 1] = textArr[textArr.length - 1].replace(reg, '...');
-            }
-            textWidth = width;
-        } else {
-            textArr.push(text);
+    return this.toRpx(width);
+  },
+  /**
+   * 渲染一段文字
+   */
+  _drawSingleText({
+    x,
+    y,
+    fontSize,
+    color,
+    baseLine,
+    textAlign = 'left',
+    text,
+    opacity = 1,
+    textDecoration = 'none',
+    width,
+    lineNum = 1,
+    lineHeight = 0
+  }) {
+    this.ctx.save();
+    this.ctx.beginPath();
+    this.ctx.setGlobalAlpha(opacity);
+    this.ctx.setFontSize(this.toPx(fontSize));
+    this.ctx.setFillStyle(color);
+    this.ctx.setTextBaseline(baseLine);
+    this.ctx.setTextAlign(textAlign);
+    let textWidth = this.toRpx(this.ctx.measureText(text).width);
+    const textArr = [];
+    if (textWidth > width) {
+      // 文本宽度 大于 渲染宽度
+      const unitTextWidth = +(textWidth / text.length).toFixed(2);
+      const unitLineNum = width / unitTextWidth; // 一行文本数量
+      for (let i = 0; i <= text.length; i += unitLineNum) { // 将文字转为数组,一行文字一个元素
+        const resText = text.slice(i, i + unitLineNum);
+        resText !== '' && textArr.push(resText);
+        if (textArr.length === lineNum) {
+          break;
         }
+      }
+      if (textArr.length * unitLineNum < text.length) {
+        const moreTextWidth = this.ctx.measureText('...').width;
+        const moreTextNum = Math.ceil(moreTextWidth / unitTextWidth);
+        const reg = new RegExp(`.{${moreTextNum}}$`);
+        textArr[textArr.length - 1] = textArr[textArr.length - 1].replace(reg, '...');
+      }
+      textWidth = width;
+    } else {
+      textArr.push(text);
+    }
 
-        textArr.forEach((item, index) => {
-            this.ctx.fillText(item, this.toPx(x), this.toPx(y + (lineHeight || fontSize) * index));
-        })
+    textArr.forEach((item, index) => {
+      this.ctx.fillText(item, this.toPx(x), this.toPx(y + (lineHeight || fontSize) * index));
+    })
 
-        this.ctx.restore();
+    this.ctx.restore();
 
-        // textDecoration
-        if (textDecoration !== 'none') {
-            let lineY = y;
-            if (textDecoration === 'line-through') {
-                // 目前只支持贯穿线
-                lineY = y;
-            }
-            this.ctx.save();
-            this.ctx.moveTo(this.toPx(x), this.toPx(lineY));
-            this.ctx.lineTo(this.toPx(x) + this.toPx(textWidth), this.toPx(lineY));
-            this.ctx.setStrokeStyle(color);
-            this.ctx.stroke();
-            this.ctx.restore();
-        }
+    // textDecoration
+    if (textDecoration !== 'none') {
+      let lineY = y;
+      if (textDecoration === 'line-through') {
+        // 目前只支持贯穿线
+        lineY = y;
+      }
+      this.ctx.save();
+      this.ctx.moveTo(this.toPx(x), this.toPx(lineY));
+      this.ctx.lineTo(this.toPx(x) + this.toPx(textWidth), this.toPx(lineY));
+      this.ctx.setStrokeStyle(color);
+      this.ctx.stroke();
+      this.ctx.restore();
+    }
 
-        return textWidth;
-    },
+    return textWidth;
+  },
 }
 const helper = {
-    /**
-      * 下载图片并获取图片信息
-      */
-    _downloadImageAndInfo(image, index) {
-        return new Promise((resolve, reject) => {
-            const { x, y, url, zIndex } = image;
-            const imageUrl = url;
-            // 下载图片
-            this._downImage(imageUrl, index)
-                // 获取图片信息
-                .then(imgPath => this._getImageInfo(imgPath, index))
-                .then(({ imgPath, imgInfo }) => {
-                    // 根据画布的宽高计算出图片绘制的大小,这里会保证图片绘制不变形
-                    let sx;
-                    let sy;
-                    const borderRadius = image.borderRadius || 0;
-                    const setWidth = image.width;
-                    const setHeight = image.height;
-                    const width = this.toRpx(imgInfo.width);
-                    const height = this.toRpx(imgInfo.height);
+  /**
+   * 下载图片并获取图片信息
+   */
+  _downloadImageAndInfo(image, index) {
+    return new Promise((resolve, reject) => {
+      const {
+        x,
+        y,
+        url,
+        zIndex
+      } = image;
+      const imageUrl = url;
+      // 下载图片
+      this._downImage(imageUrl, index)
+        // 获取图片信息
+        .then(imgPath => this._getImageInfo(imgPath, index))
+        .then(({
+          imgPath,
+          imgInfo
+        }) => {
+          // 根据画布的宽高计算出图片绘制的大小,这里会保证图片绘制不变形
+          let sx;
+          let sy;
+          const borderRadius = image.borderRadius || 0;
+          const setWidth = image.width;
+          const setHeight = image.height;
+          const width = this.toRpx(imgInfo.width);
+          const height = this.toRpx(imgInfo.height);
 
-                    if (width / height <= setWidth / setHeight) {
-                        sx = 0;
-                        sy = (height - ((width / setWidth) * setHeight)) / 2;
-                    } else {
-                        sy = 0;
-                        sx = (width - ((height / setHeight) * setWidth)) / 2;
-                    }
-                    this.drawArr.push({
-                        type: 'image',
-                        borderRadius,
-                        borderWidth: image.borderWidth,
-                        borderColor: image.borderColor,
-                        zIndex: typeof zIndex !== 'undefined' ? zIndex : index,
-                        imgPath,
-                        sx,
-                        sy,
-                        sw: (width - (sx * 2)),
-                        sh: (height - (sy * 2)),
-                        x,
-                        y,
-                        w: setWidth,
-                        h: setHeight,
-                    });
-                    resolve();
-                })
-                .catch(err => reject(err));
-        });
-    },
-    /**
-     * 下载图片资源
-     * @param {*} imageUrl
-     */
-    _downImage(imageUrl) {
-        return new Promise((resolve, reject) => {
-            if (/^http/.test(imageUrl) && !new RegExp(wx.env.USER_DATA_PATH).test(imageUrl)) {
-                wx.downloadFile({
-                    url: this._mapHttpToHttps(imageUrl),
-                    success: (res) => {
-                        if (res.statusCode === 200) {
-                            resolve(res.tempFilePath);
-                        } else {
-                            reject(res.errMsg);
-                        }
-                    },
-                    fail(err) {
-                        reject(err);
-                    },
-                });
+          if (width / height <= setWidth / setHeight) {
+            sx = 0;
+            sy = (height - ((width / setWidth) * setHeight)) / 2;
+          } else {
+            sy = 0;
+            sx = (width - ((height / setHeight) * setWidth)) / 2;
+          }
+          this.drawArr.push({
+            type: 'image',
+            borderRadius,
+            borderWidth: image.borderWidth,
+            borderColor: image.borderColor,
+            zIndex: typeof zIndex !== 'undefined' ? zIndex : index,
+            imgPath,
+            sx,
+            sy,
+            sw: (width - (sx * 2)),
+            sh: (height - (sy * 2)),
+            x,
+            y,
+            w: setWidth,
+            h: setHeight,
+          });
+          resolve();
+        })
+        .catch(err => reject(err));
+    });
+  },
+  /**
+   * 下载图片资源
+   * @param {*} imageUrl
+   */
+  _downImage(imageUrl) {
+    return new Promise((resolve, reject) => {
+      if (/^http/.test(imageUrl) && !new RegExp(wx.env.USER_DATA_PATH).test(imageUrl)) {
+        wx.downloadFile({
+          url: this._mapHttpToHttps(imageUrl),
+          success: (res) => {
+            if (res.statusCode === 200) {
+              resolve(res.tempFilePath);
             } else {
-                // 支持本地地址
-                resolve(imageUrl);
+              reject(res.errMsg);
             }
+          },
+          fail(err) {
+            reject(err);
+          },
         });
-    },
-    /**
-     * 获取图片信息
-     * @param {*} imgPath
-     * @param {*} index
-     */
-    _getImageInfo(imgPath, index) {
-        return new Promise((resolve, reject) => {
-            wx.getImageInfo({
-                src: imgPath,
-                success(res) {
-                    resolve({ imgPath, imgInfo: res, index });
-                },
-                fail(err) {
-                    reject(err);
-                },
-            });
-        });
-    },
-    toPx(rpx) {
-        return rpx * this.factor;
-    },
-    toRpx(px) {
-        return px / this.factor;
-    },
-    /**
-     * 将http转为https
-     * @param {String}} rawUrl 图片资源url
-     */
-    _mapHttpToHttps(rawUrl) {
-        if (rawUrl.indexOf(':') < 0) {
-            return rawUrl;
-        }
-        const urlComponent = rawUrl.split(':');
-        if (urlComponent.length === 2) {
-            if (urlComponent[0] === 'http') {
-                urlComponent[0] = 'https';
-                return `${urlComponent[0]}:${urlComponent[1]}`;
-            }
-        }
-        return rawUrl;
-    },
+      } else {
+        // 支持本地地址
+        resolve(imageUrl);
+      }
+    });
+  },
+  /**
+   * 获取图片信息
+   * @param {*} imgPath
+   * @param {*} index
+   */
+  _getImageInfo(imgPath, index) {
+    return new Promise((resolve, reject) => {
+      wx.getImageInfo({
+        src: imgPath,
+        success(res) {
+          resolve({
+            imgPath,
+            imgInfo: res,
+            index
+          });
+        },
+        fail(err) {
+          reject(err);
+        },
+      });
+    });
+  },
+  toPx(rpx) {
+    return rpx * this.factor;
+  },
+  toRpx(px) {
+    return px / this.factor;
+  },
+  /**
+   * 将http转为https
+   * @param {String}} rawUrl 图片资源url
+   */
+  _mapHttpToHttps(rawUrl) {
+    if (rawUrl.indexOf(':') < 0) {
+      return rawUrl;
+    }
+    const urlComponent = rawUrl.split(':');
+    if (urlComponent.length === 2) {
+      if (urlComponent[0] === 'http') {
+        urlComponent[0] = 'https';
+        return `${urlComponent[0]}:${urlComponent[1]}`;
+      }
+    }
+    return rawUrl;
+  },
 }
 Component({
-    properties: {
-    },
-    created() {
-        const sysInfo = wx.getSystemInfoSync();
-        const screenWidth = sysInfo.screenWidth;
-        this.factor = screenWidth / 750;
-    },
-    methods: Object.assign({
-        create(config) {
-            this.ctx = wx.createCanvasContext('canvasid', this);
+  properties: {},
+  created() {
+    const sysInfo = wx.getSystemInfoSync();
+    const screenWidth = sysInfo.screenWidth;
+    this.factor = screenWidth / 750;
+  },
+  methods: Object.assign({
+    create(config) {
+      this.ctx = wx.createCanvasContext('canvasid', this);
 
-            this.initCanvas(config.width, config.height, config.debug)
-                .then(() => {
-                    // 设置画布底色
-                    if (config.backgroundColor) {
-                        this.ctx.save();
-                        this.ctx.setFillStyle(config.backgroundColor);
-                        this.ctx.fillRect(0, 0, this.toPx(config.width), this.toPx(config.height));
-                        this.ctx.restore();
-                    }
-                    const { texts = [], images = [], blocks = [], lines = [] } = config;
-                    const queue = this.drawArr
-                        .concat(texts.map((item) => {
-                            item.type = 'text';
-                            item.zIndex = item.zIndex || 0;
-                            return item;
-                        }))
-                        .concat(blocks.map((item) => {
-                            item.type = 'block';
-                            item.zIndex = item.zIndex || 0;
-                            return item;
-                        }))
-                        .concat(lines.map((item) => {
-                            item.type = 'line';
-                            item.zIndex = item.zIndex || 0;
-                            return item;
-                        }));
-                    // 按照顺序排序
-                    queue.sort((a, b) => a.zIndex - b.zIndex);
-
-                    queue.forEach((item) => {
-                        if (item.type === 'image') {
-                            this.drawImage(item)
-                        } else if (item.type === 'text') {
-                            this.drawText(item)
-                        } else if (item.type === 'block') {
-                            this.drawBlock(item)
-                        } else if (item.type === 'line') {
-                            this.drawLine(item)
-                        }
-                    });
+      this.initCanvas(config.width, config.height, config.debug)
+        .then(() => {
+          // 设置画布底色
+          if (config.backgroundColor) {
+            this.ctx.save();
+            this.ctx.setFillStyle(config.backgroundColor);
+            this.ctx.fillRect(0, 0, this.toPx(config.width), this.toPx(config.height));
+            this.ctx.restore();
+          }
+          const {
+            texts = [], images = [], blocks = [], lines = []
+          } = config;
+          const queue = this.drawArr
+            .concat(texts.map((item) => {
+              item.type = 'text';
+              item.zIndex = item.zIndex || 0;
+              return item;
+            }))
+            .concat(blocks.map((item) => {
+              item.type = 'block';
+              item.zIndex = item.zIndex || 0;
+              return item;
+            }))
+            .concat(lines.map((item) => {
+              item.type = 'line';
+              item.zIndex = item.zIndex || 0;
+              return item;
+            }));
+          // 按照顺序排序
+          queue.sort((a, b) => a.zIndex - b.zIndex);
 
-                    const res = wx.getSystemInfoSync();
-                    const platform = res.platform;
-                    let time = 0;
-                    if (platform === 'android') {
-                        // 在安卓平台,经测试发现如果海报过于复杂在转换时需要做延时,要不然样式会错乱
-                        time = 300;
-                    }
-                    this.ctx.draw(false, () => {
-                        setTimeout(() => {
-                            wx.canvasToTempFilePath({
-                                canvasId: 'canvasid',
-                                success: (res) => {
-                                    this.triggerEvent('success', res.tempFilePath);
-                                },
-                                fail: (err) => {
-                                    this.triggerEvent('fail', err);
-                                },
-                            }, this);
-                        }, time);
-                    });
-                })
-                .catch((err) => {
-                    wx.showToast({ icon: 'none', title: err.errMsg || '生成失败' });
-                    console.error(err);
-                });
-        },
-    }, main, handle, helper),
-});
+          queue.forEach((item) => {
+            if (item.type === 'image') {
+              this.drawImage(item)
+            } else if (item.type === 'text') {
+              this.drawText(item)
+            } else if (item.type === 'block') {
+              this.drawBlock(item)
+            } else if (item.type === 'line') {
+              this.drawLine(item)
+            }
+          });
 
+          const res = wx.getSystemInfoSync();
+          const platform = res.platform;
+          let time = 0;
+          if (platform === 'android') {
+            // 在安卓平台,经测试发现如果海报过于复杂在转换时需要做延时,要不然样式会错乱
+            time = 300;
+          }
+          this.ctx.draw(false, () => {
+            setTimeout(() => {
+              wx.canvasToTempFilePath({
+                canvasId: 'canvasid',
+                success: (res) => {
+                  this.triggerEvent('success', res.tempFilePath);
+                },
+                fail: (err) => {
+                  this.triggerEvent('fail', err);
+                },
+              }, this);
+            }, time);
+          });
+        })
+        .catch((err) => {
+          wx.showToast({
+            icon: 'none',
+            title: err.errMsg || '生成失败'
+          });
+          console.error(err);
+        });
+    },
+  }, main, handle, helper),
+});

BIN
images/happyjob/activity.png


BIN
images/happyjob/bg.png


BIN
images/happyjob/collect.png


BIN
images/happyjob/collected.png


BIN
images/happyjob/detail_share.jpg


BIN
images/happyjob/down.png


BIN
images/happyjob/fanxian.png


BIN
images/happyjob/fuli.png


BIN
images/happyjob/gift.png


BIN
images/happyjob/index_down.png


BIN
images/happyjob/index_hot.png


BIN
images/happyjob/index_offline.png


BIN
images/happyjob/index_position.png


BIN
images/happyjob/index_up.png


BIN
images/happyjob/jianzhi.png


BIN
images/happyjob/jipin.png


BIN
images/happyjob/keyboard_del.png


BIN
images/happyjob/login_laozhang.png


BIN
images/happyjob/login_logo.png


BIN
images/happyjob/login_xiaobai.png


BIN
images/happyjob/position_address.png


BIN
images/happyjob/position_company.png


BIN
images/happyjob/position_dec.png


BIN
images/happyjob/position_detail.png


BIN
images/happyjob/position_empty.png


BIN
images/happyjob/position_gift.png


BIN
images/happyjob/position_warn.png


BIN
images/happyjob/positon_bus.png


BIN
images/happyjob/quanmin.png


BIN
images/happyjob/quanzhi.png


BIN
images/happyjob/search_clear.png


BIN
images/happyjob/share-close.png


BIN
images/happyjob/share-fuli.jpeg


BIN
images/happyjob/share-save.png


BIN
images/happyjob/share-wechat.png


BIN
images/happyjob/share.png


BIN
images/happyjob/share_img_fulltime.jpeg


BIN
images/happyjob/sign_background.png


BIN
images/happyjob/sign_button.png


BIN
images/happyjob/sort_down.png


BIN
images/happyjob/sort_null.png


BIN
images/happyjob/sort_up.png


BIN
images/happyjob/up.png


BIN
images/tabs/home.png


BIN
images/tabs/home1.png


BIN
images/tabs/mine.png


BIN
images/tabs/mine1.png


BIN
images/tabs/pintuan.png


BIN
images/tabs/pintuan1.png


+ 7 - 0
pages/apply-list/index.js

@@ -51,6 +51,13 @@ Page({
   onShareAppMessage: function() {
 
   },
+  doArrow(e) {
+    const index = e.currentTarget.dataset.index;
+    const list = this.data.list;
+    this.setData({
+      [`list[${index}].up`]: !list[index].up
+    })
+  },
   //获取我的申请岗位
   fetchData() {
     if (!this.data.isScroll) {

+ 0 - 88
pages/apply-list/index.less

@@ -1,88 +0,0 @@
-@import "../config";
-page{
-  background: #f8f8f8;
-  padding-top: 20rpx;
-}
-.box-body{
-    margin-top: 10rpx;
-    width: 100%;
-    overflow: hidden;
-    background: #fff;
-  }
-  .box-item{
-    display: flex;
-    height: 217rpx;
-    padding: 30rpx 20rpx;
-    font-size: 28rpx;
-    color: #999;
-    box-sizing: border-box;
-    border-bottom: 1px solid #eaeaea;
-  }
-  .item-hover{
-      background: #cacfd3;
-  }
-  .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: #333;
-  }
-  .job{
-      color: #333;
-      font-size: 30rpx;
-      font-family: PingFang-SC-Bold;
-      font-weight: bold;
-      letter-spacing:4rpx;
-  }
-  .salary{
-      color: #ef7618;
-      font-size: 30rpx;
-      font-weight: bold;
-  }
-  .danwei{
-      font-size: 20rpx;
-      font-weight: 400;
-  }
-  .fan{
-    background: url("@{baseUrl}/images/home/fanBg.png") no-repeat;
-    background-size: 100% 100%;
-    margin-left: 10rpx;
-    font-size: 20rpx;
-    padding: 4rpx 20rpx;
-    color: #fff;
-  }
-  .one{
-    display:flex;
-    justify-content: space-between;
-    .pt-duofan{
-      color: #f95028;
-      font-size: 24rpx;
-    }
-  }
-  .two{
-    display: flex;
-    justify-content: space-between;
-    color: #909090;
-    font-size: 20rpx;
-  }
-  .three{
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    font-size: 20rpx;
-  }

+ 170 - 79
pages/apply-list/index.wxml

@@ -2,7 +2,7 @@
 <wxs src="../tools.wxs" module="globalTools" />
 <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' wx:for="{{list}}" wx:key="hpPositionId" bindtap='toDetail' data-id="{{item.id}}" data-cate="{{item.positionCategory}}" hover-class="none">
       <!-- 兼职岗位 -->
       <block wx:if="{{item.positionCategory == 1 || item.positionCategory == 9}}">
         <view class='box-item-info'>
@@ -11,51 +11,85 @@
               {{item.positionName}}
             </view>
             <view class='salary'>
-              <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
               {{item.salary}}
             </view>
           </view>
-          <view class='two'>
+          <view class='two' id="two_{{index}}">
             <view class='limit'>
-              <view>
-                <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              </view>
+              <!-- <view>
+              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            </view> -->
               <view>
                 <block wx:if="{{item.workDay}}">
                   <block wx:for="{{globalTools.splitStr1(item.workDay,',')}}" wx:key="*this" wx:for-item="tag">
                     <block wx:if="{{index == 0}}">
-                      {{tag}} ~
+                      {{Tools.formatDate(tag)}} 至
                     </block>
                     <block wx:if="{{index == (globalTools.splitStr1(item.workDay,',').length-1)}}">
-                      {{tag}}
+                      {{Tools.formatDate(tag)}}
                     </block>
                   </block>
-                  <text>(共计{{globalTools.splitStr1(item.workDay,',').length}}天)</text>
+                  <text> (共计{{globalTools.splitStr1(item.workDay,',').length}}天)</text>
                 </block>
               </view>
             </view>
-            <block wx:if="{{item.settlementMethod}}">
-              <view class='time'>{{item.settlementMethod}}</view>
-            </block>
-            <block wx:else>
-              <view></view>
-            </block>
+            <view class='time'>
+              <text>{{Tools.formatTime(item.updateDate)}}</text>
+            </view>
           </view>
-          <view class='three'>
-            <view class='area'>
-              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
-              <block wx:if="{{item.hpPositionAddressList.length>0}}">
-                <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
+          <view class="address">
+            <text>{{item.hpPositionAddressList[0].adname}}</text>
+          </view>
+          <view class='two {{item.up?"down":""}}'>
+            <view class='limit_1'>
+              <block wx:if="{{item.settlementMethod}}">
+                <i-tag i-class="tag-class">
+                  {{item.settlementMethod}}
+                </i-tag>
               </block>
-              <block wx:else>
-                <text class='area-name'>全国</text>
+              <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 class='time'>
-              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              <text>{{globalTools.subStr(item.createDate)}}</text>
-            </view>
+            <!-- <view class="arrow" catchtap="doArrow" data-index='{{index}}' wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
+            <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
+            <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
+          </view> -->
+          </view>
+          <!-- <view class='three'>
+          <view class='area' wx:if="{{item.hpPositionAddressList}}">
+            <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
+            <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
+          </view>
+          <view wx:else>
+          </view>
+          <view class='time'>
+            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            <text>{{Tools.formatTime(item.updateDate)}}</text>
           </view>
+        </view> -->
         </view>
       </block>
       <!-- 拼团 -->
@@ -63,6 +97,7 @@
         <view class='box-item-info'>
           <view class='one'>
             <view class='left'>
+              <view wx:if='{{item.positionCategory == 4}}' class="pintuan">拼团</view>
               {{item.positionName}}
             </view>
             <view class='salary'>
@@ -72,10 +107,10 @@
           </view>
           <view class='four'>
             <view class='commpany'>{{item.hpCompany.companyName}}</view>
-            <view class='area'>
-              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
-              <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
-            </view>
+          </view>
+          <view class='address'>
+            <!-- <image src='{{imgServerUrl}}/images/happyjob/address.png'></image> -->
+            <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
           </view>
           <view class='two'>
             <view class='limit_1'>
@@ -105,19 +140,22 @@
                 </i-tag>
               </block>
             </view>
-            <view></view>
+            <view class="arrow {{item.up?'down':''}}" data-index='{{index}}' catchtap="doArrow" wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
+              <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
+              <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
+            </view>
           </view>
           <view class='three'>
             <view class='fan' wx:if="{{item.reward}}">
-              <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image>
+              <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
               <text>入职最高奖励 {{item.reward}}元</text>
             </view>
             <view wx:else>
             </view>
-            <view class='time'>
+            <!-- <view class='time'>
               <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
               <text>{{globalTools.subStr(item.updateDate)}}</text>
-            </view>
+            </view> -->
           </view>
           <view class='five'>
             <view class="pt-member">已有
@@ -135,33 +173,73 @@
               {{item.positionName}}
             </view>
             <view class='salary'>
-              <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
               {{item.salary}}
             </view>
           </view>
           <view class='two'>
             <view class='limit'>
-              <view>
-                <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              </view>
-              <text> {{globalTools.subStr(item.publishTime)}} ~ {{globalTools.subStr(item.endTime)}}</text>
+              <!-- <view>
+              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            </view> -->
+              <text> {{Tools.formatDate(item.publishTime)}} 至 {{Tools.formatDate(item.endTime)}}</text>
             </view>
-            <view class='time'>{{item.settlementMethod}}</view>
+            <view class='time'>{{Tools.formatTime(item.updateDate)}}</view>
           </view>
-          <view class='three'>
-            <view class='area'>
-              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
-              <block wx:if="{{item.activityWide}}">
-                <i-tag wx:for="{{globalTools.splitStr1(item.activityWide,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class1" style="margin-left:10rpx;">
+          <view class="address">
+            <text>{{item.hpPositionAddressList[0].adname}}</text>
+          </view>
+          <view class='two {{item.up?"down":""}}' id="two_{{index}}">
+            <view class='limit_1'>
+              <block wx:if="{{item.settlementMethod}}">
+                <i-tag i-class="tag-class">
+                  {{item.settlementMethod}}
+                </i-tag>
+              </block>
+              <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 class='time'>
-              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              <text>{{globalTools.subStr(item.createDate)}}</text>
+            <view class="arrow {{item.up?'down':''}}" data-index='{{index}}' catchtap="doArrow" wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
+              <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
+              <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
             </view>
           </view>
+          <view class='three'>
+            <!-- <view class='area'>
+            <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
+            <block wx:if="{{item.activityWide}}">
+              <i-tag wx:for="{{globalTools.splitStr1(item.activityWide,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class1" style="margin-left:10rpx;">
+                {{tag}}
+              </i-tag>
+            </block>
+          </view> -->
+            <!-- <view class='time'>
+            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            <text>{{globalTools.subStr(item.updateDate)}}</text>
+          </view> -->
+          </view>
         </view>
       </block>
       <!-- 全职,入职奖励,高薪急聘 -->
@@ -169,27 +247,58 @@
         <view class='box-item-info'>
           <view class='one'>
             <view class='left'>
+              <view wx:if='{{item.positionCategory == 3}}' class="gaoxin">高薪</view>
+              <view wx:if='{{item.positionCategory == 4}}' class="pintuan">拼团</view>
               {{item.positionName}}
             </view>
             <view class='salary'>
-              <!-- <image src='{{imgServerUrl}}/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='{{imgServerUrl}}/images/happyjob/address.png'></image>
-              <block wx:if="{{item.hpPositionAddressList.length>0}}">
-                <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
-              </block>
-              <block wx:else>
-                <text class='area-name'>全国</text>
-              </block>
+              <!-- <image src='{{imgServerUrl}}/images/happyjob/address.png'></image> -->
+              <!-- {{item.hpPositionAddressList[0].adname}} -->
+              <text class='area-name'><text>{{Tools.formatTime(item.updateDate)}}</text></text>
             </view>
           </view>
-          <view class='two'>
+          <view class="address">
+            <text>{{item.hpPositionAddressList[0].adname}}</text>
+          </view>
+          <view class='three'>
+            <block wx:if="{{item.positionCategory == 3}}">
+              <view class='fan' wx:if="{{item.reward}}">
+                <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
+                <text>入职最高奖励 {{item.reward}}元,额外奖励{{item.platformAllowance}}元</text>
+              </view>
+              <view class='fan' wx:elif="{{item.platformAllowance}}">
+                <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
+                <text>入职最高奖励 {{item.platformAllowance}}元</text>
+              </view>
+              <view wx:else>
+              </view>
+            </block>
+            <block wx:else>
+              <view class='fan' wx:if="{{item.reward}}">
+                <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
+                <text>入职最高奖励 {{item.reward}}元</text>
+              </view>
+              <view wx:else>
+              </view>
+            </block>
+            <!-- <view class='time'>
+            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            <text>{{globalTools.subStr(item.updateDate)}}</text>
+          </view> -->
+          </view>
+          <view class='two {{item.up?"down":""}}' id="two_{{index}}">
             <view class='limit_1'>
+              <block wx:if="{{item.settlementMethod}}">
+                <i-tag i-class="tag-class">
+                  {{item.settlementMethod}}
+                </i-tag>
+              </block>
               <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}}
@@ -216,30 +325,12 @@
                 </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='{{imgServerUrl}}/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='{{imgServerUrl}}/images/happyjob/reward.png'></image>
-                <text>入职最高奖励 {{item.reward}}元</text>
-              </view>
-              <view wx:else>
-              </view>
-            </block>
-            <view class='time'>
-              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              <text>{{globalTools.subStr(item.createDate)}}</text>
+            <view class="arrow {{item.up?'down':''}}" catchtap="doArrow" data-index='{{index}}' wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
+              <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
+              <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
             </view>
           </view>
+
         </view>
       </block>
     </view>

+ 111 - 64
pages/apply-list/index.wxss

@@ -6,16 +6,27 @@ page {
 
 .box-body {
   width: 100%;
-  overflow: hidden;
+  margin-top: 20rpx;
+  background: #fff;
+}
+
+.box_title {
+  height: 88rpx;
+  line-height: 88rpx;
+  font-size: 28rpx;
+  color: #666;
+  border-bottom: 2rpx solid #eee;
+  padding: 0 30rpx;
+  box-sizing: border-box;
 }
 
 .box-item {
+  min-height: 276rpx;
+  padding: 30rpx;
   display: flex;
-  padding: 35rpx 40rpx 30rpx 40rpx;
-  font-size: 32rpx;
-  color: #232327;
+  font-size: 26rpx;
+  color: #666;
   box-sizing: border-box;
-  background-color: #fff;
   border-bottom: 16rpx solid #f5f5f5;
 }
 
@@ -61,9 +72,9 @@ page {
 
 .box-item .one .salary {
   font-size: 32rpx;
-  font-family: Arial-BoldMT;
+  font-family: ArialMT;
   font-weight: 400;
-  color: rgba(255, 78, 37, 1);
+  color: #ff401a;
 }
 
 .box-item .one .salary image {
@@ -72,12 +83,15 @@ page {
 }
 
 .box-item .two {
+  max-height: 55rpx;
+  overflow: hidden;
   display: flex;
+  /* align-items: center; */
   justify-content: space-between;
-  color: #909090;
-  font-size: 24rpx;
-  margin-top: 30rpx;
-  align-items: center;
+  color: #666;
+  font-size: 26rpx;
+  margin-top: 20rpx;
+  /* transition: all 1s; */
 }
 
 .box-item .two .limit {
@@ -85,9 +99,9 @@ page {
   flex-direction: row;
   flex-grow: 1;
   overflow: hidden;
-  margin-right: 30rpx;
+  margin-right: 20rpx;
   width: 80%;
-  color: #868b92;
+  color: #666;
 }
 
 .box-item .two .limit image {
@@ -97,11 +111,10 @@ page {
 }
 
 .box-item .two .limit i-tag {
-  /* margin-left: 10rpx; */
 }
 
 .box-item .two .limit text {
-  margin-left: 10rpx;
+  /* margin-left: 10rpx; */
 }
 
 .box-item .two .limit_1 {
@@ -121,7 +134,6 @@ page {
 }
 
 .box-item .two .limit_1 i-tag {
-  /* margin-left: 10rpx; */
 }
 
 .box-item .two .limit_1 text {
@@ -129,22 +141,20 @@ page {
 }
 
 .box-item .two .time {
-  color: #4391e1;
-  font-size: 20rpx;
-  border: 2rpx solid rgba(67, 145, 225, 1);
-  border-radius: 14px;
-  padding: 4rpx 14rpx;
+  color: #666;
+  font-size: 26rpx;
 }
 
 .tag-class {
-  margin-right: 8rpx;
+  margin-right: 15rpx;
   white-space: nowrap;
-  border: none !important;
-  background: rgba(255, 246, 229, 1) !important;
-  border-radius: 14px !important;
-  margin-bottom: 12rpx;
-  color: #ff903f;
-  font-size: 20rpx;
+  border: 1rpx solid #0177ff !important;
+  background: transparent !important;
+  border-radius: 8rpx !important;
+  margin-bottom: 15rpx;
+  color: #0177ff;
+  font-size: 24rpx !important;
+  padding: 5rpx 10rpx !important;
 }
 
 .tag-class1 {
@@ -177,8 +187,8 @@ page {
 
 .box-item .three .area .area-name {
   margin-left: 10rpx;
-  color: #868b92;
-  font-size: 24rpx;
+  color: #666;
+  font-size: 26rpx;
 }
 
 .box-item .three .limit {
@@ -212,9 +222,12 @@ page {
 .box-item .three .fan {
   display: flex;
   flex-direction: row;
-  color: #ff400e;
-  font-size: 20rpx;
+  background: #fe7235;
+  color: #fff;
+  font-size: 22rpx;
   align-items: center;
+  padding: 5rpx 10rpx;
+  border-radius: 8rpx;
 }
 
 .box-item .three .fan image {
@@ -261,13 +274,16 @@ page {
 }
 
 .box-item .four .commpany {
-  font-size: 22rpx;
-  color: #a0a4a9;
+  flex: 1;
+  font-size: 26rpx;
+  color: #666;
 }
 
 .box-item .four .area {
-  color: #868b92;
-  font-size: 24rpx;
+  width: 100rpx;
+  text-align: right;
+  color: #666;
+  font-size: 26rpx;
 }
 
 .box-item .four .area image {
@@ -277,34 +293,8 @@ page {
 
 .box-item .four .area .area-name {
   margin-left: 10rpx;
-  color: #868b92;
-  font-size: 22rpx;
-}
-
-.box-item .five {
-  border-top: 2rpx solid #ddd;
-  display: flex;
-  justify-content: space-between;
-  color: #909090;
-  font-size: 22rpx;
-  margin-top: 30rpx;
-  align-items: center;
-  font-size: 20rpx;
-}
-
-.box-item .five .pt-member {
-  color: #525255;
-  margin-top: 18rpx;
-}
-
-.box-item .five .number {
-  color: #ff8f01;
-  font-weight: 700;
-}
-
-.box-item .five .endtime {
-  color: #888;
-  margin-top: 18rpx;
+  color: #666;
+  font-size: 26rpx;
 }
 
 .loading_no {
@@ -337,3 +327,60 @@ page {
   font-size: 32rpx;
   margin-top: 48rpx;
 }
+
+
+.address {
+  font-size: 26rpx;
+  color: #666;
+  margin-top: 20rpx;
+}
+
+.gaoxin, .pintuan {
+  width: 60rpx;
+  height: 38rpx;
+  text-align: center;
+  line-height: 38rpx;
+  color: #fff;
+  font-size: 24rpx;
+  background: #05c3ff;
+  border-radius: 8rpx;
+  margin-right: 15rpx;
+}
+
+.pintuan {
+  background: #ffa835;
+}
+
+.arrow image {
+  width: 22rpx;
+  height: 12rpx;
+}
+
+.box-item .down {
+  max-height: 250rpx;
+}
+
+.box-item .five {
+  border-top: 2rpx solid #ddd;
+  display: flex;
+  justify-content: space-between;
+  color: #909090;
+  margin-top: 30rpx;
+  align-items: center;
+  font-size: 20rpx;
+}
+
+.box-item .five .pt-member {
+  color: #525255;
+  margin-top: 18rpx;
+}
+
+.box-item .five .number {
+  color: #ff8f01;
+  font-weight: 700;
+}
+
+.box-item .five .endtime {
+  color: #888;
+  margin-top: 18rpx;
+}

+ 76 - 0
pages/bus-detail/bus-detail.js

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

pages/integral-pay/integral-pay.json → pages/bus-detail/bus-detail.json


+ 5 - 0
pages/bus-detail/bus-detail.wxml

@@ -0,0 +1,5 @@
+<!--pages/bus-detail/bus-detail.wxml-->
+<view class="description">
+  <text>{{BusDetail}}</text>
+</view>
+<view class="empty" wx:if="{{!BusDetail}}">暂无简介</view>

+ 16 - 0
pages/bus-detail/bus-detail.wxss

@@ -0,0 +1,16 @@
+/* pages/bus-detail/bus-detail.wxss */
+
+.description {
+  font-size: 26rpx;
+  padding: 15rpx 30rpx;
+  text-align: center;
+}
+
+.description text {
+  text-align: left;
+}
+
+.empty {
+  font-size: 24rpx;
+  text-align: center;
+}

+ 59 - 25
pages/check-iphone/index.js

@@ -16,31 +16,45 @@ Page({
     imgServerUrl: imgServerUrl,
     iphone: "",
     yzm: '',
+    phone: '',
+    url: '',
+    reset: false
   },
-  onLoad: function(opts) {
-    console.log(opts.approveState);
-    this.setData({
-      approveState: opts.approveState
-    })
-    if (opts.approveState == 0) {
-      wx.showModal({
-        title: '您还未进行实名认证',
-        content: '认证后即可使用查询功能',
-        cancelText: '以后再说',
-        confirmText: '立即认证',
-        success(res) {
-          if (res.confirm) {
-            wx.redirectTo({
-              url: '../identification/index',
-            })
-          } else if (res.cancel) {
-            wx.navigateBack({
-              delta: 1
-            })
-          }
-        }
+  onLoad: function(options) {
+    if (options.phone) {
+      this.setData({
+        phone: options.phone,
+        url: options.url
       })
+      if (options.title) {
+        wx.setNavigationBarTitle({
+          title: options.title,
+        })
+      }
     }
+    // console.log(opts.approveState);
+    // this.setData({
+    //   approveState: opts.approveState
+    // })
+    // if (opts.approveState == 0) {
+    //   wx.showModal({
+    //     title: '您还未进行实名认证',
+    //     content: '认证后即可使用查询功能',
+    //     cancelText: '以后再说',
+    //     confirmText: '立即认证',
+    //     success(res) {
+    //       if (res.confirm) {
+    //         wx.redirectTo({
+    //           url: '../identification/index',
+    //         })
+    //       } else if (res.cancel) {
+    //         wx.navigateBack({
+    //           delta: 1
+    //         })
+    //       }
+    //     }
+    //   })
+    // }
   },
   //下一步提交
   next(e) {
@@ -117,10 +131,30 @@ Page({
     }
     sendPhoneCode({
       phone: this.data.iphone
-    }).then(data => {
-
     })
     this.vcode()
   },
-
+  send() {
+    sendPhoneCode({
+      phone: this.data.phone
+    })
+  },
+  toList(e) {
+    let paramsObj = {
+      phone: this.data.phone,
+      code: e.detail.code,
+      user_id: app.globalData.userId,
+      user_token: app.globalData.userToken,
+      member_id: app.globalData.memberId
+    }
+    getPayrollId(paramsObj).then(data => {
+      wx.redirectTo({
+        url: this.data.url,
+      })
+    }).catch(data => {
+      this.setData({
+        reset: !this.data.reset
+      })
+    })
+  }
 })

+ 3 - 2
pages/check-iphone/index.json

@@ -2,7 +2,8 @@
   "usingComponents": {
     "i-button": "../../ui/button/index",
     "i-input": "../../ui/input/index",
-    "i-count-down": "../../ui/count-down/index"
+    "i-count-down": "../../ui/count-down/index",
+    "send-code": "/components/send-code/send-code"
   },
-  "navigationBarTitleText": "薪资查询"
+  "navigationBarTitleText": ""
 }

+ 3 - 2
pages/check-iphone/index.wxml

@@ -1,4 +1,4 @@
-<view class='imgBox'>
+<!-- <view class='imgBox'>
   <image class='logo' src='{{imgServerUrl}}/images/happyjob/querysalay.png'></image>
 </view>
 
@@ -31,4 +31,5 @@
 <view class="btn-group fixed-footer" bindtap='next'>
     <button class="distance selfBtn" form-type="submit">开始查询</button>
 </view>
-
+ -->
+<send-code phone='{{phone}}' bind:send='send' reset='{{reset}}'  bind:done='toList'/>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 16395 - 1375
pages/city/city.js


+ 139 - 48
pages/city/index.js

@@ -1,8 +1,12 @@
 var city = require('./city.js');
 var $ = require('../../libs/gdconf.js');
+import {
+  imgServerUrl
+} from '../../config/config.js'
 var app = getApp()
 Page({
   data: {
+    imgServerUrl,
     searchLetter: [],
     showLetter: "",
     winHeight: 0,
@@ -20,27 +24,27 @@ Page({
     hotList: [],
     hotCodeList: [],
     inputValue: "",
-    searchList: []
+    searchList: [],
+    letter: ''
   },
   onLoad: function(options) {
     var currcity = wx.getStorageSync('currcity') || '无锡'
     var currcityCode = wx.getStorageSync('currcityCode') || '320200';
     var pcity = wx.getStorageSync('city') || '无锡'
     var pcityCode = wx.getStorageSync('cityCode') || '320200';
-    var hotList = ['北京', '上海', '南京', '杭州', '厦门', '南昌', '武汉']
-    var hotCodeList = ['110000', '310000', '320100', '330100', '350200', '360100', '420100']
+    // var hotList = ['北京', '上海', '南京', '杭州', '厦门', '南昌', '武汉']
+    // var hotCodeList = ['110000', '310000', '320100', '330100', '350200', '360100', '420100'];
+    var searchLetter = city.searchLetter;
+    var cityList = city.cityList();
+    let cityNameList = city.cityNameList();
     this.setData({
       currcity: currcity,
       currcityCode: currcityCode,
       city: pcity,
       cityCode: pcityCode,
-      hotList: hotList,
-      hotCodeList: hotCodeList
+      hotList: city.hotCity(),
+      // hotCodeList: hotCodeList
     })
-    // 生命周期函数--监听页面加载
-    var searchLetter = city.searchLetter;
-    var cityList = city.cityList();
-    this.data.cityNameList = city.cityNameList();
 
     // console.log("cityinfo", cityList);
 
@@ -64,42 +68,100 @@ Page({
     this.setData({
       winHeight: winHeight,
       itemH: itemH,
-      searchLetter: tempObj,
+      searchLetter: [{
+        name: '#'
+      }, {
+        name: '热'
+      }].concat(tempObj),
       cityList: cityList,
+      cityNameList: cityNameList
     })
 
   },
+  onShow() {
+    let cityName = wx.getStorageSync('city') || '无锡';
+    let cityCode = wx.getStorageSync('cityCode') || '320200';
+    this.setData({
+      cityName: cityName,
+      cityCode: cityCode
+    })
+  },
+  toView(e) {
+    var showLetter = e.currentTarget.dataset.letter;
+    let letter = showLetter;
+    if (showLetter === '#' || showLetter === '热') {
+      this.setData({
+        showLetter,
+        letter: 'A',
+        isShowLetter: true,
+      })
+    } else {
+      this.setData({
+        showLetter,
+        letter,
+        isShowLetter: true,
+      })
+    }
 
+    setTimeout(() => {
+      this.setData({
+        showLetter,
+        isShowLetter: false,
+      })
+    }, 1000)
+  },
   searchStart: function(e) {
     var showLetter = e.currentTarget.dataset.letter;
-    var pageY = e.touches[0].pageY;
-    this.setScrollTop(this, showLetter);
-    this.nowLetter(pageY, this);
+    // var pageY = e.touches[0].pageY;
+    // this.setScrollTop(this, showLetter);
+    // this.nowLetter(pageY, this);
+    // this.setData({
+    //   showLetter: showLetter,
+    //   startPageY: pageY,
+    //   isShowLetter: true,
+    // })
+    if (showLetter === '#' || showLetter === '热') {
+      wx.pageScrollTo({
+        scrollTop: 0,
+        duration: 300,
+      })
+    }
     this.setData({
-      showLetter: showLetter,
-      startPageY: pageY,
+      showLetter,
       isShowLetter: true,
     })
   },
 
   searchMove: function(e) {
-    var pageY = e.touches[0].pageY;
-    var startPageY = this.data.startPageY;
-    var tHeight = this.data.tHeight;
-    var bHeight = this.data.bHeight;
-    var showLetter = 0;
-    // console.log(pageY);
-    if (startPageY - pageY > 0) { //向上移动
-      if (pageY < tHeight) {
-        // showLetter=this.mateLetter(pageY,this);
-        this.nowLetter(pageY, this);
-      }
-    } else { //向下移动
-      if (pageY > bHeight) {
-        // showLetter=this.mateLetter(pageY,this);
-        this.nowLetter(pageY, this);
-      }
+    // var pageY = e.touches[0].pageY;
+    // var startPageY = this.data.startPageY;
+    // var tHeight = this.data.tHeight;
+    // var bHeight = this.data.bHeight;
+    // var showLetter = 0;
+    // // console.log(pageY);
+    // if (startPageY - pageY > 0) { //向上移动
+    //   if (pageY < tHeight) {
+    //     // showLetter=this.mateLetter(pageY,this);
+    //     this.nowLetter(pageY, this);
+    //   }
+    // } else { //向下移动
+    //   if (pageY > bHeight) {
+    //     // showLetter=this.mateLetter(pageY,this);
+    //     this.nowLetter(pageY, this);
+    //   }
+    // }
+    var showLetter = e.currentTarget.dataset.letter;
+    console.log(showLetter)
+    if (showLetter === '#' || showLetter === '热') {
+      wx.pageScrollTo({
+        scrollTop: 0,
+        duration: 300,
+      })
     }
+    this.setData({
+      showLetter,
+      isShowLetter: true,
+    })
   },
 
   searchEnd: function(e) {
@@ -161,8 +223,20 @@ Page({
       city: city
     })
   },
-
-  wxSortPickerViewItemTap: function(e) {
+  chooseHotCity(e) {
+    const areaList = this.data.hotList[e.currentTarget.dataset.index].areaList;
+    this.wxSortPickerViewItemTap(e, areaList)
+  },
+  chooseCity(e) {
+    const areaList = this.data.cityList[e.currentTarget.dataset.index].cityInfo[e.currentTarget.dataset.idx].areaList;
+    this.wxSortPickerViewItemTap(e, areaList)
+  },
+  chooseSearchCity(e) {
+    const areaList = this.data.searchList[e.currentTarget.dataset.index].areaList;
+    this.wxSortPickerViewItemTap(e, areaList)
+  },
+  wxSortPickerViewItemTap(e, areaList) {
+    console.log(areaList)
     var city = e.target.dataset.text;
     var cityCode = e.target.dataset.code;
     if (city.indexOf("市") != -1) {
@@ -177,10 +251,13 @@ Page({
     if (city.indexOf("特别行政区") != -1) {
       city = city.substring(0, city.lastIndexOf('特别行政区'));
     }
-    console.log('选择了城市:', city);
-    console.log('选择了城市的code:', cityCode);
     wx.setStorageSync('city', city)
     wx.setStorageSync('cityCode', cityCode)
+    wx.setStorageSync('areaList', [{
+      countryName: '不限',
+      countryCode: ''
+    }].concat(areaList))
+    // wx.setStorageSync('countryCode', areaList[0].countryCode)
     this.setData({
       city: city,
       cityCode: cityCode
@@ -188,11 +265,12 @@ Page({
     var pages = getCurrentPages();
     var currPage = pages[pages.length - 1]; //当前页面
     var prevPage = pages[pages.length - 2]; //上一个页面
-
-    prevPage.setData({
-      hasLocation1: true
-    })
-    wx.navigateBack()
+    if (prevPage) {
+      prevPage.setData({
+        hasLocation1: true
+      })
+      wx.navigateBack()
+    }
   },
 
   cxgps: function(e) {
@@ -223,16 +301,26 @@ Page({
             success(data) {
               wx.hideLoading();
               var data = data[0],
-                city = data.regeocodeData.addressComponent.city || "无锡",
+                cityNmae = data.regeocodeData.addressComponent.city || "无锡",
                 cityCode = data.regeocodeData.addressComponent.adcode.substring(0, 4) + "00";
-              if (city.indexOf("市") != -1) {
-                city = city.substring(0, city.lastIndexOf('市'));
+              if (cityNmae.indexOf("市") != -1) {
+                cityNmae = cityNmae.substring(0, cityNmae.lastIndexOf('市'));
               }
+              let areaList = city.getcityList([cityNmae])[0].areaList;
+           
               that.setData({
-                currcity: city,
-                currcityCode: cityCode
+                currcity: cityNmae,
+                currcityCode: cityCode,
+                cityName: cityNmae
               })
-              wx.setStorageSync('currcity', city)
+              wx.setStorageSync('areaList', [{
+                countryName: '不限',
+                countryCode: ''
+              }].concat(areaList))
+              // wx.setStorageSync('countryCode', areaList[0].countryCode)
+              wx.setStorageSync('city', cityNmae);
+              wx.setStorageSync('cityCode', cityCode);
+              wx.setStorageSync('currcity', cityNmae)
               wx.setStorageSync('currcityCode', cityCode)
             }
           })
@@ -256,6 +344,7 @@ Page({
     this.serach(value)
   },
   serach(text) {
+
     var searchList = this.data.cityNameList.filter(function(name) {
       // console.log(name)
       return name.indexOf(text) !== -1
@@ -267,8 +356,10 @@ Page({
         for (var j = 0; j < cityList[i].cityInfo.length; j++) {
           var resultArr = {};
           if (searchList[k] == cityList[i].cityInfo[j].cityName) {
-            resultArr.cityCode = cityList[i].cityInfo[j].cityCode
-            resultArr.cityName = cityList[i].cityInfo[j].cityName
+            console.log(cityList[i].cityInfo[j])
+            // resultArr.cityCode = cityList[i].cityInfo[j].cityCode
+            // resultArr.cityName = cityList[i].cityInfo[j].cityName
+            resultArr = cityList[i].cityInfo[j]
             resultList.push(resultArr)
           }
         }

+ 1 - 1
pages/city/index.json

@@ -3,5 +3,5 @@
     "i-icon": "../../ui/icon/index",
     "i-panel": "../../ui/panel/index"
   },
-  "navigationBarTitleText": "选择城市"
+  "navigationBarTitleText": "城市定位"
 }

+ 31 - 9
pages/city/index.wxml

@@ -1,4 +1,4 @@
-<view class='action-panel'>
+<!-- <view class='action-panel'>
   <view class='search-box'>
     <view class='search'>
       <i-icon type="search" size='20' color='#cbcdd3' />
@@ -8,6 +8,24 @@
       <text>取消</text>
     </navigator>
   </view>
+</view> -->
+<view class='app-header'>
+  <view class='map' bindtap='toCity'>
+    <view class='location'>
+      <image src='/images/happyjob/index_position.png'></image>
+    </view>
+    <text class='cityname'>{{cityName}}</text>
+    <!-- <i-icon class="arrow-down" type="play_fill" /> -->
+  </view>
+  <view class='search' bindtap='toSearch'>
+    <view class="search-content">
+      <view class='i_search'>
+        <image src='{{imgServerUrl}}/images/happyjob/search.png'></image>
+      </view>
+      <input class='search-input' confirm-type="search" value="{{inputValue}}" bindblur='bindKeyInput' placeholder="输出城市名快速查找" placeholder-style="color:#cbcdd3;" />
+    </view>
+    <view class="btn-search">搜索</view>
+  </view>
 </view>
 <view hidden='{{inputValue}}'>
   <block wx:if="{{isShowLetter}}">
@@ -15,33 +33,37 @@
       {{showLetter}}
     </view>
   </block>
+  <!-- catchtouchstart="searchStart" catchtouchmove="searchMove" catchtouchend="searchEnd"  -->
   <view class="searchLetter touchClass">
-    <view wx:for="{{searchLetter}}" style="height:{{itemH}}px" wx:key="index" data-letter="{{item.name}}" catchtouchstart="searchStart" catchtouchmove="searchMove" catchtouchend="searchEnd">{{item.name}}</view>
+    <view wx:for="{{searchLetter}}" style="height:{{itemH}}px" wx:key="index" data-letter="{{item.name}}" bindtap="toView">{{item.name}}</view>
   </view>
-  <scroll-view scroll-y="true" style="height:{{winHeight}}px" bindscroll="bindScroll" scroll-into-view="{{showLetter}}">
+  <scroll-view scroll-y="true" style="height:{{winHeight}}px" bindscroll="bindScroll" scroll-into-view="{{letter}}">
     <view class="selection" wx:for="{{cityList}}" wx:key="{{item.firstNameLetter}}" id="{{item.firstNameLetter}}">
       <block wx:if="{{index===0}}">
-        <view class='panel'>定位城市</view>
+        <!-- <view class='panel'>定位城市</view> -->
         <view class='location_city'>
-          <view class="btn active" data-text="{{currcity}}" data-code="{{currcityCode}}" bindtap="wxSortPickerViewItemTap">{{currcity}}</view>
+          <view data-text="{{currcity}}" data-code="{{currcityCode}}" bindtap="wxSortPickerViewItemTap">
+            <text>{{currcity}}</text>
+            <text class="active">当前定位</text>
+          </view>
           <view class='position' catchtap="cxgps">
-            <i-icon type="refresh" />
+            <!-- <i-icon type="refresh" /> -->
             <text>重新定位</text>
           </view>
         </view>
         <view class='panel' wx:if="{{hotList.length}}">热门城市</view>
         <view class='hot_city' wx:if="{{hotList.length}}">
-          <view class="btn" wx:for="{{hotList}}" wx:key="*this" wx:for-index="idx" wx:for-item="cityName" data-text="{{cityName}}" data-code="{{hotCodeList[idx]}}" bindtap="wxSortPickerViewItemTap">{{cityName}}</view>
+          <view class="btn" wx:for="{{hotList}}" wx:key="*this" wx:for-index="idx" data-text="{{item.cityName}}" data-code="{{item.cityCode}}" data-index="{{index}}"  bindtap="chooseHotCity">{{item.cityName}}</view>
         </view>
       </block>
 
       <view class="item_letter">{{item.firstNameLetter}}</view>
-      <view class="item_city" wx:for="{{item.cityInfo}}" wx:for-item="ct" wx:key="{{ct.cityCode}}" wx:for-index="idx" data-text="{{ct.cityName}}" data-code='{{ct.cityCode}}' bindtap="wxSortPickerViewItemTap">
+      <view class="item_city" wx:for="{{item.cityInfo}}" wx:for-item="ct" wx:key="{{ct.cityCode}}" wx:for-index="idx" data-text="{{ct.cityName}}" data-code='{{ct.cityCode}}' data-index="{{index}}" data-idx="{{idx}}" bindtap="chooseCity">
         {{ct.cityName}}
       </view>
     </view>
   </scroll-view>
 </view>
 <view class='result-list' wx:if="{{inputValue}}" style="margin-top:20px">
-  <view class="item_city" wx:for="{{searchList}}" wx:key="*this" data-text="{{item.cityName}}" data-code="{{item.cityCode}}" bindtap="wxSortPickerViewItemTap">{{item.cityName}}</view>
+  <view class="item_city" wx:for="{{searchList}}" wx:key="{{index}}" data-text="{{item.cityName}}" data-index="{{index}}" data-code="{{item.cityCode}}" bindtap="chooseSearchCity">{{item.cityName}}</view>
 </view>

+ 229 - 71
pages/city/index.wxss

@@ -1,118 +1,258 @@
-page{
-  font-size: 14px;
+page {
+  background: #f5f5f5;
 }
+
 /* 搜索 */
-.search-box{
+
+/* 
+.search-box {
   display: flex;
   align-items: center;
 }
-.search{
+
+.search {
   display: flex;
   flex-grow: 1;
   align-items: center;
   height: 70rpx;
   padding: 0 20rpx;
   margin: 0 30rpx;
-  background:#f5f5f5;
+  background: #f5f5f5;
   border-radius: 35rpx;
   line-height: 70rpx;
   font-size: 28rpx;
   color: #999;
 }
-.search-icon{
+
+.search-icon {
   width: 40rpx;
   height: 40rpx;
 }
-.search-input{
+
+.search-input {
   flex-grow: 1;
   margin-left: 10rpx;
   color: #333;
 }
-.search-box{
+
+.search-box {
   padding-left: 20rpx;
   padding-right: 30rpx;
+} */
+
+/* 顶部 */
+
+.app-header {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  height: 114rpx;
+  /* box-shadow: 0 0 10rpx 10rpx #eaeaea; *//* border-top: 1rpx solid #f5f5f5; */
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  background: #fff;
+  margin-bottom: 15rpx;
 }
-.panel{
-  margin: 34rpx 0 34rpx 30rpx;
+
+.map {
+  display: flex;
+  align-items: center;
+  /* white-space: nowrap; */
+  font-size: 28rpx;
+  /* padding: 0 10rpx 0 20rpx; */
+  color: #999;
+  margin-right: 15rpx;
+  padding-left: 26rpx;
+  box-sizing: border-box;
 }
-/* 定位城市 */
-.location_city{
+
+.location {
+  width: 28rpx;
+  height: 34rpx;
+  padding-right: 10rpx;
+}
+
+.location image {
+  width: 100%;
+  height: 100%;
+}
+
+.map .cityname {
+  color: #006be7;
+  font-size: 36rpx;
+  max-width: 120rpx;
+  -webkit-line-clamp: 1;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  -webkit-box-orient: vertical;
+  white-space: nowrap;
+}
+
+.arrow-down {
+  transform: rotate(90deg);
+  margin-left: 10rpx;
+}
+
+.search {
+  width: 500rpx;
+  height: 74rpx;
+  font-size: 28rpx;
+  color: #aaa;
+  padding-left: 20rpx;
+  box-sizing: border-box;
+  border: 4rpx solid #0177ff;
+  border-radius: 37rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.search-content {
   display: flex;
+  align-items: center;
   justify-content: space-between;
+}
+
+.search .i_search {
+  width: 29rpx;
+  height: 29rpx;
+  display: flex;
   align-items: center;
+}
+
+.search .i_search image {
+  width: 100%;
+  height: 100%;
+}
+
+.search-input {
+  margin-left: 15rpx;
+  color: #aaa;
+}
+
+.btn-search {
+  height: 66rpx;
+  width: 128rpx;
+  color: #fff;
+  font-size: 28rpx;
+  text-align: center;
+  line-height: 66rpx;
+  background: #0177ff;
+  border-radius: 34rpx;
+  margin-left: 15rpx;
+}
+
+.panel {
+  color: #333;
   font-size: 28rpx;
-  margin: 0 25px 0 15px;
+  background: #fff;
+  padding: 30rpx;
+}
+
+/* 定位城市 */
+
+.location_city {
+  height: 102rpx;
+  padding: 0 30rpx;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 34rpx;
+  background: #fff;
+  border-bottom: 2rpx solid #eee;
+  /* margin: 0 25px 0 15px; */
 }
-.location_city .btn{
+
+/* .location_city .btn {
   width: 155rpx;
-	background-image: linear-gradient(90deg,#3ecafe 0%, #12a8ff 100%), linear-gradient(#f0f5f6, #f0f5f6);
-	background-blend-mode: normal, normal;
-  color:#fff;
-}
-.btn{
-  width: 147rpx;
-  height: 64rpx;
-  line-height: 64rpx;
-  text-align: center;
-  background: #f2f4f6;
-  color: #82838a;
-  border-radius: 32rpx;
-  overflow: hidden;
-  white-space: nowrap;
-  text-overflow: ellipsis;
+  background-image: linear-gradient(90deg, #3ecafe 0%, #12a8ff 100%),
+                      linear-gradient(#f0f5f6, #f0f5f6);
+  background-blend-mode: normal, normal;
+  color: #fff;
+} */
+
+.btn {
+  color: #333;
 }
-.btn.active{
+
+/* .btn.active {
   background: #2db7f5;
+} */
+
+.active {
+  font-size: 28rpx;
+  color: #999;
+  margin-left: 30rpx;
 }
-.position{
-  font-size: 25rpx;
-  letter-spacing: 1px;
-	color: #28b0f9;
+
+.position {
+  font-size: 28rpx;
+  /* letter-spacing: 1px; */
+  color: #327ae1;
 }
+
 /* 热门城市 */
-.hot_city{
+
+.hot_city {
+  font-size: 28rpx;
+  padding: 0 30rpx;
+  background: #fff;
   display: flex;
-  align-items: center;
   flex-wrap: wrap;
-  font-size: 28rpx;
-  margin: 0 25px 10px 15px;
+  align-items: center;
+  justify-content: space-between;
 }
-.hot_city .btn{
-  margin-bottom: 30rpx;
-  margin-right: 20rpx;
+
+.hot_city .btn {
+  min-width: 218rpx;
+  height: 68rpx;
+  text-align: center;
+  line-height: 68rpx;
+  font-size: 28rpx;
+  color: #0177ff;
+  border-radius: 10rpx;
+  background: #f2f8ff;
+  /* margin-right: 18rpx; */
+  margin-bottom: 18rpx;
 }
+
 /* 其他 */
-.dw{
+
+.dw {
   position: absolute;
-  top:0;
+  top: 0;
   right: 0;
-  width:100px;
+  width: 100px;
   height: 100%;
 }
-.wxSortPickerViewTag{
+
+.wxSortPickerViewTag {
   background-color: #f1f1f1;
   font-size: 16px;
   font-weight: bold;
-  color: #999999;
+  color: #999;
   line-height: 30px;
   height: 30px;
   padding: 0 15px;
 }
-.wxSortPickerViewItem{
+
+.wxSortPickerViewItem {
   height: 40px;
   line-height: 40px;
   border-bottom: 1px solid #eee;
   margin-left: 15px;
   color: #444;
 }
-.hor{
+
+.hor {
   font-size: 14px;
-  color: #999999;
+  color: #999;
   font-weight: 500;
   display: block;
   padding: 14px 25px 5px 0px;
 }
-.kuai{
+
+.kuai {
   height: 30px;
   width: 28%;
   text-align: center;
@@ -125,7 +265,8 @@ page{
   border: 1px solid #eee;
   border-radius: 2px;
 }
-.searchLetter{
+
+.searchLetter {
   position: fixed;
   right: 0;
   width: 20px;
@@ -134,57 +275,73 @@ page{
   justify-content: center;
   display: flex;
   flex-direction: column;
-  color: #666;
-  z-index: 1
+  color: #333;
+  font-size: 22rpx;
+  z-index: 1;
 }
-.searchLetter view{
+
+.searchLetter view {
   height: 70rpx;
 }
-.touchClass{
+
+.touchClass {
   top: 50px;
   margin-top: 35px;
   right: 0;
-  background-color: #fff;
   color: #636363;
   font-weight: 700;
 }
-.showSlectedLetter{
-  background-color: rgba(0, 0, 0,0.5);
+
+.showSlectedLetter {
+  background-color: rgba(0, 0, 0, 0.5);
   color: #fff;
   display: flex;
   justify-content: center;
   align-items: center;
   position: fixed;
-  top:50%;
+  top: 50%;
   left: 50%;
   margin: -50px;
   width: 100px;
   height: 100px;
-  border-radius:10px;
+  border-radius: 10px;
   font-size: 26px;
-  z-index: 1
+  z-index: 1;
 }
-.selection{
+
+.selection {
   display: flex;
   width: 100%;
   flex-direction: column;
 }
-.item_letter{
+
+.item_letter, .item_city {
+  height: 96rpx;
+  font-size: 34rpx;
+  color: #333;
+  background-color: #fff;
+  border-bottom: 2rpx solid #eee;
   display: flex;
-  background-color: #f8f8f8;
-  height: 30px;
-  padding-left: 10px;
   align-items: center;
+  padding: 0 30rpx;
 }
-.item_city{
+
+.item_letter {
+  font-size: 28rpx;
+  color: #0177ff;
+  margin-top: 20rpx;
+}
+
+/* .item_city {
   display: flex;
   background-color: #fff;
   height: 40px;
   padding-left: 10px;
   align-items: center;
-  border-bottom: 1px solid #f8f8f8
-}
-.gps{
+  border-bottom: 1px solid #f8f8f8;
+} */
+
+.gps {
   position: relative;
   height: 38px;
   border-bottom: 1px solid #ccc;
@@ -193,7 +350,8 @@ page{
   padding-left: 15px;
   font-size: 16px;
 }
+
 .gpsif {
   font-size: 14px;
   color: #ccc;
-}
+}

+ 7 - 0
pages/collection-list/index.js

@@ -51,6 +51,13 @@ Page({
   onShareAppMessage: function() {
 
   },
+  doArrow(e) {
+    const index = e.currentTarget.dataset.index;
+    const list = this.data.list;
+    this.setData({
+      [`list[${index}].up`]: !list[index].up
+    })
+  },
   //获取我的申请岗位
   fetchData() {
     if (!this.data.isScroll) {

+ 168 - 79
pages/collection-list/index.wxml

@@ -2,7 +2,7 @@
 <wxs src="../tools.wxs" module="globalTools" />
 <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' wx:for="{{list}}" wx:key="hpPositionId" bindtap='toDetail' data-id="{{item.id}}" data-cate="{{item.positionCategory}}" hover-class="none">
       <!-- 兼职岗位 -->
       <block wx:if="{{item.positionCategory == 1 || item.positionCategory == 9}}">
         <view class='box-item-info'>
@@ -11,51 +11,85 @@
               {{item.positionName}}
             </view>
             <view class='salary'>
-              <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
               {{item.salary}}
             </view>
           </view>
-          <view class='two'>
+          <view class='two' id="two_{{index}}">
             <view class='limit'>
-              <view>
-                <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              </view>
+              <!-- <view>
+              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            </view> -->
               <view>
                 <block wx:if="{{item.workDay}}">
                   <block wx:for="{{globalTools.splitStr1(item.workDay,',')}}" wx:key="*this" wx:for-item="tag">
                     <block wx:if="{{index == 0}}">
-                      {{tag}} ~
+                      {{Tools.formatDate(tag)}} 至
                     </block>
                     <block wx:if="{{index == (globalTools.splitStr1(item.workDay,',').length-1)}}">
-                      {{tag}}
+                      {{Tools.formatDate(tag)}}
                     </block>
                   </block>
-                  <text>(共计{{globalTools.splitStr1(item.workDay,',').length}}天)</text>
+                  <text> (共计{{globalTools.splitStr1(item.workDay,',').length}}天)</text>
                 </block>
               </view>
             </view>
-            <block wx:if="{{item.settlementMethod}}">
-              <view class='time'>{{item.settlementMethod}}</view>
-            </block>
-            <block wx:else>
-              <view></view>
-            </block>
+            <view class='time'>
+              <text>{{Tools.formatTime(item.updateDate)}}</text>
+            </view>
           </view>
-          <view class='three'>
-            <view class='area'>
-              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
-              <block wx:if="{{item.hpPositionAddressList.length>0}}">
-                <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
+          <view class="address">
+            <text>{{item.hpPositionAddressList[0].adname}}</text>
+          </view>
+          <view class='two {{item.up?"down":""}}'>
+            <view class='limit_1'>
+              <block wx:if="{{item.settlementMethod}}">
+                <i-tag i-class="tag-class">
+                  {{item.settlementMethod}}
+                </i-tag>
               </block>
-              <block wx:else>
-                <text class='area-name'>全国</text>
+              <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 class='time'>
-              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              <text>{{globalTools.subStr(item.createDate)}}</text>
-            </view>
+            <!-- <view class="arrow" catchtap="doArrow" data-index='{{index}}' wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
+            <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
+            <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
+          </view> -->
+          </view>
+          <!-- <view class='three'>
+          <view class='area' wx:if="{{item.hpPositionAddressList}}">
+            <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
+            <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
+          </view>
+          <view wx:else>
+          </view>
+          <view class='time'>
+            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            <text>{{Tools.formatTime(item.updateDate)}}</text>
           </view>
+        </view> -->
         </view>
       </block>
       <!-- 拼团 -->
@@ -72,10 +106,10 @@
           </view>
           <view class='four'>
             <view class='commpany'>{{item.hpCompany.companyName}}</view>
-            <view class='area'>
-              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
-              <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
-            </view>
+          </view>
+          <view class='address'>
+            <!-- <image src='{{imgServerUrl}}/images/happyjob/address.png'></image> -->
+            <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
           </view>
           <view class='two'>
             <view class='limit_1'>
@@ -105,19 +139,22 @@
                 </i-tag>
               </block>
             </view>
-            <view></view>
+            <view class="arrow {{item.up?'down':''}}" data-index='{{index}}' catchtap="doArrow" wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
+              <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
+              <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
+            </view>
           </view>
           <view class='three'>
             <view class='fan' wx:if="{{item.reward}}">
-              <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image>
+              <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
               <text>入职最高奖励 {{item.reward}}元</text>
             </view>
             <view wx:else>
             </view>
-            <view class='time'>
+            <!-- <view class='time'>
               <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
               <text>{{globalTools.subStr(item.updateDate)}}</text>
-            </view>
+            </view> -->
           </view>
           <view class='five'>
             <view class="pt-member">已有
@@ -135,33 +172,73 @@
               {{item.positionName}}
             </view>
             <view class='salary'>
-              <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
               {{item.salary}}
             </view>
           </view>
           <view class='two'>
             <view class='limit'>
-              <view>
-                <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              </view>
-              <text> {{globalTools.subStr(item.publishTime)}} ~ {{globalTools.subStr(item.endTime)}}</text>
+              <!-- <view>
+              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            </view> -->
+              <text> {{Tools.formatDate(item.publishTime)}} 至 {{Tools.formatDate(item.endTime)}}</text>
             </view>
-            <view class='time'>{{item.settlementMethod}}</view>
+            <view class='time'>{{Tools.formatTime(item.updateDate)}}</view>
           </view>
-          <view class='three'>
-            <view class='area'>
-              <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
-              <block wx:if="{{item.activityWide}}">
-                <i-tag wx:for="{{globalTools.splitStr1(item.activityWide,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class1" style="margin-left:10rpx;">
+          <view class="address">
+            <text>{{item.hpPositionAddressList[0].adname}}</text>
+          </view>
+          <view class='two {{item.up?"down":""}}' id="two_{{index}}">
+            <view class='limit_1'>
+              <block wx:if="{{item.settlementMethod}}">
+                <i-tag i-class="tag-class">
+                  {{item.settlementMethod}}
+                </i-tag>
+              </block>
+              <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 class='time'>
-              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              <text>{{globalTools.subStr(item.createDate)}}</text>
+            <view class="arrow {{item.up?'down':''}}" data-index='{{index}}' catchtap="doArrow" wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
+              <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
+              <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
             </view>
           </view>
+          <view class='three'>
+            <!-- <view class='area'>
+            <image src='{{imgServerUrl}}/images/happyjob/address.png'></image>
+            <block wx:if="{{item.activityWide}}">
+              <i-tag wx:for="{{globalTools.splitStr1(item.activityWide,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class1" style="margin-left:10rpx;">
+                {{tag}}
+              </i-tag>
+            </block>
+          </view> -->
+            <!-- <view class='time'>
+            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            <text>{{globalTools.subStr(item.updateDate)}}</text>
+          </view> -->
+          </view>
         </view>
       </block>
       <!-- 全职,入职奖励,高薪急聘 -->
@@ -169,27 +246,58 @@
         <view class='box-item-info'>
           <view class='one'>
             <view class='left'>
+              <view wx:if='{{item.positionCategory == 3}}' class="gaoxin">高薪</view>
+              <view wx:if='{{item.positionCategory == 4}}' class="pintuan">拼团</view>
               {{item.positionName}}
             </view>
             <view class='salary'>
-              <!-- <image src='{{imgServerUrl}}/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='{{imgServerUrl}}/images/happyjob/address.png'></image>
-              <block wx:if="{{item.hpPositionAddressList.length>0}}">
-                <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
-              </block>
-              <block wx:else>
-                <text class='area-name'>全国</text>
-              </block>
+              <!-- <image src='{{imgServerUrl}}/images/happyjob/address.png'></image> -->
+              <!-- {{item.hpPositionAddressList[0].adname}} -->
+              <text class='area-name'><text>{{Tools.formatTime(item.updateDate)}}</text></text>
             </view>
           </view>
-          <view class='two'>
+          <view class="address">
+            <text>{{item.hpPositionAddressList[0].adname}}</text>
+          </view>
+          <view class='three'>
+            <block wx:if="{{item.positionCategory == 3}}">
+              <view class='fan' wx:if="{{item.reward}}">
+                <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
+                <text>入职最高奖励 {{item.reward}}元,额外奖励{{item.platformAllowance}}元</text>
+              </view>
+              <view class='fan' wx:elif="{{item.platformAllowance}}">
+                <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
+                <text>入职最高奖励 {{item.platformAllowance}}元</text>
+              </view>
+              <view wx:else>
+              </view>
+            </block>
+            <block wx:else>
+              <view class='fan' wx:if="{{item.reward}}">
+                <!-- <image src='{{imgServerUrl}}/images/happyjob/reward.png'></image> -->
+                <text>入职最高奖励 {{item.reward}}元</text>
+              </view>
+              <view wx:else>
+              </view>
+            </block>
+            <!-- <view class='time'>
+            <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
+            <text>{{globalTools.subStr(item.updateDate)}}</text>
+          </view> -->
+          </view>
+          <view class='two {{item.up?"down":""}}' id="two_{{index}}">
             <view class='limit_1'>
+              <block wx:if="{{item.settlementMethod}}">
+                <i-tag i-class="tag-class">
+                  {{item.settlementMethod}}
+                </i-tag>
+              </block>
               <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}}
@@ -216,28 +324,9 @@
                 </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='{{imgServerUrl}}/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='{{imgServerUrl}}/images/happyjob/reward.png'></image>
-                <text>入职最高奖励 {{item.reward}}元</text>
-              </view>
-              <view wx:else>
-              </view>
-            </block>
-            <view class='time'>
-              <image src='{{imgServerUrl}}/images/happyjob/time.png'></image>
-              <text>{{globalTools.subStr(item.createDate)}}</text>
+            <view class="arrow {{item.up?'down':''}}" catchtap="doArrow" data-index='{{index}}' wx:if="{{item.specialWelfare || item.accommodation || item.socialSecurity || item.workDinner || item.regularBus}}">
+              <image src="/images/happyjob/index_up.png" wx:if='{{!item.up}}'></image>
+              <image src="/images/happyjob/index_down.png" wx:if='{{item.up}}'></image>
             </view>
           </view>
         </view>

+ 110 - 64
pages/collection-list/index.wxss

@@ -6,16 +6,27 @@ page {
 
 .box-body {
   width: 100%;
-  overflow: hidden;
+  margin-top: 20rpx;
+  background: #fff;
+}
+
+.box_title {
+  height: 88rpx;
+  line-height: 88rpx;
+  font-size: 28rpx;
+  color: #666;
+  border-bottom: 2rpx solid #eee;
+  padding: 0 30rpx;
+  box-sizing: border-box;
 }
 
 .box-item {
+  min-height: 276rpx;
+  padding: 30rpx;
   display: flex;
-  padding: 35rpx 40rpx 30rpx 40rpx;
-  font-size: 32rpx;
-  color: #232327;
+  font-size: 26rpx;
+  color: #666;
   box-sizing: border-box;
-  background-color: #fff;
   border-bottom: 16rpx solid #f5f5f5;
 }
 
@@ -61,9 +72,9 @@ page {
 
 .box-item .one .salary {
   font-size: 32rpx;
-  font-family: Arial-BoldMT;
+  font-family: ArialMT;
   font-weight: 400;
-  color: rgba(255, 78, 37, 1);
+  color: #ff401a;
 }
 
 .box-item .one .salary image {
@@ -72,12 +83,15 @@ page {
 }
 
 .box-item .two {
+  max-height: 55rpx;
+  overflow: hidden;
   display: flex;
+  /* align-items: center; */
   justify-content: space-between;
-  color: #909090;
-  font-size: 24rpx;
-  margin-top: 30rpx;
-  align-items: center;
+  color: #666;
+  font-size: 26rpx;
+  margin-top: 20rpx;
+  /* transition: all 1s; */
 }
 
 .box-item .two .limit {
@@ -85,9 +99,9 @@ page {
   flex-direction: row;
   flex-grow: 1;
   overflow: hidden;
-  margin-right: 30rpx;
+  margin-right: 20rpx;
   width: 80%;
-  color: #868b92;
+  color: #666;
 }
 
 .box-item .two .limit image {
@@ -97,11 +111,10 @@ page {
 }
 
 .box-item .two .limit i-tag {
-  /* margin-left: 10rpx; */
 }
 
 .box-item .two .limit text {
-  margin-left: 10rpx;
+  /* margin-left: 10rpx; */
 }
 
 .box-item .two .limit_1 {
@@ -121,7 +134,6 @@ page {
 }
 
 .box-item .two .limit_1 i-tag {
-  /* margin-left: 10rpx; */
 }
 
 .box-item .two .limit_1 text {
@@ -129,22 +141,20 @@ page {
 }
 
 .box-item .two .time {
-  color: #4391e1;
-  font-size: 20rpx;
-  border: 2rpx solid rgba(67, 145, 225, 1);
-  border-radius: 14px;
-  padding: 4rpx 14rpx;
+  color: #666;
+  font-size: 26rpx;
 }
 
 .tag-class {
-  margin-right: 8rpx;
+  margin-right: 15rpx;
   white-space: nowrap;
-  border: none !important;
-  background: rgba(255, 246, 229, 1) !important;
-  border-radius: 14px !important;
-  margin-bottom: 12rpx;
-  color: #ff903f;
-  font-size: 20rpx;
+  border: 1rpx solid #0177ff !important;
+  background: transparent !important;
+  border-radius: 8rpx !important;
+  margin-bottom: 15rpx;
+  color: #0177ff;
+  font-size: 24rpx !important;
+  padding: 5rpx 10rpx !important;
 }
 
 .tag-class1 {
@@ -177,8 +187,8 @@ page {
 
 .box-item .three .area .area-name {
   margin-left: 10rpx;
-  color: #868b92;
-  font-size: 24rpx;
+  color: #666;
+  font-size: 26rpx;
 }
 
 .box-item .three .limit {
@@ -212,9 +222,12 @@ page {
 .box-item .three .fan {
   display: flex;
   flex-direction: row;
-  color: #ff400e;
-  font-size: 20rpx;
+  background: #fe7235;
+  color: #fff;
+  font-size: 22rpx;
   align-items: center;
+  padding: 5rpx 10rpx;
+  border-radius: 8rpx;
 }
 
 .box-item .three .fan image {
@@ -261,13 +274,16 @@ page {
 }
 
 .box-item .four .commpany {
-  font-size: 22rpx;
-  color: #a0a4a9;
+  flex: 1;
+  font-size: 26rpx;
+  color: #666;
 }
 
 .box-item .four .area {
-  color: #868b92;
-  font-size: 24rpx;
+  width: 100rpx;
+  text-align: right;
+  color: #666;
+  font-size: 26rpx;
 }
 
 .box-item .four .area image {
@@ -277,34 +293,8 @@ page {
 
 .box-item .four .area .area-name {
   margin-left: 10rpx;
-  color: #868b92;
-  font-size: 22rpx;
-}
-
-.box-item .five {
-  border-top: 2rpx solid #ddd;
-  display: flex;
-  justify-content: space-between;
-  color: #909090;
-  font-size: 22rpx;
-  margin-top: 30rpx;
-  align-items: center;
-  font-size: 20rpx;
-}
-
-.box-item .five .pt-member {
-  color: #525255;
-  margin-top: 18rpx;
-}
-
-.box-item .five .number {
-  color: #ff8f01;
-  font-weight: 700;
-}
-
-.box-item .five .endtime {
-  color: #888;
-  margin-top: 18rpx;
+  color: #666;
+  font-size: 26rpx;
 }
 
 .loading_no {
@@ -337,3 +327,59 @@ page {
   font-size: 32rpx;
   margin-top: 48rpx;
 }
+
+.address {
+  font-size: 26rpx;
+  color: #666;
+  margin-top: 20rpx;
+}
+
+.gaoxin, .pintuan {
+  width: 60rpx;
+  height: 38rpx;
+  text-align: center;
+  line-height: 38rpx;
+  color: #fff;
+  font-size: 24rpx;
+  background: #05c3ff;
+  border-radius: 8rpx;
+  margin-right: 15rpx;
+}
+
+.pintuan {
+  background: #ffa835;
+}
+
+.arrow image {
+  width: 22rpx;
+  height: 12rpx;
+}
+
+.box-item .down {
+  max-height: 250rpx;
+}
+
+.box-item .five {
+  border-top: 2rpx solid #ddd;
+  display: flex;
+  justify-content: space-between;
+  color: #909090;
+  margin-top: 30rpx;
+  align-items: center;
+  font-size: 20rpx;
+}
+
+.box-item .five .pt-member {
+  color: #525255;
+  margin-top: 18rpx;
+}
+
+.box-item .five .number {
+  color: #ff8f01;
+  font-weight: 700;
+}
+
+.box-item .five .endtime {
+  color: #888;
+  margin-top: 18rpx;
+}

+ 76 - 0
pages/company-desc/company-desc.js

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

+ 3 - 0
pages/company-desc/company-desc.json

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

+ 6 - 0
pages/company-desc/company-desc.wxml

@@ -0,0 +1,6 @@
+<!--pages/company-desc/company-desc.wxml-->
+
+<view class="description">
+  <text>{{description}}</text>
+</view>
+<view class="empty" wx:if="{{!description}}">暂无简介</view>

+ 16 - 0
pages/company-desc/company-desc.wxss

@@ -0,0 +1,16 @@
+/* pages/company-desc/company-desc.wxss */
+
+.description {
+  font-size: 26rpx;
+  padding: 15rpx 30rpx;
+  text-align: center;
+}
+
+.description text {
+  text-align: left;
+}
+
+.empty {
+  font-size: 24rpx;
+  text-align: center;
+}

+ 0 - 2
pages/config.less

@@ -1,2 +0,0 @@
-@baseUrl:"https://weapp.hap-job.com/uploadFiles";
-

+ 271 - 10
pages/detail/index.js

@@ -7,7 +7,8 @@ import {
   saveTask
 } from '../../services/index.js'
 import {
-  imgServerUrl
+  imgServerUrl,
+  imgServerUrl_new
 } from '../../config/config.js'
 import {
   showToast
@@ -15,12 +16,13 @@ import {
 
 const WxParse = require('../../plugins/wxParse/wxParse.js');
 // var $ = require('../../libs/gdconf.js');
-
+import Poster from '../../components/wxa-plugin-canvas/poster/poster';
 const app = getApp();
 
 Page({
   data: {
     imgServerUrl: imgServerUrl,
+    imgServerUrl_new: imgServerUrl_new,
     hpPositionId: 0,
     positionCategory: 0, //0:全职 1:兼职 2:入职奖励 3:高薪急聘 4:拼团岗位 5:福利岗位 8:自发布全职 9:自发布兼职
     isShowList: false,
@@ -46,12 +48,29 @@ Page({
     maxReward: 0, //入职最高奖励
     minReward: 0, //入职最低奖励
     isLogin: false,
+    showShare: false,
+    shareImg: ''
   },
   onLoad: function(options) {
-    console.log(options)
+    console.log('detail=>', options)
+    if (options.scene) {
+      const _data = this.getQuery(options.scene);
+      this.setData({
+        hpPositionId: _data.pd,
+        positionCategory: _data.pc || 0,
+      })
+      return
+    }
+    if (options.query) {
+      this.setData({
+        hpPositionId: options.query.pd,
+        positionCategory: options.query.pc || 0,
+      })
+      return
+    }
     this.setData({
-      hpPositionId: options.hpPositionId,
-      positionCategory: options.cate || 0,
+      hpPositionId: options.hpPositionId || options.pd,
+      positionCategory: options.cate || options.pc || 0,
     })
   },
   onShow: function() {
@@ -80,13 +99,254 @@ Page({
       member_id: wx.getStorageSync('member_id'),
       task_id: 10
     })
+    this.setData({
+      showShare: false
+    })
     return {
-      title: '开心工作入职有奖',
-      path: '/pages/detail/index?cate=' + this.data.positionCategory + '&hpPositionId=' + this.data.hpPositionId,
-      imageUrl: ''
+      title: this.data.postitionDetail.positionName,
+      path: '/pages/detail/index?pc=' + this.data.positionCategory + '&pd=' + this.data.hpPositionId,
+      imageUrl: '/images/happyjob/detail_share.jpg'
+    }
+  },
+  getQuery(data) {
+    const _data = decodeURIComponent(data);
+    const json = _data.split('&').reduce((json, val, key) => {
+      const arr = val.split('=');
+      json[arr[0]] = arr[1];
+      return json
+    }, {})
+    return json
+  },
+  toCompanyDesc() {
+    wx.setStorage({
+      key: 'CompanyDesc',
+      data: this.data.postitionDetail.hpCompany.companyDescription,
+      success: function(res) {
+        wx.navigateTo({
+          url: '/pages/company-desc/company-desc'
+        })
+      }
+    })
+  },
+  toBusDetail() {
+    wx.setStorage({
+      key: 'BusDetail',
+      data: this.data.postitionDetail.busDetail,
+      success: function(res) {
+        wx.navigateTo({
+          url: '/pages/bus-detail/bus-detail'
+        })
+      }
+    })
+  },
+  creatBlock() {
+    let arr = [this.data.postitionDetail.accommodation, this.data.postitionDetail.socialSecurity, this.data.postitionDetail.workDinner, this.data.postitionDetail.regularBus, '']
+    if (this.data.postitionDetail.specialWelfare) {
+      arr = this.data.postitionDetail.specialWelfare.split(',').concat(arr)
     }
+    arr.push(this.data.postitionDetail.settlementMethod);
+    return arr.filter(val => !!val)
   },
+  // getTime(start, end) {
+  //   if (!start || !end) {
+  //     return ''
+  //   }
+  //   let _start = start.replace(/-/g, '/');
+  //   let _end = end.replace(/-/g, '/');
+
+  //   let _start_time = new Date(_start);
+  //   let _end_time = new Date(_end);
+
+  //   var month = _start_time.getMonth() + 1;
+  //   var day = _start_time.getDate();
 
+
+  //   return [_start_time.getMonth() + 1, _start_time.getDate()].map(this.formatNumber).join('-') + ' 至 ' + [_end_time.getMonth() + 1, _end_time.getDate()].map(this.formatNumber).join('-');
+
+
+  // },
+  // formatNumber(n) {
+  //   n = n.toString()
+  //   return n[1] ? n : '0' + n
+  // },
+  onCreatePoster() {
+    Poster.create();
+  },
+  onPosterSuccess(e) {
+    wx.showLoading({
+      title: '加载中...',
+    })
+    var detail = e.detail;
+    this.setData({
+      shareImg: detail,
+      showShare: true
+    })
+    wx.hideLoading()
+  },
+  onPosterFail(err) {
+    console.error(err);
+  },
+  share() {
+    
+    let blocks = [];
+    let block = [];
+    let y = 598;
+    let _arr = this.creatBlock();
+    let bg = this.data.positionCategory == 5 ? '/images/happyjob/share-fuli.jpeg' : '/images/happyjob/share_img_fulltime.jpeg';
+    let posterConfig = {
+      width: 908,
+      height: 1502,
+      debug: false,
+      blocks,
+      texts: [{
+          x: 146,
+          y,
+          width: 600,
+          text: this.data.postitionDetail.positionName,
+          fontSize: 62,
+          color: '#333333',
+          zIndex: 2,
+        },
+        {
+          x: 504,
+          y: 1234,
+          text: '一站式求职平台',
+          fontSize: 34,
+          // fontWight:'500',
+          color: '#666666',
+          zIndex: 2,
+        }
+      ],
+      images: [{
+        width: 908,
+        height: 1502,
+        x: 0,
+        y: 0,
+        url: bg,
+        zIndex: 1,
+      }, {
+        width: 264,
+        height: 264,
+        x: 158,
+        y: 1030,
+        url: `${this.data.qrcodeUrl}`,
+        zIndex: 3
+      }],
+    }
+    if (this.data.postitionDetail.hpCompany) {
+      y += 61;
+      posterConfig.texts.push({
+        x: 146,
+        y,
+        width: 600,
+        text: this.data.postitionDetail.hpCompany ? this.data.postitionDetail.hpCompany.companyName : '',
+        fontSize: 32,
+        color: '#666666',
+        zIndex: 2,
+      })
+    }
+    if (this.data.postitionDetail.salary || this.data.postitionDetail.basicSalary || this.data.postitionDetail.totalSalary) {
+      y += 80;
+      posterConfig.texts.push({
+        x: 146,
+        y,
+        text: this.data.postitionDetail.salary || this.data.postitionDetail.basicSalary || this.data.postitionDetail.totalSalary,
+        fontSize: 62,
+        // fontWight:'500',
+        color: '#FE7235',
+        zIndex: 2,
+      })
+    }
+    if (_arr.length) {
+      y += 35;
+      _arr.forEach(val => {
+        block.push({
+          y,
+          height: 76,
+          paddingLeft: 30,
+          borderWidth: 2,
+          borderColor: '#0177FF',
+          borderRadius: 10,
+          marginLeft: 24,
+          text: {
+            text: val,
+            fontSize: 38,
+            color: '#0177FF',
+            baseLine: 'middle'
+          },
+          zIndex: 2,
+        })
+      })
+      blocks.push({
+        x: 146,
+        y,
+        height: 76,
+        width: 542,
+        block,
+        beyond: {
+          y: 770,
+          width: 56,
+          height: 56,
+          zIndex: 3,
+          text: {
+            text: '...',
+            fontSize: 38,
+            color: '#0177FF',
+            baseLine: 'middle'
+          },
+        },
+        zIndex: 2,
+      })
+    }
+    if (this.data.postitionDetail.reward) {
+      y += 112;
+      blocks.push({
+        x: 146,
+        y,
+        height: 42,
+        // fontWight:'500',
+        text: {
+          text: `入职最高奖励${this.data.postitionDetail.maleReward ? `男 ${this.data.postitionDetail.maleReward}` : ''}  ${this.data.postitionDetail.femaleReward ? `女${this.data.postitionDetail.femaleReward}`:''} ${this.data.postitionDetail.platformAllowance ? `+${this.data.postitionDetail.platformAllowance || ''}`:''}`,
+          fontSize: 26,
+          color: '#fff',
+          baseLine: 'middle'
+
+        },
+        paddingLeft: 15,
+        backgroundColor: '#FE7235',
+        borderRadius: 10,
+        zIndex: 2,
+      })
+    }
+    this.setData({
+      posterConfig
+    }, _ => {
+      this.onCreatePoster()
+    })
+
+  },
+  cloaseShare() {
+    this.setData({
+      showShare: false
+    })
+  },
+  saveShareImg() {
+    wx.saveImageToPhotosAlbum({
+      filePath: this.data.shareImg,
+      success: (res) => {
+        showToast('已保存到相册,快去分享吧!');
+        this.setData({
+          showShare: false
+        })
+      },
+      fail(err) {
+        showToast('请授权保存到相册')
+        that.setData({
+          hasAuth: false
+        })
+      }
+    })
+  },
   //获取岗位详情
   fetchData() {
     let paramsObj = {
@@ -167,7 +427,8 @@ Page({
         leftTime: leftTime,
         storeAction: groupLessList,
         myGroupId: myGroupId,
-        isFarovite: data.data.isFarovite
+        isFarovite: data.data.isFarovite,
+        qrcodeUrl: data.data.qrcodeUrl
       })
       //富文本转义
       var detailArray = [];
@@ -235,7 +496,7 @@ Page({
           positionApply(paramsObj).then(data => {
             console.log("sdfg", data);
             showToast('申请职位成功', 'success')
-            setTimeout(function() { 
+            setTimeout(function() {
               wx.navigateBack();
             }, 2000)
           }).catch(data => {

+ 2 - 1
pages/detail/index.json

@@ -4,7 +4,8 @@
     "i-modal": "../../ui/modal/index",
     "i-button": "../../ui/button/index",
     "i-icon": "../../ui/icon/index",
-    "i-count-down": "../../ui/count-down/index"
+    "i-count-down": "../../ui/count-down/index",
+    "poster": "/components/wxa-plugin-canvas/poster/index"
   },
   "navigationBarTitleText": "岗位详情"
 }

+ 269 - 63
pages/detail/index.wxml

@@ -1,47 +1,79 @@
 <!--pages/detail/index.wxml-->
 <wxs src="../tools.wxs" module="globalTools" />
+<wxs src="./index.wxs" module="Tools" />
 <import src="../../plugins/wxParse/wxParse.wxml" />
 <!-- 非福利岗位 -->
 <block wx:if="{{positionCategory!=5 && positionCategory!=1 && positionCategory!=4 && positionCategory!=9}}">
   <view class='panel'>
-    <view class='one'>
-      <view class='left'>
-        {{postitionDetail.positionName}}
+    <view class="panel-header">
+      <view class='one'>
+        <view class='left'>
+          {{postitionDetail.positionName}}
+        </view>
+        <view class='salary'>
+          <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
+          <block wx:if="{{postitionDetail.salary}}">
+            {{postitionDetail.salary}}
+          </block>
+          <block wx:elif="{{postitionDetail.totalSalary}}">
+            {{postitionDetail.totalSalary}}
+          </block>
+          <block wx:else>
+            {{postitionDetail.basicSalary}}
+          </block>
+        </view>
       </view>
-      <view class='salary'>
-        <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
-        <block wx:if="{{postitionDetail.salary}}">
-          {{postitionDetail.salary}}
-        </block>
-        <block wx:elif="{{postitionDetail.totalSalary}}">
-          {{postitionDetail.totalSalary}}
-        </block>
-        <block wx:else>
-          {{postitionDetail.basicSalary}}
-        </block>
+      <view class="two">
+        <view class='left'>
+          <view>
+            招聘人数:{{postitionDetail.recruitNumber?postitionDetail.recruitNumber:'若干'}}{{postitionDetail.recruitNumber?'人':''}}
+          </view>
+        </view>
+        <view class='right'>
+          <view>
+            {{Tools.formatDate(postitionDetail.updateDate)}}
+          </view>
+        </view>
       </view>
     </view>
-    <view class="two">
+
+    <view class="two1">
       <view class='left'>
-        <view>
-          招聘人数:{{postitionDetail.recruitNumber?postitionDetail.recruitNumber:'若干'}}{{postitionDetail.recruitNumber?'人':''}}
+        <view class='reward' wx:if="{{postitionDetail.reward}}">
+          <text class="reward1">入职奖励 </text>
+          <text class="reward2"><text wx:if='{{postitionDetail.maleReward}}'>男{{postitionDetail.maleReward}} </text><text wx:if='{{postitionDetail.femaleReward}}'>女{{postitionDetail.femaleReward}}</text><text wx:if='{{postitionDetail.platformAllowance}}'>,额外奖励{{postitionDetail.platformAllowance}}</text></text>
         </view>
       </view>
-      <view class='right'>
-        <view>
-          发布于:{{globalTools.subStr(postitionDetail.updateDate)}}
+      <view class="right">
+        <view class='favour' bindtap='favourate'>
+          <block wx:if="{{isFarovite}}">
+            <image src='/images/happyjob/collected.png'></image>
+          </block>
+          <block wx:else>
+            <image src='/images/happyjob/collect.png'></image>
+          </block>
+          <text>收藏</text>
+        </view>
+        <view class='favour share' bindtap='share'>
+          <image src='/images/happyjob/share.png'></image>
+          <text>分享</text>
         </view>
       </view>
     </view>
-    <view class="two1" wx:if="{{postitionDetail.reward}}">
-      <view class='left'>
-        <view class='reward'>
-          <text class="reward1">返费 </text>
-          <text class="reward2">{{postitionDetail.reward}}元</text>
+    <view class="address">
+      <view class="address-left">
+        <image src="/images/happyjob/position_address.png"></image>
+        <view class="address-content">
+          <text>{{postitionDetail.hpPositionAddressList[0].address}}</text>
+          <text class="address-content-address">{{postitionDetail.hpPositionAddressList[0].adname}}</text>
         </view>
       </view>
+      <view class="address-right">
+        <view class="address-bar"></view>
+        <text catchtap='toaddressdetail'>全部({{postitionDetail.hpPositionAddressList.length}})</text>
+      </view>
     </view>
-    <block wx:if="{{postitionDetail.hpPositionAddressList.length>0}}">
+    <!-- <block wx:if="{{postitionDetail.hpPositionAddressList.length>0}}">
       <view class='three' catchtap='toaddressdetail'>
         <view class='left'>
           <image src='{{imgServerUrl}}/images/happyjob/location.png'></image>
@@ -51,18 +83,18 @@
           <image src='{{imgServerUrl}}/images/happyjob/right.png'></image>
         </view>
       </view>
-    </block>
-    <view class='four'>
+    </block> -->
+    <!-- <view class='four'>
       <view class='title'>
         <view class="name {{detailIndex == 0?'active':''}}" data-top="{{basePos}}" bindtap='goDeatil' data-index='0'>基本信息</view>
         <view class="name {{detailIndex == 1?'active':''}}" data-top="{{requirePos}}" bindtap='goDeatil' data-index='1'>岗位要求</view>
         <view class="name {{detailIndex == 2?'active':''}}" data-top="{{otherWelfarePos}}" bindtap='goDeatil' data-index='2'>其他福利</view>
         <view class="name {{detailIndex == 3?'active':''}}" data-top="{{jieshaoPos}}" bindtap='goDeatil' data-index='3'>公司详情</view>
       </view>
-    </view>
+    </view> -->
     <view class='five' id="base">
       <view class='title'>
-        <view class='left'></view>
+        <image class="left" src="/images/happyjob/position_dec.png"></image>
         <view class='right'>基本信息</view>
       </view>
       <view class="basesalay" wx:if="{{postitionDetail.basicSalary}}">
@@ -100,7 +132,7 @@
     </view>
     <view class='six' id="require">
       <view class='title'>
-        <view class='left'></view>
+        <image class="left" src="/images/happyjob/position_detail.png"></image>
         <view class='right'>岗位要求</view>
       </view>
       <view class="sex" wx:if="{{postitionDetail.gender != 0}}">
@@ -138,7 +170,7 @@
     </view>
     <view class='seven' id="otherWelfare">
       <view class='title'>
-        <view class='left'></view>
+        <image class="left" src="/images/happyjob/position_gift.png"></image>
         <view class='right'>其他福利</view>
       </view>
       <view class="work" wx:if="{{postitionDetail.workDinner}}">
@@ -169,26 +201,40 @@
         <view class='right'>{{postitionDetail.regularBus}}</view>
       </view>
     </view>
+    <view class="regularBus" wx:if="{{postitionDetail.busDetail}}" bindtap="toBusDetail">
+      <image src="/images/happyjob/positon_bus.png"></image>
+      <view class="bus_position">
+        查看厂车路线图 >>
+      </view>
+    </view>
     <view class='eight' id="jieshao">
       <view class='title'>
-        <view class='left'></view>
+        <image class="left" src="/images/happyjob/position_company.png"></image>
         <view class='right'>公司简介</view>
       </view>
-      <block wx:if="{{postitionDetail.hpCompany.companyDescription}}">
+      <view class="eight-company">
+        <view class="eight-company-name">{{postitionDetail.hpCompany.companyName}}</view>
+        <view class="companyDescription" bindtap="toCompanyDesc">查看公司简介 ></view>
+      </view>
+      <!-- <block wx:if="{{postitionDetail.hpCompany.companyDescription}}">
         <view class="company">
           {{postitionDetail.hpCompany.companyDescription}}
         </view>
-      </block>
-      <block wx:if="{{postitionDetail.hpCompany.address}}">
+      </block> -->
+      <!-- <block wx:if="{{postitionDetail.hpCompany.address}}">
         <view class="com">
           <view class='left'>公司地址:</view>
           <view class='right'>{{postitionDetail.hpCompany.address}}</view>
         </view>
-      </block>
-      <view class="com">
+      </block> -->
+      <!-- <view class="com">
         <view class='left'>客服电话:</view>
         <view class='right' bindtap='phoneCall'>{{postitionDetail.contactPhone}}</view>
-      </view>
+      </view> -->
+    </view>
+    <view class='nine'>
+      <image class="nin-image" src="/images/happyjob/position_warn.png"></image>
+      <view>未标明收费的职位不会收取任何费用,若要求缴纳费用或押金,请提高警惕并第一时间向我们举报。</view>
     </view>
   </view>
 </block>
@@ -218,7 +264,43 @@
         </view>
       </view>
     </view>
-    <block wx:if="{{postitionDetail.hpPositionAddressList.length>0}}">
+    <view class="two1">
+      <view class='left'>
+        <!-- <view class='reward' wx:if="{{postitionDetail.reward}}">
+          <text class="reward1">入职奖励 </text>
+          <text class="reward2">{{postitionDetail.reward}}元</text>
+        </view> -->
+      </view>
+      <view class="right">
+        <view class='favour' bindtap='favourate'>
+          <block wx:if="{{isFarovite}}">
+            <image src='/images/happyjob/share.png'></image>
+          </block>
+          <block wx:else>
+            <image src='/images/happyjob/collect.png'></image>
+          </block>
+          <text>收藏</text>
+        </view>
+        <view class='favour share' bindtap='share'>
+          <image src='/images/happyjob/share.png' style="height:25rpx"></image>
+          <text>分享</text>
+        </view>
+      </view>
+    </view>
+    <view class="address">
+      <view class="address-left">
+        <image src="/images/happyjob/position_address.png"></image>
+        <view class="address-content">
+          <text>{{postitionDetail.hpPositionAddressList[0].address}}</text>
+          <text class="address-content-address">{{postitionDetail.hpPositionAddressList[0].adname}}</text>
+        </view>
+      </view>
+      <view class="address-right">
+        <view class="address-bar"></view>
+        <text catchtap='toaddressdetail'>全部({{postitionDetail.hpPositionAddressList.length}})</text>
+      </view>
+    </view>
+    <!-- <block wx:if="{{postitionDetail.hpPositionAddressList.length>0}}">
       <view class='three' catchtap='toaddressdetail'>
         <view class='left'>
           <image src='{{imgServerUrl}}/images/happyjob/location.png'></image>
@@ -228,8 +310,8 @@
           <image src='{{imgServerUrl}}/images/happyjob/right.png'></image>
         </view>
       </view>
-    </block>
-    <view class='three_1'>
+    </block> -->
+    <!-- <view class='three_1'>
       <view class='sex'>
         <view class='left'>工作时间:</view>
         <view class='right'>
@@ -242,18 +324,18 @@
           <block wx:if="{{postitionDetail.workTime}}">{{postitionDetail.workTime}}</block>
         </view>
       </view>
-    </view>
-    <view class='four'>
+    </view> -->
+    <!-- <view class='four'>
       <view class='title'>
         <view class="name {{detailIndex == 0?'active':''}}" data-top="{{basePos}}" bindtap='goDeatil' data-index='0'>基本信息</view>
         <view class="name {{detailIndex == 1?'active':''}}" data-top="{{requirePos}}" bindtap='goDeatil' data-index='1'>岗位要求</view>
         <view class="name {{detailIndex == 2?'active':''}}" data-top="{{otherWelfarePos}}" bindtap='goDeatil' data-index='2'>其他福利</view>
         <view class="name {{detailIndex == 3?'active':''}}" data-top="{{jieshaoPos}}" bindtap='goDeatil' data-index='3'>公司详情</view>
       </view>
-    </view>
+    </view> -->
     <view class='five' id="base">
       <view class='title'>
-        <view class='left'></view>
+        <image class="left" src="/images/happyjob/position_dec.png"></image>
         <view class='right'>基本信息</view>
       </view>
       <view class="basesalay" wx:if="{{postitionDetail.basicSalary}}">
@@ -303,7 +385,7 @@
     </view>
     <view class='six' id="require">
       <view class='title'>
-        <view class='left'></view>
+        <image class="left" src="/images/happyjob/position_detail.png"></image>
         <view class='right'>岗位要求</view>
       </view>
       <view class="sex" wx:if="{{postitionDetail.gender != 0}}">
@@ -345,7 +427,7 @@
     </view>
     <view class='seven' id="otherWelfare">
       <view class='title'>
-        <view class='left'></view>
+        <image class="left" src="/images/happyjob/position_gift.png"></image>
         <view class='right'>其他福利</view>
       </view>
       <view class="work" wx:if="{{postitionDetail.workDinner}}">
@@ -373,7 +455,24 @@
         <view class='right'>{{postitionDetail.regularBus}}</view>
       </view>
     </view>
-    <view class='eight_1' id="jieshao">
+    <view class="regularBus" wx:if="{{postitionDetail.busDetail}}" bindtap="toBusDetail">
+      <image src="/images/happyjob/positon_bus.png"></image>
+      <view class="bus_position">
+        查看厂车路线图 >>
+      </view>
+    </view>
+    <view class="eight">
+      <view class='title'>
+        <image class="left" src="/images/happyjob/position_company.png"></image>
+        <view class='right'>公司简介</view>
+      </view>
+      <view class="eight-company">
+        <view class="eight-company-name">{{postitionDetail.hpCompany.companyName}}</view>
+        <view class="companyDescription" bindtap="toCompanyDesc">查看公司简介 ></view>
+      </view>
+    </view>
+
+    <!-- <view class='eight_1' id="jieshao">
       <view class='title'>
         <view class='left'></view>
         <view class='right'>公司简介</view>
@@ -393,8 +492,11 @@
         <view class='left'>客服电话:</view>
         <view class='right' bindtap='phoneCall'>{{postitionDetail.contactPhone}}</view>
       </view>
+    </view> -->
+    <view class='nine'>
+      <image class="nin-image" src="/images/happyjob/position_warn.png"></image>
+      <view>未标明收费的职位不会收取任何费用,若要求缴纳费用或押金,请提高警惕并第一时间向我们举报。</view>
     </view>
-    <view class='nine'>未标明收费的职位不会收取任何费用,若要求缴纳费用或押金,请提高警惕并第一时间向我们举报。</view>
   </view>
 </block>
 <!-- 拼团岗位 -->
@@ -421,13 +523,13 @@
     <view class="two1">
       <view class='left'>
         <view class='reward'>
-          <text class="reward1">返费 </text>
-          <text class="reward2">{{postitionDetail.reward}}元</text>
+          <text class="reward1">入职奖励 </text>
+          <text class="reward2"><text wx:if='{{postitionDetail.maleReward}}'>男{{postitionDetail.maleReward}} </text><text wx:if='{{postitionDetail.femaleReward}}'>女{{postitionDetail.femaleReward}}</text><text wx:if='{{postitionDetail.platformAllowance}}'>,额外奖励{{postitionDetail.platformAllowance}}</text></text>
           <text class="reward3">拼团成功最高可得{{maxReward}}元</text>
         </view>
       </view>
-      <view class='right'>
-      </view>
+      <!-- <view class='right'>
+      </view> -->
     </view>
     <view class='two_1'>
       <view class='left'>
@@ -486,17 +588,17 @@
         <image src='{{imgServerUrl}}/images/happyjob/right.png'></image>
       </view>
     </view>
-    <view class='four'>
+    <!-- <view class='four'>
       <view class='title'>
         <view class="name {{detailIndex == 0?'active':''}}" data-top="{{basePos}}" bindtap='goDeatil' data-index='0'>基本信息</view>
         <view class="name {{detailIndex == 1?'active':''}}" data-top="{{requirePos}}" bindtap='goDeatil' data-index='1'>岗位要求</view>
         <view class="name {{detailIndex == 2?'active':''}}" data-top="{{otherWelfarePos}}" bindtap='goDeatil' data-index='2'>其他福利</view>
         <view class="name {{detailIndex == 3?'active':''}}" data-top="{{jieshaoPos}}" bindtap='goDeatil' data-index='3'>公司详情</view>
       </view>
-    </view>
+    </view> -->
     <view class='five' id="base">
       <view class='title'>
-        <view class='left'></view>
+        <view class='left_pin'></view>
         <view class='right'>基本信息</view>
       </view>
       <view class="basesalay" wx:if="{{postitionDetail.basicSalary}}">
@@ -534,7 +636,7 @@
     </view>
     <view class='six' id="require">
       <view class='title'>
-        <view class='left'></view>
+        <view class='left_pin'></view>
         <view class='right'>岗位要求</view>
       </view>
       <view class="sex" wx:if="{{postitionDetail.gender != 0}}">
@@ -572,7 +674,7 @@
     </view>
     <view class='seven' id="otherWelfare">
       <view class='title'>
-        <view class='left'></view>
+        <view class='left_pin'></view>
         <view class='right'>其他福利</view>
       </view>
       <view class="work" wx:if="{{postitionDetail.workDinner}}">
@@ -605,7 +707,7 @@
     </view>
     <view class='eight' id="jieshao">
       <view class='title'>
-        <view class='left'></view>
+        <view class='left_pin'></view>
         <view class='right'>公司简介</view>
       </view>
       <view class="company">
@@ -624,7 +726,84 @@
 </block>
 <!-- 福利岗位 -->
 <block wx:else>
-  <view class='welfe'>
+  <view class="panel">
+    <view class="panel-header">
+      <view class='one'>
+        <view class='left'>
+          {{postitionDetail.positionName}}
+        </view>
+        <view class='salary'>
+          <!-- <image src='{{imgServerUrl}}/images/happyjob/dollor.png'></image> -->
+          <block wx:if="{{postitionDetail.salary}}">
+            {{postitionDetail.salary}}
+          </block>
+          <block wx:elif="{{postitionDetail.totalSalary}}">
+            {{postitionDetail.totalSalary}}
+          </block>
+          <block wx:else>
+            {{postitionDetail.basicSalary}}
+          </block>
+        </view>
+      </view>
+      <view class="two">
+        <view class='left'>
+          <view>
+            招聘人数:{{postitionDetail.recruitNumber?postitionDetail.recruitNumber:'若干'}}{{postitionDetail.recruitNumber?'人':''}}
+          </view>
+        </view>
+        <view class='right'>
+          <view>
+            {{Tools.formatDate(postitionDetail.updateDate)}}
+          </view>
+        </view>
+      </view>
+    </view>
+
+    <view class="two1">
+      <view class='left'>
+        <view class='reward' wx:if="{{postitionDetail.reward}}">
+          <text class="reward1">入职奖励 </text>
+          <text class="reward2"><text wx:if='{{postitionDetail.maleReward}}'>男{{postitionDetail.maleReward}} </text><text wx:if='{{postitionDetail.femaleReward}}'>女{{postitionDetail.femaleReward}}</text><text wx:if='{{postitionDetail.platformAllowance}}'>,额外奖励{{postitionDetail.platformAllowance}}</text></text>
+        </view>
+      </view>
+      <view class="right">
+        <view class='favour' bindtap='favourate'>
+          <block wx:if="{{isFarovite}}">
+            <image src='/images/happyjob/share.png'></image>
+          </block>
+          <block wx:else>
+            <image src='/images/happyjob/collect.png'></image>
+          </block>
+          <text>收藏</text>
+        </view>
+        <view class='favour share' bindtap='share'>
+          <image src='/images/happyjob/share.png'></image>
+          <text>分享</text>
+        </view>
+      </view>
+    </view>
+    <view class="five">
+      <view class='title'>
+        <image class="left" src="/images/happyjob/position_dec.png"></image>
+        <view class='right'>基本信息</view>
+      </view>
+      <view class="welfe">
+        <block wx:for="{{postitionDetail.hpWelfarePositionDetailList}}" wx:key="id">
+          <view class='wel_detail1'>
+            <template is="wxParse" data="{{wxParseData:detailArray[index].positionDetail.nodes}}" />
+          </view>
+          <view class='wel_top' wx:if="{{item.positionImg}}">
+            <image src="{{item.positionImg}}" style='height:{{swiperH}}px'></image>
+          </view>
+        </block>
+        <view class="welfare-container">
+          <template is="wxParse" data="{{wxParseData:applyCondition.nodes}}" />
+        </view>
+      </view>
+    </view>
+  </view>
+
+  <!-- <view class='welfe'>
     <view class='one' wx:if="{{postitionDetail.titleImg}}">
       <image src='{{postitionDetail.titleImg}}'></image>
     </view>
@@ -656,7 +835,7 @@
         <template is="wxParse" data="{{wxParseData:applyCondition.nodes}}" />
       </view>
     </view>
-  </view>
+  </view> -->
 </block>
 
 <!-- btn -->
@@ -736,11 +915,38 @@
 </view>
 
 <!-- 收藏 -->
-<view class='favour' bindtap='favourate'>
+<!-- <view class='favour' bindtap='favourate'>
   <block wx:if="{{isFarovite}}">
     <image src='{{imgServerUrl}}/images/happyjob/favoured.png'></image>
   </block>
   <block wx:else>
     <image src='{{imgServerUrl}}/images/happyjob/no_favour.png'></image>
   </block>
+</view> -->
+
+<poster id="poster" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig}}" bind:success="onPosterSuccess" bind:fail="onPosterFail">
+</poster>
+<view class="show-share" wx:if='{{showShare}}'>
+  <view class="share-content">
+
+    <view class="share-content-content">
+      <view class="share-content-header">
+        <text>已为你生成岗位专属海报:</text>
+      </view>
+      <image src="{{shareImg}}" class="share-content-image"></image>
+      <image src="/images/happyjob/share-close.png" class="share-close" bindtap="cloaseShare"></image>
+    </view>
+  </view>
+  <view class="show-share-bottom">
+    <view class="share-item">
+      <image src="/images/happyjob/share-save.png" mode="widthFix"></image>
+      <text>保存分享图</text>
+      <button bindtap="saveShareImg"></button>
+    </view>
+    <view class="share-item">
+      <image src="/images/happyjob/share-wechat.png" mode="widthFix"></image>
+      <text>微信好友</text>
+      <button open-type="share"></button>
+    </view>
+  </view>
 </view>

+ 24 - 0
pages/detail/index.wxs

@@ -0,0 +1,24 @@
+function formatDate(date, month_str, minute_str) {
+  if (!date) {
+    return 0
+  }
+  date = date.replace(getRegExp('-', 'g'), '/');
+  var _date = null;
+  _date = getDate(date);
+
+  var month = _date.getMonth() + 1;
+  var day = _date.getDate();
+
+
+  return [month, day].map(formatNumber).join(month_str || '-');
+
+
+}
+
+function formatNumber(n) {
+  n = n.toString()
+  return n[1] ? n : '0' + n
+}
+module.exports = {
+  formatDate: formatDate
+};

+ 377 - 88
pages/detail/index.wxss

@@ -1,26 +1,40 @@
 /* pages/detail/index.wxss */
 
-.panel {
+page {
+  background: #f5f5f5;
+  padding-bottom: 139rpx;
+}
+
+.panel-header {
+  height: 170rpx;
+  background: #fff;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
 }
 
 .panel .one {
   display: flex;
   align-items: center;
-  height: 70rpx;
+  /* height: 70rpx; */
   justify-content: space-between;
   padding: 0 30rpx;
+  background: #fff;
 }
 
 .panel .one .left {
-  color: #232327;
-  font-size: 30rpx;
+  color: #333;
+  font-size: 42rpx;
   font-family: SourceHanSansCN-Regular;
-  font-weight: 400;
+  /* font-weight: 400; */
   display: flex;
   align-items: center;
   height: 100%;
 }
 
+.panel .one .left_pin {
+}
+
 .panel .one .left image {
   width: 58rpx;
   height: 26rpx;
@@ -28,10 +42,12 @@
 }
 
 .panel .one .salary {
-  font-size: 32rpx;
+  font-size: 42rpx;
   font-family: Arial-BoldMT;
-  font-weight: bold;
-  color: rgba(255, 78, 37, 1);
+  /* font-weight: bold; */
+  color: #ff401a;
+  width: 300rpx;
+  text-align: right;
 }
 
 .panel .one .salary image {
@@ -40,6 +56,7 @@
 }
 
 .panel .two {
+  background: #fff;
   display: flex;
   align-items: center;
   justify-content: space-between;
@@ -49,10 +66,10 @@
 .panel .two .left {
   display: flex;
   flex-direction: row;
-  font-size: 22rpx;
+  font-size: 28rpx;
   font-family: PingFangSC;
-  font-weight: 400;
-  color: rgba(102, 102, 102, 1);
+  /* font-weight: 400; */
+  color: #666;
 }
 
 .panel .two .left .femaleReward {
@@ -104,17 +121,22 @@
 
 .panel .two .right {
   color: #999;
-  font-size: 20rpx;
+  font-size: 28rpx;
 }
 
 .panel .two1 {
+  height: 76rpx;
   display: flex;
   align-items: center;
   justify-content: space-between;
-  padding: 0 30rpx 30rpx 30rpx;
+  background: #fff;
+  padding: 0 30rpx;
+  border-top: 1rpx solid #eee;
+  border-bottom: 1rpx solid #eee;
 }
 
 .panel .two1 .left {
+  flex: 1;
   display: flex;
   flex-direction: row;
   font-size: 22rpx;
@@ -123,7 +145,18 @@
   color: rgba(102, 102, 102, 1);
 }
 
+.panel .two1 .left .reward {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
 .panel .two1 .left .reward1 {
+  height: 38rpx;
+  width: 100rpx;
+  text-align: center;
+  line-height: 38rpx;
   background: linear-gradient(270deg, rgba(255, 131, 49, 1) 0%, rgba(255, 83, 49, 1) 100%);
   border-radius: 10rpx;
   font-size: 24rpx;
@@ -134,12 +167,14 @@
 }
 
 .panel .two1 .left .reward2 {
+  flex: 1;
   margin-left: 20rpx;
-  font-size: 24rpx;
+  font-size: 26rpx;
   font-family: PingFangSC;
-  font-weight: 400;
-  color: rgba(102, 102, 102, 1);
+  /* font-weight: 400; */
+  color: #333;
 }
+
 .panel .two1 .left .reward3 {
   margin-left: 20rpx;
   font-size: 24rpx;
@@ -164,7 +199,17 @@
   height: 14rpx;
 }
 
+.panel .two1 .right {
+  width: 240rpx;
+  color: #333;
+  font-size: 28rpx;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
+
 .panel .two_1 {
+  background: #fff;
   display: flex;
   align-items: center;
   justify-content: space-between;
@@ -420,32 +465,39 @@
 }
 
 .panel .five {
+  background: #fff;
   display: flex;
   justify-content: center;
-  padding: 60rpx 30rpx 0rpx 30rpx;
   flex-direction: column;
+  margin-top: 22rpx;
+  padding-bottom: 15rpx;
 }
 
 .panel .five .title {
+  height: 114rpx;
   display: flex;
   flex-direction: row;
   align-items: center;
-  padding-bottom: 20rpx;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  border-bottom: 2rpx solid #eee;
+  margin-bottom: 15rpx;
+  /* padding: 0 30rpx; *//* padding-bottom: 20rpx; */
 }
 
 .panel .five .title .left {
-  width: 6rpx;
-  height: 22rpx;
-  background: rgba(30, 98, 167, 1);
-  border-radius: 3rpx;
+  width: 32rpx;
+  height: 28rpx;
+  /* background: rgba(30, 98, 167, 1);
+  border-radius: 3rpx; */
 }
 
 .panel .five .title .right {
-  color: #222;
-  font-size: 26rpx;
+  color: #333;
+  font-size: 30rpx;
   font-family: SourceHanSansCN-Regular;
-  font-weight: 400;
-  margin-left: 10rpx;
+  /* font-weight: 400; */
+  margin-left: 15rpx;
 }
 
 .panel .five .basesalay {
@@ -454,8 +506,8 @@
   color: #666;
   font-size: 22rpx;
   font-family: SourceHanSansCN-Regular;
-  font-weight: 400;
-  padding-top: 10rpx;
+  padding: 15rpx 30rpx;
+  box-sizing: border-box;
 }
 
 .panel .five .basesalay .left {
@@ -467,35 +519,40 @@
   margin-left: 36rpx;
   display: flex;
   flex-wrap: wrap;
+  word-break: break-all;
 }
 
 .panel .six {
+  background: #fff;
   display: flex;
   justify-content: center;
-  padding: 60rpx 30rpx 0rpx 30rpx;
   flex-direction: column;
+  margin-top: 22rpx;
+  padding-bottom: 15rpx;
 }
 
 .panel .six .title {
+  height: 114rpx;
   display: flex;
   flex-direction: row;
   align-items: center;
-  padding-bottom: 20rpx;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  border-bottom: 2rpx solid #eee;
+  margin-bottom: 15rpx;
 }
 
 .panel .six .title .left {
-  width: 6rpx;
-  height: 22rpx;
-  background: rgba(30, 98, 167, 1);
-  border-radius: 3rpx;
+  width: 32rpx;
+  height: 32rpx;
 }
 
 .panel .six .title .right {
-  color: #222;
-  font-size: 26rpx;
+  color: #333;
+  font-size: 30rpx;
   font-family: SourceHanSansCN-Regular;
-  font-weight: 400;
-  margin-left: 10rpx;
+  /* font-weight: 400; */
+  margin-left: 15rpx;
 }
 
 .panel .six .sex {
@@ -504,8 +561,8 @@
   color: #666;
   font-size: 22rpx;
   font-family: SourceHanSansCN-Regular;
-  font-weight: 400;
-  padding-top: 10rpx;
+  padding: 15rpx 30rpx;
+  box-sizing: border-box;
 }
 
 .panel .six .sex .left {
@@ -520,32 +577,36 @@
 }
 
 .panel .seven {
+  background: #fff;
   display: flex;
   justify-content: center;
-  padding: 60rpx 30rpx 0rpx 30rpx;
   flex-direction: column;
+  margin-top: 22rpx;
+  padding-bottom: 15rpx;
 }
 
 .panel .seven .title {
+  height: 114rpx;
   display: flex;
   flex-direction: row;
   align-items: center;
-  padding-bottom: 20rpx;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  border-bottom: 2rpx solid #eee;
+  margin-bottom: 15rpx;
 }
 
 .panel .seven .title .left {
-  width: 6rpx;
-  height: 22rpx;
-  background: rgba(30, 98, 167, 1);
-  border-radius: 3rpx;
+  width: 32rpx;
+  height: 35rpx;
 }
 
 .panel .seven .title .right {
-  color: #222;
-  font-size: 26rpx;
+  color: #333;
+  font-size: 30rpx;
   font-family: SourceHanSansCN-Regular;
-  font-weight: 400;
-  margin-left: 10rpx;
+  /* font-weight: 400; */
+  margin-left: 15rpx;
 }
 
 .panel .seven .work {
@@ -554,8 +615,8 @@
   color: #666;
   font-size: 22rpx;
   font-family: SourceHanSansCN-Regular;
-  font-weight: 400;
-  padding-top: 10rpx;
+  padding: 15rpx 30rpx;
+  box-sizing: border-box;
 }
 
 .panel .seven .work .left {
@@ -570,32 +631,36 @@
 }
 
 .panel .eight {
+  background: #fff;
   display: flex;
   justify-content: center;
-  padding: 60rpx 30rpx 140rpx 30rpx;
   flex-direction: column;
+  margin-top: 22rpx;
+  padding-bottom: 15rpx;
 }
 
 .panel .eight .title {
+  height: 114rpx;
   display: flex;
   flex-direction: row;
   align-items: center;
-  padding-bottom: 20rpx;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  border-bottom: 2rpx solid #eee;
+  margin-bottom: 15rpx;
 }
 
 .panel .eight .title .left {
-  width: 6rpx;
-  height: 22rpx;
-  background: rgba(30, 98, 167, 1);
-  border-radius: 3rpx;
+  width: 32rpx;
+  height: 32rpx;
 }
 
 .panel .eight .title .right {
-  color: #222;
-  font-size: 26rpx;
+  color: #333;
+  font-size: 30rpx;
   font-family: SourceHanSansCN-Regular;
-  font-weight: 400;
-  margin-left: 10rpx;
+  /* font-weight: 400; */
+  margin-left: 15rpx;
 }
 
 .panel .eight .company {
@@ -605,7 +670,8 @@
   font-family: SourceHanSansCN-Regular;
   font-weight: 400;
   color: rgba(102, 102, 102, 1);
-  padding-bottom: 78rpx;
+  padding: 15rpx 30rpx;
+  box-sizing: border-box;
 }
 
 .panel .eight .com {
@@ -615,7 +681,8 @@
   font-size: 22rpx;
   font-family: SourceHanSansCN-Regular;
   font-weight: 400;
-  padding-top: 10rpx;
+  padding: 0 30rpx;
+  margin-top: 10rpx;
 }
 
 .panel .eight .com .left {
@@ -629,15 +696,51 @@
   flex-wrap: wrap;
 }
 
+.eight-company {
+  height: 86rpx;
+  font-size: 28rpx;
+  color: #333;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 30rpx;
+}
+
+.eight-company-name {
+  flex: 1;
+}
+
+.companyDescription {
+  width: 200rpx;
+  text-align: right;
+  font-size: 24rpx;
+  color: #0177ff;
+}
+
 .panel .nine {
+  height: 154rpx;
+  color: #ff401a;
+  background: #fff;
+  font-size: 24rpx;
   display: flex;
-  justify-content: center;
-  padding: 40rpx 30rpx 180rpx 30rpx;
-  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+  /* padding: 40rpx 30rpx 180rpx 30rpx; *//* flex-direction: column; */
   font-family: SourceHanSansCN-Medium;
-  font-weight: 500;
-  color: rgba(255, 64, 14, 1);
-  font-size: 22rpx;
+  /* font-weight: 500; */
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  margin-top: 22rpx;
+}
+
+.panel .nine .nin-image {
+  width: 60rpx;
+  height: 60rpx;
+  margin-right: 30rpx;
+}
+
+.panel .nine view {
+  flex: 1;
 }
 
 .panel .eight_1 {
@@ -703,6 +806,7 @@
 /* 福利岗位 */
 
 .welfe {
+  padding: 30rpx;
 }
 
 .welfe .one {
@@ -829,23 +933,19 @@
 
 .btn-group {
   background: #fff;
-  padding: 20rpx;
-  box-sizing: border-box;
+  height: 124rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
 }
 
 .selfBtn {
-  display: flex;
+  width: 690rpx;
   height: 88rpx;
-  line-height: 88rpx;
-  align-items: center;
-  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
-  background: linear-gradient(90deg, rgba(59, 120, 207, 1), rgba(80, 166, 195, 1));
-  border-radius: 44rpx;
-  justify-content: center;
-  font-size: 38rpx;
-  font-family: SourceHanSansCN-Normal;
-  font-weight: 400;
-  color: rgba(255, 254, 254, 1);
+  color: #fff;
+  font-size: 34rpx;
+  background: #0177ff;
+  border-radius: 10rpx;
 }
 
 /*弹窗*/
@@ -1056,14 +1156,203 @@
 /* 收藏 */
 
 .favour {
-  position: fixed;
-  top: 312rpx;
-  right: 30rpx;
-  width: 66rpx;
-  height: 66rpx;
+  font-size: 28rpx;
+  color: #333;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.favour image {
+  width: 25rpx;
+  height: 23rpx;
+  margin-right: 6rpx;
+}
+
+.share {
+  margin-left: 40rpx;
 }
 
 .favour image {
+  height: 25rpx;
+}
+
+.address {
+  height: 150rpx;
+  background: #fff;
+  padding: 0 30rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.address-left {
+  height: 100%;
+  flex: 1;
+  color: #333;
+  font-size: 34rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding-right: 15rpx;
+}
+
+.address-left image {
+  height: 73rpx;
+  width: 73rpx;
+  margin-right: 35rpx;
+}
+
+.address-content {
+  height: 100%;
+  flex: 1;
+  padding: 20rpx 0;
+  box-sizing: border-box;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+}
+
+.address-content-address {
+  font-size: 26rpx;
+  color: #666;
+}
+
+.address-right {
+  width: 140rpx;
+  color: #0177ff;
+  font-size: 26rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.address-bar {
+  width: 2rpx;
+  height: 84rpx;
+  background: #ddd;
+  /* border: 1rpx solid rgba(221, 221, 221, 1); */
+}
+
+.address-right text {
+  margin: 0 20rpx;
+}
+
+.regularBus {
+  height: 130rpx;
+  font-weight: 400;
+  background: #fff;
+  font-family: PingFangSC-Regular, PingFang SC;
+  color: #333;
+  font-size: 34rpx;
+  padding: 0 30rpx;
+  display: flex;
+  align-items: center;
+  border-top: 1rpx solid #eee;
+}
+
+.regularBus image {
+  width: 60rpx;
+  height: 54rpx;
+  margin-right: 40rpx;
+}
+
+.show-share {
+  height: 100%;
+  width: 100%;
+  background: rgba(0, 0, 0, 0.6);
+  position: fixed;
+  left: 0;
+  top: 0;
+  display: flex;
+  align-items: center ;
+  justify-content: center;
+}
+
+.share-content {
+  width: 100%;
+  height: 85%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.share-content-content {
+  width: 552rpx;
+  height: 960rpx;
+  background: #fff;
+  border-radius: 40rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  /* justify-content: center; */
+  position: relative;
+}
+
+.share-content-image {
+  height: 751rpx;
+  width: 454rpx;
+}
+
+.share-content-header {
   width: 100%;
+  padding: 0 49rpx;
+  box-sizing: border-box;
+  font-size: 28rpx;
+  color: #333;
+  margin-top: 65rpx;
+  margin-bottom: 29rpx;
+}
+
+.share-close {
+  height: 48rpx;
+  width: 48rpx;
+  position: absolute;
+  right: 20rpx;
+  top: 20rpx;
+}
+
+.show-share-bottom {
+  height: 180rpx;
+  width: 100%;
+  background: #fff;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  justify-content: space-around;
+  position: absolute;
+  left: 0;
+  bottom: 0;
+}
+
+.share-item {
+  color: #666;
+  font-size: 24rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  position: relative;
+}
+
+.share-item image {
+  width: 80rpx;
+  margin-bottom: 15rpx;
+}
+
+.share-item button {
   height: 100%;
+  width: 100%;
+  position: absolute;
+  left: 0;
+  top: 0;
+  opacity: 0;
+}
+
+.left_pin {
+  width: 6rpx;
+  height: 22rpx;
+  background: rgba(30, 98, 167, 1);
+  border-radius: 3rpx;
 }

+ 2 - 2
pages/document/pt.wxml

@@ -4,8 +4,8 @@
   <view class='li'>拼团有效期从开团起,到该拼团岗位结束前1小时</view>
   <view class='li'>拼团有效期内,拼团人数达到3人,则拼团成功,未达到3人视为拼团失败,如在拼团有效期内拼团人数超过3人,也可成团,上不封顶</view>
   <view class='li'>拼团总人数达5人或5人以上,可叠加奖励金,具体以当天实际情况为准</view>
-  <view class='li'>奖励金领取规则,依据返费规则,并与返费同时发放</view>
-  <view class='li'>拼团奖励金以当天实际情况为准</view>
+  <view class='li'>奖励金领取规则,依据入职奖励规则,并同时发放</view>
+  <view class='li'>拼团奖励金以当天实际情况为准</view> 
   <view class='li'>拼团规则不与经纪人规则同时适用</view>
   <view class='li'>具体可咨询客服电话:400-692-0099</view>
 </view>

BIN
pages/expense/images/return-fee.png


BIN
pages/expense/images/tixing.png


BIN
pages/expense/images/wages-close.png


+ 147 - 0
pages/expense/pages/return-fee/detail.js

@@ -0,0 +1,147 @@
+// pages/return-fee/pages/return-fee/detail.js
+
+import {
+  myHpAgencyFeeDetail,
+  confirmHpAgencyFee
+} from '../../../../services/index.js'
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    visible: false,
+    comfire: false,
+    showIntegral: false,
+    integral: 0,
+    action: [{
+      name: '取消',
+      color: '#327AE1',
+    }, {
+      name: '确认',
+      color: '#327AE1',
+      fontWeight: 'bolder'
+    }]
+  },
+  question() {
+    this.setData({
+      visible: true
+    })
+  },
+  phone() {
+    wx.makePhoneCall({
+      phoneNumber: '4006920099',
+      success: res => {
+        this.setData({
+          visible: false
+        })
+      }
+    })
+  },
+  showComfire() {
+    this.setData({
+      comfire: true
+    })
+  },
+  comfire(e) {
+    if (e.detail.index) {
+      confirmHpAgencyFee({
+        user_id: wx.getStorageSync('user_id'),
+        user_token: wx.getStorageSync('user_token'),
+        member_id: wx.getStorageSync('member_id'),
+        hpAgencyFeeId_id: this.data.id
+      }).then(data => {
+        this.setData({
+          comfire: false,
+          integral: data.data.point,
+          showIntegral: Boolean(data.data.point)
+        })
+        if (!data.data.point) {
+          wx.showToast({
+            title: '领取成功',
+          })
+        }
+      })
+    } else {
+      this.setData({
+        comfire: false
+      })
+    }
+  },
+  getData(hpAgencyFeeId_id) {
+    myHpAgencyFeeDetail({
+      user_id: wx.getStorageSync('user_id'),
+      user_token: wx.getStorageSync('user_token'),
+      member_id: wx.getStorageSync('member_id'),
+      hpAgencyFeeId_id
+    }).then(res => {
+      res.data.hpAgencyFee.onboardingDate = res.data.hpAgencyFee.onboardingDate.split(' ')[0]
+      this.setData({
+        ...res.data.hpAgencyFee
+      })
+    })
+  },
+  toIntegral() {
+    wx.reLaunch({
+      url: '/pages/integral/pages/integral/integral',
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    if (options.id) {
+      this.getData(options.id)
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 5 - 0
pages/expense/pages/return-fee/detail.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "i-modal": "../../ui/modal/index"
+  }
+}

+ 46 - 0
pages/expense/pages/return-fee/detail.wxml

@@ -0,0 +1,46 @@
+<!--pages/return-fee/pages/return-fee/detail.wxml-->
+<view class="container">
+  <view class="header">
+    <view class="cell">
+      <text>入职企业:</text>
+      <text>{{onboardingCompany}}</text>
+    </view>
+    <view class="cell">
+      <text>入职日期:</text>
+      <text>{{onboardingDate}}</text>
+    </view>
+    <view class="cell">
+      <text>返费金额:</text>
+      <text>{{agencyFee}}</text>
+    </view>
+  </view>
+
+  <view class="button">
+    <view class="" bindtap="question">我有疑问</view>
+    <view class="" bindtap="showComfire">确认无误</view>
+  </view>
+
+</view>
+<i-modal showCancel='{{false}}' visible='{{visible}}' okColor='#327AE1' bind:ok='phone' okText='好的'>
+  <view class="content">如果您对入职奖励有疑问,请联系:400-692-0099</view>
+</i-modal>
+
+<i-modal visible='{{comfire}}' bind:click='comfire' actions='{{action}}'>
+  <view class="content">您将确认入职奖励正确无误,预计在您确认3个工作日内我们会将奖励发放至您的银行账户中。</view>
+</i-modal>
+
+<view class="cover" wx:if='{{showIntegral}}'>
+  <view class="cover-content">
+    <image src="../../images/return-fee.png" class="fee-img"></image>
+    <view class="fee-content">
+      <view class="fee-content-body">
+        <view class="">恭喜!小白给你送了{{integral}}积分!</view>
+        <view>快去积分商城兑换好礼和活动吧!</view>
+      </view>
+      <view class="fee-button" bindtap="toIntegral">
+        现在就去
+      </view>
+
+    </view>
+  </view>
+</view>

+ 121 - 0
pages/expense/pages/return-fee/detail.wxss

@@ -0,0 +1,121 @@
+/* pages/return-fee/pages/return-fee/detail.wxss */
+
+.header {
+  font-size: 30rpx;
+  color: #666;
+  padding: 0 30rpx;
+  background: #fff;
+}
+
+.header view {
+  border-bottom: 2rpx solid #eee;
+}
+
+.cell {
+  height: 116rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.button {
+  width: 750rpx;
+  height: 120rpx;
+  position: fixed;
+  left: 0;
+  bottom: 0;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.button view {
+  height: 88rpx;
+  width: 336rpx;
+  font-size: 34rpx;
+  text-align: center;
+  line-height: 88rpx;
+  color: #327ae1;
+  background: #fff;
+  border-radius: 10rpx;
+  border: 2rpx solid rgba(50, 122, 225, 1);
+}
+
+.button view:last-child {
+  color: #fff;
+  background: linear-gradient(90deg, rgba(78, 171, 225, 1) 0%, rgba(49, 121, 225, 1) 100%);
+}
+
+.content {
+  color: #333;
+  font-size: 34rpx;
+  padding: 20rpx 30rpx;
+}
+
+.cover {
+  height: 100%;
+  width: 100%;
+  background: rgba(0, 0, 0, 0.4);
+  position: fixed;
+  left: 0;
+  top: 0;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.cover-content {
+  height: 684rpx;
+  width: 600rpx;
+  position: relative;
+}
+
+.fee-img {
+  height: 684rpx;
+  width: 600rpx;
+  position: absolute;
+  left: 0;
+  top: 0;
+}
+
+.fee-content {
+  height: 684rpx;
+  width: 600rpx;
+  position: absolute;
+  left: 0;
+  top: 0;
+  display: flex;
+  flex-direction: column;
+  justify-content: flex-end;
+  align-items: center;
+}
+
+.fee-content-body {
+  font-size: 34rpx;
+  color: #333;
+  margin-bottom: 48rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+}
+
+.fee-content-body view:last-child {
+  color: #666;
+  font-size: 28rpx;
+  margin-top: 30rpx;
+}
+
+.fee-button {
+  width: 336rpx;
+  height: 88rpx;
+  text-align: center;
+  line-height: 88rpx;
+  color: #fff;
+  font-size: 34rpx;
+  background: linear-gradient(90deg, rgba(113, 92, 255, 1) 0%, rgba(49, 121, 225, 1) 100%);
+  border-radius: 44rpx;
+  margin-bottom: 50rpx;
+}

+ 118 - 0
pages/expense/pages/return-fee/index.js

@@ -0,0 +1,118 @@
+// pages/return-fee/index.js
+import {
+  myHpAgencyFeeList
+} from '../../../../services/index.js'
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    list: [],
+    pageNo: 1,
+    isLast: false
+  },
+  todetail(e) {
+    const {
+      id
+    } = e.currentTarget.dataset;
+    wx.navigateTo({
+      url: './detail?id=' + id,
+    })
+  },
+  getList(pageNo = this.data.pageNo) {
+    myHpAgencyFeeList({
+      user_id: wx.getStorageSync('user_id'),
+      user_token: wx.getStorageSync('user_token'),
+      member_id: wx.getStorageSync('member_id'),
+      idcard_number: wx.getStorageSync('hpMember').idCardNumber,
+      pageNo
+    }).then(data => {
+      if (data.data.list && data.data.list.length) {
+        pageNo++;
+        this.setData({
+          [`list[${pageNo - 2}]`]: data.data.list,
+          pageNo,
+          isLast: data.data.isLast
+        })
+      }
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    wx.getStorage({
+      key: 'hpMember',
+      success: (res) => {
+        this.setData({
+          realName: res.data.realName,
+          idNum: res.data.idCardNumber,
+        })
+      },
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+    this.setData({
+      pageNo: 1,
+      list: []
+    }, _ => {
+      this.getList()
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+    this.setData({
+      pageNo: 1,
+      list: []
+    }, _ => {
+      this.getList()
+    })
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+    if (this.data.isLast) {
+
+    } else {
+      this.getList()
+    }
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 5 - 0
pages/expense/pages/return-fee/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "入职奖励",
+  "enablePullDownRefresh": true
+}

+ 28 - 0
pages/expense/pages/return-fee/index.wxml

@@ -0,0 +1,28 @@
+<!--pages/return-fee/index.wxml-->
+
+
+<view class="container">
+
+  <view class="header">
+    <view class="cell">
+      <text>姓名:</text>
+      <text>{{realName}}</text>
+    </view>
+    <view class="cell">
+      <text>身份证号:</text>
+      <text>{{idNum}}</text>
+    </view>
+  </view>
+  <block wx:for='{{list}}' wx:key='{{index}}'>
+    <view class="content" wx:for='{{item}}' wx:key='{{index}}' data-id="{{item.id}}" bindtap="todetail">
+      <view class="content-cell">
+        <text class="money">¥{{item.agencyFee}}</text>
+      </view>
+      <view class="content-cell">
+        <text class="time">{{item.onboardingCompany}}</text>
+        <text class="time color">查看入职奖励明细>></text>
+      </view>
+    </view>
+  </block>
+  <view class="empty" wx:if='{{!list.length}}'>暂无需要确认的入职奖励</view>
+</view>

+ 79 - 0
pages/expense/pages/return-fee/index.wxss

@@ -0,0 +1,79 @@
+/* pages/return-fee/index.wxss */
+
+page {
+  background: rgba(245, 245, 245, 1);
+}
+
+.header {
+  font-size: 30rpx;
+  color: #666;
+  padding: 0 30rpx;
+  background: #fff;
+}
+
+.header view:first-child {
+  border-bottom: 2rpx solid #eee;
+}
+
+.cell {
+  height: 116rpx;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.content {
+  height: 194rpx;
+  background: #fff;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  margin-top: 22rpx;
+  padding: 30rpx;
+  box-sizing: border-box;
+}
+
+.content-cell {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.content-cell:first-child {
+  margin-bottom: 15rpx;
+}
+
+.money {
+  color: #333;
+  font-size: 40rpx;
+}
+
+.time {
+  color: #666;
+  font-size: 24rpx;
+}
+
+.color {
+  color: #327ae1;
+}
+
+.tips {
+  color: #aaa;
+  font-size: 24rpx;
+  display: flex;
+  align-items: center;
+  padding: 22rpx 30rpx;
+}
+
+.tips image {
+  height: 28rpx;
+  width: 28rpx;
+  margin-right: 15rpx;
+}
+
+.empty {
+  color: #aaa;
+  font-size: 24rpx;
+  text-align: center;
+  padding: 22rpx 30rpx;
+}

+ 97 - 0
pages/expense/pages/wages/detail.js

@@ -0,0 +1,97 @@
+// pages/wages/detail.js
+import {
+  myPayRollDetail
+} from '../../../../services/index.js'
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    close: true
+  },
+  close() {
+    this.setData({
+      close: false
+    })
+  },
+  getData(hpPayroll_id = this.data.id) {
+    myPayRollDetail({
+      user_id: wx.getStorageSync('user_id'),
+      user_token: wx.getStorageSync('user_token'),
+      member_id: wx.getStorageSync('member_id'),
+      hpPayroll_id
+    }).then(data => {
+      const payrollDetail = JSON.parse(data.data.hpPayroll.payrollDetail)
+      this.setData({
+        ...data.data.hpPayroll,
+        payrollDetail
+      })
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+    if (options.id) {
+      this.getData(options.id)
+    }
+    wx.getStorage({
+      key: 'hpMember',
+      success: (res) => {
+        this.setData({
+          realName: res.data.realName,
+        })
+      },
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function() {
+    this.getData(this.data.id)
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function() {
+
+  }
+})

+ 0 - 0
pages/expense/pages/wages/detail.json


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.