revert: 还原合并冲突文件
This commit is contained in:
4540
package-lock.json
generated
4540
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
1168
pages.json
1168
pages.json
File diff suppressed because it is too large
Load Diff
@@ -106,17 +106,17 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="service-title">题库和考试</view>
|
<view class="service-title">题库和考试</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="service-item press-button" @click="handleServiceClick('quality-assessment')">
|
<view class="service-item press-button" @click="goCa()">
|
||||||
<view class="service-icon service-icon-8">
|
<view class="service-icon service-icon-8">
|
||||||
<IconfontIcon name="suzhicepingtiku" :size="48" color="#FFFFFF" />
|
<IconfontIcon name="suzhicepingtiku" :size="48" color="#FFFFFF" />
|
||||||
</view>
|
</view>
|
||||||
<view class="service-title">素质测评</view>
|
<view class="service-title">素质测评</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="service-item press-button" @click="handleServiceClick('ai-interview')">
|
<view class="service-item press-button" @click="goAiAu()">
|
||||||
<view class="service-icon service-icon-9">
|
<view class="service-icon service-icon-9">
|
||||||
<IconfontIcon name="ai" :size="68" color="#FFFFFF" />
|
<IconfontIcon name="ai" :size="68" color="#FFFFFF" />
|
||||||
</view>
|
</view>
|
||||||
<view class="service-title">AI智能面试</view>
|
<view class="service-title">虚拟面试</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="service-item press-button" style="justify-content:normal" @click="goRc()">
|
<view class="service-item press-button" style="justify-content:normal" @click="goRc()">
|
||||||
<view class="service-icon service-icon-9">
|
<view class="service-icon service-icon-9">
|
||||||
@@ -124,17 +124,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="service-title" style="overflow:unset">高校毕业生<br/>智慧就业服务</view>
|
<view class="service-title" style="overflow:unset">高校毕业生<br/>智慧就业服务</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="service-item press-button" @click="handleServiceClick('career-planning')">
|
<view class="service-item press-button" @click="navToPage">
|
||||||
<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">
|
<view class="service-icon service-icon-10">
|
||||||
<uni-icons type="gear-filled" size="32" color="#FFFFFF"></uni-icons>
|
<uni-icons type="gear-filled" size="32" color="#FFFFFF"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="service-title">测试页面</view>
|
<view class="service-title">帮扶</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -599,8 +593,6 @@ const { columnCount, columnSpace } = useColumnCount(() => {
|
|||||||
const getCompanyInfo = () => {
|
const getCompanyInfo = () => {
|
||||||
try {
|
try {
|
||||||
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
const cachedUserInfo = uni.getStorageSync('userInfo') || {};
|
||||||
console.log('缓存中的userInfo:', cachedUserInfo);
|
|
||||||
|
|
||||||
// 重置企业信息
|
// 重置企业信息
|
||||||
companyInfo.name = '';
|
companyInfo.name = '';
|
||||||
companyInfo.avatar = '';
|
companyInfo.avatar = '';
|
||||||
@@ -707,15 +699,49 @@ const handleServiceClick = (serviceType) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 处理直播按钮点击
|
// 处理直播按钮点击 - 跳转微信视频号
|
||||||
const handleLiveClick = () => {
|
const handleLiveClick = () => {
|
||||||
$api.msg('该功能正在开发中');
|
// #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
|
||||||
};
|
};
|
||||||
|
|
||||||
// 跳转到测试页面
|
const navToPage = () =>{
|
||||||
const navToTestPage = () => {
|
// navTo('/packageB/login?flag=nw');
|
||||||
navTo('/pages/test/homepage-test');
|
navTo('/packageB/priority/helpFilter');
|
||||||
};
|
}
|
||||||
|
|
||||||
async function loadData() {
|
async function loadData() {
|
||||||
try {
|
try {
|
||||||
@@ -1008,17 +1034,49 @@ function dataToImg(data) {
|
|||||||
|
|
||||||
// import { loginRc } from '@/apiRc/login/login.js';
|
// import { loginRc } from '@/apiRc/login/login.js';
|
||||||
import storeRc from '@/utilsRc/store/index.js';
|
import storeRc from '@/utilsRc/store/index.js';
|
||||||
|
import { getToken } from '@/utilsRc/auth.js';
|
||||||
// 跳转到高校毕业页面
|
// 跳转到高校毕业页面
|
||||||
function goRc(){
|
function goRc(){
|
||||||
if (checkLogin()) {
|
if (checkLogin()) {
|
||||||
let userInfo = uni.getStorageSync('userInfo')
|
let token = getToken();
|
||||||
console.log(uni.getStorageSync('userInfo'), "uni.getStorageSync('userInfo')");
|
console.log(token,'t123312')
|
||||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
if(!token){
|
||||||
// console.log(res, "'res");
|
console.log(111)
|
||||||
navTo('/packageRc/pages/index/index');
|
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');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 跳转素质测评页面(在线测评,职业库,职业生涯规划)
|
||||||
|
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 });
|
defineExpose({ loadData });
|
||||||
@@ -1325,17 +1383,15 @@ defineExpose({ loadData });
|
|||||||
align-items: center
|
align-items: center
|
||||||
justify-content: center
|
justify-content: center
|
||||||
.service-icon-11
|
.service-icon-11
|
||||||
background-color: #72A4FC
|
background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%)
|
||||||
position: relative
|
position: relative
|
||||||
display: flex
|
&::before
|
||||||
align-items: center
|
content: '📈'
|
||||||
justify-content: center
|
position: absolute
|
||||||
.service-icon-img
|
top: 50%
|
||||||
width: 42rpx
|
left: 50%
|
||||||
height: 42rpx
|
transform: translate(-50%, -50%)
|
||||||
position: relative
|
font-size: 32rpx
|
||||||
z-index: 1
|
|
||||||
filter: brightness(1.8) contrast(1.4)
|
|
||||||
.service-icon-12
|
.service-icon-12
|
||||||
background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%)
|
background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%)
|
||||||
position: relative
|
position: relative
|
||||||
|
|||||||
@@ -5,25 +5,9 @@
|
|||||||
* @LastEditors: lip
|
* @LastEditors: lip
|
||||||
*/
|
*/
|
||||||
// 应用全局配置
|
// 应用全局配置
|
||||||
import config from '@/config.js'
|
|
||||||
|
|
||||||
let exports = {
|
let exports = {
|
||||||
// 引用根目录config.js的baseUrl,避免重复配置
|
baseUrl: 'http://222.80.110.161:11111/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
|
||||||
baseUrl: config.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引用,不再重复配置
|
|
||||||
zytpBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks_zytp/admin-api/zytp',
|
|
||||||
|
|
||||||
// 应用信息
|
// 应用信息
|
||||||
appInfo: {
|
appInfo: {
|
||||||
|
|||||||
@@ -12,59 +12,30 @@ import { toast, showConfirm, tansParams } from '@/utilsRc/common'
|
|||||||
|
|
||||||
let timeout = 10000
|
let timeout = 10000
|
||||||
const baseUrl = configRc.baseUrl
|
const baseUrl = configRc.baseUrl
|
||||||
const zytpBaseUrl = configRc.zytpBaseUrl || ''
|
|
||||||
|
|
||||||
const request = config => {
|
const request = config => {
|
||||||
// 是否需要设置 token
|
// 是否需要设置 token
|
||||||
const isToken = (config.headers || {}).isToken === false
|
const isToken = (config.headers || {}).isToken === false
|
||||||
config.header = config.header || {}
|
config.header = config.header || {}
|
||||||
// 从存储中获取微信登录的 token
|
if (getToken() && !isToken) {
|
||||||
const token = getToken()
|
config.header['Authorization'] = 'Bearer ' + getToken()
|
||||||
if (token && !isToken) {
|
|
||||||
config.header['Authorization'] = 'Bearer ' + token
|
|
||||||
}
|
}
|
||||||
|
// config.header['Authorization'] = 'Bearer ' + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiJzeXNfdXNlcjoxIiwicm5TdHIiOiJGUVl3YmRUalAzQ1BMNGFVc0RxeGJmdjAyT3JMZllDVSIsInVzZXJJZCI6MX0.kSOXY2QJQPbfjE0Yx2R3S8yQciA33OZBS9xJtr7cQ1A'
|
||||||
// get请求映射params参数
|
// 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) {
|
if (config.params) {
|
||||||
let url = tansParams(config.params)
|
let url = config.url + '?' + tansParams(config.params)
|
||||||
url = url.slice(0, -1)
|
url = url.slice(0, -1)
|
||||||
if (url) {
|
config.url = 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) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
method: config.method || 'get',
|
method: config.method || 'get',
|
||||||
timeout: config.timeout || timeout,
|
timeout: config.timeout || timeout,
|
||||||
url: requestUrl,
|
url: baseUrl + config.url,
|
||||||
// url: 'https://gccrcdh.sd-talent.cn:80/zhq' + config.url,
|
// url: 'https://gccrcdh.sd-talent.cn:80/zhq' + config.url,
|
||||||
data: config.data,
|
data: config.data,
|
||||||
header: config.header,
|
header: config.header,
|
||||||
dataType: 'json',
|
dataType: 'json'
|
||||||
responseType: config.responseType || 'text'
|
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
let res = response.data
|
let res = response.data
|
||||||
let error = response.errMsg!='request:ok'
|
let error = response.errMsg!='request:ok'
|
||||||
@@ -73,11 +44,10 @@ const request = config => {
|
|||||||
reject('网络出小差,请稍后再试')
|
reject('网络出小差,请稍后再试')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 处理 code,0 和 200 都表示成功
|
const code = res.code || 200
|
||||||
const code = res.code !== undefined && res.code !== null ? res.code : 200
|
|
||||||
const msg = errorCode[code] || res.msg || errorCode['default']
|
const msg = errorCode[code] || res.msg || errorCode['default']
|
||||||
const isShowModel = getApp().globalData.isShowModel
|
const isShowModel = getApp().globalData.isShowModel
|
||||||
if (code === 200 || code === 0) {
|
if (code == 200) {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}else if (code === 401) {
|
}else if (code === 401) {
|
||||||
if(isShowModel === false) {
|
if(isShowModel === false) {
|
||||||
@@ -110,15 +80,12 @@ const request = config => {
|
|||||||
else if (code === 500) {
|
else if (code === 500) {
|
||||||
toast(msg)
|
toast(msg)
|
||||||
reject('500')
|
reject('500')
|
||||||
} else if (code !== 200 && code !== 0 && code !== 9999) {
|
} else if (code !== 200 && code !== 9999) {
|
||||||
// 9999是正常的业务状态码,不应该被当作错误处理
|
// 9999是正常的业务状态码,不应该被当作错误处理
|
||||||
// 0 和 200 都表示成功
|
|
||||||
toast(msg)
|
toast(msg)
|
||||||
reject(code)
|
reject(code)
|
||||||
}
|
}
|
||||||
// 如果 code 是 0 或 200,返回完整响应对象,而不是 res.data
|
resolve(res.data)
|
||||||
// 因为有些接口的 data 在 res.data 中,有些在 res 中
|
|
||||||
resolve(res)
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
let message = error.errMsg
|
let message = error.errMsg
|
||||||
|
|||||||
Reference in New Issue
Block a user