提交 0b44f6e5 authored 作者: 钟是志's avatar 钟是志

31986 分配宿舍时选择层级有时选择不上,2001010256 123456

上级 6df1790a
...@@ -3,23 +3,18 @@ import { getToken } from '@/webPublic/one_stop_public/utils/token'; ...@@ -3,23 +3,18 @@ import { getToken } from '@/webPublic/one_stop_public/utils/token';
import { getInfo, transformApi } from '@/highOrderComponent/Service'; import { getInfo, transformApi } from '@/highOrderComponent/Service';
import urlTransform from '@/webPublic/zyd_public/request/urlTransform'; import urlTransform from '@/webPublic/zyd_public/request/urlTransform';
export function hrefWithToken(
export function hrefWithToken(url, arg = { url,
arg = {
justOpenUrl: false, justOpenUrl: false,
params: {}, params: {},
fileName: '导出', fileName: '导出',
method: 'GET', method: 'GET',
ext: 'xlsx', ext: 'xlsx',
prexUrl: '' prexUrl: '',
}) { },
const { ) {
justOpenUrl, const { justOpenUrl, params, fileName, method, ext, prexUrl } = arg;
params,
fileName,
method,
ext,
prexUrl
} = arg;
if (!getIsBei_Dian()) { if (!getIsBei_Dian()) {
if (url.indexOf('?') > -1) { if (url.indexOf('?') > -1) {
url = `${url}&token=${getToken()}`; url = `${url}&token=${getToken()}`;
...@@ -27,7 +22,7 @@ export function hrefWithToken(url, arg = { ...@@ -27,7 +22,7 @@ export function hrefWithToken(url, arg = {
url = `${url}?token=${getToken()}`; url = `${url}?token=${getToken()}`;
} }
} }
const hrefUrl = prexUrl?prexUrl:transformApi(url); const hrefUrl = prexUrl ? prexUrl : transformApi(url);
let u = `${hrefUrl}${url}`; let u = `${hrefUrl}${url}`;
u = urlTransform(u); u = urlTransform(u);
if (justOpenUrl) { if (justOpenUrl) {
...@@ -41,8 +36,7 @@ export function hrefWithToken(url, arg = { ...@@ -41,8 +36,7 @@ export function hrefWithToken(url, arg = {
return; return;
} }
getInfo({}, '/InstructorConfigApi/getCurrentDate') getInfo({}, '/InstructorConfigApi/getCurrentDate').then((response) => {
.then((response) => {
if (response) { if (response) {
window.open(`${u}`); // 存在问题 浏览器会自动切换内核到IE 内核导致 文件名称乱码. window.open(`${u}`); // 存在问题 浏览器会自动切换内核到IE 内核导致 文件名称乱码.
return true; return true;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论