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 个修改的文件
包含
105 行增加
和
75 行删除
+105
-75
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
+31
-22
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
+7
-4
ImgUploadCom.jsx
one_stop_public/libs/ImgUploadCom.jsx
+3
-1
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
+3
-1
getHeaders.js
zyd_public/utils/getHeaders.js
+33
-34
没有找到文件。
FormInsertDiy/AffairPage/component/FormArray.js
浏览文件 @
ff963524
...
@@ -28,6 +28,7 @@ import baseConfig from '@/config/config';
...
@@ -28,6 +28,7 @@ import baseConfig from '@/config/config';
import
'react-quill/dist/quill.snow.css'
;
import
'react-quill/dist/quill.snow.css'
;
import
ButtonUpload
from
'./ButtonUpload'
;
import
ButtonUpload
from
'./ButtonUpload'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
RadioGroup
=
Radio
.
Group
;
const
RadioGroup
=
Radio
.
Group
;
const
Option
=
Select
.
Option
;
const
Option
=
Select
.
Option
;
...
@@ -489,6 +490,7 @@ export default class FormArray extends Component {
...
@@ -489,6 +490,7 @@ export default class FormArray extends Component {
{...
defaultProps
}
{...
defaultProps
}
headers
=
{{
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
}}
data
=
{{
data
=
{{
token
:
getToken
(),
token
:
getToken
(),
...
...
FormInsertDiy/ImportUtil/ImportUtil.js
浏览文件 @
ff963524
...
@@ -7,6 +7,7 @@ import config from '@/config/config';
...
@@ -7,6 +7,7 @@ import config from '@/config/config';
import
{
connect
}
from
'dva'
;
import
{
connect
}
from
'dva'
;
// import { exportExcel } from 'xlsx-oc';
// import { exportExcel } from 'xlsx-oc';
import
{
getToken
}
from
'@/utils/authority'
;
import
{
getToken
}
from
'@/utils/authority'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
Step
=
Steps
.
Step
;
const
Step
=
Steps
.
Step
;
const
TabPane
=
Tabs
.
TabPane
;
const
TabPane
=
Tabs
.
TabPane
;
...
@@ -204,6 +205,7 @@ export default class ImportUtil extends React.PureComponent {
...
@@ -204,6 +205,7 @@ export default class ImportUtil extends React.PureComponent {
headers
:
{
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
},
data
:
{
data
:
{
token
:
getToken
(),
token
:
getToken
(),
...
...
one_stop_public/2023yunshangguizhou/utils.js
浏览文件 @
ff963524
export
function
isJSON
(
str
)
{
export
function
isJSON
(
str
)
{
if
(
typeof
str
==
'string'
)
{
if
(
typeof
str
==
'string'
)
{
try
{
try
{
JSON
.
parse
(
str
);
JSON
.
parse
(
str
);
if
(
typeof
JSON
.
parse
(
str
)
===
'number'
)
{
if
(
typeof
JSON
.
parse
(
str
)
===
'number'
)
{
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
catch
(
e
)
{
}
catch
(
e
)
{
return
false
;
return
false
;
}
}
}
}
}
}
export
const
getSysCode
=
()
=>
{
return
getYunShangGuiZhouSyStemConfig
().
code
;
};
// 查询系统配置
// 查询系统配置
export
const
getYunShangGuiZhouSyStemConfig
=
()
=>
{
export
const
getYunShangGuiZhouSyStemConfig
=
()
=>
{
const
localStorageData
=
localStorage
.
getItem
(
'antd-pro-systemConfig'
);
const
localStorageData
=
localStorage
.
getItem
(
'antd-pro-systemConfig'
);
if
(
localStorageData
&&
isJSON
(
localStorageData
))
{
if
(
localStorageData
&&
isJSON
(
localStorageData
))
{
let
d
=
JSON
.
parse
(
localStorageData
);
let
d
=
JSON
.
parse
(
localStorageData
);
return
{
return
{
sysCode
:
d
.
code
,
sysCode
:
d
.
code
,
logo
:
''
,
logo
:
''
,
name
:
d
.
name
,
name
:
d
.
name
,
siteId
:
'5'
,
siteId
:
'5'
,
siteUrl
:
''
,
siteUrl
:
''
,
};
};
}
}
else
{
return
{
sysCode
:
undefined
,
name
:
''
,
};
}
};
};
one_stop_public/App/DraftEditor.js
浏览文件 @
ff963524
...
@@ -29,6 +29,7 @@ import {
...
@@ -29,6 +29,7 @@ import {
}
from
'draft-js'
;
}
from
'draft-js'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
queryFileUrl
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
queryFileUrl
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
FormItem
=
Form
.
Item
;
const
FormItem
=
Form
.
Item
;
function
getBlockStyle
(
block
)
{
function
getBlockStyle
(
block
)
{
...
@@ -501,6 +502,7 @@ class AttrForm extends React.Component {
...
@@ -501,6 +502,7 @@ class AttrForm extends React.Component {
action
=
{
config
.
uploadUrl
}
action
=
{
config
.
uploadUrl
}
headers
=
{{
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
}}
data
=
{{
data
=
{{
token
:
getToken
(),
token
:
getToken
(),
...
@@ -594,6 +596,7 @@ class VideoForm extends React.Component {
...
@@ -594,6 +596,7 @@ class VideoForm extends React.Component {
action
=
{
config
.
uploadUrl
}
action
=
{
config
.
uploadUrl
}
headers
=
{{
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
}}
data
=
{{
data
=
{{
token
:
getToken
(),
token
:
getToken
(),
...
@@ -686,6 +689,7 @@ class PicForm extends React.Component {
...
@@ -686,6 +689,7 @@ class PicForm extends React.Component {
onChange
=
{
this
.
onChange
}
onChange
=
{
this
.
onChange
}
headers
=
{{
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
}}
data
=
{{
data
=
{{
token
:
getToken
(),
token
:
getToken
(),
...
...
one_stop_public/App/DraftEditorCom.js
浏览文件 @
ff963524
...
@@ -28,6 +28,7 @@ import {
...
@@ -28,6 +28,7 @@ import {
RichUtils
,
RichUtils
,
}
from
'draft-js'
;
}
from
'draft-js'
;
import
{
queryFileUrl
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
queryFileUrl
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
FormItem
=
Form
.
Item
;
const
FormItem
=
Form
.
Item
;
function
getBlockStyle
(
block
)
{
function
getBlockStyle
(
block
)
{
...
@@ -504,6 +505,7 @@ class AttrForm extends React.Component {
...
@@ -504,6 +505,7 @@ class AttrForm extends React.Component {
action
=
{
config
.
uploadUrl
}
action
=
{
config
.
uploadUrl
}
headers
=
{{
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
}}
data
=
{{
data
=
{{
token
:
getToken
(),
token
:
getToken
(),
...
@@ -598,6 +600,7 @@ class VideoForm extends React.Component {
...
@@ -598,6 +600,7 @@ class VideoForm extends React.Component {
onChangemultiple
=
{
false
}
onChangemultiple
=
{
false
}
headers
=
{{
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
}}
data
=
{{
data
=
{{
token
:
getToken
(),
token
:
getToken
(),
...
@@ -689,6 +692,7 @@ class PicForm extends React.Component {
...
@@ -689,6 +692,7 @@ class PicForm extends React.Component {
onChange
=
{
this
.
onChange
}
onChange
=
{
this
.
onChange
}
headers
=
{{
headers
=
{{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
}}
}}
data
=
{{
data
=
{{
token
:
getToken
(),
token
:
getToken
(),
...
...
one_stop_public/App/ImportUtil.js
浏览文件 @
ff963524
...
@@ -10,6 +10,7 @@ import { getMessage, getModal } from '@/webPublic/one_stop_public/utils/utils';
...
@@ -10,6 +10,7 @@ import { getMessage, getModal } from '@/webPublic/one_stop_public/utils/utils';
import
{
giveFilePostDataInfoForTrue
}
from
'@/webPublic/one_stop_public/Base16'
;
import
{
giveFilePostDataInfoForTrue
}
from
'@/webPublic/one_stop_public/Base16'
;
import
{
getTransformApi
}
from
'@/webPublic/one_stop_public/2022beidianke/localstorageTransform'
;
import
{
getTransformApi
}
from
'@/webPublic/one_stop_public/2022beidianke/localstorageTransform'
;
import
ProgressDiy
from
'./ProgressDiy'
;
import
ProgressDiy
from
'./ProgressDiy'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
Modal
=
getModal
();
const
Modal
=
getModal
();
const
message
=
getMessage
();
const
message
=
getMessage
();
...
@@ -297,6 +298,7 @@ export default class ImportUtil extends React.PureComponent {
...
@@ -297,6 +298,7 @@ export default class ImportUtil extends React.PureComponent {
action
:
config
.
uploadUrl
,
action
:
config
.
uploadUrl
,
headers
:
{
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
},
data
:
{
data
:
{
token
:
getToken
(),
token
:
getToken
(),
...
...
one_stop_public/Table/globalFunction.js
浏览文件 @
ff963524
...
@@ -6,6 +6,7 @@ import { getToken } from '@/webPublic/one_stop_public/utils/token';
...
@@ -6,6 +6,7 @@ import { getToken } from '@/webPublic/one_stop_public/utils/token';
import
{
deepCopy
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
deepCopy
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getTransformApi
}
from
'@/webPublic/one_stop_public/2022beidianke/localstorageTransform'
;
import
{
getTransformApi
}
from
'@/webPublic/one_stop_public/2022beidianke/localstorageTransform'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
apiUrl
=
queryOauthActionPath
();
const
apiUrl
=
queryOauthActionPath
();
const
exportStyles
=
{
const
exportStyles
=
{
...
@@ -376,9 +377,9 @@ export function getColumnsSqlKeyRealize({
...
@@ -376,9 +377,9 @@ export function getColumnsSqlKeyRealize({
* @param {sqlKey,columnsList,columnsMerges,columnsKey,styles,fileName,ext,allValues} param
* @param {sqlKey,columnsList,columnsMerges,columnsKey,styles,fileName,ext,allValues} param
* 自定义表头和sql数据导出(表头合并表格,数据不合并表格)
* 自定义表头和sql数据导出(表头合并表格,数据不合并表格)
* sqlKey : 数据sql编码
* sqlKey : 数据sql编码
* columnsList
* columnsList
* columnsMerges
* columnsMerges
* columnsKey
* columnsKey
* styles : 导出excl样式
* styles : 导出excl样式
* fileName : 导出文件名
* fileName : 导出文件名
* ext : 导出后缀 目前xecl、dbf
* ext : 导出后缀 目前xecl、dbf
...
@@ -587,7 +588,7 @@ export function getCustomDataRealize({
...
@@ -587,7 +588,7 @@ export function getCustomDataRealize({
* ext : 导出后缀 目前xecl、dbf
* ext : 导出后缀 目前xecl、dbf
* url : 接口地址
* url : 接口地址
* eliminateRow : 列需要忽略合并的数据
* eliminateRow : 列需要忽略合并的数据
* eliminateCol : 行需要忽略合并的数据
* eliminateCol : 行需要忽略合并的数据
* mergeMappingRow : *映射mergeKey 纵向合并结果,key必须在mergeKey数组里面,value不可以在mergeKey里。
* mergeMappingRow : *映射mergeKey 纵向合并结果,key必须在mergeKey数组里面,value不可以在mergeKey里。
* mergePrimary : 所有合并都会在当前mergePrimary 的范围下合并
* mergePrimary : 所有合并都会在当前mergePrimary 的范围下合并
*
*
...
@@ -1204,6 +1205,7 @@ export async function downloadFile(url, params, fileName = '导出文件', ext =
...
@@ -1204,6 +1205,7 @@ export async function downloadFile(url, params, fileName = '导出文件', ext =
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
let
headers
=
{
let
headers
=
{
Authorization
:
`bearer
${
localStorage
.
getItem
(
'antd-pro-token-onestop'
)}
`
,
Authorization
:
`bearer
${
localStorage
.
getItem
(
'antd-pro-token-onestop'
)}
`
,
sysCode
:
getSysCode
(),
};
};
// if(headersApi){
// if(headersApi){
// headers.apis = headersApi;
// headers.apis = headersApi;
...
@@ -1247,6 +1249,7 @@ export async function downloadFileAndShowModal(url, params, fileName = '导出
...
@@ -1247,6 +1249,7 @@ export async function downloadFileAndShowModal(url, params, fileName = '导出
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
const
{
transformApi
,
headersApi
}
=
await
getTransformApi
(
url
);
let
headers
=
{
let
headers
=
{
Authorization
:
`bearer
${
localStorage
.
getItem
(
'antd-pro-token-onestop'
)}
`
,
Authorization
:
`bearer
${
localStorage
.
getItem
(
'antd-pro-token-onestop'
)}
`
,
sysCode
:
getSysCode
(),
};
};
// if(headersApi){
// if(headersApi){
// headers.apis = headersApi;
// headers.apis = headersApi;
...
...
one_stop_public/libs/ImgUploadCom.jsx
浏览文件 @
ff963524
...
@@ -4,6 +4,7 @@ import config from '@/webPublic/one_stop_public/config';
...
@@ -4,6 +4,7 @@ import config from '@/webPublic/one_stop_public/config';
import
{
zipImage
}
from
'@/webPublic/zyd_public/utils/handlePhoto'
;
import
{
zipImage
}
from
'@/webPublic/zyd_public/utils/handlePhoto'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
queryFileUrl
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
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
{
export
default
class
ImgUploadCom
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -92,7 +93,8 @@ export default class ImgUploadCom extends React.Component {
...
@@ -92,7 +93,8 @@ export default class ImgUploadCom extends React.Component {
url=
{
url
}
url=
{
url
}
headers=
{
{
headers=
{
{
Authorization
:
`bearer ${getToken()}`
,
Authorization
:
`bearer ${getToken()}`
,
}
}
sysCode
:
getSysCode
(),
}
}
data=
{
{
data=
{
{
token
:
getToken
(),
token
:
getToken
(),
}
}
}
}
...
...
one_stop_public/libs/PictureSignature/ShowItem.js
浏览文件 @
ff963524
...
@@ -3,6 +3,7 @@ import { queryApiActionPath, queryFileUrl } from '@/webPublic/one_stop_public/ut
...
@@ -3,6 +3,7 @@ import { queryApiActionPath, queryFileUrl } from '@/webPublic/one_stop_public/ut
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
isFromIframe
}
from
'@/webPublic/one_stop_public/utils/utils'
;
import
{
isFromIframe
}
from
'@/webPublic/one_stop_public/utils/utils'
;
import
getOneStopUploadUrl
from
'@/webPublic/one_stop_public/Base16/getOneStopUploadUrl'
;
import
getOneStopUploadUrl
from
'@/webPublic/one_stop_public/Base16/getOneStopUploadUrl'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
oneSetItemP
=
{
const
oneSetItemP
=
{
...
@@ -142,6 +143,7 @@ export const uploadFile = (file) => {
...
@@ -142,6 +143,7 @@ export const uploadFile = (file) => {
headers
:
{
headers
:
{
Accept
:
'*/*'
,
Accept
:
'*/*'
,
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
},
body
:
formData
,
body
:
formData
,
})
})
...
...
one_stop_public/libs/UploadCom.js
浏览文件 @
ff963524
...
@@ -7,6 +7,7 @@ import styles from './style.less';
...
@@ -7,6 +7,7 @@ import styles from './style.less';
import
UploadComDiyForQnZy
from
'@/webPublic/one_stop_public/libs/UploadComDiyForQnZy'
;
import
UploadComDiyForQnZy
from
'@/webPublic/one_stop_public/libs/UploadComDiyForQnZy'
;
import
Viewer
from
'react-viewer'
;
import
Viewer
from
'react-viewer'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
message
.
config
({
message
.
config
({
top
:
300
,
top
:
300
,
...
@@ -175,6 +176,7 @@ class UploadCom extends React.Component {
...
@@ -175,6 +176,7 @@ class UploadCom extends React.Component {
accept
:
accept
,
accept
:
accept
,
headers
:
{
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
},
data
:
{
data
:
{
token
:
getToken
(),
token
:
getToken
(),
...
...
one_stop_public/libs/UploadComDiyForQnZy.js
浏览文件 @
ff963524
...
@@ -7,6 +7,7 @@ import { checkIsImage } from "./UploadCom";
...
@@ -7,6 +7,7 @@ import { checkIsImage } from "./UploadCom";
import
Viewer
from
"react-viewer"
;
import
Viewer
from
"react-viewer"
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getHeaders
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getHeaders
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
// 为黔南职院单独写的 上传组件 用于 bug 20576 个人就业信息/求职创业补贴申报,201801010006 119242 上传图片加限制,跟签约派遣上传图片加限制一样
// 为黔南职院单独写的 上传组件 用于 bug 20576 个人就业信息/求职创业补贴申报,201801010006 119242 上传图片加限制,跟签约派遣上传图片加限制一样
...
@@ -109,6 +110,7 @@ export default class UploadComDiyForQnZy extends React.Component {
...
@@ -109,6 +110,7 @@ export default class UploadComDiyForQnZy extends React.Component {
beforeUpload
:
this
.
beforeUpload
,
beforeUpload
:
this
.
beforeUpload
,
headers
:
{
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
},
data
:
{
data
:
{
token
:
getToken
(),
token
:
getToken
(),
...
...
one_stop_public/libs/VideoUploadCom.jsx
浏览文件 @
ff963524
...
@@ -4,6 +4,7 @@ import queryConfig from './queryConfig';
...
@@ -4,6 +4,7 @@ import queryConfig from './queryConfig';
import
{
Upload
,
message
}
from
'antd'
;
import
{
Upload
,
message
}
from
'antd'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/copy'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
getToken
=
()
=>
{
const
getToken
=
()
=>
{
const
x
=
localStorage
.
getItem
(
'uploadVideoServiceToken'
);
const
x
=
localStorage
.
getItem
(
'uploadVideoServiceToken'
);
...
@@ -110,6 +111,7 @@ export default class VideoUploadCom extends React.Component {
...
@@ -110,6 +111,7 @@ export default class VideoUploadCom extends React.Component {
onChange=
{
this
.
changeUrl
}
onChange=
{
this
.
changeUrl
}
headers=
{
{
headers=
{
{
Authorization
:
`bearer ${getToken()}`
,
Authorization
:
`bearer ${getToken()}`
,
sysCode
:
getSysCode
(),
}
}
}
}
multiple=
{
false
}
multiple=
{
false
}
data=
{
{
data=
{
{
...
...
zyd_private/BasicLayout/SplitBasicLayout.js
浏览文件 @
ff963524
...
@@ -4,6 +4,7 @@ import config from "@/config/config";
...
@@ -4,6 +4,7 @@ import config from "@/config/config";
import
{
formatMessage
}
from
"umi/locale"
;
import
{
formatMessage
}
from
"umi/locale"
;
import
{
getSysConfig
}
from
"../utils/basiclayout"
;
import
{
getSysConfig
}
from
"../utils/basiclayout"
;
import
{
isJSON
}
from
"@/webPublic/zyd_public/utils/utils"
;
import
{
isJSON
}
from
"@/webPublic/zyd_public/utils/utils"
;
import
{
getYunShangGuiZhouSyStemConfig
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
const
query
=
{
const
query
=
{
"screen-xs"
:
{
"screen-xs"
:
{
...
@@ -30,19 +31,7 @@ const query = {
...
@@ -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
getSystemConfig
=
()
=>
{
const
urlParams
=
new
URL
(
window
.
location
.
href
);
const
urlParams
=
new
URL
(
window
.
location
.
href
);
...
...
zyd_private/StatisticsInfo/index.js
浏览文件 @
ff963524
...
@@ -15,6 +15,7 @@ import styles from './Ability.css';
...
@@ -15,6 +15,7 @@ import styles from './Ability.css';
import
FormdataWrapper
from
'@/utils/object-to-formdata-custom'
;
import
FormdataWrapper
from
'@/utils/object-to-formdata-custom'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
controlNotification
}
from
'@/baseComponent/utils'
;
import
{
controlNotification
}
from
'@/baseComponent/utils'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
Option
=
Select
.
Option
;
const
Option
=
Select
.
Option
;
const
nameSpan
=
{
const
nameSpan
=
{
...
@@ -424,6 +425,7 @@ export default class StatisticsInfo extends React.Component {
...
@@ -424,6 +425,7 @@ export default class StatisticsInfo extends React.Component {
body
:
FormdataWrapper
(
params
),
body
:
FormdataWrapper
(
params
),
headers
:
{
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
},
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
...
zyd_public/WangEditor/uploadFile.js
浏览文件 @
ff963524
import
request
from
'@/utils/request'
;
import
request
from
'@/utils/request'
;
import
config
,
{
getUploadUrl
}
from
'@/config/config'
;
import
config
,
{
getUploadUrl
}
from
'@/config/config'
;
import
{
getToken
}
from
'@/utils/authority'
;
import
{
getToken
}
from
'@/utils/authority'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
uploadUrl
=
getUploadUrl
();
const
uploadUrl
=
getUploadUrl
();
...
@@ -9,6 +10,7 @@ export default function uploadFile(params) {
...
@@ -9,6 +10,7 @@ export default function uploadFile(params) {
method
:
'POST'
,
method
:
'POST'
,
headers
:
{
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
sysCode
:
getSysCode
(),
},
},
body
:
params
,
body
:
params
,
});
});
...
...
zyd_public/components/ImportUtil2.0/index.js
浏览文件 @
ff963524
...
@@ -7,6 +7,7 @@ import ButtonDiy from '@/baseComponent/ButtonDiy';
...
@@ -7,6 +7,7 @@ import ButtonDiy from '@/baseComponent/ButtonDiy';
import
{
getUploadUrl
}
from
'@/config/config'
;
import
{
getUploadUrl
}
from
'@/config/config'
;
import
{
Row
,
Col
}
from
'antd'
;
import
{
Row
,
Col
}
from
'antd'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getSysCode
}
from
'@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps'
;
const
Step
=
Steps
.
Step
;
const
Step
=
Steps
.
Step
;
...
@@ -378,7 +379,8 @@ export default class ImportUtil extends React.PureComponent {
...
@@ -378,7 +379,8 @@ export default class ImportUtil extends React.PureComponent {
action
:
getUploadUrl
(),
action
:
getUploadUrl
(),
headers
:
{
headers
:
{
Authorization
:
`bearer
${
getToken
()}
`
,
Authorization
:
`bearer
${
getToken
()}
`
,
},
sysCode
:
getSysCode
(),
},
data
:
{
data
:
{
token
:
getToken
(),
token
:
getToken
(),
},
},
...
...
zyd_public/utils/getHeaders.js
浏览文件 @
ff963524
import
{
getCurrentUser
,
getToken
,
getUserInfo
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
{
getToken
}
from
'@/webPublic/one_stop_public/utils/token'
;
import
gg5xxxxx
from
'js-md5'
;
import
{
getSysCode
,
}
from
'@/webPublic/one_stop_public/2023yunshangguizhou/utils'
;
import
{
getIsBei_Dian
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getIsBei_Dian
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getUrlInfo
}
from
'@/webPublic/one_stop_public/DetailForAudit/utils'
;
import
{
getUrlInfo
}
from
'@/webPublic/one_stop_public/DetailForAudit/utils'
;
const
isTest
=
getUrlInfo
().
test
;
export
function
getVisitorToken
()
{
let
token
=
getToken
();
export
function
getVisitorToken
(){
const
visitor_client
=
let
token
=
getToken
()
;
sessionStorage
.
getItem
(
'visitor_client'
)
===
'true'
||
!!
getUrlInfo
().
visitor
;
const
visitor_client
=
sessionStorage
.
getItem
(
'visitor_client'
)
===
'true'
||
!!
getUrlInfo
().
visitor
;
if
(
visitor_client
&&
(
token
===
'null'
||
!
token
))
{
if
(
visitor_client
&&
(
token
===
'null'
||
!
token
)){
// 访客token 欢哥喊加的
// 访客token 欢哥喊加的
token
=
'704d693b-cc68-49a7-8888-4acc73b5ca73'
;
token
=
'704d693b-cc68-49a7-8888-4acc73b5ca73'
;
}
}
return
token
;
return
token
;
}
}
export
function
getHeaders
(
url
=
''
,
headersApi
=
undefined
)
{
let
token
=
getVisitorToken
();
const
res
=
{
headers
:
{
sysCode
:
getSysCode
(),
},
};
if
(
process
.
env
.
NODE_ENV
===
'development'
&&
getIsBei_Dian
())
{
res
.
headers
.
env
=
'test'
;
}
if
(
url
&&
typeof
url
===
'string'
&&
url
.
indexOf
(
'oauthPub=true'
)
>
-
1
)
{
// 公共接口不需要token
return
res
;
}
if
(
!
token
||
token
===
'null'
)
{
return
res
;
}
else
{
res
.
headers
.
Authorization
=
`bearer
${
token
}
`
;
// 这个必须要带上
}
export
function
getHeaders
(
url
=
''
,
headersApi
=
undefined
)
{
return
res
;
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
:
{},
};
if
(
process
.
env
.
NODE_ENV
===
'development'
&&
getIsBei_Dian
()){
res
.
headers
.
env
=
'test'
;
}
if
(
url
&&
typeof
url
===
'string'
&&
url
.
indexOf
(
'oauthPub=true'
)
>
-
1
){
// 公共接口不需要token
return
res
;
}
if
(
!
token
||
token
===
'null'
)
{
return
res
;
}
else
{
res
.
headers
.
Authorization
=
`bearer
${
token
}
`
;
// 这个必须要带上
}
return
res
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论