Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
ff963524
提交
ff963524
authored
4月 18, 2023
作者:
钟是志
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
张新说的 云上贵州项目 学工的接口headers里面要加 sysCode
上级
9aa5b066
显示空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
60 行增加
和
30 行删除
+60
-30
FormArray.js
FormInsertDiy/AffairPage/component/FormArray.js
+2
-0
ImportUtil.js
FormInsertDiy/ImportUtil/ImportUtil.js
+2
-0
utils.js
one_stop_public/2023yunshangguizhou/utils.js
+9
-0
DraftEditor.js
one_stop_public/App/DraftEditor.js
+4
-0
DraftEditorCom.js
one_stop_public/App/DraftEditorCom.js
+4
-0
ImportUtil.js
one_stop_public/App/ImportUtil.js
+2
-0
globalFunction.js
one_stop_public/Table/globalFunction.js
+3
-0
ImgUploadCom.jsx
one_stop_public/libs/ImgUploadCom.jsx
+2
-0
ShowItem.js
one_stop_public/libs/PictureSignature/ShowItem.js
+2
-0
UploadCom.js
one_stop_public/libs/UploadCom.js
+2
-0
UploadComDiyForQnZy.js
one_stop_public/libs/UploadComDiyForQnZy.js
+2
-0
VideoUploadCom.jsx
one_stop_public/libs/VideoUploadCom.jsx
+2
-0
SplitBasicLayout.js
zyd_private/BasicLayout/SplitBasicLayout.js
+2
-13
index.js
zyd_private/StatisticsInfo/index.js
+2
-0
uploadFile.js
zyd_public/WangEditor/uploadFile.js
+2
-0
index.js
zyd_public/components/ImportUtil2.0/index.js
+2
-0
getHeaders.js
zyd_public/utils/getHeaders.js
+16
-17
没有找到文件。
FormInsertDiy/AffairPage/component/FormArray.js
浏览文件 @
ff963524
...
...
@@ -28,6 +28,7 @@ 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/Table/giveSmartFormGlobalProps'
;
const
RadioGroup
=
Radio
.
Group
;
const
Option
=
Select
.
Option
;
...
...
@@ -489,6 +490,7 @@ export default class FormArray extends Component {
{...
defaultProps
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
data
=
{{
token
:
getToken
(),
...
...
FormInsertDiy/ImportUtil/ImportUtil.js
浏览文件 @
ff963524
...
...
@@ -7,6 +7,7 @@ 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/Table/giveSmartFormGlobalProps'
;
const
Step
=
Steps
.
Step
;
const
TabPane
=
Tabs
.
TabPane
;
...
...
@@ -204,6 +205,7 @@ export default class ImportUtil extends React.PureComponent {
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
data
:
{
token
:
getToken
(),
...
...
one_stop_public/2023yunshangguizhou/utils.js
浏览文件 @
ff963524
...
...
@@ -12,6 +12,10 @@ export function isJSON(str) {
}
}
export
const
getSysCode
=
()
=>
{
return
getYunShangGuiZhouSyStemConfig
().
code
;
};
// 查询系统配置
export
const
getYunShangGuiZhouSyStemConfig
=
()
=>
{
const
localStorageData
=
localStorage
.
getItem
(
'antd-pro-systemConfig'
);
...
...
@@ -24,5 +28,10 @@ export const getYunShangGuiZhouSyStemConfig = () => {
siteId
:
'5'
,
siteUrl
:
''
,
};
}
else
{
return
{
sysCode
:
undefined
,
name
:
''
,
};
}
};
one_stop_public/App/DraftEditor.js
浏览文件 @
ff963524
...
...
@@ -29,6 +29,7 @@ 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/Table/giveSmartFormGlobalProps'
;
const
FormItem
=
Form
.
Item
;
function
getBlockStyle
(
block
)
{
...
...
@@ -501,6 +502,7 @@ class AttrForm extends React.Component {
action
=
{
config
.
uploadUrl
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
data
=
{{
token
:
getToken
(),
...
...
@@ -594,6 +596,7 @@ class VideoForm extends React.Component {
action
=
{
config
.
uploadUrl
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
data
=
{{
token
:
getToken
(),
...
...
@@ -686,6 +689,7 @@ class PicForm extends React.Component {
onChange
=
{
this
.
onChange
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
data
=
{{
token
:
getToken
(),
...
...
one_stop_public/App/DraftEditorCom.js
浏览文件 @
ff963524
...
...
@@ -28,6 +28,7 @@ import {
RichUtils
,
}
from
'draft-js'
;
import
{
queryFileUrl
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
FormItem
=
Form
.
Item
;
function
getBlockStyle
(
block
)
{
...
...
@@ -504,6 +505,7 @@ class AttrForm extends React.Component {
action
=
{
config
.
uploadUrl
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
data
=
{{
token
:
getToken
(),
...
...
@@ -598,6 +600,7 @@ class VideoForm extends React.Component {
onChangemultiple
=
{
false
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
data
=
{{
token
:
getToken
(),
...
...
@@ -689,6 +692,7 @@ class PicForm extends React.Component {
onChange
=
{
this
.
onChange
}
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
data
=
{{
token
:
getToken
(),
...
...
one_stop_public/App/ImportUtil.js
浏览文件 @
ff963524
...
...
@@ -10,6 +10,7 @@ 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/Table/giveSmartFormGlobalProps'
;
const
Modal
=
getModal
();
const
message
=
getMessage
();
...
...
@@ -297,6 +298,7 @@ export default class ImportUtil extends React.PureComponent {
action
:
config
.
uploadUrl
,
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
data
:
{
token
:
getToken
(),
...
...
one_stop_public/Table/globalFunction.js
浏览文件 @
ff963524
...
...
@@ -6,6 +6,7 @@ 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/Table/giveSmartFormGlobalProps'
;
const
apiUrl
=
queryOauthActionPath
();
const
exportStyles
=
{
...
...
@@ -1204,6 +1205,7 @@ export async function downloadFile(url, params, fileName = '导出文件', ext =
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
let
headers
=
{
Authorization
:
`bearer
${
localStorage
.
getItem
(
'antd-pro-token-onestop'
)}
`
,
sysCode
:
getSysCode
(),
};
// if(headersApi){
// headers.apis = headersApi;
...
...
@@ -1247,6 +1249,7 @@ export async function downloadFileAndShowModal(url, params, fileName = '导出
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
let
headers
=
{
Authorization
:
`bearer
${
localStorage
.
getItem
(
'antd-pro-token-onestop'
)}
`
,
sysCode
:
getSysCode
(),
};
// if(headersApi){
// headers.apis = headersApi;
...
...
one_stop_public/libs/ImgUploadCom.jsx
浏览文件 @
ff963524
...
...
@@ -4,6 +4,7 @@ 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/Table/giveSmartFormGlobalProps'
;
export
default
class
ImgUploadCom
extends
React
.
Component
{
constructor
(
props
)
{
...
...
@@ -92,6 +93,7 @@ export default class ImgUploadCom extends React.Component {
url=
{
url
}
headers=
{
{
Authorization
:
`bearer ${getToken()}`
,
sysCode
:
getSysCode
(),
}
}
data=
{
{
token
:
getToken
(),
...
...
one_stop_public/libs/PictureSignature/ShowItem.js
浏览文件 @
ff963524
...
...
@@ -3,6 +3,7 @@ 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/Table/giveSmartFormGlobalProps'
;
const
oneSetItemP
=
{
...
...
@@ -142,6 +143,7 @@ export const uploadFile = (file) => {
headers
:
{
Accept
:
'*/*'
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
body
:
formData
,
})
...
...
one_stop_public/libs/UploadCom.js
浏览文件 @
ff963524
...
...
@@ -7,6 +7,7 @@ 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/Table/giveSmartFormGlobalProps'
;
message
.
config
({
top
:
300
,
...
...
@@ -175,6 +176,7 @@ class UploadCom extends React.Component {
accept
:
accept
,
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
data
:
{
token
:
getToken
(),
...
...
one_stop_public/libs/UploadComDiyForQnZy.js
浏览文件 @
ff963524
...
...
@@ -7,6 +7,7 @@ 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/Table/giveSmartFormGlobalProps'
;
// 为黔南职院单独写的 上传组件 用于 bug 20576 个人就业信息/求职创业补贴申报,201801010006 119242 上传图片加限制,跟签约派遣上传图片加限制一样
...
...
@@ -109,6 +110,7 @@ export default class UploadComDiyForQnZy extends React.Component {
beforeUpload
:
this
.
beforeUpload
,
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
data
:
{
token
:
getToken
(),
...
...
one_stop_public/libs/VideoUploadCom.jsx
浏览文件 @
ff963524
...
...
@@ -4,6 +4,7 @@ import queryConfig from './queryConfig';
import
{
Upload
,
message
}
from
'antd'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
getToken
=
()
=>
{
const
x
=
localStorage
.
getItem
(
'uploadVideoServiceToken'
);
...
...
@@ -110,6 +111,7 @@ export default class VideoUploadCom extends React.Component {
onChange=
{
this
.
changeUrl
}
headers=
{
{
Authorization
:
`bearer ${getToken()}`
,
sysCode
:
getSysCode
(),
}
}
multiple=
{
false
}
data=
{
{
...
...
zyd_private/BasicLayout/SplitBasicLayout.js
浏览文件 @
ff963524
...
...
@@ -4,6 +4,7 @@ import config from "@/config/config";
import
{
formatMessage
}
from
"umi/locale"
;
import
{
getSysConfig
}
from
"../utils/basiclayout"
;
import
{
isJSON
}
from
"@/webPublic/zyd_public/utils/utils"
;
import
{
getYunShangGuiZhouSyStemConfig
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
query
=
{
"screen-xs"
:
{
...
...
@@ -30,19 +31,7 @@ const query = {
}
};
const
getYunShangGuiZhouSyStemConfig
=
()
=>
{
const
localStorageData
=
localStorage
.
getItem
(
'antd-pro-systemConfig'
);
if
(
localStorageData
&&
isJSON
(
localStorageData
)){
let
d
=
JSON
.
parse
(
localStorageData
);
return
{
sysCode
:
d
.
code
,
logo
:
''
,
name
:
d
.
name
,
siteId
:
'5'
,
siteUrl
:
''
,
};
}
};
const
getSystemConfig
=
()
=>
{
const
urlParams
=
new
URL
(
window
.
location
.
href
);
...
...
zyd_private/StatisticsInfo/index.js
浏览文件 @
ff963524
...
...
@@ -15,6 +15,7 @@ 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/Table/giveSmartFormGlobalProps'
;
const
Option
=
Select
.
Option
;
const
nameSpan
=
{
...
...
@@ -424,6 +425,7 @@ export default class StatisticsInfo extends React.Component {
body
:
FormdataWrapper
(
params
),
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
})
.
then
((
res
)
=>
{
...
...
zyd_public/WangEditor/uploadFile.js
浏览文件 @
ff963524
import
request
from
'@/utils/request'
;
import
config
,
{
getUploadUrl
}
from
'@/config/config'
;
import
{
getToken
}
from
'@/utils/authority'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
uploadUrl
=
getUploadUrl
();
...
...
@@ -9,6 +10,7 @@ export default function uploadFile(params) {
method
:
'POST'
,
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
body
:
params
,
});
...
...
zyd_public/components/ImportUtil2.0/index.js
浏览文件 @
ff963524
...
...
@@ -7,6 +7,7 @@ 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/Table/giveSmartFormGlobalProps'
;
const
Step
=
Steps
.
Step
;
...
...
@@ -378,6 +379,7 @@ export default class ImportUtil extends React.PureComponent {
action
:
getUploadUrl
(),
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
data
:
{
token
:
getToken
(),
...
...
zyd_public/utils/getHeaders.js
浏览文件 @
ff963524
import
{
getCurrentUser
,
getToken
,
getUserInfo
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
gg5xxxxx
from
'js-md5'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getSysCode
,
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getIsBei_Dian
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getUrlInfo
}
from
'@/webPublic/one_stop_public/DetailForAudit/utils'
;
const
isTest
=
getUrlInfo
().
test
;
export
function
getVisitorToken
(){
export
function
getVisitorToken
()
{
let
token
=
getToken
();
const
visitor_client
=
sessionStorage
.
getItem
(
'visitor_client'
)
===
'true'
||
!!
getUrlInfo
().
visitor
;
if
(
visitor_client
&&
(
token
===
'null'
||
!
token
)){
// 访客token 欢哥喊加的
const
visitor_client
=
sessionStorage
.
getItem
(
'visitor_client'
)
===
'true'
||
!!
getUrlInfo
().
visitor
;
if
(
visitor_client
&&
(
token
===
'null'
||
!
token
))
{
// 访客token 欢哥喊加的
token
=
'704d693b-cc68-49a7-8888-4acc73b5ca73'
;
}
return
token
;
}
export
function
getHeaders
(
url
=
''
,
headersApi
=
undefined
)
{
export
function
getHeaders
(
url
=
''
,
headersApi
=
undefined
)
{
let
token
=
getVisitorToken
();
// const currentInfo = getCurrentUser() || {};
// const user = getUserInfo() || {};
// const userId = user.id || currentInfo.xgUserId;
// const timestamp = user.differenceBetweenServerAndClientTime ? new Date().getTime() + user.differenceBetweenServerAndClientTime : new Date().getTime();
// const secretString = token + userId + timestamp;
const
res
=
{
headers
:
{},
headers
:
{
sysCode
:
getSysCode
(),
},
};
if
(
process
.
env
.
NODE_ENV
===
'development'
&&
getIsBei_Dian
())
{
if
(
process
.
env
.
NODE_ENV
===
'development'
&&
getIsBei_Dian
())
{
res
.
headers
.
env
=
'test'
;
}
if
(
url
&&
typeof
url
===
'string'
&&
url
.
indexOf
(
'oauthPub=true'
)
>
-
1
){
// 公共接口不需要token
if
(
url
&&
typeof
url
===
'string'
&&
url
.
indexOf
(
'oauthPub=true'
)
>
-
1
)
{
// 公共接口不需要token
return
res
;
}
if
(
!
token
||
token
===
'null'
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论