Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service
This commit is contained in:
@@ -153,9 +153,9 @@
|
||||
|
||||
|
||||
|
||||
async function thirdLogin(){
|
||||
async function thirdLogin(needToast){
|
||||
let form={}
|
||||
if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||
if (uni.getStorageSync('userInfo') && uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||
form={
|
||||
usertype: '1',
|
||||
idno: uni.getStorageSync('userInfo').idCard,
|
||||
@@ -165,7 +165,7 @@
|
||||
contactperson: "",
|
||||
contactphone: "",
|
||||
}
|
||||
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||
}else if (uni.getStorageSync('userInfo') && uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||
form={
|
||||
usertype: "2",
|
||||
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||
@@ -176,10 +176,12 @@
|
||||
name: ""
|
||||
}
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先登录'
|
||||
})
|
||||
if(needToast){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先登录'
|
||||
})
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
||||
@@ -213,7 +215,7 @@
|
||||
};
|
||||
|
||||
async function goDetail(jobFairId){
|
||||
if(await thirdLogin()){
|
||||
if(await thirdLogin('1')){
|
||||
if(state.current != 3){
|
||||
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
|
||||
}else{
|
||||
@@ -256,23 +258,28 @@
|
||||
state.current = currented;
|
||||
}
|
||||
|
||||
function seemsg(index) {
|
||||
async function seemsg(index) {
|
||||
|
||||
state.current = index;
|
||||
if (index != 3) {
|
||||
getFair("refresh");
|
||||
} else {
|
||||
if (!isLogin.value) {
|
||||
getHeart();
|
||||
return;
|
||||
}
|
||||
// 确保获取到用户信息后再请求“我参与的”列表
|
||||
if (!userInfo.value?.info?.userId) {
|
||||
getUser().then(() => {
|
||||
|
||||
if(await thirdLogin('1')){
|
||||
if (!isLogin.value) {
|
||||
getHeart();
|
||||
return;
|
||||
}
|
||||
// 确保获取到用户信息后再请求“我参与的”列表
|
||||
if (!userInfo.value?.info?.userId) {
|
||||
getUser().then(() => {
|
||||
getMyFair("refresh");
|
||||
});
|
||||
} else {
|
||||
getMyFair("refresh");
|
||||
});
|
||||
} else {
|
||||
getMyFair("refresh");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,15 +297,21 @@
|
||||
}
|
||||
};
|
||||
|
||||
function getHeart() {
|
||||
async function getHeart() {
|
||||
|
||||
|
||||
const raw = uni.getStorageSync("Padmin-Token");
|
||||
const token = typeof raw === "string" ? raw.trim() : "";
|
||||
|
||||
var isLogins = await thirdLogin();
|
||||
|
||||
const headers = token ? {
|
||||
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
|
||||
} : {};
|
||||
|
||||
|
||||
|
||||
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
|
||||
if (resData.code == 200) {
|
||||
if (isLogins) {
|
||||
isLogin.value = true;
|
||||
getUser();
|
||||
} else {
|
||||
|
||||
@@ -184,7 +184,6 @@
|
||||
src="/static/icon/addGroup.png"
|
||||
></image>
|
||||
</view>
|
||||
|
||||
<!-- sendmessgae Button-->
|
||||
<view class="btn-box purple" v-if="textInput && !isTyping" @click="sendMessage">
|
||||
<image class="send-btn" src="/static/icon/send3.png"></image>
|
||||
@@ -199,6 +198,7 @@
|
||||
<view class="btn-box-round"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ai-tips">本服务为AI生成内容,结果仅供参考</view>
|
||||
<!-- btn -->
|
||||
<CollapseTransition :show="showfile">
|
||||
<view class="area-tips">
|
||||
@@ -1021,13 +1021,26 @@ image-margin-top = 40rpx
|
||||
}
|
||||
.input-area {
|
||||
padding: 32rpx 28rpx 24rpx 28rpx;
|
||||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom) + 40rpx - 40rpx);
|
||||
/* #ifdef H5 */
|
||||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom) + 70rpx);
|
||||
/* #endif */
|
||||
/* #ifdef MP-WEIXIN */
|
||||
/* 小程序不支持CSS中的本地图片,使用image标签替代 */
|
||||
padding-bottom: calc(24rpx + env(safe-area-inset-bottom) + 40rpx - 50rpx);
|
||||
/* #endif */
|
||||
position: relative;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx -4rpx 10rpx 0rpx rgba(11,44,112,0.06);
|
||||
transition: height 2s ease-in-out;
|
||||
z-index: 1001;
|
||||
}
|
||||
.ai-tips{
|
||||
font-size: 24rpx;
|
||||
color: #8c8c8c;
|
||||
line-height: 33rpx;
|
||||
margin-top: 18rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.input-area::after
|
||||
position: absolute
|
||||
content: ''
|
||||
|
||||
@@ -682,10 +682,11 @@ const goToCompanyInfo = () => {
|
||||
onMounted(() => {
|
||||
// 获取企业信息
|
||||
getCompanyInfo();
|
||||
|
||||
// pageNull.value = 0;
|
||||
// 监听退出登录事件,显示微信登录弹窗
|
||||
uni.$on('showLoginModal', () => {
|
||||
wxAuthLoginRef.value?.open();
|
||||
pageNull.value = 0;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -796,12 +797,14 @@ async function loadData() {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
const pageNull = ref(0);
|
||||
function scrollBottom() {
|
||||
console.log('scrollBottom------')
|
||||
if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
|
||||
loadmoreRef.value.change('loading');
|
||||
}
|
||||
if (state.tabIndex === 'all') {
|
||||
pageNull.value++;
|
||||
getJobRecommend();
|
||||
} else {
|
||||
getJobList();
|
||||
@@ -983,6 +986,16 @@ function getJobRecommend(type = 'add') {
|
||||
...conditionSearch.value,
|
||||
isPublish: 1,
|
||||
};
|
||||
// 优先从store获取,如果为空则从缓存获取
|
||||
const storeIsCompanyUser = userInfo.value?.isCompanyUser;
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
const cachedIsCompanyUser = cachedUserInfo.isCompanyUser;
|
||||
const userType = storeIsCompanyUser !== undefined ? Number(storeIsCompanyUser) : Number(cachedIsCompanyUser);
|
||||
console.log('---------userType-----', userType)
|
||||
// 只有企业用户(isCompanyUser=0)才添加current字段
|
||||
if (userType === 0) {
|
||||
params.current = pageNull.value;
|
||||
}
|
||||
let comd = { recommend: true, jobCategory: '', tip: '确认你的兴趣,为您推荐更多合适的岗位' };
|
||||
$api.createRequest('/app/job/recommend', params).then((resData) => {
|
||||
const { data, total } = resData;
|
||||
@@ -1014,6 +1027,11 @@ function getJobRecommend(type = 'add') {
|
||||
const reslist = dataToImg(data);
|
||||
list.value = reslist;
|
||||
}
|
||||
if (data.length > 0) {
|
||||
pageNull.value++;
|
||||
} else {
|
||||
$api.msg('没有更多岗位了');
|
||||
}
|
||||
// 切换状态
|
||||
if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
|
||||
if (data.length < pageState.pageSize) {
|
||||
@@ -1040,8 +1058,8 @@ function getJobList(type = 'add') {
|
||||
// waterfallsFlowRef.value.refresh();
|
||||
if (waterfallsFlowRef.value) waterfallsFlowRef.value.refresh();
|
||||
}
|
||||
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
...pageState.search,
|
||||
// ...conditionSearch.value,
|
||||
@@ -1073,7 +1091,7 @@ const isFourLevelLinkagePurview=ref(false)
|
||||
const getIsFourLevelLinkagePurview=()=>{
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
if(userInfo){
|
||||
$api.myRequest('/auth/login2/ks',{userid: userInfo.dwUserid, idcardno: userInfo.idCard},"POST",'9100',{}).then(res=>{
|
||||
$api.myRequest('/auth/login2/ks',{userid: userInfo.dwUserid, idcardno: userInfo.idCard},"POST",9100,{}).then(res=>{
|
||||
if(res.code == 200){
|
||||
uni.setStorageSync('fourLevelLinkage-token',res.data.access_token)
|
||||
let roleIdList= ['103','106','107']
|
||||
@@ -1124,7 +1142,7 @@ function goCa(){
|
||||
if (checkLogin()) {
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||
navTo(`/packageCa/search/search?name=${userInfo.name}&idCard=${userInfo.idCard}`);
|
||||
navTo(`/packageCa/search/search?name=${userInfo.name}&userId=${userInfo.idCard}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1133,7 +1151,7 @@ function goCaAI(){
|
||||
if (checkLogin()) {
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||
navTo(`/packageCa/search/AIAudition?name=${userInfo.name}&idCard=${userInfo.idCard}`);
|
||||
navTo(`/packageCa/search/AIAudition?name=${userInfo.name}&userId=${userInfo.idCard}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ const handleLogin = async () => {
|
||||
icon: 'success'
|
||||
})
|
||||
// window.location.assign('http://222.80.110.161:11111/mechine-dual-vue/login')
|
||||
window.location.assign('http://222.80.110.161:11111/mechine-single-vue/login')
|
||||
window.location.assign('https://www.xjksly.cn/mechine-single-vue/login')
|
||||
// // 跳转到首页
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/index'
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
</view>
|
||||
<view class="row-right">已认证</view>
|
||||
</view>
|
||||
<view class="main-row btn-feel">
|
||||
<view class="main-row btn-feel" @click="goCa()">
|
||||
<view class="row-left">
|
||||
<image class="left-img" src="@/static/icon/server2.png"></image>
|
||||
<text class="left-text">素质测评</text>
|
||||
@@ -83,7 +83,7 @@
|
||||
<uni-icons color="#909090" type="right" size="14"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-row btn-feel">
|
||||
<view class="main-row btn-feel" @click="goCaAI()">
|
||||
<view class="row-left">
|
||||
<image class="left-img" src="@/static/icon/server3.png"></image>
|
||||
<text class="left-text">AI面试</text>
|
||||
@@ -203,6 +203,17 @@ function goToJobHelper() {
|
||||
// 跳转到求职者信息补全页面
|
||||
navTo('/pages/complete-info/complete-info');
|
||||
}
|
||||
// 跳转到素质测评
|
||||
function goCa(){
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
navTo(`/packageCa/search/search?name=${userInfo.name}&userId=${userInfo.idCard}`);
|
||||
}
|
||||
// 跳转到AI面试
|
||||
function goCaAI(){
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
navTo(`/packageCa/search/AIAudition?name=${userInfo.name}&userId=${userInfo.idCard}`);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
|
||||
Reference in New Issue
Block a user