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

586 lines
16 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
9 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
10 months ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
10 months ago
1 year ago
1 year ago
9 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
10 months ago
10 months ago
10 months ago
1 year ago
10 months ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="page">
  3. <navbar bgColor="#3796F8"/>
  4. <view class="head">
  5. <!-- 未登录状态 -->
  6. <template v-if="!isLoggedIn">
  7. <view class="headImage">
  8. <image src="/static/image/center/headImage.png" mode=""></image>
  9. </view>
  10. <view class="info">
  11. <view class="name">
  12. 未登录用户
  13. </view>
  14. <view class="tips">
  15. 请先登录以查看个人信息
  16. </view>
  17. </view>
  18. <view class="loginBtn" @click="$utils.toLogin()">
  19. 登录
  20. </view>
  21. </template>
  22. <!-- 已登录状态 -->
  23. <template v-else>
  24. <view class="headImage">
  25. <image :src="headImage" mode=""></image>
  26. </view>
  27. <view class="info">
  28. <view class="name"
  29. @click="$utils.navigateTo('/pages_order/mine/updateUser?back=true')">
  30. {{username}}
  31. <!-- 个人实名认证图标 -->
  32. <image v-if="UserExtensionInfo.personAuthenticationStatus == '1'"
  33. :src="configList.config_person_icon"
  34. class="auth-icon"
  35. mode="aspectFit"></image>
  36. <!-- 企业认证图标 -->
  37. <image v-if="UserExtensionInfo.companyAuthenticationStatus == '1'"
  38. :src="configList.config_person_icon"
  39. class="auth-icon"
  40. mode="aspectFit"></image>
  41. <view>
  42. <uv-icon name="edit-pen" size="40rpx" color="#fff"></uv-icon>
  43. 修改资料
  44. </view>
  45. </view>
  46. <view class="tips">
  47. 手机号{{phone}}
  48. </view>
  49. <view>
  50. {{ UserExtensionInfo.vipType || '' }}
  51. </view>
  52. <!-- 个人实名认证到期提醒 -->
  53. <view v-if="personAuthDaysLeft" :class="personAuthDaysLeft === 'expired' ? 'auth-expired' : 'auth-warning'">
  54. <template v-if="personAuthDaysLeft === 'expired'">
  55. 个人实名认证已过期
  56. </template>
  57. <template v-else>
  58. 个人实名认证还有{{personAuthDaysLeft}}天到期
  59. </template>
  60. </view>
  61. <!-- 企业认证到期提醒 -->
  62. <view v-if="companyAuthDaysLeft" :class="companyAuthDaysLeft === 'expired' ? 'auth-expired' : 'auth-warning'">
  63. <template v-if="companyAuthDaysLeft === 'expired'">
  64. 企业认证已过期
  65. </template>
  66. <template v-else>
  67. 企业认证还有{{companyAuthDaysLeft}}天到期
  68. </template>
  69. </view>
  70. </view>
  71. </template>
  72. <!-- <view class="setting">
  73. <uv-icon name="setting" size="40rpx"></uv-icon>
  74. </view> -->
  75. </view>
  76. <!-- 酒店 -->
  77. <view class="user">
  78. <!-- 实名认证 - 仅登录后显示 -->
  79. <template v-if="isLoggedIn">
  80. <view class="auth" v-if="UserExtensionInfo.personAuthenticationStatus != '1'"
  81. @click="$utils.navigateTo('/pages_order/auth/certification')">
  82. <uv-cell
  83. icon="setting-fill"
  84. title="完成实名认证,信息优先推荐!"
  85. value="去认证"
  86. isLink></uv-cell>
  87. </view>
  88. <view class="auth" v-else
  89. @click="$utils.navigateTo('/pages_order/auth/certification')">
  90. <uv-cell
  91. icon="setting-fill"
  92. title="您已完成实名认证!"
  93. value="去查看"
  94. isLink></uv-cell>
  95. </view>
  96. </template>
  97. <!-- 轮播图 -->
  98. <view class="swipe">
  99. <uv-swiper
  100. :list="bannerList"
  101. indicator
  102. height="220rpx"
  103. keyName="image"></uv-swiper>
  104. </view>
  105. <!-- 数据统计 - 仅登录后显示 -->
  106. <view class="line" v-if="isLoggedIn">
  107. <view class="item"
  108. @click="$utils.navigateTo('/pages_order/mine/InvitationCredit')">
  109. <view class="">
  110. {{UserExtensionInfo.integerNum || 0}}
  111. </view>
  112. <view class="">
  113. 我的积分
  114. </view>
  115. </view>
  116. <!-- <view class="item">
  117. <view class="">
  118. 30000
  119. </view>
  120. <view class="">
  121. 临时积分
  122. </view>
  123. </view> -->
  124. <view class="item"
  125. @click="$utils.navigateTo('/pages_order/mine/collect')">
  126. <view class=""
  127. v-if="role">
  128. {{UserExtensionInfo.resumeCollectionNum || 0 }}
  129. </view>
  130. <view class=""
  131. v-else>
  132. {{ UserExtensionInfo.jobCollectionNum || 0 }}
  133. </view>
  134. <view class="">
  135. 我的收藏
  136. </view>
  137. </view>
  138. <view class="item"
  139. @click="$utils.navigateTo('/pages_order/mine/contactRecord')">
  140. <view class=""
  141. v-if="role">
  142. {{ (UserExtensionInfo.resumecheckNumBoss || 0) +
  143. (UserExtensionInfo.jobCheckNumBoss || 0)
  144. }}
  145. </view>
  146. <view class=""
  147. v-else>
  148. {{ (UserExtensionInfo.jobcheckNumEmployee || 0) +
  149. (UserExtensionInfo.resumecheckNumEmployee || 0)
  150. }}
  151. </view>
  152. <view class="">
  153. 联系记录
  154. </view>
  155. </view>
  156. </view>
  157. <!-- 未登录提示 -->
  158. <view class="line login-tip" v-if="!isLoggedIn">
  159. <view class="tip-content">
  160. <text>登录后可查看个人数据</text>
  161. <button class="login-tip-btn" @click="$utils.toLogin()">立即登录</button>
  162. </view>
  163. </view>
  164. <view class="line grid">
  165. <view class="title">
  166. 我的工作
  167. </view>
  168. <uv-grid :col="4" :border="false">
  169. <uv-grid-item
  170. v-if="!role && isLoggedIn"
  171. @click="toAddResume">
  172. <image class="image" src="/static/image/center/a1.png" mode=""></image>
  173. <text class="grid-text">在线简历</text>
  174. </uv-grid-item>
  175. <uv-grid-item
  176. v-if="role && isLoggedIn"
  177. @click="$utils.navigateTo('/pages_order/mine/releaseWork')">
  178. <image class="image" src="/static/image/center/a1.png" mode=""></image>
  179. <text class="grid-text">{{ role ? '我的招工' : '我的找活'}}</text>
  180. </uv-grid-item>
  181. <uv-grid-item
  182. v-if="!isLoggedIn"
  183. @click="$utils.toLogin()">
  184. <image class="image" src="/static/image/center/a1.png" mode=""></image>
  185. <text class="grid-text">在线简历</text>
  186. </uv-grid-item>
  187. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/seeMy') : $utils.toLogin()">
  188. <image class="image" src="/static/image/center/a2.png" mode=""></image>
  189. <text class="grid-text">谁看过我</text>
  190. </uv-grid-item>
  191. </uv-grid>
  192. </view>
  193. <view class="line grid">
  194. <view class="title">
  195. 我的服务
  196. </view>
  197. <uv-grid :col="4" :border="false">
  198. <uv-grid-item
  199. v-if="role || !isLoggedIn"
  200. @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/MemberRecharge') : $utils.toLogin()">
  201. <image class="image" src="/static/image/center/1.png" mode=""></image>
  202. <text class="grid-text">会员充值</text>
  203. </uv-grid-item>
  204. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/GainPoints') : $utils.toLogin()">
  205. <image class="image" src="/static/image/center/4.png" mode=""></image>
  206. <text class="grid-text">获取积分</text>
  207. </uv-grid-item>
  208. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/IntegralRecord') : $utils.toLogin()">
  209. <image class="image" src="/static/image/center/5.png" mode=""></image>
  210. <text class="grid-text">积分记录</text>
  211. </uv-grid-item>
  212. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/auth/certificationEnterprise') : $utils.toLogin()"
  213. v-if="role || !isLoggedIn">
  214. <image class="image" src="/static/image/center/6.png" mode=""></image>
  215. <text class="grid-text">企业认证</text>
  216. </uv-grid-item>
  217. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/auth/certification') : $utils.toLogin()"
  218. v-if="!role || !isLoggedIn">
  219. <image class="image" src="/static/image/center/6.png" mode=""></image>
  220. <text class="grid-text">实名认证</text>
  221. </uv-grid-item>
  222. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/enterpriseInfo') : $utils.toLogin()"
  223. v-if="role || !isLoggedIn">
  224. <image class="image" src="/static/image/center/6.png" mode=""></image>
  225. <text class="grid-text">企业信息</text>
  226. </uv-grid-item>
  227. <uv-grid-item @click="$utils.redirectTo('/index/consult')"
  228. v-if="!role || !isLoggedIn">
  229. <image class="image" src="/static/image/center/6.png" mode=""></image>
  230. <text class="grid-text">考证咨询</text>
  231. </uv-grid-item>
  232. <!-- <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/redeemCode') : $utils.toLogin()">
  233. <image class="image" src="/static/image/center/5.png" mode=""></image>
  234. <text class="grid-text">兑换码</text>
  235. </uv-grid-item> -->
  236. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/contract/contract') : $utils.toLogin()">
  237. <image class="image" src="/static/image/center/5.png" mode=""></image>
  238. <text class="grid-text">电子合同</text>
  239. </uv-grid-item>
  240. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/contract/contractManage') : $utils.toLogin()"
  241. v-if="role || !isLoggedIn">
  242. <image class="image" src="/static/image/center/5.png" mode=""></image>
  243. <text class="grid-text">合同模板</text>
  244. </uv-grid-item>
  245. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/promotion') : $utils.toLogin()">
  246. <image class="image" src="/static/image/center/5.png" mode=""></image>
  247. <text class="grid-text">面对面分享</text>
  248. </uv-grid-item>
  249. </uv-grid>
  250. </view>
  251. <view class="line grid">
  252. <view class="title">
  253. 设置与帮助
  254. </view>
  255. <uv-grid :col="4" :border="false">
  256. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/setting') : $utils.toLogin()">
  257. <image class="image" src="/static/image/center/setting.png" mode=""></image>
  258. <text class="grid-text">系统设置</text>
  259. </uv-grid-item>
  260. <uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/help') : $utils.toLogin()">
  261. <image class="image" src="/static/image/center/help.png" mode=""></image>
  262. <text class="grid-text">帮助与反馈</text>
  263. </uv-grid-item>
  264. <uv-grid-item @click="$utils.navigateTo('/pages_order/mine/about')">
  265. <image class="image" src="/static/image/center/message.png" mode=""></image>
  266. <text class="grid-text">关于本程序</text>
  267. </uv-grid-item>
  268. </uv-grid>
  269. </view>
  270. </view>
  271. <tabber select="3" />
  272. </view>
  273. </template>
  274. <script>
  275. import tabber from '@/components/base/tabbar.vue'
  276. import { mapState } from 'vuex'
  277. export default {
  278. components: {
  279. tabber,
  280. },
  281. computed: {
  282. ...mapState(['userInfo', 'role','banner', 'UserExtensionInfo']),
  283. // 判断是否已登录
  284. isLoggedIn(){
  285. return this.userInfo && this.userInfo.id
  286. },
  287. headImage(){
  288. return this.userInfo.headImage || '/static/image/center/headImage.png'
  289. },
  290. username(){
  291. return this.userInfo.nickName || '未设置昵称'
  292. },
  293. phone(){
  294. return this.userInfo.phone || '未绑定手机'
  295. },
  296. bannerList(){
  297. return this.banner.filter(n => n.type == 1)
  298. },
  299. // 个人实名认证剩余天数
  300. personAuthDaysLeft(){
  301. if(!this.UserExtensionInfo.personAuthenticationValidTime) return null
  302. const validTime = new Date(this.UserExtensionInfo.personAuthenticationValidTime)
  303. const now = new Date()
  304. const diffTime = validTime.getTime() - now.getTime()
  305. const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))
  306. // 如果已过期,返回特殊标识
  307. if(diffDays <= 0) return 'expired'
  308. // 如果在7天内,返回剩余天数
  309. return diffDays <= 7 ? diffDays : null
  310. },
  311. // 企业认证剩余天数
  312. companyAuthDaysLeft(){
  313. if(!this.UserExtensionInfo.companyAuthenticationValidTime) return null
  314. const validTime = new Date(this.UserExtensionInfo.companyAuthenticationValidTime)
  315. const now = new Date()
  316. const diffTime = validTime.getTime() - now.getTime()
  317. const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24))
  318. // 如果已过期,返回特殊标识
  319. if(diffDays <= 0) return 'expired'
  320. // 如果在7天内,返回剩余天数
  321. return diffDays <= 7 ? diffDays : null
  322. },
  323. },
  324. data() {
  325. return {
  326. show: false,
  327. // bannerList: [
  328. // {
  329. // url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  330. // },
  331. // {
  332. // url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  333. // },
  334. // {
  335. // url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  336. // },
  337. // ],
  338. }
  339. },
  340. onShow() {
  341. if(uni.getStorageSync('token')){
  342. this.$store.commit('getUserExtensionInfo')
  343. this.$store.commit('getUserInfo')
  344. }
  345. this.$store.commit('getBanner')
  346. //判断如果是登录状态则获取信息
  347. },
  348. methods: {
  349. toAddResume(){
  350. // 在完成实名认证的情况下执行
  351. this.$store.commit('isAuthCertification', () => {
  352. this.$utils.navigateTo('/pages_order/work/addResume')
  353. })
  354. },
  355. }
  356. }
  357. </script>
  358. <style scoped lang="scss">
  359. .page {
  360. }
  361. image {
  362. width: 100%;
  363. height: 100%;
  364. }
  365. .head {
  366. display: flex;
  367. background-color: $uni-color;
  368. padding: 40rpx 20rpx;
  369. align-items: center;
  370. position: relative;
  371. color: #fff;
  372. padding-bottom: 70rpx;
  373. .headImage {
  374. width: 120rpx;
  375. height: 120rpx;
  376. // background-image: url(/static/image/center/3.png);
  377. background-size: 100% 100%;
  378. overflow: hidden;
  379. border-radius: 50%;
  380. margin-right: 40rpx;
  381. }
  382. .info {
  383. font-size: 28rpx;
  384. flex: 1;
  385. .name {
  386. font-size: 32rpx;
  387. display: flex;
  388. align-items: center;
  389. padding-bottom: 10rpx;
  390. .auth-icon {
  391. width: 40rpx;
  392. height: 40rpx;
  393. margin-left: 10rpx;
  394. }
  395. view{
  396. display: flex;
  397. font-size: 20rpx;
  398. align-items: center;
  399. padding-left: 20rpx;
  400. }
  401. }
  402. .tips {
  403. font-size: 26rpx;
  404. color: #fff;
  405. }
  406. .auth-warning {
  407. font-size: 24rpx;
  408. color: #FFD700;
  409. background: rgba(255, 215, 0, 0.2);
  410. padding: 8rpx 16rpx;
  411. border-radius: 8rpx;
  412. margin-top: 8rpx;
  413. border: 1rpx solid rgba(255, 215, 0, 0.5);
  414. }
  415. .auth-expired {
  416. font-size: 24rpx;
  417. color: #FF4444;
  418. background: rgba(255, 68, 68, 0.2);
  419. padding: 8rpx 16rpx;
  420. border-radius: 8rpx;
  421. margin-top: 8rpx;
  422. border: 1rpx solid rgba(255, 68, 68, 0.5);
  423. }
  424. }
  425. .loginBtn {
  426. padding: 15rpx 30rpx;
  427. background-color: rgba(255, 255, 255, 0.2);
  428. color: #fff;
  429. border-radius: 30rpx;
  430. font-size: 28rpx;
  431. border: 2rpx solid rgba(255, 255, 255, 0.5);
  432. }
  433. // .headBtn {
  434. // margin-left: auto;
  435. // padding: 15rpx 20rpx;
  436. // background-color: $uni-color;
  437. // color: #fff;
  438. // border-radius: 20rpx;
  439. // margin-top: 50rpx;
  440. // }
  441. // .setting {
  442. // position: absolute;
  443. // right: 50rpx;
  444. // top: 50rpx;
  445. // }
  446. }
  447. .user {
  448. position: relative;
  449. padding-top: 30rpx;
  450. .auth{
  451. width: 690rpx;
  452. position: absolute;
  453. top: -50rpx;
  454. left: 30rpx;
  455. z-index: 99;
  456. overflow: hidden;
  457. background-color: #fff;
  458. border-radius: 20rpx;
  459. /deep/ text{
  460. font-size: 26rpx;
  461. }
  462. }
  463. .swipe{
  464. margin: 30rpx;
  465. border-radius: 20rpx;
  466. overflow: hidden;
  467. }
  468. .line {
  469. display: flex;
  470. background-color: #fff;
  471. margin-top: 20rpx;
  472. padding: 20rpx 0;
  473. margin: 30rpx;
  474. border-radius: 20rpx;
  475. overflow: hidden;
  476. .item {
  477. flex: 1;
  478. display: flex;
  479. flex-direction: column;
  480. justify-content: center;
  481. align-items: center;
  482. font-size: 24rpx;
  483. padding: 10rpx 0;
  484. view{
  485. padding: 5rpx 0;
  486. }
  487. }
  488. }
  489. .login-tip {
  490. justify-content: center;
  491. align-items: center;
  492. padding: 40rpx 20rpx;
  493. .tip-content {
  494. text-align: center;
  495. font-size: 28rpx;
  496. color: #666;
  497. }
  498. .login-tip-btn {
  499. margin-top: 20rpx;
  500. padding: 15rpx 40rpx;
  501. background-color: $uni-color;
  502. color: #fff;
  503. border-radius: 30rpx;
  504. font-size: 26rpx;
  505. border: none;
  506. }
  507. }
  508. .grid {
  509. flex-direction: column;
  510. font-size: 26rpx;
  511. padding: 20rpx;
  512. .title {
  513. margin-bottom: 30rpx;
  514. font-size: 28rpx;
  515. }
  516. .image {
  517. width: 45rpx;
  518. height: 45rpx;
  519. margin-bottom: 10rpx;
  520. }
  521. text {
  522. text-align: center;
  523. margin-bottom: 20rpx;
  524. }
  525. }
  526. }
  527. </style>