diff --git a/src/api/user.ts b/src/api/user.ts index d2df419..725dc2e 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -5,6 +5,7 @@ enum Api { Login = '/sys/login', Logout = '/sys/logout', GetUserInfo = '/sys/user/getUserInfo', + auth = '/sys/permission/getPermCode', } export const getCodeInfo = (params: any) => get(Api.getInputCode + `/${params}`); @@ -27,6 +28,10 @@ export function getUserInfo() { }); } +export function getAuth() { + return get(Api.auth); +} + export function doLogout() { return get(Api.Logout); -} \ No newline at end of file +} diff --git a/src/views/index.vue b/src/views/index.vue index 257c20b..0bafc78 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -234,18 +234,6 @@ return Promise.all(hospitalPromises); } - // function getHospitalList(hospitalList, userLocation) { - // hospitalList.forEach(async (item) => { - // item.distance = getDistance(userLocation, [item.lon, item.lat]); - // let { time, routeList } = await getDriveTime(userLocation, [item.lon, item.lat]); - // item.driveTime = time; - // item.routeList = routeList; - // item.userLocation = userLocation; - // console.log('time', item.driveTime); - // }); - // return hospitalList; - // } - function getDistance(userLocation, destination) { const value = Map.getDistance(userLocation, destination); return value > 1000 ? (value / 1000).toFixed(2) + 'km' : value + 'm'; diff --git a/src/views/sys/login.vue b/src/views/sys/login.vue index 78bb61f..0c7a8d7 100644 --- a/src/views/sys/login.vue +++ b/src/views/sys/login.vue @@ -91,7 +91,7 @@