| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 |
- <template>
- <view class="resume-detail" :style="{ paddingTop: (12 + statusBarHeight + 88 - 60) + 'px' }">
- <!-- 固定顶部导航栏 -->
- <view class="fixed-nav" :style="{ paddingTop: (12 + statusBarHeight) + 'px' }">
- <view class="navbar">
- <view class="navbar-content">
- <view class="navbar-left" @click="goBack">
- <u-icon name="arrow-left" size="36" color="#333"></u-icon>
- </view>
- <view class="navbar-title">简历详情</view>
- <view class="nav-right">
- <view class="nav-icon" @click="setCollection">
- <image v-if="resumeData.isCollection == 0" src="/static/images/index/guanzhu.svg" class="icon-img"></image>
- <image v-else src="/static/images/index/gzActive.svg" style="width: 50rpx;height: 50rpx;"></image>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view style="margin-top: 20px; border-top: 20rpx solid rgba(241, 245, 248, 1);" v-if="!loading">
- <previewResume :resumesId="resumesId" :postPushId="postPushId"></previewResume>
- </view>
- <!-- 底部操作按钮 -->
- <view v-if="postPushId != '' && isShowBtn == 0" class="bottom-actions">
- <view class="action-btn contact-btn" @click="contactCandidate">
- <text>立即联系</text>
- </view>
- </view>
- </view>
- </template>
- <script>
- import previewResume from '@/components/resume/preview-resume.vue';
- import { debounce } from '@/utils/util'
-
- export default {
- components: {
- previewResume
- },
- data() {
- return {
- statusBarHeight: 0, // 状态栏高度
- resumeData: {},
- userEntity: "",
- eduList: "",
- intentions: "",
- resumeList: {},
- skills: "",
- postPushId: "",
- workExpList: [],
- workExpTimes: "",
- resumesStatus: ['离职&随时到岗', '在职&月内到岗', '在职&考虑机会', '在职&暂不考虑'],
- isShowBtn:0,
- resumesId: '',
- postPushId: '',
- loading: true
- }
- },
- onLoad(option) {
- // 获取状态栏高度
- let systemInfo = uni.getSystemInfoSync();
- this.statusBarHeight = systemInfo.statusBarHeight || 0;
- // 获取邀请码保存到本地
- if (option.invitation) {
- this.$queue.setData('inviterCode', option.invitation);
- }
- // #ifdef MP-WEIXIN
- if (option.scene) {
- const scene = decodeURIComponent(option.scene);
- this.$queue.setData('inviterCode', scene.split(',')[0]);
- }
- // #endif
- this.weekMember = uni.getStorageSync('weekMember')
- this.userId = uni.getStorageSync('userId') ? uni.getStorageSync('userId') : 0
- if (option.postPushId) {
- this.postPushId = option.postPushId
- }
- if (option.resumesId) {
- this.resumesId = option.resumesId
- this.getDetail()
- }
- // if (option.resumesId) {
- // this.resumesId = option.resumesId
- // this.getDetail()
- // } else if (option.userId) {
- // this.byuserId = option.userId
- // this.getDetail()
- // }
- if(option.isShowBtn){
- this.isShowBtn = option.isShowBtn
- }
- },
- onUnload() {
- this.$queue.remove('resumeDetailData')
- },
- methods: {
- /**
- * 收藏简历
- */
- setCollection: debounce(function() {
- this.$Request.postT("/app/myCollection/saveCollection", {
- resumesId: this.resumesId,
- type: 2
- }).then(res => {
- if (res.code == 0) {
- uni.showToast({
- title: res.msg
- })
- this.getDetail()
- }
- })
- }, 300),
- goBack() {
- uni.navigateBack();
- },
- contactCandidate: debounce(function() {
- //去联系
- this.getDetail()
- this.$Request.postJson('/app/chat/insertChatConversation', {
- userId: this.userEntity, //会话对象的id
- focusedUserId: uni.getStorageSync('userId'), //当前登录者Id
- postPushId: this.postPushId,
- resumesId: this.resumesId,
- type: 2,
- }).then(ret => {
- if (ret.code == 0) {
- uni.navigateTo({
- url: '/pages/msg/im?byUserId=' + this.userEntity
- + '&chatConversationId=' + ret.data
- .chatConversationId + '&resumesId=' + this.resumesId + '&postPushId=' +
- this.postPushId
- })
- }
- })
- }, 300),
- getDetail() {
- uni.showLoading({
- title: '加载中'
- })
- let data = {
- resumesId: this.resumesId,
- userId: this.userId,
- companyId: uni.getStorageSync('companyId'),
- }
- if (this.postPushId && this.postPushId !== 'null' && this.postPushId !== 'undefined') {
- data = {
- ...data,
- postPushId: this.postPushId
- }
- }
- this.$Request.get('/app/resumes/selectResumesByResumesId', data).then(res => {
- if (res.code == 0) {
- uni.hideLoading()
- var data = res.data;
- this.resumeData = res.data;
- // this.userEntity = data.userEntity
- this.userEntity = data.userId
- this.eduList = data.eduList
- this.intentions = data.intentionList
- this.resumeList = data.resumesListDtoList !=null?data.resumesListDtoList : {}
- // this.skills = data.skills
- this.skills = data.skillList
- this.workExpList = data.workExpList
- this.$queue.setData('resumeDetailData', res.data)
- } else {
- uni.hideLoading()
- uni.showModal({
- title: '提示',
- content: '用户简历不存在',
- showCancel: false,
- complete(ret) {
- uni.navigateBack()
- }
- })
- }
- }).finally(() => {
- this.loading = false
- })
- },
- //使用岗位名称查询出企业正在招聘的该岗位拿到对应的岗位id
- getJobList(ruleClassifyName) {
- let data = {
- status: 2,
- page: 1,
- limit: 1,
- ruleClassifyName: ruleClassifyName,
- companyId: uni.getStorageSync('companyId')
- }
- this.$Request.getT('/app/postPush/getPostPushList', data).then(res => {
- if (res.code == 0) {
- this.postPushId = res.data.records[0].postPushId
- }
- })
- },
- // 查看图片
- saveImg(imgs, index) {
- // console.log(imgs)
- let that = this;
- let imgArr = imgs
- // imgArr.push(imgs);
- // //预览图片
- uni.previewImage({
- urls: imgArr,
- current: imgArr[index]
- });
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .resume-detail {
- min-height: 100vh;
- padding-bottom: 120rpx;
- // padding-top 已改为动态计算,在模板中通过 :style 设置
- }
- .fixed-nav {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 9999;
- background-color: #ffffff;
- // padding: 0 4rpx;
- // padding-top 已改为动态计算,在模板中通过 :style 设置
- }
- // 顶部导航栏
- .navbar {
- background: #fff;
- height: 88rpx;
- padding: 0 8rpx;
- // padding: 80rpx 0 40rpx 0; // 已移除,因为现在是固定导航栏
- .navbar-content {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 0 30rpx;
- height: 60rpx;
- .navbar-left {
- width: 96rpx;
- display: flex;
- align-items: center;
- }
- .navbar-title {
- color: rgba(23, 23, 37, 1);
- font-family: DM Sans;
- font-size: 34rpx;
- font-weight: 400;
- line-height: 52rpx;
- letter-spacing: 0%;
- text-align: center;
- }
- .nav-right {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- width: 96rpx;
- }
-
- .nav-icon {
- display: flex;
- align-items: center;
- justify-content: center;
- // width: 36rpx;
- // height: 36rpx;
- }
-
- .icon-img {
- width: 42rpx;
- height: 42rpx;
- }
- }
- }
- // 底部操作按钮
- .bottom-actions {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- background: #fff;
- padding: 30rpx;
- box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
- .action-btn {
- width: 100%;
- height: 88rpx;
- border-radius: 44rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 32rpx;
- font-weight: 500;
- }
- .contact-btn {
- background: linear-gradient(90deg, rgba(13, 39, 247, 1), rgba(19, 193, 234, 1) 100%);
- color: #fff;
- }
- }
- .company-title {
- margin-bottom: 8rpx;
- color: rgba(23, 23, 37, 1);
- font-family: DM Sans;
- font-size: 28rpx;
- font-weight: 400;
- }
- </style>
|