修改功能
This commit is contained in:
@@ -1,19 +1,16 @@
|
||||
/*
|
||||
* @Date: 2025-10-31 11:06:15
|
||||
* @LastEditors: lip
|
||||
* @LastEditTime: 2025-11-03 12:51:45
|
||||
* @LastEditors: shirlwang
|
||||
* @LastEditTime: 2025-11-03 14:31:12
|
||||
*/
|
||||
import request from '@/utilsRc/request'
|
||||
|
||||
// 登录方法
|
||||
export function login(data) {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/personnel/personBaseInfo/loginGrAndQy',
|
||||
data,
|
||||
headers: {
|
||||
isToken: false
|
||||
}
|
||||
method: 'get',
|
||||
url: '/not/login/person/zkrLogin',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
export function smsLogin(data) {
|
||||
|
||||
@@ -1000,10 +1000,17 @@ function dataToImg(data) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// import { loginRc } from '@/apiRc/login/login.js';
|
||||
import storeRc from '@/utilsRc/store/index.js';
|
||||
// 跳转到高校毕业页面
|
||||
function goRc(){
|
||||
if (checkLogin()) {
|
||||
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');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -88,6 +88,26 @@ const user = {
|
||||
},
|
||||
|
||||
actions: {
|
||||
// 登录
|
||||
LoginByUserInfo({
|
||||
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)
|
||||
login(userInfo).then(res => {
|
||||
console.log('登录接口返回:', res);
|
||||
setToken(res.data.token)
|
||||
commit('SET_TOKEN', res.data.token)
|
||||
resolve(res)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 登录
|
||||
Login({
|
||||
commit,
|
||||
|
||||
Reference in New Issue
Block a user