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

273 lines
5.8 KiB

10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 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. <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. this.$utils.navigateTo('/pages_order/work/jobPosting')
  131. }else{
  132. this.$utils.navigateTo('/pages_order/work/addResume')
  133. }
  134. },
  135. search(){
  136. this.$utils.navigateTo(`/pages_order/work/workList?keyword=${this.keyword}`)
  137. },
  138. // 切换身份
  139. async switchIdentity(){
  140. this.$store.commit('getUserExtensionInfo')
  141. // 在完成实名认证的情况下执行
  142. this.$store.commit('isAuthCertification', () => {
  143. // 在完成企业认证的情况下执行
  144. this.$store.commit('isAuthCertificationEnterprise', state => {
  145. uni.showModal({
  146. title: `确认切换到${
  147. this.role ? '师傅' : '雇主'
  148. }身份吗`,
  149. success : e => {
  150. this.$store.commit('setRole', !this.role)
  151. this.$nextTick(() => {
  152. this.$refs.workList.getData(this.screenWorkList)
  153. })
  154. }
  155. })
  156. })
  157. })
  158. },
  159. }
  160. }
  161. </script>
  162. <style scoped lang="scss">
  163. .page{
  164. .banner{
  165. position: relative;
  166. background-color: $uni-color;
  167. .top{
  168. position: absolute;
  169. top: 190rpx;
  170. left:00rpx;
  171. padding-top: 30rpx;
  172. display: flex;
  173. width: 100%;
  174. flex-direction: column;
  175. align-items: center;
  176. .search{
  177. width: 700rpx;
  178. /deep/ .uv-search__content__icon{
  179. padding: 10rpx 0;
  180. }
  181. }
  182. .title{
  183. image{
  184. width: 600rpx;
  185. height: 300rpx;
  186. }
  187. }
  188. }
  189. }
  190. .box{
  191. position: fixed;
  192. left: 50%;
  193. background: $uni-color;
  194. bottom: calc(env(safe-area-inset-bottom) + 150rpx);
  195. color: #fff;
  196. display: flex;
  197. justify-content: center;
  198. align-items: center;
  199. transform: translate(-50%);
  200. border-radius: 20rpx;
  201. height: 80rpx;
  202. font-size: 28rpx;
  203. image{
  204. width: 100%;
  205. height: 100%;
  206. border-radius: 50%;
  207. }
  208. .left{
  209. padding-left: 30rpx;
  210. }
  211. .center{
  212. width: 100rpx;
  213. height: 100rpx;
  214. border-radius: 50%;
  215. background: $uni-color;
  216. margin: 0 20rpx;
  217. margin-top: -30rpx;
  218. box-shadow: 0 0 4rpx 4rpx #ffffff;
  219. }
  220. .right{
  221. padding-right: 30rpx;
  222. }
  223. }
  224. .content{
  225. position: relative;
  226. margin-top: -60rpx;
  227. .grid{
  228. padding-bottom: 30rpx;
  229. background-color: #fff;
  230. // border-radius: 60rpx;
  231. border-top-left-radius: 60rpx;
  232. border-top-right-radius: 60rpx;
  233. // box-shadow: 0 -10rpx 10rpx 10rpx #00000013;
  234. .grid-icon{
  235. width: 80rpx;
  236. height: 80rpx;
  237. margin-bottom: 10rpx;
  238. margin-top: 30rpx;
  239. }
  240. .grid-text{
  241. font-size: 24rpx;
  242. font-weight: 900;
  243. }
  244. }
  245. }
  246. .switchIdentity{
  247. position: fixed;
  248. right: 30rpx;
  249. bottom: 300rpx;
  250. image{
  251. width: 100rpx;
  252. }
  253. }
  254. }
  255. </style>