| | |
| | | export const login = (userName, password, deliveredCode) => { |
| | | return axios({ |
| | | method: "post", |
| | | url: 'login/loginByRSA', |
| | | url: "login/loginByRSA", |
| | | params: { |
| | | userName, |
| | | password: encodeURIComponent(formatPassword(password)), |
| | | deliveredCode |
| | | } |
| | | deliveredCode, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | |
| | | return axios({ |
| | | method: "POST", |
| | | url: `/login/loginWithUKey`, |
| | | params: { userName: username, password: encodeURIComponent(formatPassword(password)), UId: 0, uKeyId: uKeyId } |
| | | params: { |
| | | userName: username, |
| | | password: encodeURIComponent(formatPassword(password)), |
| | | UId: 0, |
| | | uKeyId: uKeyId, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | | export const getRandomFromServer = () => { |
| | | return axios({ |
| | | method: 'GET', |
| | | url: '/login/getRandom' |
| | | method: "GET", |
| | | url: "/login/getRandom", |
| | | }); |
| | | }; |
| | | |
| | | export const loginSignVerity = (data) => { |
| | | return axios({ |
| | | method: 'post', |
| | | url: '/login/verify', |
| | | method: "post", |
| | | url: "/login/verify", |
| | | data: data, |
| | | }); |
| | | }; |
| | | |
| | | export const searchName = () => { |
| | | return axios({ |
| | | method: 'GET', |
| | | url: '/pageParam/allList', |
| | | params: { categoryId: 5 } |
| | | method: "GET", |
| | | url: "/pageParam/allList", |
| | | params: { categoryId: 5 }, |
| | | }); |
| | | }; |
| | | |
| | | export const searchVersion = () => { |
| | | return axios({ |
| | | method: 'GET', |
| | | url: '/pageParam/allList', |
| | | params: { categoryId: 6 } |
| | | method: "GET", |
| | | url: "/pageParam/allList", |
| | | params: { categoryId: 6 }, |
| | | }); |
| | | }; |
| | | |
| | | export const getUserLoginInfo = (uid) => { |
| | | return axios({ |
| | | method: 'GET', |
| | | url: '/login/loginNoPass', |
| | | method: "GET", |
| | | url: "/login/loginNoPass", |
| | | params: { |
| | | uId: uid ? uid : 1002, |
| | | }, |
| | |
| | | */ |
| | | export const getMacLicense = (data) => { |
| | | return axios({ |
| | | method: 'GET', |
| | | url: '/license/getSerialNumberLicense', |
| | | data: null |
| | | method: "GET", |
| | | url: "/license/getSerialNumberLicense", |
| | | data: null, |
| | | }); |
| | | }; |
| | | |
| | |
| | | */ |
| | | export const checkLicense = (license) => { |
| | | return axios({ |
| | | method: 'GET', |
| | | url: '/license/checkSerialNumberLicense', |
| | | params: license |
| | | method: "GET", |
| | | url: "/license/checkSerialNumberLicense", |
| | | params: license, |
| | | }); |
| | | }; |
| | | |
| | |
| | | */ |
| | | export const getLicenseResTime = () => { |
| | | return axios({ |
| | | method: 'POST', |
| | | url: '/license/time2DeadLine', |
| | | data: null |
| | | method: "POST", |
| | | url: "/license/time2DeadLine", |
| | | data: null, |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const checkServeLicense = () => { |
| | | // 请求后台查询内容 |
| | | return axios({ |
| | | method: 'GET', |
| | | url: '/license/checkRegistered', |
| | | data: null |
| | | method: "GET", |
| | | url: "/license/checkRegistered", |
| | | data: null, |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const getUKeyByUName = (UName) => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: '/user/searchUNameToUKey', |
| | | url: "/user/searchUNameToUKey", |
| | | params: { |
| | | uKeyId: UName |
| | | } |
| | | uKeyId: UName, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const getUNameByUKey = (UKeyId) => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: '/user/searchUKeyToUName', |
| | | url: "/user/searchUKeyToUName", |
| | | params: { |
| | | uKeyId: UKeyId |
| | | } |
| | | uKeyId: UKeyId, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | |
| | | export const bindUKey = (UName, UKeyId, upubKeyX, upubKeyY) => { |
| | | return axios({ |
| | | method: "POST", |
| | | url: '/user/bindUkey', |
| | | url: "/user/bindUkey", |
| | | data: { |
| | | uname: UName, |
| | | ukeyId: UKeyId, |
| | | upubKeyX, |
| | | upubKeyY |
| | | } |
| | | upubKeyY, |
| | | }, |
| | | }); |
| | | }; |
| | | |
| | |
| | | */ |
| | | export const checkUserPwd = (pwd) => { |
| | | return axios({ |
| | | method: 'post', |
| | | url: '/user/checkUserPasswordOfRSA', |
| | | method: "post", |
| | | url: "/user/checkUserPasswordOfRSA", |
| | | params: { pwd: encodeURIComponent(formatPassword(pwd)) }, |
| | | }); |
| | | }; |
| | |
| | | */ |
| | | export const updateUserPwd = (pwd) => { |
| | | return axios({ |
| | | method: 'post', |
| | | url: '/user/updatePasswordByRSA', |
| | | method: "post", |
| | | url: "/user/updatePasswordByRSA", |
| | | params: { password: encodeURIComponent(formatPassword(pwd)) }, |
| | | }); |
| | | }; |
| | |
| | | export const getLoginVerity = () => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: 'message/getFontDynamicCode' |
| | | url: "message/getFontDynamicCode", |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 获取可以生成mac地址的ukey列表 包含对应的用户 |
| | | * @returns |
| | | * @returns |
| | | */ |
| | | export const getMacUks = () => { |
| | | return axios({ |
| | | method: "GET", |
| | | url: 'macUkey/searMacUkey' |
| | | url: "macUkey/searMacUkey", |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 登出逻辑 |
| | | * @return {AxiosPromise} |
| | | */ |
| | | export const loginOutAPI = () => { |
| | | return axios({ |
| | | method: "POST", |
| | | url: "login/logout", |
| | | }); |
| | | }; |