Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
df33abad
提交
df33abad
authored
4月 26, 2023
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
34246 在学工、素质测评、宿管、离校的所有接口中增加请求头
上级
28cbe86e
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
92 行增加
和
92 行删除
+92
-92
FormArray.js
FormInsertDiy/AffairPage/component/FormArray.js
+5
-5
ImportUtil.js
FormInsertDiy/ImportUtil/ImportUtil.js
+5
-5
utils.js
one_stop_public/2023yunshangguizhou/utils.js
+12
-0
DraftEditor.js
one_stop_public/App/DraftEditor.js
+7
-13
DraftEditorCom.js
one_stop_public/App/DraftEditorCom.js
+7
-13
ImportUtil.js
one_stop_public/App/ImportUtil.js
+5
-5
globalFunction.js
one_stop_public/Table/globalFunction.js
+6
-9
ImgUploadCom.jsx
one_stop_public/libs/ImgUploadCom.jsx
+5
-5
ShowItem.js
one_stop_public/libs/PictureSignature/ShowItem.js
+5
-3
UploadCom.js
one_stop_public/libs/UploadCom.js
+5
-5
UploadComDiyForQnZy.js
one_stop_public/libs/UploadComDiyForQnZy.js
+5
-5
VideoUploadCom.jsx
one_stop_public/libs/VideoUploadCom.jsx
+7
-5
index.js
zyd_private/StatisticsInfo/index.js
+5
-5
uploadFile.js
zyd_public/WangEditor/uploadFile.js
+5
-5
index.js
zyd_public/components/ImportUtil2.0/index.js
+5
-5
getHeaders.js
zyd_public/utils/getHeaders.js
+3
-4
没有找到文件。
FormInsertDiy/AffairPage/component/FormArray.js
浏览文件 @
df33abad
...
...
@@ -28,7 +28,10 @@ import baseConfig from '@/config/config';
import
'react-quill/dist/quill.snow.css'
;
import
ButtonUpload
from
'./ButtonUpload'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
RadioGroup
=
Radio
.
Group
;
const
Option
=
Select
.
Option
;
...
...
@@ -488,10 +491,7 @@ export default class FormArray extends Component {
accept
=
{
info
.
accept
}
multiple
=
{
info
.
multiple
}
{...
defaultProps
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
headers
=
{
getSassApiHeader
()}
data
=
{{
token
:
getToken
(),
}}
...
...
FormInsertDiy/ImportUtil/ImportUtil.js
浏览文件 @
df33abad
...
...
@@ -7,7 +7,10 @@ import config from '@/config/config';
import
{
connect
}
from
'dva'
;
// import { exportExcel } from 'xlsx-oc';
import
{
getToken
}
from
'@/utils/authority'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
Step
=
Steps
.
Step
;
const
TabPane
=
Tabs
.
TabPane
;
...
...
@@ -203,10 +206,7 @@ export default class ImportUtil extends React.PureComponent {
name
:
'file'
,
action
:
config
.
sqlFormsServer
+
'/upload'
,
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
headers
:
getSassApiHeader
(),
data
:
{
token
:
getToken
(),
},
...
...
one_stop_public/2023yunshangguizhou/utils.js
浏览文件 @
df33abad
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/getToken'
;
import
{
getUserInfo
}
from
'@/webPublic/one_stop_public/utils/token'
;
export
function
isJSON
(
str
)
{
if
(
typeof
str
==
'string'
)
{
try
{
...
...
@@ -35,3 +38,12 @@ export const getYunShangGuiZhouSyStemConfig = () => {
};
}
};
export
const
getSassApiHeader
=
()
=>
{
// 解决禅道 34246 在学工、素质测评、宿管、离校的所有接口中增加请求头
return
{
authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
tenant
:
getUserInfo
().
tenantId
||
null
,
};
};
one_stop_public/App/DraftEditor.js
浏览文件 @
df33abad
...
...
@@ -29,7 +29,10 @@ import {
}
from
'draft-js'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
queryFileUrl
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
FormItem
=
Form
.
Item
;
function
getBlockStyle
(
block
)
{
...
...
@@ -500,10 +503,7 @@ class AttrForm extends React.Component {
showUploadList
=
{
false
}
name
=
"file"
action
=
{
config
.
uploadUrl
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
headers
=
{
getSassApiHeader
()}
data
=
{{
token
:
getToken
(),
}}
...
...
@@ -594,10 +594,7 @@ class VideoForm extends React.Component {
showUploadList
=
{
false
}
name
=
"file"
action
=
{
config
.
uploadUrl
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
headers
=
{
getSassApiHeader
()}
data
=
{{
token
:
getToken
(),
}}
...
...
@@ -687,10 +684,7 @@ class PicForm extends React.Component {
name
=
"file"
action
=
{
config
.
uploadUrl
}
onChange
=
{
this
.
onChange
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
headers
=
{
getSassApiHeader
()}
data
=
{{
token
:
getToken
(),
}}
...
...
one_stop_public/App/DraftEditorCom.js
浏览文件 @
df33abad
...
...
@@ -28,7 +28,10 @@ import {
RichUtils
,
}
from
'draft-js'
;
import
{
queryFileUrl
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
FormItem
=
Form
.
Item
;
function
getBlockStyle
(
block
)
{
...
...
@@ -503,10 +506,7 @@ class AttrForm extends React.Component {
showUploadList
=
{
false
}
name
=
"file"
action
=
{
config
.
uploadUrl
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
headers
=
{
getSassApiHeader
()}
data
=
{{
token
:
getToken
(),
}}
...
...
@@ -598,10 +598,7 @@ class VideoForm extends React.Component {
name
=
"file"
action
=
{
config
.
uploadUrl
}
onChangemultiple
=
{
false
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
headers
=
{
getSassApiHeader
()}
data
=
{{
token
:
getToken
(),
}}
...
...
@@ -690,10 +687,7 @@ class PicForm extends React.Component {
name
=
"file"
action
=
{
config
.
uploadUrl
}
onChange
=
{
this
.
onChange
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
headers
=
{
getSassApiHeader
()}
data
=
{{
token
:
getToken
(),
}}
...
...
one_stop_public/App/ImportUtil.js
浏览文件 @
df33abad
...
...
@@ -10,7 +10,10 @@ import { getMessage, getModal } from '@/webPublic/one_stop_public/utils/utils';
import
{
giveFilePostDataInfoForTrue
}
from
'@/webPublic/one_stop_public/Base16'
;
import
{
getTransformApi
}
from
'@/webPublic/one_stop_public/2022beidianke/localstorageTransform'
;
import
ProgressDiy
from
'./ProgressDiy'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
Modal
=
getModal
();
const
message
=
getMessage
();
...
...
@@ -296,10 +299,7 @@ export default class ImportUtil extends React.PureComponent {
const
props
=
{
name
:
'file'
,
action
:
config
.
uploadUrl
,
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
headers
:
getSassApiHeader
(),
data
:
{
token
:
getToken
(),
},
...
...
one_stop_public/Table/globalFunction.js
浏览文件 @
df33abad
...
...
@@ -6,7 +6,10 @@ import { getToken } from '@/webPublic/one_stop_public/utils/token';
import
{
deepCopy
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getTransformApi
}
from
'@/webPublic/one_stop_public/2022beidianke/localstorageTransform'
;
import
moment
from
'moment'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
apiUrl
=
queryOauthActionPath
();
const
exportStyles
=
{
...
...
@@ -1203,10 +1206,7 @@ function FormdataWrapper(obj, fd, pre) {
export
async
function
downloadFile
(
url
,
params
,
fileName
=
'导出文件'
,
ext
=
'xlsx'
)
{
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
let
headers
=
{
Authorization
:
`bearer
${
localStorage
.
getItem
(
'antd-pro-token-onestop'
)}
`
,
sysCode
:
getSysCode
(),
};
let
headers
=
getSassApiHeader
();
// if(headersApi){
// headers.apis = headersApi;
// }
...
...
@@ -1247,10 +1247,7 @@ export async function downloadFile(url, params, fileName = '导出文件', ext =
export
async
function
downloadFileAndShowModal
(
url
,
params
,
fileName
=
'导出文件'
,
ext
=
'xlsx'
)
{
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
let
headers
=
{
Authorization
:
`bearer
${
localStorage
.
getItem
(
'antd-pro-token-onestop'
)}
`
,
sysCode
:
getSysCode
(),
};
let
headers
=
getSassApiHeader
();
// if(headersApi){
// headers.apis = headersApi;
// }
...
...
one_stop_public/libs/ImgUploadCom.jsx
浏览文件 @
df33abad
...
...
@@ -4,7 +4,10 @@ import config from '@/webPublic/one_stop_public/config';
import
{
zipImage
}
from
'@/webPublic/zyd_public/utils/handlePhoto'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
queryFileUrl
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
export
default
class
ImgUploadCom
extends
React
.
Component
{
constructor
(
props
)
{
...
...
@@ -91,10 +94,7 @@ export default class ImgUploadCom extends React.Component {
disabled=
{
disabled
}
accept=
{
otherProps
.
accept
||
'image/*'
}
url=
{
url
}
headers=
{
{
Authorization
:
`bearer ${getToken()}`
,
sysCode
:
getSysCode
(),
}
}
headers=
{
getSassApiHeader
()
}
data=
{
{
token
:
getToken
(),
}
}
...
...
one_stop_public/libs/PictureSignature/ShowItem.js
浏览文件 @
df33abad
...
...
@@ -3,7 +3,10 @@ import { queryApiActionPath, queryFileUrl } from '@/webPublic/one_stop_public/ut
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
isFromIframe
}
from
'@/webPublic/one_stop_public/utils/utils'
;
import
getOneStopUploadUrl
from
'@/webPublic/one_stop_public/Base16/getOneStopUploadUrl'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
oneSetItemP
=
{
...
...
@@ -142,8 +145,7 @@ export const uploadFile = (file) => {
method
:
'POST'
,
headers
:
{
Accept
:
'*/*'
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
...
getSassApiHeader
(),
},
body
:
formData
,
})
...
...
one_stop_public/libs/UploadCom.js
浏览文件 @
df33abad
...
...
@@ -7,7 +7,10 @@ import styles from './style.less';
import
UploadComDiyForQnZy
from
'@/webPublic/one_stop_public/libs/UploadComDiyForQnZy'
;
import
Viewer
from
'react-viewer'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
message
.
config
({
top
:
300
,
...
...
@@ -174,10 +177,7 @@ class UploadCom extends React.Component {
name
:
'file'
,
multiple
:
isMultiple
,
accept
:
accept
,
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
headers
:
getSassApiHeader
(),
data
:
{
token
:
getToken
(),
},
...
...
one_stop_public/libs/UploadComDiyForQnZy.js
浏览文件 @
df33abad
...
...
@@ -7,7 +7,10 @@ import { checkIsImage } from "./UploadCom";
import
Viewer
from
"react-viewer"
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getHeaders
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
// 为黔南职院单独写的 上传组件 用于 bug 20576 个人就业信息/求职创业补贴申报,201801010006 119242 上传图片加限制,跟签约派遣上传图片加限制一样
...
...
@@ -108,10 +111,7 @@ export default class UploadComDiyForQnZy extends React.Component {
showUploadList
:
false
,
onChange
:
this
.
changeUrl
,
beforeUpload
:
this
.
beforeUpload
,
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
headers
:
getSassApiHeader
(),
data
:
{
token
:
getToken
(),
},
...
...
one_stop_public/libs/VideoUploadCom.jsx
浏览文件 @
df33abad
...
...
@@ -4,7 +4,10 @@ import queryConfig from './queryConfig';
import
{
Upload
,
message
}
from
'antd'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
getToken
=
()
=>
{
const
x
=
localStorage
.
getItem
(
'uploadVideoServiceToken'
);
...
...
@@ -109,10 +112,9 @@ export default class VideoUploadCom extends React.Component {
name=
"file"
action=
{
configService
+
'/uploadFileApi/upload'
}
onChange=
{
this
.
changeUrl
}
headers=
{
{
Authorization
:
`bearer ${getToken()}`
,
sysCode
:
getSysCode
(),
}
}
headers=
{
getSassApiHeader
()
}
multiple=
{
false
}
data=
{
{
isConvert
:
true
,
...
...
zyd_private/StatisticsInfo/index.js
浏览文件 @
df33abad
...
...
@@ -15,7 +15,10 @@ import styles from './Ability.css';
import
FormdataWrapper
from
'@/utils/object-to-formdata-custom'
;
import
moment
from
'moment'
;
import
{
controlNotification
}
from
'@/baseComponent/utils'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
Option
=
Select
.
Option
;
const
nameSpan
=
{
...
...
@@ -423,10 +426,7 @@ export default class StatisticsInfo extends React.Component {
fetch
(
url
,
{
method
:
'POST'
,
body
:
FormdataWrapper
(
params
),
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
headers
:
getSassApiHeader
(),
})
.
then
((
res
)
=>
{
if
(
res
.
status
!=
'200'
)
{
...
...
zyd_public/WangEditor/uploadFile.js
浏览文件 @
df33abad
import
request
from
'@/utils/request'
;
import
config
,
{
getUploadUrl
}
from
'@/config/config'
;
import
{
getToken
}
from
'@/utils/authority'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
uploadUrl
=
getUploadUrl
();
export
default
function
uploadFile
(
params
)
{
return
request
(
uploadUrl
,
{
method
:
'POST'
,
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
headers
:
getSassApiHeader
(),
body
:
params
,
});
}
zyd_public/components/ImportUtil2.0/index.js
浏览文件 @
df33abad
...
...
@@ -7,7 +7,10 @@ import ButtonDiy from '@/baseComponent/ButtonDiy';
import
{
getUploadUrl
}
from
'@/config/config'
;
import
{
Row
,
Col
}
from
'antd'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getSassApiHeader
,
getSysCode
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
Step
=
Steps
.
Step
;
...
...
@@ -377,10 +380,7 @@ export default class ImportUtil extends React.PureComponent {
const
props
=
{
name
:
'file'
,
action
:
getUploadUrl
(),
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
headers
:
getSassApiHeader
(),
data
:
{
token
:
getToken
(),
},
...
...
zyd_public/utils/getHeaders.js
浏览文件 @
df33abad
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
,
getUserInfo
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getSassApiHeader
,
getSysCode
,
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getIsBei_Dian
}
from
'@/webPublic/zyd_public/utils/utils'
;
...
...
@@ -19,9 +20,7 @@ export function getVisitorToken() {
export
function
getHeaders
(
url
=
''
,
headersApi
=
undefined
)
{
let
token
=
getVisitorToken
();
const
res
=
{
headers
:
{
sysCode
:
getSysCode
(),
},
headers
:
getSassApiHeader
(),
};
if
(
process
.
env
.
NODE_ENV
===
'development'
&&
getIsBei_Dian
())
{
res
.
headers
.
env
=
'test'
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论