特易招,招聘小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

271 lines
5.4 KiB

6 months ago
6 months ago
4 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
4 months ago
4 months ago
4 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
6 months ago
4 months ago
4 months ago
4 months ago
6 months ago
6 months ago
6 months ago
4 months ago
4 months ago
4 months ago
4 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
4 months ago
6 months ago
  1. <template>
  2. <view class="page">
  3. <view class="banner">
  4. <uv-swiper
  5. :list="bannerList"
  6. indicator
  7. height="620rpx"
  8. keyName="image"></uv-swiper>
  9. <!-- indicatorStyle="bottom: 100rpx;" -->
  10. <view class="top">
  11. <view class="search">
  12. <uv-search
  13. placeholder="请输入岗位/公司名称"
  14. :showAction="false"
  15. search-icon-size="40rpx"
  16. @search="search"
  17. v-model="keyword"></uv-search>
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 工人看到的 -->
  22. <view class="content"
  23. v-if="!role">
  24. <view class="grid">
  25. <uv-grid :border="false"
  26. :col="5">
  27. <!-- @click="$utils.navigateTo('/pages_order/work/workList?id=' + item.id)" -->
  28. <uv-grid-item
  29. v-for="(item,index) in jobTypeList"
  30. :key="index">
  31. <image class="grid-icon" :src="item.image" mode="aspectFill"></image>
  32. <text class="grid-text">{{item.name}}</text>
  33. </uv-grid-item>
  34. </uv-grid>
  35. </view>
  36. </view>
  37. <!-- 筛选器 -->
  38. <screenWork ref="screenWork" @clickItem="clickItem"/>
  39. <!-- 老板看到的 -->
  40. <userList ref="workList" v-if="role"/>
  41. <!-- 工人看到的 -->
  42. <workList ref="workList" v-else/>
  43. <view class="box"
  44. @click="toAdd"
  45. v-if="role">
  46. <view class="left">
  47. 发布
  48. </view>
  49. <view class="center">
  50. <image src="/static/image/home/c.png" mode=""></image>
  51. </view>
  52. <view class="right">
  53. 招工
  54. </view>
  55. </view>
  56. <view class="switchIdentity"
  57. @click="switchIdentity">
  58. <image src="/static/image/home/x1.png"
  59. v-if="role"
  60. mode="widthFix"></image>
  61. <image src="/static/image/home/x2.png"
  62. v-else
  63. mode="widthFix"></image>
  64. </view>
  65. <checkinScore ref="checkinScore" v-if="numInfo.signFlag == false"/>
  66. <PrivacyAgreementPoup/>
  67. <tabber select="0"/>
  68. </view>
  69. </template>
  70. <script>
  71. import PrivacyAgreementPoup from '@/components/config/PrivacyAgreementPoup.vue'
  72. import workList from '@/components/list/workList/index.vue'
  73. import userList from '@/components/list/userList/index.vue'
  74. import tabber from '@/components/base/tabbar.vue'
  75. import screenWork from '@/components/screen/screenWork.vue'
  76. import checkinScore from '@/components/checkinScore.vue'
  77. import { mapState } from 'vuex'
  78. export default {
  79. components : {
  80. PrivacyAgreementPoup,
  81. workList,
  82. tabber,
  83. screenWork,
  84. userList,
  85. checkinScore,
  86. },
  87. computed: {
  88. ...mapState([
  89. 'userInfo',
  90. 'role',
  91. 'banner',
  92. 'jobTypeList'
  93. ]),
  94. bannerList(){
  95. return this.banner.filter(n => n.type == 0)
  96. },
  97. },
  98. data() {
  99. return {
  100. productList: [],
  101. keyword : '',
  102. numInfo : {},
  103. }
  104. },
  105. onPullDownRefresh(){
  106. this.$refs.workList.getData()
  107. this.$store.commit('getBanner')
  108. },
  109. // 页面显示的时候触发
  110. onShow() {
  111. this.$refs.workList.getData()
  112. this.$store.commit('getBanner')
  113. this.getUserCenterData();
  114. },
  115. //滚动到屏幕底部
  116. onReachBottom() {
  117. this.$refs.workList.loadMoreData()
  118. },
  119. methods: {
  120. //获取个人中心基础信息的接口
  121. getUserCenterData(){
  122. if(!uni.getStorageSync('token')){
  123. return
  124. }
  125. this.$api('getUserCenterData',{}, res =>{
  126. if(res.code == 200){
  127. this.numInfo = res.result
  128. }
  129. })
  130. },
  131. clickItem(result){
  132. console.log(result);
  133. this.$refs.workList.getData(result)
  134. },
  135. toAdd(){
  136. if(this.role){
  137. this.$utils.navigateTo('/pages_order/work/jobPosting')
  138. }else{
  139. this.$utils.navigateTo('/pages_order/work/addResume')
  140. }
  141. },
  142. search(){
  143. },
  144. // 切换身份
  145. switchIdentity(){
  146. uni.showModal({
  147. title: `确认切换到${
  148. this.role ? '师傅' : '雇主'
  149. }身份吗`,
  150. success : e => {
  151. this.$store.commit('setRole', !this.role)
  152. this.$nextTick(() => {
  153. this.$refs.workList.getData()
  154. })
  155. }
  156. })
  157. },
  158. }
  159. }
  160. </script>
  161. <style scoped lang="scss">
  162. .page{
  163. .banner{
  164. position: relative;
  165. background-color: $uni-color;
  166. .top{
  167. position: absolute;
  168. top: 190rpx;
  169. left:00rpx;
  170. padding-top: 30rpx;
  171. display: flex;
  172. width: 100%;
  173. flex-direction: column;
  174. align-items: center;
  175. .search{
  176. width: 700rpx;
  177. /deep/ .uv-search__content__icon{
  178. padding: 10rpx 0;
  179. }
  180. }
  181. .title{
  182. image{
  183. width: 600rpx;
  184. height: 300rpx;
  185. }
  186. }
  187. }
  188. }
  189. .box{
  190. position: fixed;
  191. left: 50%;
  192. background: $uni-color;
  193. bottom: calc(env(safe-area-inset-bottom) + 150rpx);
  194. color: #fff;
  195. display: flex;
  196. justify-content: center;
  197. align-items: center;
  198. transform: translate(-50%);
  199. border-radius: 20rpx;
  200. height: 80rpx;
  201. font-size: 28rpx;
  202. image{
  203. width: 100%;
  204. height: 100%;
  205. border-radius: 50%;
  206. }
  207. .left{
  208. padding-left: 30rpx;
  209. }
  210. .center{
  211. width: 100rpx;
  212. height: 100rpx;
  213. border-radius: 50%;
  214. background: $uni-color;
  215. margin: 0 20rpx;
  216. margin-top: -30rpx;
  217. box-shadow: 0 0 4rpx 4rpx #ffffff;
  218. }
  219. .right{
  220. padding-right: 30rpx;
  221. }
  222. }
  223. .content{
  224. position: relative;
  225. margin-top: -60rpx;
  226. .grid{
  227. padding-bottom: 30rpx;
  228. background-color: #fff;
  229. // border-radius: 60rpx;
  230. border-top-left-radius: 60rpx;
  231. border-top-right-radius: 60rpx;
  232. // box-shadow: 0 -10rpx 10rpx 10rpx #00000013;
  233. .grid-icon{
  234. width: 80rpx;
  235. height: 80rpx;
  236. margin-bottom: 10rpx;
  237. margin-top: 30rpx;
  238. }
  239. .grid-text{
  240. font-size: 24rpx;
  241. font-weight: 900;
  242. }
  243. }
  244. }
  245. .switchIdentity{
  246. position: fixed;
  247. right: 30rpx;
  248. bottom: 300rpx;
  249. image{
  250. width: 100rpx;
  251. }
  252. }
  253. }
  254. </style>