Browse Source

feat: 添加查询手机号接口并优化用户详情页

- 在boss.js中添加queryPhoneNum接口用于查询手机号
- 用户详情页增加手机号脱敏显示和查看按钮
- 修改认证页面添加技能证书上传功能
- 调整首页布局和样式
- 优化电话拨打逻辑,增加查看次数检查
- 工作咨询页面增加模板下载功能
- 修复若干UI显示问题
master
前端-胡立永 1 month ago
parent
commit
8ec64c07ca
13 changed files with 288 additions and 73 deletions
  1. +6
    -0
      api/model/boss.js
  2. +4
    -1
      components/list/userList/index.vue
  3. +16
    -9
      components/list/userList/userItem.vue
  4. +3
    -3
      components/screen/screenWork.vue
  5. +2
    -0
      mixins/configList.js
  6. +3
    -1
      pages/index/center.vue
  7. +44
    -14
      pages/index/index.vue
  8. +35
    -5
      pages_order/auth/certification.vue
  9. +1
    -0
      pages_order/auth/certificationEnterprise.vue
  10. +1
    -1
      pages_order/auth/wxLogin.vue
  11. +75
    -14
      pages_order/work/postConsult.vue
  12. +78
    -14
      pages_order/work/userDetail.vue
  13. +20
    -11
      store/store.js

+ 6
- 0
api/model/boss.js View File

@ -2,6 +2,12 @@
// boss相关接口 // boss相关接口
const api = { const api = {
//查询手机号
queryPhoneNum: {
url: '/employ/user/queryPhoneNum',
method: 'GET',
auth: true,
},
} }
export default api export default api

+ 4
- 1
components/list/userList/index.vue View File

@ -5,7 +5,8 @@
@scrolltolower="loadMoreData"> @scrolltolower="loadMoreData">
<view class="bossList"> <view class="bossList">
<view <view
@click="$store.commit('checkViewCount', (keyName ? item[keyName] : item).id)"
@click="$utils.navigateTo('/pages_order/work/userDetail?id=' + (keyName && item[keyName] ? item[keyName] : item).id)"
:key="index" :key="index"
v-for="(item, index) in list"> v-for="(item, index) in list">
<userItem :item="keyName && item[keyName] ? item[keyName] : item" <userItem :item="keyName && item[keyName] ? item[keyName] : item"
@ -14,6 +15,8 @@
/> />
</view> </view>
<!-- $store.commit('checkViewCount', (keyName ? item[keyName] : item).id) -->
<uv-empty mode="list" v-if="list.length == 0"></uv-empty> <uv-empty mode="list" v-if="list.length == 0"></uv-empty>
</view> </view>
</scroll-view> </scroll-view>


+ 16
- 9
components/list/userList/userItem.vue View File

@ -103,6 +103,7 @@
}, },
methods: { methods: {
callPhone(){ callPhone(){
// //
if (!this.isDataValid || !this.phone) { if (!this.isDataValid || !this.phone) {
uni.showToast({ uni.showToast({
@ -112,15 +113,21 @@
return; return;
} }
uni.makePhoneCall({
phoneNumber: this.phone,
success() {
console.log('安卓拨打成功');
},
fail() {
console.log('安卓拨打失败');
}
})
this.$store.commit('checkViewCount', {
data : this.item,
phone : this.phone,
type : 'phone',
})
// uni.makePhoneCall({
// phoneNumber: this.phone,
// success() {
// console.log('');
// },
// fail() {
// console.log('');
// }
// })
}, },
} }
} }


+ 3
- 3
components/screen/screenWork.vue View File

@ -114,7 +114,7 @@
result: [], result: [],
activeName: 'areaId', activeName: 'areaId',
areaId: { areaId: {
label: '全部',
label: '地点',
value: 0, value: 0,
activeIndex: 0, activeIndex: 0,
color: '#333', color: '#333',
@ -392,12 +392,12 @@
this.popupSelectedAddress = '全部地区' this.popupSelectedAddress = '全部地区'
// areaId // areaId
this.areaId.label = '全部地区'
this.areaId.label = '地点'
this.areaId.value = 'all' this.areaId.value = 'all'
// clickItemresult // clickItemresult
this.clickItem({ this.clickItem({
label: '全部地区',
label: '地点',
value: 'all', value: 'all',
}) })


+ 2
- 0
mixins/configList.js View File

@ -21,6 +21,7 @@ export default {
let o = { let o = {
...this.Gshare, ...this.Gshare,
title: this.configList.config_app_name, title: this.configList.config_app_name,
imageUrl: this.configList.config_share_image,
} }
if (this.userInfo.id) { if (this.userInfo.id) {
o.path = this.Gshare.path + '?shareId=' + this.userInfo.id o.path = this.Gshare.path + '?shareId=' + this.userInfo.id
@ -32,6 +33,7 @@ export default {
let o = { let o = {
...this.Gshare, ...this.Gshare,
title: this.configList.config_app_name, title: this.configList.config_app_name,
imageUrl: this.configList.config_share_image,
} }
if (this.userInfo.id) { if (this.userInfo.id) {
o.path = this.Gshare.path + '?shareId=' + this.userInfo.id o.path = this.Gshare.path + '?shareId=' + this.userInfo.id


+ 3
- 1
pages/index/center.vue View File

@ -216,7 +216,9 @@
我的服务 我的服务
</view> </view>
<uv-grid :col="4" :border="false"> <uv-grid :col="4" :border="false">
<uv-grid-item @click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/MemberRecharge') : $utils.toLogin()">
<uv-grid-item
v-if="role || !isLoggedIn"
@click="isLoggedIn ? $utils.navigateTo('/pages_order/mine/MemberRecharge') : $utils.toLogin()">
<image class="image" src="/static/image/center/1.png" mode=""></image> <image class="image" src="/static/image/center/1.png" mode=""></image>
<text class="grid-text">会员充值</text> <text class="grid-text">会员充值</text>
</uv-grid-item> </uv-grid-item>


+ 44
- 14
pages/index/index.vue View File

@ -2,23 +2,32 @@
<view class="page"> <view class="page">
<view class="banner"> <view class="banner">
<view class="banner-top">
<view class="title">
{{ configList.config_app_name }}
<text>专注特种行业首招</text>
</view>
<view class="top">
<view class="search">
<uv-search
:placeholder="role ? '请输入简历名称' : '请输入岗位名称'"
:showAction="false"
search-icon-size="40rpx"
@search="search"
v-model="keyword"></uv-search>
</view>
</view>
</view>
<uv-swiper <uv-swiper
:list="bannerList" :list="bannerList"
indicator indicator
height="620rpx"
height="350rpx"
keyName="image"></uv-swiper> keyName="image"></uv-swiper>
<!-- indicatorStyle="bottom: 100rpx;" --> <!-- indicatorStyle="bottom: 100rpx;" -->
<view class="top">
<view class="search">
<uv-search
:placeholder="role ? '请输入简历名称' : '请输入岗位名称'"
:showAction="false"
search-icon-size="40rpx"
@search="search"
v-model="keyword"></uv-search>
</view>
</view>
</view> </view>
<!-- 工人看到的 --> <!-- 工人看到的 -->
@ -215,10 +224,31 @@
.banner{ .banner{
position: relative; position: relative;
background-color: $uni-color; background-color: $uni-color;
.banner-top{
display: flex;
flex-direction: column;
justify-content: flex-end;
height: 250rpx;
background-color: $uni-color;
.title{
color: #fff;
font-size: 40rpx;
font-weight: 900;
padding-left: 30rpx;
font-family: "Arial","Microsoft YaHei","黑体","宋体",sans-serif;
text{
font-size: 24rpx;
font-weight: 500;
margin-left: 20rpx;
margin-top: 10rpx;
}
}
}
.top{ .top{
position: absolute;
top: 190rpx;
left:00rpx;
// position: absolute;
// top: 190rpx;
// left:00rpx;
padding-top: 30rpx; padding-top: 30rpx;
display: flex; display: flex;
width: 100%; width: 100%;


+ 35
- 5
pages_order/auth/certification.vue View File

@ -97,6 +97,26 @@
@delete="deleteImage"> @delete="deleteImage">
</uv-upload> </uv-upload>
</view> </view>
<view class="form-item">
<view class="title">
技能证书选填
</view>
</view>
<view class="form-item">
<uv-upload
:fileList="skillBook"
:maxCount="9"
width="280rpx"
height="280rpx"
multiple
name="skillBook"
@afterRead="afterRead"
@delete="deleteImage">
</uv-upload>
</view>
</view> </view>
@ -147,7 +167,8 @@
form : {}, form : {},
fileList: [], fileList: [],
authFileList : [], authFileList : [],
sub:0
skillBook : [],
sub : 0,
} }
}, },
onLoad() { onLoad() {
@ -170,10 +191,16 @@
}) : [] }) : []
this.authFileList = this.form.authorizationBook ? this.form.authorizationBook.split(',').map(url => { this.authFileList = this.form.authorizationBook ? this.form.authorizationBook.split(',').map(url => {
return {
url
}
}) : []
return {
url
}
}) : []
this.skillBook = this.form.skillBook ? this.form.skillBook.split(',').map(url => {
return {
url
}
}) : []
} }
}) })
}, },
@ -199,6 +226,8 @@
}) })
} }
this.form.image = this.fileList.map((item) => item.url).join(",") this.form.image = this.fileList.map((item) => item.url).join(",")
this.form.authorizationBook = this.authFileList.map((item) => item.url).join(",")
this.form.skillBook = this.skillBook.map((item) => item.url).join(",")
if(this.$utils.verificationAll(this.form,{ if(this.$utils.verificationAll(this.form,{
name:'请输入姓名', name:'请输入姓名',
cerNo:'请输入身份证号码', cerNo:'请输入身份证号码',
@ -214,6 +243,7 @@
delete this.form.updateBy delete this.form.updateBy
delete this.form.updateTime delete this.form.updateTime
delete this.form.userId delete this.form.userId
delete this.form.validTime
this.$api('addAuthenticationPerson',this.form, res =>{ this.$api('addAuthenticationPerson',this.form, res =>{
if(res.code == 200){ if(res.code == 200){


+ 1
- 0
pages_order/auth/certificationEnterprise.vue View File

@ -241,6 +241,7 @@
delete this.form.updateBy delete this.form.updateBy
delete this.form.updateTime delete this.form.updateTime
delete this.form.userId delete this.form.userId
delete this.form.validTime
this.$api('addAuthenticationCompany', this.form, res =>{ this.$api('addAuthenticationCompany', this.form, res =>{
if(res.code == 200){ if(res.code == 200){


+ 1
- 1
pages_order/auth/wxLogin.vue View File

@ -12,7 +12,7 @@
<image src="../static/auth/wx.png" mode=""></image> <image src="../static/auth/wx.png" mode=""></image>
</view> </view>
<view class=""> <view class="">
授权登录
快捷登录
</view> </view>
</view> </view>
<!-- <view class="btn b2"> <!-- <view class="btn b2">


+ 75
- 14
pages_order/work/postConsult.vue View File

@ -26,21 +26,28 @@
<view class="input" <view class="input"
v-else> v-else>
<uv-upload
:fileList="fileMapList[item.keyName]"
:name="item.keyName"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image :src="item.image"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
<view class="upload-container">
<uv-upload
:fileList="fileMapList[item.keyName]"
:name="item.keyName"
:maxCount="1"
width="120rpx"
height="120rpx"
multiple
@afterRead="afterRead"
@delete="deleteImage">
<view class="upload">
<image :src="item.image"
mode="aspectFit"
style="width: 120rpx;height: 120rpx;" />
</view>
</uv-upload>
<view class="download-btn"
v-if="item.template"
@click="downloadTemplate(item.template, item.title)">
<text>下载模板</text>
</view> </view>
</uv-upload>
</view>
</view> </view>
<view class="icon" <view class="icon"
v-if="item.type == 1"> v-if="item.type == 1">
@ -131,6 +138,44 @@
} }
}) })
}, },
downloadTemplate(template, title) {
if (!template) {
uni.showToast({
title: '暂无模板文件',
icon: 'none'
})
return
}
uni.downloadFile({
url: template,
success: (res) => {
if (res.statusCode === 200) {
uni.saveFile({
tempFilePath: res.tempFilePath,
success: () => {
uni.showToast({
title: '下载成功',
icon: 'success'
})
},
fail: () => {
uni.showToast({
title: '保存失败',
icon: 'none'
})
}
})
}
},
fail: () => {
uni.showToast({
title: '下载失败',
icon: 'none'
})
}
})
},
queryCertById(){ queryCertById(){
this.$api('queryCertById', { this.$api('queryCertById', {
cerId : this.id, cerId : this.id,
@ -201,6 +246,12 @@
background-color: #fff; background-color: #fff;
margin: 20rpx; margin: 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
.upload-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 10rpx;
}
.upload{ .upload{
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -220,6 +271,16 @@
// border-radius: 10rpx; // border-radius: 10rpx;
// } // }
} }
.download-btn {
padding: 8rpx 16rpx;
background-color: #007aff;
color: #fff;
border-radius: 6rpx;
font-size: 24rpx;
text {
color: #fff;
}
}
} }
} }
</style> </style>

+ 78
- 14
pages_order/work/userDetail.vue View File

@ -6,12 +6,12 @@
<view class="headImage"> <view class="headImage">
<image :src="hanHaiMember.headImage" mode=""></image> <image :src="hanHaiMember.headImage" mode=""></image>
<view class=""> <view class="">
{{ authenticationPerson.name }}
{{ detail.title }}
</view> </view>
</view> </view>
<view class="info"> <view class="info">
<view class="name"> <view class="name">
{{ detail.title }}
{{ authenticationPerson.name }}
</view> </view>
<view class="tips"> <view class="tips">
性别{{ detail.sex }} 性别{{ detail.sex }}
@ -58,8 +58,11 @@
<view class="left"> <view class="left">
联系电话 联系电话
</view> </view>
<view class="right">
{{ authenticationPerson.phone }}
<view class="right phone-container">
<text>{{ displayPhone }}</text>
<view v-if="!showPhone" class="view-phone-btn" @click="clickShowPhone">
查看
</view>
</view> </view>
</view> </view>
@ -68,7 +71,7 @@
期望工作地 期望工作地
</view> </view>
<view class="right"> <view class="right">
{{ detail.expectAddressName }}
{{ detail.expectAddressName || detail.expectAddress }}
</view> </view>
</view> </view>
@ -148,6 +151,27 @@
hanHaiMember: {}, hanHaiMember: {},
authenticationPerson: {}, authenticationPerson: {},
collectionFlag: false, collectionFlag: false,
showPhone : false,
}
},
computed : {
phone(){
return this.hanHaiMember && this.hanHaiMember.phone
},
// showPhone
displayPhone(){
const phone = this.phone
if (!phone) return ''
if (this.showPhone) {
return phone
} else {
// 34****
return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
}
},
//
isDataValid(){
return this.id
} }
}, },
onLoad({ onLoad({
@ -192,16 +216,41 @@
} }
}) })
}, },
clickShowPhone(){
this.$store.commit('checkViewCount', {
data : this.item,
success : () => {
this.showPhone = true
}
})
},
callPhone(){ callPhone(){
uni.makePhoneCall({
phoneNumber: this.hanHaiMember && this.hanHaiMember.phone,
success() {
console.log('安卓拨打成功');
},
fail() {
console.log('安卓拨打失败');
}
})
//
if (!this.isDataValid || !this.phone) {
uni.showToast({
title: '联系方式不可用',
icon: 'none'
});
return;
}
this.$store.commit('checkViewCount', {
data : this.item,
phone : this.phone,
type : 'phone',
})
// uni.makePhoneCall({
// phoneNumber: this.hanHaiMember && this.hanHaiMember.phone,
// success() {
// console.log('');
// },
// fail() {
// console.log('');
// }
// })
}, },
} }
} }
@ -300,6 +349,21 @@
width: 220rpx; width: 220rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.phone-container {
display: flex;
align-items: center;
gap: 20rpx;
.view-phone-btn {
background-color: rgba($uni-color, 0.1);
color: $uni-color;
padding: 8rpx 16rpx;
border-radius: 8rpx;
font-size: 24rpx;
border: 1px solid rgba($uni-color, 0.3);
}
}
} }
} }


+ 20
- 11
store/store.js View File

@ -248,24 +248,33 @@ const store = new Vuex.Store({
state.addressTreeMap[pid] = list state.addressTreeMap[pid] = list
}, },
// 检查当前查看次数,在进入简历页面 // 检查当前查看次数,在进入简历页面
checkViewCount(state, id){
api('getUserCenterData', res =>{
checkViewCount(state, {
data = {},
type = 'click',
success = () => {},
phone = ''
}){
api('queryPhoneNum', {
resumeId: data.id,
}, res =>{
if(res.code == 200){ if(res.code == 200){
state.UserExtensionInfo = res.result
if (state.UserExtensionInfo.checkNum > 0) {
return uni.navigateTo({
url: '/pages_order/work/userDetail?id=' + id
if (res.result <= 0) {
return uni.showToast({
title: '您的查看次数已用完,无法继续查看',
icon: 'none'
}) })
} }
uni.showToast({
title: '您的查看次数已用完,无法继续查看',
icon: 'none'
})
success()
if (type == 'phone' && phone) {
uni.makePhoneCall({
phoneNumber: phone,
})
}
} }
}) })
} }
}, },
actions: { actions: {


Loading…
Cancel
Save