特易招,招聘小程序
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.

279 lines
6.0 KiB

8 months ago
8 months ago
5 months ago
8 months ago
7 months ago
7 months ago
8 months ago
5 months ago
8 months ago
7 months ago
8 months ago
5 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
5 months ago
8 months ago
7 months ago
8 months ago
7 months ago
5 months ago
7 months ago
5 months ago
7 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
8 months ago
8 months ago
7 months ago
8 months ago
7 months ago
5 months ago
8 months ago
8 months ago
7 months ago
5 months ago
8 months ago
7 months ago
7 months ago
5 months ago
7 months ago
5 months ago
7 months ago
8 months ago
8 months ago
5 months ago
8 months ago
5 months ago
5 months ago
5 months ago
5 months ago
7 months ago
7 months ago
5 months ago
7 months ago
5 months ago
7 months ago
8 months ago
7 months ago
5 months ago
7 months ago
7 months ago
5 months ago
7 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
5 months ago
8 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="role ? '请输入简历名称' : '请输入岗位名称'"
  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. <uv-grid-item
  28. @click="$utils.navigateTo(`/pages_order/work/workList?typeId=${item.id}&title=${item.name}`)"
  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="UserExtensionInfo.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. 'UserExtensionInfo',
  94. ]),
  95. bannerList(){
  96. return this.banner.filter(n => n.type == 0)
  97. },
  98. },
  99. data() {
  100. return {
  101. productList: [],
  102. keyword : '',
  103. screenWorkList : [],
  104. }
  105. },
  106. onPullDownRefresh(){
  107. this.$refs.workList.getData(this.screenWorkList)
  108. this.$store.commit('getBanner')
  109. },
  110. // 页面显示的时候触发
  111. onShow() {
  112. this.$refs.workList.getData(this.screenWorkList)
  113. this.$store.commit('getBanner')
  114. if(uni.getStorageSync('token')){
  115. this.$store.commit('getUserExtensionInfo')
  116. this.$store.commit('getBanner')
  117. }
  118. },
  119. //滚动到屏幕底部
  120. onReachBottom() {
  121. this.$refs.workList.loadMoreData()
  122. },
  123. methods: {
  124. clickItem(result){
  125. this.screenWorkList = result
  126. this.$refs.workList.getData(this.screenWorkList)
  127. },
  128. toAdd(){
  129. if(this.role){
  130. // 在完成企业认证的情况下执行
  131. this.$store.commit('isAuthCertificationEnterprise', state => {
  132. this.$utils.navigateTo('/pages_order/work/jobPosting')
  133. })
  134. }else{
  135. this.$utils.navigateTo('/pages_order/work/addResume')
  136. }
  137. },
  138. search(){
  139. this.$utils.navigateTo(`/pages_order/work/workList?keyword=${this.keyword}`)
  140. this.keyword = ''
  141. },
  142. // 切换身份
  143. async switchIdentity(){
  144. // 在完成实名认证的情况下执行
  145. this.$store.commit('isAuthCertification', () => {
  146. // 在完成企业认证的情况下执行
  147. this.$store.commit('isAuthCertificationEnterprise', state => {
  148. uni.showModal({
  149. title: `确认切换到${
  150. this.role ? '师傅' : '雇主'
  151. }身份吗`,
  152. success : e => {
  153. if(!e.confirm){
  154. return
  155. }
  156. this.$store.commit('setRole', !this.role)
  157. this.$nextTick(() => {
  158. this.$refs.workList.getData(this.screenWorkList)
  159. })
  160. }
  161. })
  162. })
  163. })
  164. },
  165. }
  166. }
  167. </script>
  168. <style scoped lang="scss">
  169. .page{
  170. .banner{
  171. position: relative;
  172. background-color: $uni-color;
  173. .top{
  174. position: absolute;
  175. top: 190rpx;
  176. left:00rpx;
  177. padding-top: 30rpx;
  178. display: flex;
  179. width: 100%;
  180. flex-direction: column;
  181. align-items: center;
  182. .search{
  183. width: 700rpx;
  184. /deep/ .uv-search__content__icon{
  185. padding: 10rpx 0;
  186. }
  187. }
  188. .title{
  189. image{
  190. width: 600rpx;
  191. height: 300rpx;
  192. }
  193. }
  194. }
  195. }
  196. .box{
  197. position: fixed;
  198. left: 50%;
  199. background: $uni-color;
  200. bottom: calc(env(safe-area-inset-bottom) + 150rpx);
  201. color: #fff;
  202. display: flex;
  203. justify-content: center;
  204. align-items: center;
  205. transform: translate(-50%);
  206. border-radius: 20rpx;
  207. height: 80rpx;
  208. font-size: 28rpx;
  209. image{
  210. width: 100%;
  211. height: 100%;
  212. border-radius: 50%;
  213. }
  214. .left{
  215. padding-left: 30rpx;
  216. }
  217. .center{
  218. width: 100rpx;
  219. height: 100rpx;
  220. border-radius: 50%;
  221. background: $uni-color;
  222. margin: 0 20rpx;
  223. margin-top: -30rpx;
  224. box-shadow: 0 0 4rpx 4rpx #ffffff;
  225. }
  226. .right{
  227. padding-right: 30rpx;
  228. }
  229. }
  230. .content{
  231. position: relative;
  232. margin-top: -60rpx;
  233. .grid{
  234. padding-bottom: 30rpx;
  235. background-color: #fff;
  236. // border-radius: 60rpx;
  237. border-top-left-radius: 60rpx;
  238. border-top-right-radius: 60rpx;
  239. // box-shadow: 0 -10rpx 10rpx 10rpx #00000013;
  240. .grid-icon{
  241. width: 80rpx;
  242. height: 80rpx;
  243. margin-bottom: 10rpx;
  244. margin-top: 30rpx;
  245. }
  246. .grid-text{
  247. font-size: 24rpx;
  248. font-weight: 900;
  249. }
  250. }
  251. }
  252. .switchIdentity{
  253. position: fixed;
  254. right: 30rpx;
  255. bottom: 300rpx;
  256. image{
  257. width: 100rpx;
  258. }
  259. }
  260. }
  261. </style>