同意修改地址
This commit is contained in:
@@ -8,7 +8,7 @@ import request from '@/utilsRc/request'
|
||||
// 获取用户信息(职业规划推荐用)
|
||||
export function appUserInfo() {
|
||||
return request({
|
||||
fullUrl: 'http://222.80.110.161:80/api/ks/app/user/appUserInfo',
|
||||
fullUrl: 'https://www.xjksly.cn/api/ks/app/user/appUserInfo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ const prePage = () => {
|
||||
}
|
||||
|
||||
// export const urls ='http://10.110.145.145/images/train/'
|
||||
export const urls ='http://222.80.110.161:80/images/train/'
|
||||
export const urls ='https://www.xjksly.cn/images/train/'
|
||||
|
||||
/**
|
||||
* 页面跳转封装,支持 query 参数传递和返回回调
|
||||
@@ -61,74 +61,74 @@ export const urls ='http://222.80.110.161:80/images/train/'
|
||||
* @param {object} options.query - 携带参数
|
||||
* @param {function} options.onBack - 页面返回时的回调(目标页调用 uni.navigateBack 时传递数据)
|
||||
*/
|
||||
export const navTo = function(url, {
|
||||
needLogin = false,
|
||||
query = {},
|
||||
onBack = null
|
||||
} = {}) {
|
||||
const userStore = useUserStore();
|
||||
|
||||
if (needLogin && !userStore.hasLogin) {
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length >= 10) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
uni.redirectTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
fail: (err2) => {
|
||||
console.error('redirectTo也失败:', err2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const queryStr = Object.entries(query)
|
||||
.map(([key, val]) => `${key}=${encodeURIComponent(val)}`)
|
||||
.join('&');
|
||||
const finalUrl = queryStr ? `${url}?${queryStr}` : url;
|
||||
|
||||
if (onBack) {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
currentPage.__onBackCallback__ = onBack;
|
||||
}
|
||||
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length >= 10) {
|
||||
// 页面栈已满,使用redirectTo替代
|
||||
uni.redirectTo({
|
||||
url: finalUrl,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: finalUrl,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
// 失败后尝试redirectTo
|
||||
uni.redirectTo({
|
||||
url: finalUrl,
|
||||
fail: (err2) => {
|
||||
console.error('redirectTo也失败:', err2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
export const navTo = function(url, {
|
||||
needLogin = false,
|
||||
query = {},
|
||||
onBack = null
|
||||
} = {}) {
|
||||
const userStore = useUserStore();
|
||||
|
||||
if (needLogin && !userStore.hasLogin) {
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length >= 10) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
uni.redirectTo({
|
||||
url: '/pages/complete-info/complete-info',
|
||||
fail: (err2) => {
|
||||
console.error('redirectTo也失败:', err2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const queryStr = Object.entries(query)
|
||||
.map(([key, val]) => `${key}=${encodeURIComponent(val)}`)
|
||||
.join('&');
|
||||
const finalUrl = queryStr ? `${url}?${queryStr}` : url;
|
||||
|
||||
if (onBack) {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
currentPage.__onBackCallback__ = onBack;
|
||||
}
|
||||
|
||||
const pages = getCurrentPages();
|
||||
if (pages.length >= 10) {
|
||||
// 页面栈已满,使用redirectTo替代
|
||||
uni.redirectTo({
|
||||
url: finalUrl,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: finalUrl,
|
||||
fail: (err) => {
|
||||
console.error('页面跳转失败:', err);
|
||||
// 失败后尝试redirectTo
|
||||
uni.redirectTo({
|
||||
url: finalUrl,
|
||||
fail: (err2) => {
|
||||
console.error('redirectTo也失败:', err2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const navBack = function({
|
||||
|
||||
16
config.js
16
config.js
@@ -1,17 +1,23 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @Author: lip
|
||||
* @Date: 2025-12-04 13:40:08
|
||||
* @LastEditors: lip
|
||||
*/
|
||||
export default {
|
||||
// baseUrl: 'http://39.98.44.136:8080', // 测试
|
||||
baseUrl: 'https://www.xjksly.cn/api/ks', // 测试
|
||||
// baseUrl: 'http://222.80.110.161:80/api/ks', // 测试
|
||||
// baseUrl: 'https://www.xjksly.cn/api/ks', // 测试
|
||||
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 测试
|
||||
|
||||
// LCBaseUrl:'http://10.110.145.145:9100',//内网端口
|
||||
// LCBaseUrlInner:'http://10.110.145.145:10100',//招聘、培训、帮扶
|
||||
// imgBaseUrl:'http://10.110.145.145/images', //图片基础url
|
||||
// trainVideoImgUrl:'http://10.110.145.145:9100/file/file/minio',
|
||||
LCBaseUrl:'http://222.80.110.161:80/prod-api',//内网端口
|
||||
LCBaseUrlInner:'http://222.80.110.161:80/prod-psout-api',//招聘、培训、帮扶
|
||||
imgBaseUrl:'http://222.80.110.161:80/images', //图片基础url
|
||||
trainVideoImgUrl:'http://222.80.110.161:80/prod-api/file/file/minio',
|
||||
LCBaseUrl:'https://www.xjksly.cn/prod-api',//内网端口
|
||||
LCBaseUrlInner:'https://www.xjksly.cn/prod-psout-api',//招聘、培训、帮扶
|
||||
imgBaseUrl:'https://www.xjksly.cn/images', //图片基础url
|
||||
trainVideoImgUrl:'https://www.xjksly.cn/prod-api/file/file/minio',
|
||||
// sseAI+
|
||||
// StreamBaseURl: 'http://39.98.44.136:8000',
|
||||
StreamBaseURl: 'https://qd.zhaopinzao8dian.com/ai',
|
||||
|
||||
@@ -2,9 +2,9 @@ let baseUrl = ""
|
||||
// #ifdef MP-WEIXIN
|
||||
// 编译项目,因为使用插件lime-echart,echart文件过大,需要非压缩代码方式编译,不然会很慢,发布的时候才压缩代码方式编译
|
||||
if (wx.getAccountInfoSync().miniProgram.envVersion === 'develop') {
|
||||
baseUrl = 'http://222.80.110.161:80/career' // 开发环境
|
||||
baseUrl = 'https://www.xjksly.cn/career' // 开发环境
|
||||
} else {
|
||||
baseUrl = 'http://222.80.110.161:80/career' // 生产环境
|
||||
baseUrl = 'https://www.xjksly.cn/career' // 生产环境
|
||||
}
|
||||
// #endif
|
||||
|
||||
|
||||
@@ -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:80/mechine-single-vue/login')
|
||||
window.location.assign('https://www.xjksly.cn/mechine-single-vue/login')
|
||||
// // 跳转到首页
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/index'
|
||||
|
||||
@@ -10,7 +10,7 @@ import config from '@/config.js'
|
||||
let exports = {
|
||||
// ========== baseUrl 配置方式选择 ==========
|
||||
// 方式1:硬编码baseUrl(main分支使用,合并到main时不会影响现有功能)
|
||||
baseUrl: 'http://222.80.110.161:80/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
|
||||
baseUrl: 'https://www.xjksly.cn/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
|
||||
|
||||
// 方式2:引用根目录config.js的baseUrl(CareerMap分支可选方式,如需使用请注释掉方式1,取消注释此方式)
|
||||
// baseUrl: config.baseUrl, // 引用根目录config.js的baseUrl,避免重复配置
|
||||
@@ -26,13 +26,13 @@ let exports = {
|
||||
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 已从根目录config.js引用,不再重复配置
|
||||
|
||||
// ========== 职业图谱专用baseUrl ==========
|
||||
zytpBaseUrl: 'http://222.80.110.161:80/career-map/api/ks_zytp/admin-api/zytp',
|
||||
zytpBaseUrl: 'https://www.xjksly.cn/career-map/api/ks_zytp/admin-api/zytp',
|
||||
|
||||
// ========== 用户接口专用baseUrl(其他用户接口使用) ==========
|
||||
userBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 用户相关接口使用根目录config.js的baseUrl
|
||||
|
||||
// ========== appUserInfo接口专用baseUrl ==========
|
||||
appUserInfoBaseUrl: 'http://222.80.110.161:80/api/ks', // appUserInfo接口专用,与其他接口路径不一致
|
||||
appUserInfoBaseUrl: 'https://www.xjksly.cn/api/ks', // appUserInfo接口专用,与其他接口路径不一致
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user