/** * @file util * @author svon.me@gmail.com */ import type { RouteLocationRaw } from 'vue-router'; import * as user from './user'; export const userToken = function () { return user.token(); }; export const link = function (to: RouteLocationRaw): RouteLocationRaw { // if (to && typeof to === 'object') { // safeSet(to, `query.${sandbox.key()}`, sandbox.value()); // } // if (to && typeof to === 'string') { // const value = `${sandbox.key()}=${sandbox.value()}`; // if (to.includes('?')) { // to += `&${value}`; // } else { // to += `?${value}`; // } // } return to; };