111
This commit is contained in:
@@ -16,27 +16,29 @@
|
|||||||
</template>
|
</template>
|
||||||
<view class="content" v-show="!isEmptyObject(jobInfo)">
|
<view class="content" v-show="!isEmptyObject(jobInfo)">
|
||||||
<view class="content-top btn-feel">
|
<view class="content-top btn-feel">
|
||||||
<view class="top-salary">
|
<view style="background: #ffffff;padding: 24rpx;box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);border-radius: 20rpx 20rpx 20rpx 20rpx;position: relative;overflow: hidden;">
|
||||||
<Salary-Expectation
|
<view class="top-salary">
|
||||||
:max-salary="jobInfo.maxSalary"
|
<Salary-Expectation
|
||||||
:min-salary="jobInfo.minSalary"
|
:max-salary="jobInfo.maxSalary"
|
||||||
:is-month="true"
|
:min-salary="jobInfo.minSalary"
|
||||||
></Salary-Expectation>
|
:is-month="true"
|
||||||
</view>
|
></Salary-Expectation>
|
||||||
<view class="top-name">{{ jobInfo.jobTitle }}</view>
|
|
||||||
<view class="top-info">
|
|
||||||
<view class="info-img"><image src="/static/icon/post12.png"></image></view>
|
|
||||||
<view class="info-text">
|
|
||||||
<dict-Label dictType="experience" :value="jobInfo.experience"></dict-Label>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="info-img mar_le20"><image src="/static/icon/post13.png"></image></view>
|
<view class="top-name">{{ jobInfo.jobTitle }}</view>
|
||||||
<view class="info-text">
|
<view class="top-info">
|
||||||
<dict-Label dictType="education" :value="jobInfo.education"></dict-Label>
|
<view class="info-img"><image src="/static/icon/post12.png"></image></view>
|
||||||
|
<view class="info-text">
|
||||||
|
<dict-Label dictType="experience" :value="jobInfo.experience"></dict-Label>
|
||||||
|
</view>
|
||||||
|
<view class="info-img mar_le20"><image src="/static/icon/post13.png"></image></view>
|
||||||
|
<view class="info-text">
|
||||||
|
<dict-Label dictType="education" :value="jobInfo.education"></dict-Label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="position-source">
|
||||||
|
<text>来源 </text>
|
||||||
|
{{ jobInfo.dataSource }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
<view class="position-source">
|
|
||||||
<text>来源 </text>
|
|
||||||
{{ jobInfo.dataSource }}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ai-explain" v-if="jobInfo.isExplain">
|
<view class="ai-explain" v-if="jobInfo.isExplain">
|
||||||
@@ -503,11 +505,11 @@ for i in 0..100
|
|||||||
.content{
|
.content{
|
||||||
padding: 0 28rpx
|
padding: 0 28rpx
|
||||||
height: 100%
|
height: 100%
|
||||||
|
padding-top: 28rpx
|
||||||
.content-top{
|
.content-top{
|
||||||
background: #FFFFFF;
|
|
||||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
|
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
|
||||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||||
padding: 52rpx 32rpx 34rpx 32rpx
|
padding: 24rpx
|
||||||
position: relative
|
position: relative
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
.top-salary{
|
.top-salary{
|
||||||
|
|||||||
@@ -196,10 +196,10 @@
|
|||||||
}, {
|
}, {
|
||||||
"path": "pages/UnitDetails/UnitDetails",
|
"path": "pages/UnitDetails/UnitDetails",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "单位详情",
|
"navigationBarTitleText": "单位详情"
|
||||||
"navigationBarBackgroundColor": "#4778EC",
|
// "navigationBarBackgroundColor": "#4778EC",
|
||||||
"navigationBarTextStyle": "white",
|
// "navigationBarTextStyle": "white"
|
||||||
"navigationStyle": "custom"
|
// "navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/exhibitors/exhibitors",
|
"path": "pages/exhibitors/exhibitors",
|
||||||
|
|||||||
@@ -613,14 +613,31 @@ function complete() {
|
|||||||
experiencesList: experiencesList
|
experiencesList: experiencesList
|
||||||
};
|
};
|
||||||
|
|
||||||
$api.createRequest('/app/user/registerUser', requestData, 'post').then((resData) => {
|
$api.createRequest('/registerUser', requestData, 'post').then(async (resData) => {
|
||||||
$api.msg('完成');
|
$api.msg('完成');
|
||||||
// 获取用户信息并存储到store中
|
|
||||||
getUserResume().then((userInfo) => {
|
// 如果接口返回了token,需要重新保存token
|
||||||
console.log('用户信息已存储到store:', userInfo);
|
if (resData.token) {
|
||||||
uni.reLaunch({
|
try {
|
||||||
url: '/pages/index/index',
|
await loginSetToken(resData.token);
|
||||||
});
|
console.log('Token已更新:', resData.token);
|
||||||
|
} catch (error) {
|
||||||
|
console.error('更新Token失败:', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存成功后,重新获取用户信息并更新缓存
|
||||||
|
try {
|
||||||
|
await getUserResume();
|
||||||
|
console.log('用户信息已更新到缓存');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取用户信息失败:', error);
|
||||||
|
// 即使获取用户信息失败,也不影响页面跳转
|
||||||
|
}
|
||||||
|
|
||||||
|
// 跳转到首页
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/index/index',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -42,6 +42,13 @@
|
|||||||
<uni-icons class="iconsearch" color="#666666" type="search" size="18"></uni-icons>
|
<uni-icons class="iconsearch" color="#666666" type="search" size="18"></uni-icons>
|
||||||
<text class="inpute">职位名称、薪资要求等</text>
|
<text class="inpute">职位名称、薪资要求等</text>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 直播入口按钮 -->
|
||||||
|
<view class="live-button press-button" @click="handleLiveClick">
|
||||||
|
<view class="live-icon">
|
||||||
|
<uni-icons type="videocam-filled" size="16" color="#FFFFFF"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="live-text">直播</view>
|
||||||
|
</view>
|
||||||
<!-- <view class="chart button-click">职业图谱</view> -->
|
<!-- <view class="chart button-click">职业图谱</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="cards" v-if="shouldShowJobSeekerContent">
|
<view class="cards" v-if="shouldShowJobSeekerContent">
|
||||||
@@ -688,6 +695,11 @@ const handleServiceClick = (serviceType) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 处理直播按钮点击
|
||||||
|
const handleLiveClick = () => {
|
||||||
|
$api.msg('该功能正在开发中');
|
||||||
|
};
|
||||||
|
|
||||||
// 跳转到测试页面
|
// 跳转到测试页面
|
||||||
const navToTestPage = () => {
|
const navToTestPage = () => {
|
||||||
navTo('/pages/test/homepage-test');
|
navTo('/pages/test/homepage-test');
|
||||||
@@ -1107,17 +1119,19 @@ defineExpose({ loadData });
|
|||||||
padding-bottom: 0 !important;
|
padding-bottom: 0 !important;
|
||||||
margin-top: 0 !important;
|
margin-top: 0 !important;
|
||||||
margin-bottom: 0 !important;
|
margin-bottom: 0 !important;
|
||||||
|
|
||||||
.container-search
|
.container-search
|
||||||
padding: 16rpx 24rpx
|
padding: 16rpx 24rpx
|
||||||
display: flex
|
display: flex
|
||||||
justify-content: space-between
|
justify-content: space-between
|
||||||
|
align-items: center
|
||||||
.search-input
|
.search-input
|
||||||
display: flex
|
display: flex
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%
|
flex: 1
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx
|
line-height: 80rpx
|
||||||
margin-right: 24rpx
|
margin-right: 16rpx
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 75rpx 75rpx 75rpx 75rpx;
|
border-radius: 75rpx 75rpx 75rpx 75rpx;
|
||||||
.iconsearch
|
.iconsearch
|
||||||
@@ -1128,6 +1142,35 @@ defineExpose({ loadData });
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #B5B5B5;
|
color: #B5B5B5;
|
||||||
width: 100%
|
width: 100%
|
||||||
|
.live-button
|
||||||
|
display: flex
|
||||||
|
align-items: center
|
||||||
|
justify-content: center
|
||||||
|
width: 90rpx
|
||||||
|
height: 42rpx
|
||||||
|
background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%)
|
||||||
|
border-radius: 40rpx
|
||||||
|
box-shadow: 0 3rpx 8rpx rgba(255, 107, 107, 0.2)
|
||||||
|
transition: all 0.2s ease
|
||||||
|
flex-shrink: 0
|
||||||
|
|
||||||
|
&:active
|
||||||
|
transform: scale(0.96)
|
||||||
|
box-shadow: 0 2rpx 6rpx rgba(255, 107, 107, 0.25)
|
||||||
|
|
||||||
|
.live-icon
|
||||||
|
margin-right: 8rpx
|
||||||
|
display: flex
|
||||||
|
align-items: center
|
||||||
|
justify-content: center
|
||||||
|
|
||||||
|
.live-text
|
||||||
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif
|
||||||
|
font-weight: 500
|
||||||
|
font-size: 24rpx
|
||||||
|
color: #FFFFFF
|
||||||
|
text-align: center
|
||||||
|
white-space: nowrap
|
||||||
.chart
|
.chart
|
||||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||||
width: 170rpx;
|
width: 170rpx;
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
<scroll-view class="content" scroll-y="true" :style="{ height: scrollViewHeight }" :scroll-with-animation="true">
|
<scroll-view class="content" scroll-y="true" :style="{ height: scrollViewHeight }" :scroll-with-animation="true">
|
||||||
<!-- 基本信息区块 -->
|
<!-- 基本信息区块 -->
|
||||||
<view class="form-block">
|
<view class="form-block">
|
||||||
|
<view class="form-group" v-if="userType === 0">
|
||||||
|
<view class="label">招聘公司</view>
|
||||||
|
<view-text style="color: #333;font-size: 38rpx;padding: 16rpx 0;display: inline-block;">{{formData.companyName}}</view-text>
|
||||||
|
</view>
|
||||||
<view class="form-group">
|
<view class="form-group">
|
||||||
<view class="label">岗位名称</view>
|
<view class="label">岗位名称</view>
|
||||||
<input
|
<input
|
||||||
@@ -17,10 +21,7 @@
|
|||||||
v-model="formData.jobTitle"
|
v-model="formData.jobTitle"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-group" v-if="userType === 0">
|
|
||||||
<view class="label">招聘公司</view>
|
|
||||||
<view-text style="color: #333;font-size: 28rpx;padding: 16rpx 0;display: inline-block;">{{formData.companyName}}</view-text>
|
|
||||||
</view>
|
|
||||||
<view class="form-group" v-if="userType === 2">
|
<view class="form-group" v-if="userType === 2">
|
||||||
<view class="label">招聘公司</view>
|
<view class="label">招聘公司</view>
|
||||||
<!-- 企业用户:显示缓存中的企业名称,不可编辑 -->
|
<!-- 企业用户:显示缓存中的企业名称,不可编辑 -->
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<!-- 自定义tabbar -->
|
<!-- 自定义tabbar -->
|
||||||
<CustomTabBar :currentPage="4" />
|
<CustomTabBar :currentPage="4" />
|
||||||
<!-- 企业用户信息卡片 -->
|
<!-- 企业用户信息卡片 -->
|
||||||
<view v-if="userInfo.isCompanyUser === 0" class="company-info-card btn-feel" @click="seeDetail">
|
<view v-if="userType === 0" class="company-info-card btn-feel" @click="seeDetail">
|
||||||
<view class="company-avatar">
|
<view class="company-avatar">
|
||||||
<image class="company-avatar-img" :src="companyInfo.avatar || '/static/icon/company-default.png'"></image>
|
<image class="company-avatar-img" :src="companyInfo.avatar || '/static/icon/company-default.png'"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -100,7 +100,8 @@
|
|||||||
<view class="row-right">已开启</view>
|
<view class="row-right">已开启</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-back button-click" @click="logOut">退出登录</view>
|
<view v-if="userType === 2" class="card-help button-click" @click="goToJobHelper">求职帮</view>
|
||||||
|
<view class="card-back button-click" @click="logOut">退出登录</view>
|
||||||
<uni-popup ref="popup" type="dialog">
|
<uni-popup ref="popup" type="dialog">
|
||||||
<uni-popup-dialog
|
<uni-popup-dialog
|
||||||
mode="base"
|
mode="base"
|
||||||
@@ -120,7 +121,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, inject, watch, ref, onMounted, onUnmounted } from 'vue';
|
import { reactive, inject, watch, ref, onMounted, onUnmounted, computed } from 'vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
const { $api, navTo } = inject('globalFunction');
|
const { $api, navTo } = inject('globalFunction');
|
||||||
@@ -130,6 +131,18 @@ const popup = ref(null);
|
|||||||
const { userInfo, Completion } = storeToRefs(useUserStore());
|
const { userInfo, Completion } = storeToRefs(useUserStore());
|
||||||
const counts = ref({});
|
const counts = ref({});
|
||||||
|
|
||||||
|
// 获取用户类型,参考首页的实现方式
|
||||||
|
const userType = computed(() => {
|
||||||
|
// 优先从store获取,如果为空则从缓存获取
|
||||||
|
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
|
||||||
|
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||||
|
const cachedIsCompanyUser = cachedUserInfo.isCompanyUser;
|
||||||
|
|
||||||
|
// 获取用户类型:优先使用store中的isCompanyUser,如果store中没有,使用缓存中的isCompanyUser
|
||||||
|
// 缓存中的值可能是字符串,需要转换为数值类型
|
||||||
|
return storeIsCompanyUser !== undefined ? Number(storeIsCompanyUser) : Number(cachedIsCompanyUser);
|
||||||
|
});
|
||||||
|
|
||||||
// 企业信息数据
|
// 企业信息数据
|
||||||
const companyInfo = reactive({
|
const companyInfo = reactive({
|
||||||
name: '科里喀什分公司',
|
name: '科里喀什分公司',
|
||||||
@@ -177,7 +190,7 @@ function getUserstatistics() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function seeDetail() {
|
function seeDetail() {
|
||||||
if (userInfo.isCompanyUser === 0) {
|
if (userType === 0) {
|
||||||
// 企业用户跳转到企业信息页面
|
// 企业用户跳转到企业信息页面
|
||||||
navTo('/pages/mine/company-info');
|
navTo('/pages/mine/company-info');
|
||||||
} else {
|
} else {
|
||||||
@@ -185,6 +198,11 @@ function seeDetail() {
|
|||||||
navTo('/packageA/pages/myResume/myResume');
|
navTo('/packageA/pages/myResume/myResume');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function goToJobHelper() {
|
||||||
|
// 跳转到求职者信息补全页面
|
||||||
|
navTo('/pages/complete-info/complete-info');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@@ -284,6 +302,16 @@ function seeDetail() {
|
|||||||
margin: 0
|
margin: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.card-help{
|
||||||
|
height: 96rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 96rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #256BFA;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
.card-back{
|
.card-back{
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
|
|||||||
Reference in New Issue
Block a user