网格员账号登录跳转
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Descripttion:
|
||||
* @Author: lip
|
||||
* @Date: 2022-12-28 13:59:09
|
||||
* @LastEditors: lip
|
||||
* @LastEditors: shirlwang
|
||||
*/
|
||||
// 应用全局配置
|
||||
import config from '@/config.js'
|
||||
@@ -10,7 +10,7 @@ import config from '@/config.js'
|
||||
let exports = {
|
||||
// ========== baseUrl 配置方式选择 ==========
|
||||
// 方式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,取消注释此方式)
|
||||
// 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: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(其他用户接口使用) ==========
|
||||
userBaseUrl: 'http://ks.zhaopinzao8dian.com/api/ks', // 用户相关接口使用根目录config.js的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 {
|
||||
login,
|
||||
// logout,
|
||||
loginByUserId,
|
||||
getInfo,
|
||||
register,
|
||||
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({
|
||||
commit,
|
||||
|
||||
Reference in New Issue
Block a user