merge: 合并 CareerMap 分支到 main(职业图谱功能)
This commit is contained in:
@@ -117,7 +117,6 @@ import { getToken } from "@/utilsRc/auth";
|
||||
name: 'file',
|
||||
formData: {},
|
||||
header: {
|
||||
// 'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJQSlUyVlJCc1E1aXRMMWgxdjNkcVh2eER1c2VVc0hvRiIsInVzZXJJZCI6MX0.z4Z2XqgXyU0GQU-i7Bsa5T-zCKApTxj1YQ73rk7bAVo'
|
||||
'Authorization': 'Bearer ' + getToken(),
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
@@ -338,7 +338,6 @@ export default {
|
||||
name: 'file',
|
||||
formData: {},
|
||||
header: {
|
||||
// 'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJQSlUyVlJCc1E1aXRMMWgxdjNkcVh2eER1c2VVc0hvRiIsInVzZXJJZCI6MX0.z4Z2XqgXyU0GQU-i7Bsa5T-zCKApTxj1YQ73rk7bAVo'
|
||||
'Authorization': 'Bearer ' + getToken(),
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
1153
pages.json
1153
pages.json
File diff suppressed because it is too large
Load Diff
@@ -106,17 +106,17 @@
|
||||
</view>
|
||||
<view class="service-title">题库和考试</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="goCa()">
|
||||
<view class="service-item press-button" @click="handleServiceClick('quality-assessment')">
|
||||
<view class="service-icon service-icon-8">
|
||||
<IconfontIcon name="suzhicepingtiku" :size="48" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="service-title">素质测评</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="goAiAu()">
|
||||
<view class="service-item press-button" @click="handleServiceClick('ai-interview')">
|
||||
<view class="service-icon service-icon-9">
|
||||
<IconfontIcon name="ai" :size="68" color="#FFFFFF" />
|
||||
</view>
|
||||
<view class="service-title">虚拟面试</view>
|
||||
<view class="service-title">AI智能面试</view>
|
||||
</view>
|
||||
<view class="service-item press-button" style="justify-content:normal" @click="goRc()">
|
||||
<view class="service-icon service-icon-9">
|
||||
@@ -124,11 +124,17 @@
|
||||
</view>
|
||||
<view class="service-title" style="overflow:unset">高校毕业生<br/>智慧就业服务</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToPage">
|
||||
<view class="service-item press-button" @click="handleServiceClick('career-planning')">
|
||||
<view class="service-icon service-icon-11">
|
||||
<image class="service-icon-img" src="/static/icon/antOutline.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="service-title">职业规划推荐</view>
|
||||
</view>
|
||||
<view class="service-item press-button" @click="navToTestPage">
|
||||
<view class="service-icon service-icon-10">
|
||||
<uni-icons type="gear-filled" size="32" color="#FFFFFF"></uni-icons>
|
||||
</view>
|
||||
<view class="service-title">帮扶</view>
|
||||
<view class="service-title">测试页面</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -593,6 +599,8 @@ const { columnCount, columnSpace } = useColumnCount(() => {
|
||||
const getCompanyInfo = () => {
|
||||
try {
|
||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||
console.log('缓存中的userInfo:', cachedUserInfo);
|
||||
|
||||
// 重置企业信息
|
||||
companyInfo.name = '';
|
||||
companyInfo.avatar = '';
|
||||
@@ -699,49 +707,15 @@ const handleServiceClick = (serviceType) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 处理直播按钮点击 - 跳转微信视频号
|
||||
// 处理直播按钮点击
|
||||
const handleLiveClick = () => {
|
||||
// #ifdef MP-WEIXIN
|
||||
const feedId = 'sphKH1AEeLfTJJE';
|
||||
|
||||
// 使用微信原生 API 打开视频号直播
|
||||
if (typeof wx !== 'undefined' && wx.openChannelsUserProfile) {
|
||||
wx.openChannelsUserProfile({
|
||||
// feedId: feedId,
|
||||
finderUserName: feedId, // 视频号 finderUserName,如果feedId足够可以留空
|
||||
success: (res) => {
|
||||
console.log('打开视频号成功', res);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('打开视频号失败', err);
|
||||
$api.msg(err.errMsg || '无法打开直播,请稍后重试');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// 如果 API 不存在,尝试使用 uni API
|
||||
uni.openChannelsLive({
|
||||
feedId: feedId,
|
||||
success: (res) => {
|
||||
console.log('打开视频号成功', res);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('打开视频号失败', err);
|
||||
$api.msg('无法打开直播,请检查微信版本或稍后重试');
|
||||
}
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
// 非微信小程序环境提示
|
||||
$api.msg('该功能仅在微信小程序中可用');
|
||||
// #endif
|
||||
$api.msg('该功能正在开发中');
|
||||
};
|
||||
|
||||
const navToPage = () =>{
|
||||
// navTo('/packageB/login?flag=nw');
|
||||
navTo('/packageB/priority/helpFilter');
|
||||
}
|
||||
// 跳转到测试页面
|
||||
const navToTestPage = () => {
|
||||
navTo('/pages/test/homepage-test');
|
||||
};
|
||||
|
||||
async function loadData() {
|
||||
try {
|
||||
@@ -1034,49 +1008,17 @@ function dataToImg(data) {
|
||||
|
||||
// import { loginRc } from '@/apiRc/login/login.js';
|
||||
import storeRc from '@/utilsRc/store/index.js';
|
||||
import { getToken } from '@/utilsRc/auth.js';
|
||||
// 跳转到高校毕业页面
|
||||
function goRc(){
|
||||
if (checkLogin()) {
|
||||
let token = getToken();
|
||||
console.log(token,'t123312')
|
||||
if(!token){
|
||||
console.log(111)
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||
// console.log(res, "'res");
|
||||
storeRc.dispatch('GetInfo').then(res => {
|
||||
if(res.data.user.userType == 'person'){
|
||||
navTo('/packageRc/pages/index/index');
|
||||
}else{
|
||||
navTo('/packageRc/pages/daiban/daiban');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
if(storeRc.state.user.type == 'person'){
|
||||
navTo('/packageRc/pages/index/index');
|
||||
}else{
|
||||
navTo('/packageRc/pages/daiban/daiban');
|
||||
}
|
||||
}
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
console.log(uni.getStorageSync('userInfo'), "uni.getStorageSync('userInfo')");
|
||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||
// console.log(res, "'res");
|
||||
navTo('/packageRc/pages/index/index');
|
||||
});
|
||||
}
|
||||
}
|
||||
// 跳转素质测评页面(在线测评,职业库,职业生涯规划)
|
||||
function goCa(){
|
||||
if (checkLogin()) {
|
||||
const userInfo = uni.getStorageSync('userInfo')
|
||||
navTo(`/packageCa/search/search?userId=${userInfo.userId}&name=${userInfo.name}`);
|
||||
}
|
||||
}
|
||||
// 跳转AI智能面试
|
||||
function goAiAu(){
|
||||
if (checkLogin()) {
|
||||
const userInfo = uni.getStorageSync('userInfo')
|
||||
navTo(`/packageCa/search/AIAudition?userId=${userInfo.userId}&name=${userInfo.name}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({ loadData });
|
||||
@@ -1383,15 +1325,17 @@ defineExpose({ loadData });
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-11
|
||||
background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%)
|
||||
background-color: #72A4FC
|
||||
position: relative
|
||||
&::before
|
||||
content: '📈'
|
||||
position: absolute
|
||||
top: 50%
|
||||
left: 50%
|
||||
transform: translate(-50%, -50%)
|
||||
font-size: 32rpx
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
.service-icon-img
|
||||
width: 42rpx
|
||||
height: 42rpx
|
||||
position: relative
|
||||
z-index: 1
|
||||
filter: brightness(1.8) contrast(1.4)
|
||||
.service-icon-12
|
||||
background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%)
|
||||
position: relative
|
||||
|
||||
@@ -2,12 +2,33 @@
|
||||
* @Descripttion:
|
||||
* @Author: lip
|
||||
* @Date: 2022-12-28 13:59:09
|
||||
* @LastEditors: lip
|
||||
* @LastEditors: shirlwang
|
||||
*/
|
||||
// 应用全局配置
|
||||
import config from '@/config.js'
|
||||
|
||||
let exports = {
|
||||
baseUrl: 'http://222.80.110.161:11111/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
|
||||
// ========== baseUrl 配置方式选择 ==========
|
||||
// 方式1:硬编码baseUrl(main分支使用,合并到main时不会影响现有功能)
|
||||
baseUrl: 'http://222.80.110.161:11111/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
|
||||
|
||||
// 方式2:引用根目录config.js的baseUrl(CareerMap分支可选方式,如需使用请注释掉方式1,取消注释此方式)
|
||||
// baseUrl: config.baseUrl, // 引用根目录config.js的baseUrl,避免重复配置
|
||||
|
||||
// ========== 其他baseUrl配置(备用) ==========
|
||||
// baseUrl: 'http://172.20.0.177:8903', // 正式环境在济南人才上部署(不要轻易连接)
|
||||
// baseUrl: 'http://127.0.0.1:8903', // 本地开发
|
||||
// baseUrl: 'http://172.20.0.104:8903', // xubaiqi 地址
|
||||
// baseUrl: 'http://172.20.1.76:8903', // 演示环境内网
|
||||
// baseUrl: 'http://36.140.162.216:8904/prod-api', // 演示环境外网
|
||||
// baseUrl: 'http://10.160.0.5:8903', // 演示环境外网
|
||||
// baseUrl: 'http://111.34.80.140:8081/prod-api', // 正式环境(不要轻易连接)
|
||||
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 已从根目录config.js引用,不再重复配置
|
||||
|
||||
// ========== 职业图谱专用baseUrl ==========
|
||||
zytpBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks_zytp/admin-api/zytp',
|
||||
|
||||
|
||||
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Descripttion:
|
||||
* @Author: lip
|
||||
* @Date: 2023-05-12 08:44:49
|
||||
* @LastEditors: lip
|
||||
* @LastEditors: shirlwang
|
||||
*/
|
||||
import store from './store/index.js'
|
||||
import configRc from './config.js'
|
||||
@@ -12,30 +12,59 @@ import { toast, showConfirm, tansParams } from '@/utilsRc/common'
|
||||
|
||||
let timeout = 10000
|
||||
const baseUrl = configRc.baseUrl
|
||||
const zytpBaseUrl = configRc.zytpBaseUrl || ''
|
||||
|
||||
const request = config => {
|
||||
// 是否需要设置 token
|
||||
const isToken = (config.headers || {}).isToken === false
|
||||
config.header = config.header || {}
|
||||
if (getToken() && !isToken) {
|
||||
config.header['Authorization'] = 'Bearer ' + getToken()
|
||||
// 从存储中获取微信登录的 token
|
||||
const token = getToken()
|
||||
if (token && !isToken) {
|
||||
config.header['Authorization'] = 'Bearer ' + token
|
||||
}
|
||||
// config.header['Authorization'] = 'Bearer ' + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJGUVl3YmRUalAzQ1BMNGFVc0RxeGJmdjAyT3JMZllDVSIsInVzZXJJZCI6MX0.kSOXY2QJQPbfjE0Yx2R3S8yQciA33OZBS9xJtr7cQ1A'
|
||||
// get请求映射params参数
|
||||
const baseType = config.baseUrlType
|
||||
const requestBaseUrl = baseType === 'zytp' && zytpBaseUrl ? zytpBaseUrl : baseUrl
|
||||
let requestUrl = config.fullUrl ? config.fullUrl : (requestBaseUrl + (config.url || ''))
|
||||
|
||||
if (config.params) {
|
||||
let url = config.url + '?' + tansParams(config.params)
|
||||
let url = tansParams(config.params)
|
||||
url = url.slice(0, -1)
|
||||
config.url = url
|
||||
if (url) {
|
||||
requestUrl += (requestUrl.includes('?') ? '&' : '?') + url
|
||||
}
|
||||
}
|
||||
|
||||
// 如果是 getJobPathById 接口,打印完整 URL(调试用,生产环境可注释)
|
||||
// if (config.url && config.url.includes('getJobPathById')) {
|
||||
// console.log('[请求URL] getJobPathById 完整请求URL:', requestUrl);
|
||||
// console.log('[请求URL] baseUrl:', requestBaseUrl);
|
||||
// console.log('[请求URL] 接口路径:', config.url);
|
||||
// console.log('[请求URL] 请求参数:', config.params);
|
||||
// }
|
||||
|
||||
// 如果是 recommendJob 接口,打印详细信息(调试用,生产环境可注释)
|
||||
// if (config.url && config.url.includes('recommendJob')) {
|
||||
// console.log('[请求URL] recommendJob 完整请求URL:', requestUrl);
|
||||
// console.log('[请求URL] baseUrl:', requestBaseUrl);
|
||||
// console.log('[请求URL] 接口路径:', config.url);
|
||||
// console.log('[请求URL] 请求方法:', config.method);
|
||||
// console.log('[请求URL] 请求参数 (params):', config.params);
|
||||
// console.log('[请求URL] 请求数据 (data):', config.data);
|
||||
// console.log('[请求URL] Content-Type:', config.header?.['content-type']);
|
||||
// }
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
method: config.method || 'get',
|
||||
timeout: config.timeout || timeout,
|
||||
url: baseUrl + config.url,
|
||||
url: requestUrl,
|
||||
// url: 'https://gccrcdh.sd-talent.cn:80/zhq' + config.url,
|
||||
data: config.data,
|
||||
header: config.header,
|
||||
dataType: 'json'
|
||||
dataType: 'json',
|
||||
responseType: config.responseType || 'text'
|
||||
}).then(response => {
|
||||
let res = response.data
|
||||
let error = response.errMsg!='request:ok'
|
||||
@@ -44,10 +73,12 @@ const request = config => {
|
||||
reject('网络出小差,请稍后再试')
|
||||
return
|
||||
}
|
||||
const code = res.code || 200
|
||||
// 处理 code,0 和 200 都表示成功
|
||||
const code = res.code !== undefined && res.code !== null ? res.code : 200
|
||||
// console.log(code, 'const code = res.code || 200') // 调试用,生产环境可注释
|
||||
const msg = errorCode[code] || res.msg || errorCode['default']
|
||||
const isShowModel = getApp().globalData.isShowModel
|
||||
if (code == 200) {
|
||||
if (code === 200 || code === 0) {
|
||||
resolve(res)
|
||||
}else if (code === 401) {
|
||||
if(isShowModel === false) {
|
||||
@@ -80,14 +111,18 @@ const request = config => {
|
||||
else if (code === 500) {
|
||||
toast(msg)
|
||||
reject('500')
|
||||
} else if (code !== 200 && code !== 9999) {
|
||||
} else if (code !== 200 && code !== 0 && code !== 9999) {
|
||||
// 9999是正常的业务状态码,不应该被当作错误处理
|
||||
// 0 和 200 都表示成功
|
||||
toast(msg)
|
||||
reject(code)
|
||||
}
|
||||
resolve(res.data)
|
||||
// 如果 code 是 0 或 200,返回完整响应对象,而不是 res.data
|
||||
// 因为有些接口的 data 在 res.data 中,有些在 res 中
|
||||
resolve(res)
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error, 'error')
|
||||
let message = error.errMsg
|
||||
if (message === 'Network Error') {
|
||||
message = '网络出小差,请稍后再试'
|
||||
|
||||
Reference in New Issue
Block a user