Compare commits
10 Commits
CareerMap
...
19e1aab840
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19e1aab840 | ||
|
|
3cf0a7d7f5 | ||
| 872b68b0f2 | |||
|
|
0028c81d7d | ||
|
|
8d150c7b88 | ||
|
|
94d6caee7f | ||
|
|
22d96430d6 | ||
|
|
38313ee63b | ||
|
|
4e5fa2a39b | ||
|
|
dcd6741b37 |
@@ -50,7 +50,8 @@ const { $api, navTo, navBack } = inject('globalFunction');
|
|||||||
const weekMap = ['日', '一', '二', '三', '四', '五', '六'];
|
const weekMap = ['日', '一', '二', '三', '四', '五', '六'];
|
||||||
const calendarData = ref([]);
|
const calendarData = ref([]);
|
||||||
const current = ref({});
|
const current = ref({});
|
||||||
import { Solar, Lunar } from '@/packageA/lib/lunar-javascript@1.7.2.js';
|
import lunarModule from '@/packageA/lib/lunar-javascript@1.7.2.js';
|
||||||
|
const { Solar, Lunar } = lunarModule;
|
||||||
|
|
||||||
const isRecord = ref(false);
|
const isRecord = ref(false);
|
||||||
const recordNum = ref(4);
|
const recordNum = ref(4);
|
||||||
|
|||||||
9
packageB/apiRc/policy/index.js
Normal file
9
packageB/apiRc/policy/index.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import request from "@/utilsRc/request";
|
||||||
|
//政策列表
|
||||||
|
export function getPolicyList(queryParams) {
|
||||||
|
return request({
|
||||||
|
url: "/portal/policyInfo/portalList",
|
||||||
|
method: "get",
|
||||||
|
params: queryParams,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
<view class="form-btns">
|
<view class="form-btns">
|
||||||
<button class="mini-btn form-box-btn detail-btn" size="mini" v-if="false">详情</button>
|
<button class="mini-btn form-box-btn detail-btn" size="mini" v-if="false">详情</button>
|
||||||
<button class="mini-btn form-box-btn follow-btn" size="mini" @click="goFollow(item)">跟进</button>
|
<button class="mini-btn form-box-btn follow-btn" size="mini" @click="goFollow(item)">跟进</button>
|
||||||
<button class="mini-btn form-box-btn recommend-btn" size="mini" >智能推荐</button>
|
<button class="mini-btn form-box-btn recommend-btn" size="mini" @click="goRecommend(item)">智能推荐</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -381,6 +381,10 @@ function getDataList(type = 'add') {
|
|||||||
function goFollow(item) {
|
function goFollow(item) {
|
||||||
navTo(`/packageB/priority/helpFollow?task_id=${item.task_id}&person_id=${item.person_id}&&name=${item.name}&&taskType=${getTaskTypeLabelByValue(item.task_type)}`);
|
navTo(`/packageB/priority/helpFollow?task_id=${item.task_id}&person_id=${item.person_id}&&name=${item.name}&&taskType=${getTaskTypeLabelByValue(item.task_type)}`);
|
||||||
}
|
}
|
||||||
|
//智能推荐
|
||||||
|
const goRecommend = (item) => {
|
||||||
|
navTo('/packageB/priority/recommend');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
|||||||
413
packageB/priority/recommend.vue
Normal file
413
packageB/priority/recommend.vue
Normal file
@@ -0,0 +1,413 @@
|
|||||||
|
<template>
|
||||||
|
<AppLayout :title="title" :show-bg-image="false">
|
||||||
|
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
||||||
|
<view class="list-top">
|
||||||
|
<view class="list-title">
|
||||||
|
<text>岗位推荐列表</text>
|
||||||
|
<view class="title-line" style="left: 70rpx"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="jobListBox">
|
||||||
|
<view class="item" v-for="(job, index) in list" :key="index">
|
||||||
|
<view class="falls-card">
|
||||||
|
<view class="falls-card-pay">
|
||||||
|
<view class="pay-text">
|
||||||
|
<Salary-Expectation
|
||||||
|
:max-salary="job.maxSalary"
|
||||||
|
:min-salary="job.minSalary"
|
||||||
|
:is-month="true"
|
||||||
|
></Salary-Expectation>
|
||||||
|
</view>
|
||||||
|
<image
|
||||||
|
v-if="job.isHot"
|
||||||
|
class="flame"
|
||||||
|
src="/static/icon/flame.png"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
|
<view class="falls-card-title">{{ job.jobTitle }}</view>
|
||||||
|
<view class="fl_box fl_warp">
|
||||||
|
<view class="falls-card-education mar_ri10" v-if="job.education">
|
||||||
|
<dict-Label
|
||||||
|
dictType="education"
|
||||||
|
:value="job.education"
|
||||||
|
></dict-Label>
|
||||||
|
</view>
|
||||||
|
<view class="falls-card-experience" v-if="job.experience">
|
||||||
|
<dict-Label
|
||||||
|
dictType="experience"
|
||||||
|
:value="job.experience"
|
||||||
|
></dict-Label>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="falls-card-company">
|
||||||
|
{{ config.appInfo.areaName }}
|
||||||
|
<dict-Label
|
||||||
|
dictType="area"
|
||||||
|
:value="job.jobLocationAreaCode"
|
||||||
|
></dict-Label>
|
||||||
|
</view>
|
||||||
|
<view class="falls-card-pepleNumber">
|
||||||
|
<view>
|
||||||
|
<image class="point2" src="/static/icon/pintDate.png"></image>
|
||||||
|
<view class="fl_1">
|
||||||
|
{{ job.postingDate || "发布日期" }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<image
|
||||||
|
class="point3"
|
||||||
|
src="/static/icon/pointpeople.png"
|
||||||
|
></image>
|
||||||
|
<view class="fl_1">
|
||||||
|
{{ vacanciesTo(job.vacancies) }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="falls-card-company2">
|
||||||
|
<image class="point3" src="/static/icon/point3.png"></image>
|
||||||
|
<view class="fl_1">
|
||||||
|
{{ job.companyName }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
||||||
|
<view class="list-top">
|
||||||
|
<view class="list-title">
|
||||||
|
<text>政策推荐列表</text>
|
||||||
|
<view class="title-line" style="left: 70rpx"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
style="margin-bottom: 24rpx; border-radius: 16rpx"
|
||||||
|
class="policy-list"
|
||||||
|
v-for="(item, index) in policyList"
|
||||||
|
:key="index"
|
||||||
|
@click="goPolicyDetail(item)"
|
||||||
|
>
|
||||||
|
<view class="sign">推荐</view>
|
||||||
|
<view class="title">
|
||||||
|
<image src="../../packageRc/static/zcLeft.png" />
|
||||||
|
{{ item.zcmc }}</view
|
||||||
|
>
|
||||||
|
<view class="infos">
|
||||||
|
<view v-if="item.zclx">{{ item.zclx }}</view>
|
||||||
|
<view v-if="item.zcLevel">{{ item.zcLevel }}</view>
|
||||||
|
<view v-if="item.sourceUnit">{{ item.sourceUnit }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom-line">
|
||||||
|
<view
|
||||||
|
><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons
|
||||||
|
>发布日期:{{ item.createTime }}</view
|
||||||
|
>
|
||||||
|
<view>
|
||||||
|
<!-- 浏览数<text style="color: #6aa7e8">{{ item.viewNum }}</text> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</AppLayout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { inject, ref, reactive, onMounted } from "vue";
|
||||||
|
const { $api, navTo, navBack, vacanciesTo } = inject("globalFunction");
|
||||||
|
import config from "@/config.js";
|
||||||
|
import { getPolicyList } from "@/packageB/apiRc/policy/index.js";
|
||||||
|
import AppLayout from "@/components/AppLayout/AppLayout.vue";
|
||||||
|
import dictLabel from "@/components/dict-Label/dict-Label.vue";
|
||||||
|
const title = ref("");
|
||||||
|
const baseUrl = config.imgBaseUrl;
|
||||||
|
const list = ref([]);
|
||||||
|
const getBackgroundStyle = (imageName) => ({
|
||||||
|
backgroundImage: `url(${baseUrl}/dispatch/${imageName})`,
|
||||||
|
backgroundSize: "cover", // 覆盖整个容器
|
||||||
|
backgroundPosition: "center", // 居中
|
||||||
|
backgroundRepeat: "no-repeat",
|
||||||
|
});
|
||||||
|
onMounted(() => {
|
||||||
|
getJobRecommend();
|
||||||
|
getPolicyData();
|
||||||
|
});
|
||||||
|
function getJobRecommend() {
|
||||||
|
$api
|
||||||
|
.createRequest(
|
||||||
|
"/cms/job/recommend",
|
||||||
|
{ pageSize: 8 },
|
||||||
|
"GET",
|
||||||
|
false,
|
||||||
|
{},
|
||||||
|
false
|
||||||
|
)
|
||||||
|
.then((resData) => {
|
||||||
|
if (resData.code == 200) {
|
||||||
|
list.value = resData.data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const policyList = ref([]);
|
||||||
|
function getPolicyData() {
|
||||||
|
getPolicyList({ pageNum: 1, pageSize: 8 }).then((res) => {
|
||||||
|
if(res.code == 200){
|
||||||
|
policyList.value = res.rows;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function goPolicyDetail(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/packageRc/pages/policy/policyDetail?id=${item.id}`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.main-list {
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 20rpx 25rpx 28rpx 25rpx;
|
||||||
|
margin: 30rpx 30rpx;
|
||||||
|
box-shadow: 0px 3px 20px 0px rgba(0, 105, 234, 0.1);
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-top {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 36rpx;
|
||||||
|
color: #404040;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-line {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -10rpx;
|
||||||
|
left: 36rpx;
|
||||||
|
width: 70rpx;
|
||||||
|
height: 8rpx;
|
||||||
|
background: linear-gradient(90deg, #ffad58 0%, #ff7a5b 100%);
|
||||||
|
border-radius: 4rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jobListBox {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-top: 28rpx;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 48%;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
|
.falls-card {
|
||||||
|
padding: 30rpx;
|
||||||
|
|
||||||
|
.falls-card-title {
|
||||||
|
font-family: "PingFangSC-Medium", "PingFang SC", "Helvetica Neue",
|
||||||
|
Helvetica, Arial, "Microsoft YaHei", sans-serif;
|
||||||
|
color: #606060;
|
||||||
|
text-align: left;
|
||||||
|
word-break: break-all;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.falls-card-pay {
|
||||||
|
// height: 50rpx;
|
||||||
|
word-break: break-all;
|
||||||
|
color: #002979;
|
||||||
|
text-align: left;
|
||||||
|
display: flex;
|
||||||
|
align-items: end;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.pay-text {
|
||||||
|
font-family: DIN-Medium;
|
||||||
|
color: #4c6efb;
|
||||||
|
padding-right: 10rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #4c6efb;
|
||||||
|
line-height: 45rpx;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flame {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
right: -10rpx;
|
||||||
|
transform: translate(0, -30%);
|
||||||
|
width: 24rpx;
|
||||||
|
height: 31rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.falls-card-education,
|
||||||
|
.falls-card-experience {
|
||||||
|
width: fit-content;
|
||||||
|
height: 30rpx;
|
||||||
|
background: #f4f4f4;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #6c7282;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.falls-card-company,
|
||||||
|
.falls-card-pepleNumber {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 25rpx;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.falls-card-pepleNumber {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-top: 10rpx;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
line-height: 46rpx;
|
||||||
|
|
||||||
|
view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
.point2 {
|
||||||
|
margin: 0rpx 6rpx 0 2rpx;
|
||||||
|
height: 22rpx;
|
||||||
|
width: 22rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.point3 {
|
||||||
|
margin: 0rpx 4rpx 0 0;
|
||||||
|
height: 28rpx;
|
||||||
|
width: 28rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.falls-card-matchingrate {
|
||||||
|
margin-top: 10rpx;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 21rpx;
|
||||||
|
color: #4778ec;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.falls-card-company2 {
|
||||||
|
margin-top: 4rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999999;
|
||||||
|
text-align: left;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.point3 {
|
||||||
|
margin: 4rpx 4rpx 0 0;
|
||||||
|
height: 26rpx;
|
||||||
|
width: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.policy-list {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
color: #333333;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 28rpx 22rpx;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.sign {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 24rpx;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
padding: 4rpx 14rpx;
|
||||||
|
border: 1rpx solid #ec4827;
|
||||||
|
background: rgba(227, 79, 49, 0.09);
|
||||||
|
border-top-right-radius: 24rpx;
|
||||||
|
border-bottom-left-radius: 24rpx;
|
||||||
|
color: #ec4827;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-line {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #a2a2a2;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
|
||||||
|
.salary {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #4c6efb;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #282828;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 46rpx;
|
||||||
|
height: 46rpx;
|
||||||
|
margin-right: 11rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.infos {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
line-height: 42rpx;
|
||||||
|
|
||||||
|
view {
|
||||||
|
padding: 0 16rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
background: #f2f2f2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-line {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #a2a2a2;
|
||||||
|
margin-top: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
30
pages.json
30
pages.json
@@ -138,18 +138,18 @@
|
|||||||
"navigationBarTitleText": "简历示例"
|
"navigationBarTitleText": "简历示例"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/service/salary-info",
|
"path": "pages/service/salary-info",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "薪酬信息"
|
"navigationBarTitleText": "薪酬信息"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/service/guidance",
|
"path": "pages/service/guidance",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "服务指导"
|
"navigationBarTitleText": "服务指导"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subpackages": [
|
"subpackages": [
|
||||||
{
|
{
|
||||||
@@ -387,6 +387,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "跟进"
|
"navigationBarTitleText": "跟进"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "priority/recommend",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "推荐"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "train/wrongAnswer/mistakeNotebook",
|
"path": "train/wrongAnswer/mistakeNotebook",
|
||||||
|
|||||||
@@ -153,9 +153,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function thirdLogin(){
|
async function thirdLogin(needToast){
|
||||||
let form={}
|
let form={}
|
||||||
if (uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
if (uni.getStorageSync('userInfo') && uni.getStorageSync('userInfo').isCompanyUser=='1') {
|
||||||
form={
|
form={
|
||||||
usertype: '1',
|
usertype: '1',
|
||||||
idno: uni.getStorageSync('userInfo').idCard,
|
idno: uni.getStorageSync('userInfo').idCard,
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
contactperson: "",
|
contactperson: "",
|
||||||
contactphone: "",
|
contactphone: "",
|
||||||
}
|
}
|
||||||
}else if (uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
}else if (uni.getStorageSync('userInfo') && uni.getStorageSync('userInfo').isCompanyUser=='0') {
|
||||||
form={
|
form={
|
||||||
usertype: "2",
|
usertype: "2",
|
||||||
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
enterprisecode: uni.getStorageSync('userInfo').idCard,
|
||||||
@@ -176,10 +176,12 @@
|
|||||||
name: ""
|
name: ""
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
if(needToast){
|
||||||
icon: 'none',
|
uni.showToast({
|
||||||
title: '请先登录'
|
icon: 'none',
|
||||||
})
|
title: '请先登录'
|
||||||
|
})
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
var resLogin = await $api.myRequest('/auth/login2/ks',form,'post',10100);
|
||||||
@@ -213,7 +215,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
async function goDetail(jobFairId){
|
async function goDetail(jobFairId){
|
||||||
if(await thirdLogin()){
|
if(await thirdLogin('1')){
|
||||||
if(state.current != 3){
|
if(state.current != 3){
|
||||||
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
|
navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + jobFairId)
|
||||||
}else{
|
}else{
|
||||||
@@ -256,23 +258,28 @@
|
|||||||
state.current = currented;
|
state.current = currented;
|
||||||
}
|
}
|
||||||
|
|
||||||
function seemsg(index) {
|
async function seemsg(index) {
|
||||||
|
|
||||||
state.current = index;
|
state.current = index;
|
||||||
if (index != 3) {
|
if (index != 3) {
|
||||||
getFair("refresh");
|
getFair("refresh");
|
||||||
} else {
|
} else {
|
||||||
if (!isLogin.value) {
|
|
||||||
getHeart();
|
if(await thirdLogin('1')){
|
||||||
return;
|
if (!isLogin.value) {
|
||||||
}
|
getHeart();
|
||||||
// 确保获取到用户信息后再请求“我参与的”列表
|
return;
|
||||||
if (!userInfo.value?.info?.userId) {
|
}
|
||||||
getUser().then(() => {
|
// 确保获取到用户信息后再请求“我参与的”列表
|
||||||
|
if (!userInfo.value?.info?.userId) {
|
||||||
|
getUser().then(() => {
|
||||||
|
getMyFair("refresh");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
getMyFair("refresh");
|
getMyFair("refresh");
|
||||||
});
|
}
|
||||||
} else {
|
|
||||||
getMyFair("refresh");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,15 +297,21 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function getHeart() {
|
async function getHeart() {
|
||||||
|
|
||||||
|
|
||||||
const raw = uni.getStorageSync("Padmin-Token");
|
const raw = uni.getStorageSync("Padmin-Token");
|
||||||
const token = typeof raw === "string" ? raw.trim() : "";
|
const token = typeof raw === "string" ? raw.trim() : "";
|
||||||
|
|
||||||
|
var isLogins = await thirdLogin();
|
||||||
|
|
||||||
const headers = token ? {
|
const headers = token ? {
|
||||||
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
|
Authorization: raw.startsWith("Bearer ") ? raw : `Bearer ${token}`
|
||||||
} : {};
|
} : {};
|
||||||
|
|
||||||
|
|
||||||
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
|
$api.myRequest("/dashboard/auth/heart", {}, "POST", 10100, headers).then((resData) => {
|
||||||
if (resData.code == 200) {
|
if (isLogins) {
|
||||||
isLogin.value = true;
|
isLogin.value = true;
|
||||||
getUser();
|
getUser();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -796,12 +796,14 @@ async function loadData() {
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const pageNull = ref(0);
|
||||||
function scrollBottom() {
|
function scrollBottom() {
|
||||||
|
console.log('scrollBottom------')
|
||||||
if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
|
if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
|
||||||
loadmoreRef.value.change('loading');
|
loadmoreRef.value.change('loading');
|
||||||
}
|
}
|
||||||
if (state.tabIndex === 'all') {
|
if (state.tabIndex === 'all') {
|
||||||
|
pageNull.value++;
|
||||||
getJobRecommend();
|
getJobRecommend();
|
||||||
} else {
|
} else {
|
||||||
getJobList();
|
getJobList();
|
||||||
@@ -983,6 +985,16 @@ function getJobRecommend(type = 'add') {
|
|||||||
...conditionSearch.value,
|
...conditionSearch.value,
|
||||||
isPublish: 1,
|
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: '确认你的兴趣,为您推荐更多合适的岗位' };
|
let comd = { recommend: true, jobCategory: '', tip: '确认你的兴趣,为您推荐更多合适的岗位' };
|
||||||
$api.createRequest('/app/job/recommend', params).then((resData) => {
|
$api.createRequest('/app/job/recommend', params).then((resData) => {
|
||||||
const { data, total } = resData;
|
const { data, total } = resData;
|
||||||
@@ -1014,6 +1026,11 @@ function getJobRecommend(type = 'add') {
|
|||||||
const reslist = dataToImg(data);
|
const reslist = dataToImg(data);
|
||||||
list.value = reslist;
|
list.value = reslist;
|
||||||
}
|
}
|
||||||
|
if (data.length > 0) {
|
||||||
|
pageNull.value++;
|
||||||
|
} else {
|
||||||
|
$api.msg('没有更多岗位了');
|
||||||
|
}
|
||||||
// 切换状态
|
// 切换状态
|
||||||
if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
|
if (loadmoreRef.value && typeof loadmoreRef.value.change === 'function') {
|
||||||
if (data.length < pageState.pageSize) {
|
if (data.length < pageState.pageSize) {
|
||||||
@@ -1040,8 +1057,8 @@ function getJobList(type = 'add') {
|
|||||||
// waterfallsFlowRef.value.refresh();
|
// waterfallsFlowRef.value.refresh();
|
||||||
if (waterfallsFlowRef.value) waterfallsFlowRef.value.refresh();
|
if (waterfallsFlowRef.value) waterfallsFlowRef.value.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
current: pageState.page,
|
|
||||||
pageSize: pageState.pageSize,
|
pageSize: pageState.pageSize,
|
||||||
...pageState.search,
|
...pageState.search,
|
||||||
// ...conditionSearch.value,
|
// ...conditionSearch.value,
|
||||||
@@ -1073,7 +1090,7 @@ const isFourLevelLinkagePurview=ref(false)
|
|||||||
const getIsFourLevelLinkagePurview=()=>{
|
const getIsFourLevelLinkagePurview=()=>{
|
||||||
let userInfo = uni.getStorageSync('userInfo')
|
let userInfo = uni.getStorageSync('userInfo')
|
||||||
if(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){
|
if(res.code == 200){
|
||||||
uni.setStorageSync('fourLevelLinkage-token',res.data.access_token)
|
uni.setStorageSync('fourLevelLinkage-token',res.data.access_token)
|
||||||
let roleIdList= ['103','106','107']
|
let roleIdList= ['103','106','107']
|
||||||
|
|||||||
@@ -1,247 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>社保登录流程测试</title>
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
max-width: 800px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 20px;
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
background: white;
|
|
||||||
padding: 30px;
|
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
color: #333;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.test-case {
|
|
||||||
margin: 20px 0;
|
|
||||||
padding: 15px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 5px;
|
|
||||||
background: #f9f9f9;
|
|
||||||
}
|
|
||||||
.test-case h3 {
|
|
||||||
margin-top: 0;
|
|
||||||
color: #4778EC;
|
|
||||||
}
|
|
||||||
.code {
|
|
||||||
background: #f4f4f4;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-family: monospace;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
.btn {
|
|
||||||
background: #4778EC;
|
|
||||||
color: white;
|
|
||||||
padding: 10px 20px;
|
|
||||||
border: none;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
margin: 10px 5px;
|
|
||||||
}
|
|
||||||
.btn:hover {
|
|
||||||
background: #256BFA;
|
|
||||||
}
|
|
||||||
.result {
|
|
||||||
margin-top: 10px;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 4px;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.success {
|
|
||||||
background: #d4edda;
|
|
||||||
color: #155724;
|
|
||||||
border: 1px solid #c3e6cb;
|
|
||||||
}
|
|
||||||
.error {
|
|
||||||
background: #f8d7da;
|
|
||||||
color: #721c24;
|
|
||||||
border: 1px solid #f5c6cb;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="container">
|
|
||||||
<h1>社保登录流程测试</h1>
|
|
||||||
|
|
||||||
<div class="test-case">
|
|
||||||
<h3>测试用例 1: Base64 解码测试</h3>
|
|
||||||
<p>测试 Base64 解码功能是否正常工作</p>
|
|
||||||
<div class="code">
|
|
||||||
// 测试数据: "142634199305163418" 的 Base64 编码<br>
|
|
||||||
// 原始身份证号: 142634199305163418<br>
|
|
||||||
// Base64 编码: MTQyNjM0MTk5MzA1MTYzNDE4
|
|
||||||
</div>
|
|
||||||
<button class="btn" onclick="testBase64Decode()">测试 Base64 解码</button>
|
|
||||||
<div id="base64Result" class="result"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="test-case">
|
|
||||||
<h3>测试用例 2: URL 参数解析测试</h3>
|
|
||||||
<p>测试从 URL 中获取 idCard 参数的功能</p>
|
|
||||||
<div class="code">
|
|
||||||
// 测试 URL: http://localhost:5173/ks_app/#/pages/login/id-card-login?idCard=MTQyNjM0MTk5MzA1MTYzNDE4<br>
|
|
||||||
// 预期结果: 成功获取到 idCard 参数值
|
|
||||||
</div>
|
|
||||||
<button class="btn" onclick="testUrlParams()">测试 URL 参数解析</button>
|
|
||||||
<div id="urlResult" class="result"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="test-case">
|
|
||||||
<h3>测试用例 3: 完整登录流程测试</h3>
|
|
||||||
<p>模拟完整的社保登录流程</p>
|
|
||||||
<div class="code">
|
|
||||||
1. 从 URL 获取 idCard 参数 (Base64 编码)<br>
|
|
||||||
2. Base64 解码得到明文身份证号<br>
|
|
||||||
3. 调用 /app/idCardLogin 接口<br>
|
|
||||||
4. 处理登录结果
|
|
||||||
</div>
|
|
||||||
<button class="btn" onclick="testFullLoginFlow()">测试完整登录流程</button>
|
|
||||||
<div id="loginResult" class="result"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="test-case">
|
|
||||||
<h3>测试用例 4: 生成测试链接</h3>
|
|
||||||
<p>生成用于测试的社保登录链接</p>
|
|
||||||
<div class="code">
|
|
||||||
身份证号: <input type="text" id="testIdCard" value="142634199305163418" style="width: 200px; padding: 5px;">
|
|
||||||
</div>
|
|
||||||
<button class="btn" onclick="generateTestLink()">生成测试链接</button>
|
|
||||||
<div id="linkResult" class="result"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// Base64 解码函数 (与前端代码保持一致)
|
|
||||||
function decodeBase64(base64Str) {
|
|
||||||
try {
|
|
||||||
return atob(base64Str);
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Base64解码失败:', error);
|
|
||||||
throw new Error('身份证号码解码失败');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 测试 Base64 解码
|
|
||||||
function testBase64Decode() {
|
|
||||||
const base64Str = "MTQyNjM0MTk5MzA1MTYzNDE4";
|
|
||||||
const resultDiv = document.getElementById('base64Result');
|
|
||||||
|
|
||||||
try {
|
|
||||||
const decoded = decodeBase64(base64Str);
|
|
||||||
resultDiv.innerHTML = `<strong>成功!</strong><br>
|
|
||||||
Base64 编码: ${base64Str}<br>
|
|
||||||
解码结果: ${decoded}<br>
|
|
||||||
预期结果: 142634199305163418<br>
|
|
||||||
匹配: ${decoded === "142634199305163418" ? "✓" : "✗"}`;
|
|
||||||
resultDiv.className = 'result success';
|
|
||||||
resultDiv.style.display = 'block';
|
|
||||||
} catch (error) {
|
|
||||||
resultDiv.innerHTML = `<strong>失败!</strong><br>错误信息: ${error.message}`;
|
|
||||||
resultDiv.className = 'result error';
|
|
||||||
resultDiv.style.display = 'block';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 测试 URL 参数解析
|
|
||||||
function testUrlParams() {
|
|
||||||
const testUrl = "http://localhost:5173/ks_app/#/pages/login/id-card-login?idCard=MTQyNjM0MTk5MzA1MTYzNDE4";
|
|
||||||
const resultDiv = document.getElementById('urlResult');
|
|
||||||
|
|
||||||
try {
|
|
||||||
const urlObj = new URL(testUrl);
|
|
||||||
const idCardParam = urlObj.searchParams.get('idCard');
|
|
||||||
|
|
||||||
resultDiv.innerHTML = `<strong>成功!</strong><br>
|
|
||||||
URL: ${testUrl}<br>
|
|
||||||
获取到的 idCard 参数: ${idCardParam}<br>
|
|
||||||
参数存在: ${idCardParam ? "✓" : "✗"}`;
|
|
||||||
resultDiv.className = 'result success';
|
|
||||||
resultDiv.style.display = 'block';
|
|
||||||
} catch (error) {
|
|
||||||
resultDiv.innerHTML = `<strong>失败!</strong><br>错误信息: ${error.message}`;
|
|
||||||
resultDiv.className = 'result error';
|
|
||||||
resultDiv.style.display = 'block';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 测试完整登录流程
|
|
||||||
function testFullLoginFlow() {
|
|
||||||
const resultDiv = document.getElementById('loginResult');
|
|
||||||
resultDiv.innerHTML = '<strong>测试中...</strong>';
|
|
||||||
resultDiv.className = 'result';
|
|
||||||
resultDiv.style.display = 'block';
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
try {
|
|
||||||
// 模拟登录流程
|
|
||||||
const base64IdCard = "MTQyNjM0MTk5MzA1MTYzNDE4";
|
|
||||||
const decodedIdCard = decodeBase64(base64IdCard);
|
|
||||||
|
|
||||||
// 验证身份证格式
|
|
||||||
if (!decodedIdCard || decodedIdCard.length < 15) {
|
|
||||||
throw new Error('身份证号码格式不正确');
|
|
||||||
}
|
|
||||||
|
|
||||||
resultDiv.innerHTML = `<strong>成功!</strong><br>
|
|
||||||
完整登录流程测试通过:<br>
|
|
||||||
1. Base64 参数获取: ✓<br>
|
|
||||||
2. Base64 解码: ✓ (${decodedIdCard})<br>
|
|
||||||
3. 身份证格式验证: ✓<br>
|
|
||||||
4. 接口调用准备: ✓<br>
|
|
||||||
<br>
|
|
||||||
<em>注意: 实际接口调用需要在真实环境中测试</em>`;
|
|
||||||
resultDiv.className = 'result success';
|
|
||||||
} catch (error) {
|
|
||||||
resultDiv.innerHTML = `<strong>失败!</strong><br>错误信息: ${error.message}`;
|
|
||||||
resultDiv.className = 'result error';
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 生成测试链接
|
|
||||||
function generateTestLink() {
|
|
||||||
const idCardInput = document.getElementById('testIdCard');
|
|
||||||
const idCard = idCardInput.value.trim();
|
|
||||||
const resultDiv = document.getElementById('linkResult');
|
|
||||||
|
|
||||||
if (!idCard) {
|
|
||||||
resultDiv.innerHTML = '<strong>错误!</strong><br>请输入身份证号码';
|
|
||||||
resultDiv.className = 'result error';
|
|
||||||
resultDiv.style.display = 'block';
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const base64IdCard = btoa(idCard);
|
|
||||||
const testLink = `http://localhost:5173/ks_app/#/pages/login/id-card-login?idCard=${base64IdCard}`;
|
|
||||||
|
|
||||||
resultDiv.innerHTML = `<strong>测试链接已生成!</strong><br>
|
|
||||||
原始身份证号: ${idCard}<br>
|
|
||||||
Base64 编码: ${base64IdCard}<br>
|
|
||||||
<br>
|
|
||||||
<strong>测试链接:</strong><br>
|
|
||||||
<a href="${testLink}" target="_blank" style="word-break: break-all;">${testLink}</a><br>
|
|
||||||
<br>
|
|
||||||
<em>复制此链接在开发环境中测试社保登录功能</em>`;
|
|
||||||
resultDiv.className = 'result success';
|
|
||||||
resultDiv.style.display = 'block';
|
|
||||||
} catch (error) {
|
|
||||||
resultDiv.innerHTML = `<strong>生成失败!</strong><br>错误信息: ${error.message}`;
|
|
||||||
resultDiv.className = 'result error';
|
|
||||||
resultDiv.style.display = 'block';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -73,7 +73,7 @@ export function request({
|
|||||||
* @param header Object,headers,默认:{}
|
* @param header Object,headers,默认:{}
|
||||||
* @returns promise
|
* @returns promise
|
||||||
**/
|
**/
|
||||||
export function createRequest(url, data = {}, method = 'GET', loading = false, headers = {}) {
|
export function createRequest(url, data = {}, method = 'GET', loading = false, headers = {},needHeader = true) {
|
||||||
if (loading) {
|
if (loading) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '请稍后',
|
title: '请稍后',
|
||||||
@@ -86,7 +86,9 @@ export function createRequest(url, data = {}, method = 'GET', loading = false, h
|
|||||||
}
|
}
|
||||||
|
|
||||||
const header = headers || {};
|
const header = headers || {};
|
||||||
header["Authorization"] = encodeURIComponent(Authorization);
|
if(needHeader){
|
||||||
|
header["Authorization"] = encodeURIComponent(Authorization);
|
||||||
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: config.baseUrl + url,
|
url: config.baseUrl + url,
|
||||||
@@ -215,34 +217,34 @@ export function myRequest(url, data = {}, method = 'GET', port = 9100, headers =
|
|||||||
resolve(resData.data)
|
resolve(resData.data)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 处理业务错误
|
// 处理业务错误
|
||||||
if (resData.data?.code === 401 || resData.data?.code === 402) {
|
if (resData.data?.code === 401 || resData.data?.code === 402) {
|
||||||
const pages = getCurrentPages();
|
const pages = getCurrentPages();
|
||||||
if (pages.length >= 10) {
|
if (pages.length >= 10) {
|
||||||
// 页面栈已满,使用redirectTo替代
|
// 页面栈已满,使用redirectTo替代
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url:'/packageB/login?flag=nw',
|
url:'/packageB/login?flag=nw',
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('页面跳转失败:', err);
|
console.error('页面跳转失败:', err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/packageB/login?flag=nw',
|
url:'/packageB/login?flag=nw',
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('页面跳转失败:', err);
|
console.error('页面跳转失败:', err);
|
||||||
// 失败后尝试redirectTo
|
// 失败后尝试redirectTo
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url:'/packageB/login?flag=nw',
|
url:'/packageB/login?flag=nw',
|
||||||
fail: (err2) => {
|
fail: (err2) => {
|
||||||
console.error('redirectTo也失败:', err2);
|
console.error('redirectTo也失败:', err2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
useUserStore().logOut()
|
useUserStore().logOut()
|
||||||
|
|
||||||
}
|
}
|
||||||
// 显示具体的错误信息
|
// 显示具体的错误信息
|
||||||
const errorMsg = msg || '请求出现异常,请联系工作人员'
|
const errorMsg = msg || '请求出现异常,请联系工作人员'
|
||||||
|
|||||||
Reference in New Issue
Block a user