111
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
</template>
|
||||
<view class="content" v-show="!isEmptyObject(jobInfo)">
|
||||
<view class="content-top btn-feel">
|
||||
<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;">
|
||||
<view class="top-salary">
|
||||
<Salary-Expectation
|
||||
:max-salary="jobInfo.maxSalary"
|
||||
@@ -39,6 +40,7 @@
|
||||
{{ jobInfo.dataSource }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ai-explain" v-if="jobInfo.isExplain">
|
||||
<view class="exbg">
|
||||
<view class="explain-left btn-shaky">
|
||||
@@ -503,11 +505,11 @@ for i in 0..100
|
||||
.content{
|
||||
padding: 0 28rpx
|
||||
height: 100%
|
||||
padding-top: 28rpx
|
||||
.content-top{
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(0,0,0,0.04);
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
padding: 52rpx 32rpx 34rpx 32rpx
|
||||
padding: 24rpx
|
||||
position: relative
|
||||
overflow: hidden
|
||||
.top-salary{
|
||||
|
||||
@@ -196,10 +196,10 @@
|
||||
}, {
|
||||
"path": "pages/UnitDetails/UnitDetails",
|
||||
"style": {
|
||||
"navigationBarTitleText": "单位详情",
|
||||
"navigationBarBackgroundColor": "#4778EC",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "单位详情"
|
||||
// "navigationBarBackgroundColor": "#4778EC",
|
||||
// "navigationBarTextStyle": "white"
|
||||
// "navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/exhibitors/exhibitors",
|
||||
|
||||
@@ -613,16 +613,33 @@ function complete() {
|
||||
experiencesList: experiencesList
|
||||
};
|
||||
|
||||
$api.createRequest('/app/user/registerUser', requestData, 'post').then((resData) => {
|
||||
$api.createRequest('/registerUser', requestData, 'post').then(async (resData) => {
|
||||
$api.msg('完成');
|
||||
// 获取用户信息并存储到store中
|
||||
getUserResume().then((userInfo) => {
|
||||
console.log('用户信息已存储到store:', userInfo);
|
||||
|
||||
// 如果接口返回了token,需要重新保存token
|
||||
if (resData.token) {
|
||||
try {
|
||||
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 {
|
||||
$api.msg('身份证校验失败');
|
||||
console.log('验证失败:', result.message);
|
||||
|
||||
@@ -42,6 +42,13 @@
|
||||
<uni-icons class="iconsearch" color="#666666" type="search" size="18"></uni-icons>
|
||||
<text class="inpute">职位名称、薪资要求等</text>
|
||||
</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>
|
||||
<view class="cards" v-if="shouldShowJobSeekerContent">
|
||||
@@ -688,6 +695,11 @@ const handleServiceClick = (serviceType) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 处理直播按钮点击
|
||||
const handleLiveClick = () => {
|
||||
$api.msg('该功能正在开发中');
|
||||
};
|
||||
|
||||
// 跳转到测试页面
|
||||
const navToTestPage = () => {
|
||||
navTo('/pages/test/homepage-test');
|
||||
@@ -1107,17 +1119,19 @@ defineExpose({ loadData });
|
||||
padding-bottom: 0 !important;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
|
||||
.container-search
|
||||
padding: 16rpx 24rpx
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
.search-input
|
||||
display: flex
|
||||
align-items: center;
|
||||
width: 100%
|
||||
flex: 1
|
||||
height: 80rpx;
|
||||
line-height: 80rpx
|
||||
margin-right: 24rpx
|
||||
margin-right: 16rpx
|
||||
background: #FFFFFF;
|
||||
border-radius: 75rpx 75rpx 75rpx 75rpx;
|
||||
.iconsearch
|
||||
@@ -1128,6 +1142,35 @@ defineExpose({ loadData });
|
||||
font-size: 28rpx;
|
||||
color: #B5B5B5;
|
||||
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
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
width: 170rpx;
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
<scroll-view class="content" scroll-y="true" :style="{ height: scrollViewHeight }" :scroll-with-animation="true">
|
||||
<!-- 基本信息区块 -->
|
||||
<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="label">岗位名称</view>
|
||||
<input
|
||||
@@ -17,10 +21,7 @@
|
||||
v-model="formData.jobTitle"
|
||||
/>
|
||||
</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="label">招聘公司</view>
|
||||
<!-- 企业用户:显示缓存中的企业名称,不可编辑 -->
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- 自定义tabbar -->
|
||||
<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">
|
||||
<image class="company-avatar-img" :src="companyInfo.avatar || '/static/icon/company-default.png'"></image>
|
||||
</view>
|
||||
@@ -100,6 +100,7 @@
|
||||
<view class="row-right">已开启</view>
|
||||
</view>
|
||||
</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-dialog
|
||||
@@ -120,7 +121,7 @@
|
||||
</template>
|
||||
|
||||
<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 { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, navTo } = inject('globalFunction');
|
||||
@@ -130,6 +131,18 @@ const popup = ref(null);
|
||||
const { userInfo, Completion } = storeToRefs(useUserStore());
|
||||
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({
|
||||
name: '科里喀什分公司',
|
||||
@@ -177,7 +190,7 @@ function getUserstatistics() {
|
||||
});
|
||||
}
|
||||
function seeDetail() {
|
||||
if (userInfo.isCompanyUser === 0) {
|
||||
if (userType === 0) {
|
||||
// 企业用户跳转到企业信息页面
|
||||
navTo('/pages/mine/company-info');
|
||||
} else {
|
||||
@@ -185,6 +198,11 @@ function seeDetail() {
|
||||
navTo('/packageA/pages/myResume/myResume');
|
||||
}
|
||||
}
|
||||
|
||||
function goToJobHelper() {
|
||||
// 跳转到求职者信息补全页面
|
||||
navTo('/pages/complete-info/complete-info');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@@ -284,6 +302,16 @@ function seeDetail() {
|
||||
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{
|
||||
height: 96rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
Reference in New Issue
Block a user