| | |
| | | // BASE_API: '"https://sinanoaq.cn:8100"', |
| | | // BASE_API: '"http://127.0.0.1:8100"', |
| | | // IMG_API: '"http://127.0.0.1:8100/upload/"', |
| | | // BASE_API: '"http://192.168.0.35:8100"', |
| | | BASE_API: '"http://192.168.0.35:8100"', |
| | | // IMG_API: '"http://127.0.0.1:8100/upload/"', |
| | | // IMG_API: '"https://sinanoaq.com:8100/upload/"', |
| | | // BASE_API: '"http://220.171.99.118:4100"', |
| | |
| | | |
| | | // BASE_API: '"http://220.171.99.118:3100"', |
| | | // IMG_API: '"http://220.171.99.118:3100/upload/"', |
| | | |
| | | BASE_API: '"http://222.92.213.22:8100"', |
| | | IMG_API: '"http://222.92.213.22:8100/upload/"', |
| | | // BASE_API: '"http://192.168.0.179:8100"' |
| | | BASE_API: '"http://39.104.85.193:4105"', |
| | | IMG_API: '"http://39.104.85.193:4105/upload/"', |
| | | |
| | | // BASE_API: '"http://220.171.99.118:4101/api"', |
| | | // IMG_API: '"http://220.171.99.118:4101/api/upload/"', |
| | |
| | | "file-saver": "^1.3.8", |
| | | "fuse.js": "3.4.2", |
| | | "jquery": "^3.6.0", |
| | | "js-base64": "^2.6.1", |
| | | "js-cookie": "2.2.0", |
| | | "jsbarcode": "^3.11.4", |
| | | "jsonlint": "1.6.3", |
| | | "jszip": "^3.1.5", |
| | | "mockjs": "1.0.1-beta3", |
| | | "node-sass": "^6.0.1", |
| | | "node-sass": "^7.0.3", |
| | | "normalize.css": "7.0.0", |
| | | "nprogress": "0.2.0", |
| | | "print-js": "^1.6.0", |
| | |
| | | import request from '@/utils/request' |
| | | import { getToken } from '@/utils/auth' |
| | | import { Base64 } from '_js-base64@2.6.1@js-base64' |
| | | |
| | | export function loginByUsername(data) { |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + '/auth/login', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | const base64 = Base64.encode(JSON.stringify(data)) |
| | | return request({ |
| | | headers: { |
| | | 'Authorization': getToken() |
| | | }, |
| | | url: process.env.BASE_API + `/auth/login?encryptStr=${base64}`, |
| | | method: 'post', |
| | | }) |
| | | } |
| | | |
| | | export function logout() { |