ZhangWenQiang пре 6 година
родитељ
комит
114a2785cb
4 измењених фајлова са 327 додато и 160 уклоњено
  1. 6 5
      pages/detail/index.js
  2. 114 84
      pages/search-result/search-result.wxml
  3. 204 70
      pages/search-result/search-result.wxss
  4. 3 1
      pages/search/index.js

+ 6 - 5
pages/detail/index.js

@@ -98,6 +98,7 @@ Page({
       let postitionDetail = {};
       let groupLessList = {};
       var leftTime = 0;
+      var myGroupId = '';
       switch (this.data.positionCategory) {
         case "0":
           postitionDetail = data.data.hpFulltimePosition
@@ -112,9 +113,10 @@ Page({
           postitionDetail = data.data.hpGoodmoneyPosition
           break;
         case "4":
-          postitionDetail = data.data.hpGroupPosition
-          leftTime = data.data.hpGroupPosition.groupEndTime
-          groupLessList = data.data.groupLessList
+          postitionDetail = data.data.hpGroupPosition;
+          leftTime = data.data.hpGroupPosition.groupEndTime;
+          groupLessList = data.data.groupLessList;
+          myGroupId = data.data.myGroupId;
           break;
         case "5":
           postitionDetail = data.data.hpWelfarePosition
@@ -136,11 +138,10 @@ Page({
       }
       this.setData({
         postitionDetail: postitionDetail,
-        // isOpen: isOpen,
         isApply: data.data.isApply,
         leftTime: leftTime,
         storeAction: groupLessList,
-        myGroupId: data.data.myGroupId
+        myGroupId: myGroupId
       })
       //富文本转义
       var detailArray = [];

+ 114 - 84
pages/search-result/search-result.wxml

@@ -1,129 +1,153 @@
+<!--pages/search-result/search-result.wxml-->
 <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">
       <!-- 兼职岗位 -->
-      <block wx:if="{{item.positionCategory == 1}}">
+      <block wx:if="{{item.positionCategory == 1 || item.positionCategory == 9}}">
         <view class='box-item-info'>
           <view class='one'>
             <view class='left'>
-              <text class='job'>{{item.positionName}}</text>
+              {{item.positionName}}
             </view>
-            <view class='salary'>{{item.salary}}
-              <!-- <text class="danwei">元</text> -->
+            <view class='salary'>
+              <image src='../../images/happyjob/dollor.png'></image>
+              {{item.salary}}
             </view>
           </view>
           <view class='two'>
             <view class='limit'>
-              <block wx:if="{{item.workDay}}">
-                <i-tag wx:for="{{globalTools.splitStr1(item.workDay,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class">
-                  {{tag}}
-                </i-tag>
-                <text>共{{globalTools.splitStr1(item.workDay,',').length}}天</text>
-              </block>
+              <view>
+                <image src='../../images/happyjob/limit.png'></image>
+              </view>
+              <view>
+                <block wx:if="{{item.workDay}}">
+                  <i-tag wx:for="{{globalTools.splitStr1(item.workDay,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class">
+                    {{tag}}
+                  </i-tag>
+                  <text>(共计{{globalTools.splitStr1(item.workDay,',').length}}天)</text>
+                </block>
+              </view>
             </view>
             <view class='time'>{{item.settlementMethod}}</view>
           </view>
           <view class='three'>
             <view class='area' wx:if="{{item.hpPositionAddressList}}">
-              <i-icon type="coordinates_fill" />
-              <text class='area-name'>{{item.hpPositionAddressList[0].adname}}{{item.hpPositionAddressList[0].address}}</text>
+              <image src='../../images/happyjob/address.png'></image>
+              <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
             </view>
             <view wx:else>
             </view>
-            <view class='time'>{{item.updateDate}}</view>
+            <view class='time'>
+              <image src='../../images/happyjob/time.png'></image>
+              <text>{{globalTools.subStr(item.updateDate)}}</text>
+            </view>
           </view>
         </view>
       </block>
       <!-- 拼团 -->
       <block wx:elif="{{item.positionCategory == 4}}">
-        <!-- <view class='box-item-info'>
-        <view class='one'>
-          <view class='left'>
-            <text class='job'>{{item.positionName}}</text>
-          </view>
-          <view class='salary'>{{item.totalSalary?item.totalSalary:item.basicSalary}}
-            <text class="danwei">元</text>
+        <view class='box-item-info'>
+          <view class='one'>
+            <view class='left'>
+              {{item.positionName}}
+            </view>
+            <view class='salary'>
+              <image src='../../images/happyjob/dollor.png'></image>
+              {{item.totalSalary?item.totalSalary:item.basicSalary}}
+            </view>
           </view>
-        </view>
-        <view class='two'>
-          <view class='commpany'>{{item.hpCompany.companyName}}</view>
-          <view class='area'>
-            <i-icon type="coordinates_fill" />
-            <text class='area-name'>{{item.hpCompany.adname}}</text>
+          <view class='four'>
+            <view class='commpany'>{{item.hpCompany.companyName}}</view>
+            <view class='area'>
+              <image src='../../images/happyjob/address.png'></image>
+              <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
+            </view>
           </view>
-        </view>
-        <view class='two'>
-          <view class='limit'>
-            <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 class='two'>
+            <view class='limit'>
+              <block wx:if="{{item.specialWelfare}}">
+                <i-tag wx:for="{{globalTools.splitStr1(item.specialWelfare,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class">
+                  {{tag}}
+                </i-tag>
+              </block>
+              <block wx:if="{{item.accommodation}}">
+                <i-tag i-class="tag-class">
+                  {{item.accommodation}}
+                </i-tag>
+              </block>
+              <block wx:if="{{item.socialSecurity}}">
+                <i-tag i-class="tag-class">
+                  {{item.socialSecurity}}
+                </i-tag>
+              </block>
+              <block wx:if="{{item.workDinner}}">
+                <i-tag i-class="tag-class">
+                  {{item.workDinner}}
+                </i-tag>
+              </block>
+              <block wx:if="{{item.regularBus}}">
+                <i-tag i-class="tag-class">
+                  {{item.regularBus}}
+                </i-tag>
+              </block>
+            </view>
+            <view></view>
           </view>
-          <view></view>
-        </view>
-        <view class='three'>
-          <view class='fan' wx:if="{{item.reward}}">
-            <text>{{item.reward}}元
-          </text>
+          <view class='three'>
+            <view class='fan' wx:if="{{item.reward}}">
+              <image src='../../images/happyjob/reward.png'></image>
+              <text>入职最高奖励 {{item.reward}}元</text>
+            </view>
+            <view wx:else>
+            </view>
+            <view class='time'>
+              <image src='../../images/happyjob/time.png'></image>
+              <text>{{globalTools.subStr(item.updateDate)}}</text>
+            </view>
           </view>
-          <view wx:else>
+          <view class='five'>
+            <view class="pt-member">已有
+              <text class="number">{{item.startGroupNumber}}</text> 位伙伴加入了该拼工
+            </view>
+            <view class="endtime">结束时间:{{item.groupEndTime}}</view>
           </view>
-          <view class='time'>{{item.updateDate}}</view>
         </view>
-        <view class="four">
-          <text class="pt-member">已有<text class="number">{{item.startGroupNumber}}</text>人拼团成功</text>
-          <text class="endtime">结束时间:{{item.groupEndTime}}</text>
-        </view>
-      </view> -->
       </block>
       <!-- 福利岗位 -->
       <block wx:elif="{{item.positionCategory == 5}}">
         <view class='box-item-info'>
           <view class='one'>
             <view class='left'>
-              <text class='job'>{{item.positionName}}</text>
+              {{item.positionName}}
             </view>
-            <view class='salary'>{{item.salary}}
-              <!-- <text class="danwei">元</text> -->
+            <view class='salary'>
+              <image src='../../images/happyjob/dollor.png'></image>
+              {{item.salary}}
             </view>
           </view>
           <view class='two'>
             <view class='limit'>
+              <view>
+                <image src='../../images/happyjob/limit.png'></image>
+              </view>
               <text> {{globalTools.subStr(item.publishTime)}}-{{globalTools.subStr(item.endTime)}}</text>
             </view>
             <view class='time'>{{item.settlementMethod}}</view>
           </view>
           <view class='three'>
             <view class='area'>
+              <image src='../../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-class">
+                <i-tag wx:for="{{globalTools.splitStr1(item.activityWide,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class" style="margin-left:10rpx;">
                   {{tag}}
                 </i-tag>
               </block>
             </view>
-            <view class='time'>{{item.updateDate}}</view>
+            <view class='time'>
+              <image src='../../images/happyjob/time.png'></image>
+              <text>{{globalTools.subStr(item.updateDate)}}</text>
+            </view>
           </view>
         </view>
       </block>
@@ -132,21 +156,22 @@
         <view class='box-item-info'>
           <view class='one'>
             <view class='left'>
-              <text class='job'>{{item.positionName}}</text>
+              {{item.positionName}}
             </view>
-            <view class='salary'>{{item.totalSalary?item.totalSalary:item.basicSalary}}
-              <!-- <text class="danwei">元</text> -->
+            <view class='salary'>
+              <image src='../../images/happyjob/dollor.png'></image>
+              {{item.totalSalary?item.totalSalary:item.basicSalary}}
             </view>
           </view>
-          <view class='two'>
+          <view class='four'>
             <view class='commpany'>{{item.hpCompany.companyName}}</view>
             <view class='area'>
-              <i-icon type="coordinates_fill" />
-              <text class='area-name'>{{item.hpCompany.adname}}</text>
+              <image src='../../images/happyjob/address.png'></image>
+              <text class='area-name'>{{item.hpPositionAddressList[0].adname}}</text>
             </view>
           </view>
           <view class='two'>
-            <view class='limit'>
+            <view class='limit_1'>
               <block wx:if="{{item.specialWelfare}}">
                 <i-tag wx:for="{{globalTools.splitStr1(item.specialWelfare,',')}}" wx:key="*this" wx:for-item="tag" i-class="tag-class">
                   {{tag}}
@@ -178,29 +203,34 @@
           <view class='three'>
             <block wx:if="{{item.positionCategory == 3}}">
               <view class='fan' wx:if="{{item.reward}}">
-                <text>{{item.reward}}+{{item.platformAllowance}}元</text>
+                <image src='../../images/happyjob/reward.png'></image>
+                <text>入职最高奖励 {{item.reward}}+{{item.platformAllowance}}元</text>
               </view>
               <view wx:else>
               </view>
             </block>
             <block wx:else>
               <view class='fan' wx:if="{{item.reward}}">
-                <text>{{item.reward}}元</text>
+                <image src='../../images/happyjob/reward.png'></image>
+                <text>入职最高奖励 {{item.reward}}元</text>
               </view>
               <view wx:else>
               </view>
             </block>
-            <view class='time'>{{item.updateDate}}</view>
+            <view class='time'>
+              <image src='../../images/happyjob/time.png'></image>
+              <text>{{globalTools.subStr(item.updateDate)}}</text>
+            </view>
           </view>
         </view>
       </block>
     </view>
   </view>
-  <view class="loading_no" hidden='{{isScroll}}' wx:if="{{list.length}}">{{showNoMore}}</view>
+  <view class="loading_no" hidden='{{isScroll}}'>{{showNoMore}}</view>
 </block>
 <block wx:else>
   <view class='no_data'>
-    <image src="../../images/tabs/white.png" class="white" />
+    <image src="../../images/happyjob/no_data.png" class="white" />
     <view class='no_text'>没有找到您要搜索的职位</view>
   </view>
 </block>

+ 204 - 70
pages/search-result/search-result.wxss

@@ -1,20 +1,26 @@
-/* 列表 */
+/* pages/search-result/search-result.wxss */
+
+page {
+  background-color: #f5f5f5;
+}
 
 .box-body {
-  margin-top: 10rpx;
   width: 100%;
   overflow: hidden;
 }
 
 .box-item {
   display: flex;
-  font-size: 28rpx;
-  color: #999;
+  padding: 35rpx 40rpx 30rpx 40rpx;
+  font-size: 32rpx;
+  color: #232327;
   box-sizing: border-box;
+  background-color: #fff;
+  border-bottom: 16rpx solid #f5f5f5;
 }
 
 .item-hover {
-  background: #cacfd3;
+  background: #f5f5f5;
 }
 
 .box-item .box-item-img {
@@ -33,145 +39,273 @@
   flex-grow: 1;
   box-sizing: border-box;
   overflow: hidden;
-  padding: 40rpx 20rpx 30rpx 30rpx;
-  border-bottom: 1px solid #eaeaea;
 }
 
 .box-item .one {
   display: flex;
   justify-content: space-between;
-  color: #333;
+  color: #232327;
+  flex-direction: row;
 }
 
 .box-item .one .left {
   display: flex;
   flex-grow: 1;
   align-items: center;
+  font-size: 32rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(35, 35, 39, 1);
+  width: 60%;
 }
 
-.job {
-  color: #333;
-  font-size: 30rpx;
-  font-family: PingFang-SC-Bold;
+.box-item .one .salary {
+  font-size: 32rpx;
+  font-family: Arial-BoldMT;
   font-weight: bold;
-  letter-spacing: 4rpx;
+  color: rgba(30, 98, 167, 1);
 }
 
-.salary {
-  color: #ef7618;
-  font-size: 30rpx;
-  font-weight: bold;
+.box-item .one .salary image {
+  width: 18rpx;
+  height: 24rpx;
 }
 
-.danwei {
-  font-size: 20rpx;
-  font-weight: 400;
+.box-item .two {
+  display: flex;
+  justify-content: space-between;
+  color: #909090;
+  font-size: 24rpx;
+  margin-top: 30rpx;
+  align-items: center;
 }
 
-.fan {
-  background: url("https://happyjob.oss-cn-shanghai.aliyuncs.com/uploadfiles/mina/images/home/fanBg.png") no-repeat;
-  background-size: 100% 100%;
+.box-item .two .limit {
+  display: flex;
+  flex-direction: row;
+  flex-grow: 1;
+  overflow: hidden;
+  margin-right: 30rpx;
+  width: 80%;
+  color: #868b92;
+}
+
+.box-item .two .limit image {
+  width: 18rpx;
+  height: 18rpx;
+  margin-right: 10rpx;
+}
+
+.box-item .two .limit i-tag {
   /* margin-left: 10rpx; */
-  font-size: 20rpx;
-  padding: 4rpx 10rpx;
-  color: #fff;
 }
 
-.two {
-  display: flex;
-  justify-content: space-between;
-  color: #909090;
-  font-size: 20rpx;
-  margin-top: 30rpx;
+.box-item .two .limit text {
+  margin-left: 10rpx;
 }
 
-.two .limit {
+.box-item .two .limit_1 {
   display: flex;
-  flex-wrap: wrap;
+  flex-direction: row;
   flex-grow: 1;
   overflow: hidden;
+  width: 80%;
+  color: #868b92;
+  flex-wrap: wrap;
+}
+
+.box-item .two .limit_1 image {
+  width: 18rpx;
+  height: 18rpx;
   margin-right: 10rpx;
 }
 
-.two .limit i-tag {
-  margin-bottom: 10rpx;
+.box-item .two .limit_1 i-tag {
+  /* margin-left: 10rpx; */
 }
 
-.two .time {
-  flex: 0 0 auto;
+.box-item .two .limit_1 text {
+  margin-left: 10rpx;
+}
+
+.box-item .two .time {
+  color: #706f6f;
+  font-size: 20rpx;
 }
 
-.three {
+.tag-class {
+  background: #e2f4fe !important;
+  margin-right: 6rpx;
+  white-space: nowrap;
+  border: none !important;
+  background: rgba(245, 245, 245, 1) !important;
+  border-radius: 14px !important;
+}
+
+.box-item .three {
   display: flex;
   justify-content: space-between;
   align-items: center;
   font-size: 20rpx;
-  margin-top: 35rpx;
+  margin-top: 20rpx;
 }
 
-.three .limit {
+.box-item .three image {
+  width: 16rpx;
+  height: 19rpx;
+}
+
+.box-item .three .area {
+  color: #868b92;
+  font-size: 24rpx;
+}
+
+.box-item .three .area .area-name {
+  margin-left: 10rpx;
+  color: #868b92;
+  font-size: 24rpx;
+}
+
+.box-item .three .limit {
   display: flex;
-  flex-wrap: wrap;
   flex-grow: 1;
   overflow: hidden;
   margin-right: 10rpx;
+  width: 80%;
+  flex-direction: row;
 }
 
-.three .limit i-tag {
-  margin-bottom: 10rpx;
+.box-item .three .limit i-tag {
+  margin-left: 10rpx;
 }
 
-.three .time {
+.box-item .three .time {
   flex: 0 0 auto;
+  color: #868b92;
 }
 
-.tag-class {
-  color: #37aceb;
-  background: #e2f4fe !important;
-  margin-right: 10rpx;
-  white-space: nowrap;
+.box-item .three .time image {
+  width: 18rpx;
+  height: 18rpx;
 }
 
-.loading_no {
+.box-item .three .time text {
+  margin-left: 6rpx;
+  font-size: 20rpx;
+}
+
+.box-item .three .fan {
   display: flex;
-  justify-content: center;
+  flex-direction: row;
+  color: #ff400e;
+  font-size: 20rpx;
   align-items: center;
-  height: 60rpx;
-  font-size: 22rpx;
-  color: #696969;
 }
 
-.active {
-  color: #ef7618;
+.box-item .three .fan image {
+  width: 24rpx;
+  height: 24rpx;
+  margin-right: 10rpx;
 }
 
 .box-item .four {
   display: flex;
   justify-content: space-between;
+  color: #909090;
+  font-size: 22rpx;
+  margin-top: 18rpx;
   align-items: center;
-  color: #3c3c3c;
-  background: #fff5e1;
-  padding: 10rpx 20rpx;
 }
 
-.box-item .four .pt-member {
+.box-item .four .limit {
+  display: flex;
+  flex-direction: row;
+  flex-grow: 1;
+  overflow: hidden;
+  margin-right: 30rpx;
+  width: 80%;
+  color: #868b92;
+}
+
+.box-item .four .limit image {
+  width: 18rpx;
+  height: 18rpx;
+}
+
+.box-item .four .limit i-tag {
+  margin-left: 10rpx;
+}
+
+.box-item .four .limit text {
+  margin-left: 10rpx;
+}
+
+.box-item .four .time {
+  color: #706f6f;
+  font-size: 20rpx;
+}
+
+.box-item .four .commpany {
   font-size: 22rpx;
+  color: #a0a4a9;
 }
 
-.box-item .four .number {
-  font-size: 28rpx;
-  font-weight: 700;
+.box-item .four .area {
+  color: #868b92;
+  font-size: 24rpx;
+}
+
+.box-item .four .area image {
+  width: 16rpx;
+  height: 19rpx;
 }
 
-.box-item .four .endtime {
+.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;
+}
+
+.loading_no {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  height: 60rpx;
+  font-size: 22rpx;
+  color: #696969;
+}
+
 /* 空白页 */
 
 .no_data {
   width: 100%;
-  margin-top: 30%;
+  margin-top: 20%;
   display: flex;
   justify-content: center;
   align-items: center;
@@ -179,12 +313,12 @@
 }
 
 .white {
-  width: 68px;
-  height: 98px;
+  width: 125px;
+  height: 125px;
 }
 
 .no_text {
   color: #ccc;
-  font-size: 28rpx;
-  margin-top: 20rpx;
+  font-size: 32rpx;
+  margin-top: 48rpx;
 }

+ 3 - 1
pages/search/index.js

@@ -48,7 +48,9 @@ Page({
         if (res.confirm) {
           wx.removeStorageSync("searchKey");
           showToast("删除成功");
-          this.onShow();
+          this.setData({
+            searchKey: []
+          })
         }
       }
     })