网格员账号登录跳转
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Date: 2025-10-31 11:06:15
|
* @Date: 2025-10-31 11:06:15
|
||||||
* @LastEditors: shirlwang
|
* @LastEditors: shirlwang
|
||||||
* @LastEditTime: 2025-11-03 15:51:28
|
* @LastEditTime: 2025-12-16 16:29:33
|
||||||
*/
|
*/
|
||||||
import request from '@/utilsRc/request'
|
import request from '@/utilsRc/request'
|
||||||
|
|
||||||
@@ -13,6 +13,14 @@ export function login(data) {
|
|||||||
params: data,
|
params: data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 登录方法
|
||||||
|
export function loginByUserId(data) {
|
||||||
|
return request({
|
||||||
|
method: 'get',
|
||||||
|
url: '/ksSso/getTjmhTokenById?userId='+data,
|
||||||
|
// params: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
export function smsLogin(data) {
|
export function smsLogin(data) {
|
||||||
return request({
|
return request({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
* @Date: 2025-01-XX
|
* @Date: 2025-01-XX
|
||||||
* @LastEditors:
|
* @LastEditors: shirlwang
|
||||||
* @LastEditTime:
|
* @LastEditTime: 2025-12-16 16:35:06
|
||||||
*/
|
*/
|
||||||
import request from '@/utilsRc/request'
|
import request from '@/utilsRc/request'
|
||||||
|
|
||||||
// 获取用户信息(职业规划推荐用)
|
// 获取用户信息(职业规划推荐用)
|
||||||
export function appUserInfo() {
|
export function appUserInfo() {
|
||||||
return request({
|
return request({
|
||||||
fullUrl: 'http://222.80.110.161:11111/api/ks/app/user/appUserInfo',
|
fullUrl: 'http://222.80.110.161:80/api/ks/app/user/appUserInfo',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1099,10 +1099,20 @@ import storeRc from '@/utilsRc/store/index.js';
|
|||||||
function goRc(){
|
function goRc(){
|
||||||
if (checkLogin()) {
|
if (checkLogin()) {
|
||||||
let userInfo = uni.getStorageSync('userInfo')
|
let userInfo = uni.getStorageSync('userInfo')
|
||||||
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
if(userInfo.isCompanyUser == 2){
|
||||||
// console.log(res, "'res");
|
storeRc.dispatch('LoginByID', userInfo.userId).then(res => {
|
||||||
navTo('/packageRc/pages/index/index');
|
storeRc.dispatch('GetInfo').then(res => {
|
||||||
});
|
navTo('/packageRc/pages/daiban/daiban');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}else if(userInfo.isCompanyUser == 1){
|
||||||
|
storeRc.dispatch('LoginByUserInfo', userInfo).then(res => {
|
||||||
|
navTo('/packageRc/pages/index/index');
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
showToast('企业账号无法查看此模块~');
|
||||||
|
}
|
||||||
|
// storeRc.dispatch('LoginByID', userInfo.userId).then(res => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 跳转到素质测评
|
// 跳转到素质测评
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Descripttion:
|
* @Descripttion:
|
||||||
* @Author: lip
|
* @Author: lip
|
||||||
* @Date: 2022-12-28 13:59:09
|
* @Date: 2022-12-28 13:59:09
|
||||||
* @LastEditors: lip
|
* @LastEditors: shirlwang
|
||||||
*/
|
*/
|
||||||
// 应用全局配置
|
// 应用全局配置
|
||||||
import config from '@/config.js'
|
import config from '@/config.js'
|
||||||
@@ -10,7 +10,7 @@ import config from '@/config.js'
|
|||||||
let exports = {
|
let exports = {
|
||||||
// ========== baseUrl 配置方式选择 ==========
|
// ========== baseUrl 配置方式选择 ==========
|
||||||
// 方式1:硬编码baseUrl(main分支使用,合并到main时不会影响现有功能)
|
// 方式1:硬编码baseUrl(main分支使用,合并到main时不会影响现有功能)
|
||||||
baseUrl: 'http://222.80.110.161:11111/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
|
baseUrl: 'http://222.80.110.161:80/sdrc-api', // 正式环境在济南人才上部署(不要轻易连接)
|
||||||
|
|
||||||
// 方式2:引用根目录config.js的baseUrl(CareerMap分支可选方式,如需使用请注释掉方式1,取消注释此方式)
|
// 方式2:引用根目录config.js的baseUrl(CareerMap分支可选方式,如需使用请注释掉方式1,取消注释此方式)
|
||||||
// baseUrl: config.baseUrl, // 引用根目录config.js的baseUrl,避免重复配置
|
// baseUrl: config.baseUrl, // 引用根目录config.js的baseUrl,避免重复配置
|
||||||
@@ -26,13 +26,13 @@ let exports = {
|
|||||||
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 已从根目录config.js引用,不再重复配置
|
// baseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 已从根目录config.js引用,不再重复配置
|
||||||
|
|
||||||
// ========== 职业图谱专用baseUrl ==========
|
// ========== 职业图谱专用baseUrl ==========
|
||||||
zytpBaseUrl: 'http://222.80.110.161:11111/career-map/api/ks_zytp/admin-api/zytp',
|
zytpBaseUrl: 'http://222.80.110.161:80/career-map/api/ks_zytp/admin-api/zytp',
|
||||||
|
|
||||||
// ========== 用户接口专用baseUrl(其他用户接口使用) ==========
|
// ========== 用户接口专用baseUrl(其他用户接口使用) ==========
|
||||||
userBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 用户相关接口使用根目录config.js的baseUrl
|
userBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 用户相关接口使用根目录config.js的baseUrl
|
||||||
|
|
||||||
// ========== appUserInfo接口专用baseUrl ==========
|
// ========== appUserInfo接口专用baseUrl ==========
|
||||||
appUserInfoBaseUrl: 'http://222.80.110.161:11111/api/ks', // appUserInfo接口专用,与其他接口路径不一致
|
appUserInfoBaseUrl: 'http://222.80.110.161:80/api/ks', // appUserInfo接口专用,与其他接口路径不一致
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import constant from '@/utilsRc/constant'
|
|||||||
import {
|
import {
|
||||||
login,
|
login,
|
||||||
// logout,
|
// logout,
|
||||||
|
loginByUserId,
|
||||||
getInfo,
|
getInfo,
|
||||||
register,
|
register,
|
||||||
smsLogin,
|
smsLogin,
|
||||||
@@ -107,6 +108,25 @@ const user = {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 网格员登录
|
||||||
|
LoginByID({
|
||||||
|
commit,
|
||||||
|
// state
|
||||||
|
}, userInfo) {
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
// const info = JSON.parse(JSON.stringify(userInfo))
|
||||||
|
// info.password = '04' + sm2.doEncrypt(info.password, state.publicKey, 0)
|
||||||
|
// info.username = '04' + sm2.doEncrypt(info.username, state.publicKey, 0)
|
||||||
|
loginByUserId(userInfo).then(res => {
|
||||||
|
setToken(res.token)
|
||||||
|
commit('SET_TOKEN', res.token)
|
||||||
|
resolve(res)
|
||||||
|
}).catch(error => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 登录
|
// 登录
|
||||||
Login({
|
Login({
|
||||||
commit,
|
commit,
|
||||||
|
|||||||
Reference in New Issue
Block a user