From bcee37b84bde39072e6e35e642b0911a94f52eef Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期一, 11 十一月 2019 08:59:15 +0800 Subject: [PATCH] 若依 1.1 --- ruoyi-ui/src/utils/ruoyi.js | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 6442ce2..db97dcc 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -3,6 +3,8 @@ * Copyright (c) 2019 ruoyi */ +const baseURL = process.env.VUE_APP_BASE_API + // 日期格式化 export function parseTime(time, pattern) { if (arguments.length === 0) { @@ -73,6 +75,11 @@ return actions.join(''); } +// 通用下载方法 +export function download(fileName) { + window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; +} + // 字符串格式化(%s ) export function sprintf(str) { var args = arguments, flag = true, i = 1; -- Gitblit v1.9.2