Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
WebPublic
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
前端开发小组
WebPublic
Commits
da848831
提交
da848831
authored
7月 14, 2022
作者:
姚鑫国
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://scjoyedu.eicp.net:9121/front-team/webPublic
上级
409c9f9a
6d5eb7a1
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
296 行增加
和
205 行删除
+296
-205
pdfMenu.js
zyd_public/WangEditor/WangEditor5/DiyMenu/pdfMenu.js
+90
-0
ReactComponent.js
zyd_public/WangEditor/WangEditor5/ReactComponent.js
+93
-149
index.esm.js
zyd_public/WangEditor/WangEditor5/index.esm.js
+0
-0
readme.md
zyd_public/WangEditor/WangEditor5/readme.md
+56
-0
proxyChangeUrl.js
zyd_public/request/proxyChangeUrl.js
+1
-1
getHeaders.js
zyd_public/utils/getHeaders.js
+56
-55
没有找到文件。
zyd_public/WangEditor/WangEditor5/DiyMenu/pdfMenu.js
0 → 100644
浏览文件 @
da848831
import
{
uploadFile
}
from
'@/webPublic/one_stop_public/libs/PictureSignature/ShowItem'
;
import
{
queryApiActionPath
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
message
}
from
'antd'
;
import
{
isJSON
}
from
'@/webPublic/one_stop_public/tableCompon/Split_Index/staticInfo'
;
class
MyMenu
{
constructor
()
{
this
.
title
=
'pdf上传'
;
this
.
iconSvg
=
`<svg viewBox='0 0 1024 1024'
xmlns='http://www.w3.org/2000/svg'
width='18'
height='18'
fill='currentColor'
>
<path d='M905 179q-10-10-22-21-36-33-67-62-3-2-5-4-45-41-71-63-16-13-25-19-6-5-11-7-6-3-13-3-10 0-17.5 7.5T666 26v230h230l-26-25v767l26-25H230q-31 0-53.5-22.5T154 896V26l-26 26h461q10 0 17.5-7.5t7.5-18-7.5-18T589 1H102v895q0 53 37.5 90.5T230 1024h692V205H691l26 26V26q0 10-7.5 17.5T692 51q-5 0-9-2l2 2q7 5 22 17 25 22 69 62 3 2 5 4 31 28 67 62 12 10 22 20 6 5 8 8 8 7 18.5 7t18-8 7-18.5T914 187q-4-3-9-8zM102 461H0v435h1024V461H102z m106 250v108h-50V528h111q49 0 77.5 25.5T375 621t-28 66-79 24h-60z m0-41h61q27 0 41-12.5t14-36.5-14-38-40-14h-62v101z m211 149V528h86q39 0 69 17t46.5 49 16.5 72v15q0 41-16.5 72.5t-47 48.5-70.5 17h-84z m51-250v210h33q40 0 61-25t22-72v-16q0-47-20.5-72T505 569h-35z m385 127H738v123h-51V528h185v41H738v86h117v41z' />
</svg>`
;
this
.
tag
=
'button'
;
}
getValue
(
editor
)
{
return
''
;
}
isActive
(
editor
)
{
return
false
;
// or false
}
isDisabled
(
editor
)
{
return
false
;
// or true
}
exec
(
editor
,
value
)
{
console
.
log
(
'exec'
,
editor
);
let
dom
=
document
.
createElement
(
'input'
);
dom
.
accept
=
'.pdf'
;
dom
.
type
=
'file'
;
dom
.
onchange
=
(
v
)
=>
{
console
.
log
(
v
);
if
(
dom
.
files
&&
dom
.
files
.
length
)
{
message
.
info
(
'正在上传文件, 请耐心等待'
);
const
file
=
dom
.
files
[
0
];
console
.
log
(
file
);
const
fileName
=
file
.
name
;
uploadFile
(
file
)
.
then
((
res
)
=>
{
setTimeout
(()
=>
{
if
(
res
&&
typeof
res
===
'string'
&&
res
.
length
>
10
&&
res
.
indexOf
(
'errMsg'
)
<=
-
1
)
{
let
url
=
queryApiActionPath
()
+
res
;
message
.
success
(
'上传文件成功'
);
const
v
=
`<p class='wangEditor-pdfReader'><embed width='100%'
height='768px'
name='plugin'
id='plugin'
src='
${
url
}
'
type='application/pdf'
internalinstanceid='3'
title='
${
fileName
}
'/>
</p>
<p class='wangEditor-aHref'>
<a href='
${
url
}
'
target='_blank'
download='
${
fileName
}
'>
${
fileName
}
</a></p>`
;
editor
.
dangerouslyInsertHtml
(
v
);
//
}
else
{
let
text
=
'上传文件失败'
;
if
(
isJSON
(
res
)){
text
=
text
+
','
+
JSON
.
parse
(
res
).
errMsg
;
}
editor
.
dangerouslyInsertHtml
(
`<a href="123123">123123</a>`
);
//
message
.
error
(
text
);
}
},
2000
);
});
}
};
dom
.
click
();
}
}
const
myMenuConf
=
{
key
:
'myMenu'
,
factory
()
{
return
new
MyMenu
();
},
};
export
default
myMenuConf
;
zyd_public/WangEditor/WangEditor5/ReactComponent.js
浏览文件 @
da848831
/**
/**
*
*
* WangEditor5的使用
* WangEditor5的使用
* 2022年6月21日
* 2022年6月21日
* 官方文档 https://www.wangeditor.com/v5/getting-started.html
* TODO pdfMenu 插入 的时候 无法插入 <embed 标签 需要求助 2022年7月14日
* 将github 的源代码 下载下来 并执行
* npm install
* 再在 git bash 中执行
* npm run build 获取编译后的文件/packages/editor/dist 复制出来放在项目代码中并使用
* 2022年6月25日 解决了上传图片功能
* TODO 无法创建自定义菜单 (Pdf上传功能, 视频上传功能);
* TODO https://github.com/wangeditor-team/wangEditor/issues/4465 使用这里面说的建立自定义菜单
* 2022年7月5日 改为异步加载依赖 保证功能正常;
* */
/**
* * 所有的菜单
// toolbarKeys: [
// 'bold', 'underline',
// 'italic', 'through',
// 'code', 'sub',
// 'sup', 'clearStyle',
// 'color', 'bgColor',
// 'fontSize', 'fontFamily',
// 'indent', 'delIndent',
// 'justifyLeft', 'justifyRight',
// 'justifyCenter', 'justifyJustify',
// 'lineHeight', 'insertImage',
// 'deleteImage', 'editImage',
// 'viewImageLink', 'imageWidth30',
// 'imageWidth50', 'imageWidth100',
// 'divider', 'emotion',
// 'insertLink', 'editLink',
// 'unLink', 'viewLink',
// 'codeBlock', 'blockquote',
// 'headerSelect', 'header1',
// 'header2', 'header3',
// 'header4', 'header5',
// 'todo', 'redo', 'undo',
// 'fullScreen', 'enter',
// 'bulletedList', 'numberedList',
// 'insertTable', 'deleteTable',
// 'insertTableRow', 'deleteTableRow',
// 'insertTableCol', 'deleteTableCol',
// 'tableHeader', 'tableFullWidth',
// 'insertVideo', 'uploadVideo',
// 'editVideoSize', 'uploadImage',
// 'codeSelectLang',
// ],
* */
* */
import
styles
from
'./css/style.less'
;
import
styles
from
'./css/style.less'
;
...
@@ -56,113 +11,102 @@ import compressImage from '@/webPublic/zyd_public/WangEditor/compressImage';
...
@@ -56,113 +11,102 @@ import compressImage from '@/webPublic/zyd_public/WangEditor/compressImage';
import
{
queryApiActionPath
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
queryApiActionPath
}
from
'@/webPublic/one_stop_public/utils/queryConfig'
;
import
{
uploadFile
as
uploadOnestopFile
}
from
'@/webPublic/one_stop_public/libs/PictureSignature/ShowItem'
;
import
{
uploadFile
as
uploadOnestopFile
}
from
'@/webPublic/one_stop_public/libs/PictureSignature/ShowItem'
;
import
loadCss
from
'@/webPublic/zyd_public/WangEditor/WangEditor5/css/cssLoader'
;
import
loadCss
from
'@/webPublic/zyd_public/WangEditor/WangEditor5/css/cssLoader'
;
import
myMenuConf
from
'@/webPublic/zyd_public/WangEditor/WangEditor5/DiyMenu/pdfMenu'
;
let
editor
=
null
;
export
default
function
PrepareShow
(
props
){
export
default
function
PrepareShow
(
props
)
{
const
[
show
,
setShow
]
=
useState
(
false
);
const
[
show
,
setShow
]
=
useState
(
false
);
const
WangEditor5
=
useRef
();
const
WangEditor5
=
useRef
();
useEffect
(()
=>
{
useEffect
(()
=>
{
import
(
'./index.esm'
).
then
((
res
)
=>
{
// 异步加载这个js。 因为js 过大影响性能
import
(
'./index.esm'
).
then
((
res
)
=>
{
loadCss
().
then
((
cssRes
)
=>
{
// 异步加载这个css 文件
// 异步加载这个js。 因为js 过大影响性能
WangEditor5
.
current
=
res
;
loadCss
().
then
((
cssRes
)
=>
{
console
.
log
(
WangEditor5
);
// 异步加载这个 wangEditor5 的css 文件
setShow
(
true
);
console
.
log
(
'123'
);
});
WangEditor5
.
current
=
res
;
});
WangEditor5
.
current
.
Boot
.
registerMenu
(
myMenuConf
);
// setShow(true);
setShow
(
true
);
},
[]);
});
});
if
(
show
){
// setShow(true);
return
<
WangEditorReactComponent
{...
props
}
WangEditor5
=
{
WangEditor5
.
current
}
/>
;
},
[]);
}
else
{
// console.log(show, WangEditor5);
return
null
;
if
(
show
)
{
}
return
<
WangEditorReactComponent
{...
props
}
WangEditor5
=
{
WangEditor5
.
current
}
/>
;
}
else
{
return
null
;
}
}
}
function
WangEditorReactComponent
(
props
)
{
function
WangEditorReactComponent
(
props
)
{
const
{
WangEditor5
}
=
props
;
const
{
WangEditor5
}
=
props
;
const
{
const
{
domKey
=
'cmsContent'
,
height
=
'450px'
,
value
,
onChange
}
=
props
;
domKey
=
'cmsContent'
,
useEffect
(()
=>
{
height
=
'450px'
,
let
htmlDefault
=
''
;
value
,
if
(
value
&&
value
.
indexOf
(
'wangEditorHtml'
)
>
-
1
)
{
onChange
,
htmlDefault
=
value
;
}
=
props
;
}
else
{
useEffect
(()
=>
{
htmlDefault
=
'<div class="wangEditorHtml">'
+
value
+
'</div>'
;
let
htmlDefault
=
''
;
}
if
(
value
&&
value
.
indexOf
(
'wangEditorHtml'
)
>
-
1
)
{
const
editorConfig
=
{
htmlDefault
=
value
;
placeholder
:
'请输入内容'
,
}
else
{
html
:
htmlDefault
,
htmlDefault
=
'<div class="wangEditorHtml">'
+
value
+
'</div>'
;
MENU_CONF
:
{
}
uploadImage
:
{
const
editorConfig
=
{
customUpload
:
(
file
,
insertFn
)
=>
{
placeholder
:
'请输入内容'
,
compressImage
(
file
,
(
fileNew
)
=>
{
html
:
htmlDefault
,
uploadOnestopFile
(
fileNew
).
then
((
y
)
=>
{
MENU_CONF
:
{
// 使用一站式的文件上传接口
uploadImage
:
{
if
(
y
&&
y
.
length
)
{
customUpload
:
(
file
,
insertFn
)
=>
{
insertFn
(
queryApiActionPath
()
+
y
,
file
.
name
);
compressImage
(
file
,
(
fileNew
)
=>
{
}
uploadOnestopFile
(
fileNew
).
then
((
y
)
=>
{
// 使用一站式的文件上传接口
});
if
(
y
&&
y
.
length
)
{
});
insertFn
(
queryApiActionPath
()
+
y
,
file
.
name
);
},
}
},
});
},
});
},
},
},
onChange
:
(
editor
)
=>
{
// console.log('content', editor.children);
onChange
(
editor
.
getHtml
());
console
.
log
(
'html'
,
editor
.
getHtml
());
},
}
;
const
toolbarConfig
=
{
excludeKeys
:
[
'codeBlock'
,
'emotion'
,
'group-video'
,
'undo'
,
'redo'
,
'bulletedList'
,
'numberedList'
,
],
// insertKeys: {
// index: 5, // 插入的位置,基于当前的 toolbarKeys
// keys: ['video-upload'],
// },
};
const
editor
=
WangEditor5
.
createEditor
({
selector
:
'#'
+
domKey
,
config
:
editorConfig
,
mode
:
'default'
,
},
);
const
toolBar
=
WangEditor5
.
createToolbar
({
editor
,
selector
:
'#wangEditorToolBar'
,
config
:
toolbarConfig
,
mode
:
'default'
,
});
// console.log(editor.getAllMenuKeys());
// console.log(toolBar.getConfig().toolbarKeys);
},
[]);
return
<
div
className
=
{
styles
.
wangEditor5
}
style
=
{{
zIndex
:
'149'
,
}}
>
<
div
id
=
{
'wangEditorToolBar'
}
style
=
{{
zIndex
:
'150'
,
}}
>
<
/div
>
onChange
:
(
editor
)
=>
{
<
div
id
=
{
domKey
}
// console.log('content', editor.children);
style
=
{{
zIndex
:
'149'
,
}}
onChange
(
editor
.
getHtml
());
>
// console.log('html', editor.getHtml());
},
};
const
toolbarConfig
=
{
excludeKeys
:
[
'codeBlock'
,
'emotion'
,
'group-video'
,
'undo'
,
'redo'
,
'bulletedList'
,
'numberedList'
,
],
insertKeys
:
{
index
:
0
,
// 插入的位置,基于当前的 toolbarKeys
keys
:
[
'myMenu'
],
},
};
editor
=
WangEditor5
.
createEditor
({
selector
:
'#'
+
domKey
,
config
:
editorConfig
,
mode
:
'default'
,
});
const
toolBar
=
WangEditor5
.
createToolbar
({
editor
,
selector
:
'#wangEditorToolBar'
,
config
:
toolbarConfig
,
mode
:
'default'
,
});
return
()
=>
{
editor
.
destroy
();
// 销毁编辑器
};
},
[]);
<
/div
>
return
(
<
/div>
;
<
div
className
=
{
styles
.
wangEditor5
}
style
=
{{
zIndex
:
'149'
}}
>
<
div
id
=
{
'wangEditorToolBar'
}
style
=
{{
zIndex
:
'150'
}}
/
>
<
div
id
=
{
domKey
}
style
=
{{
zIndex
:
'149'
}}
/
>
<
/div
>
);
}
}
zyd_public/WangEditor/WangEditor5/index.esm.js
浏览文件 @
da848831
This source diff could not be displayed because it is too large. You can
view the blob
instead.
zyd_public/WangEditor/WangEditor5/readme.md
0 → 100644
浏览文件 @
da848831
WangEditor5的使用
-
2022年6月21日
-
官方文档 https://www.wangeditor.com/v5/getting-started.html
-
将github 的源代码 下载下来 并执行
-
npm install
-
再在 git bash 中执行
-
npm run build 获取编译后的文件/packages/editor/dist 复制出来放在项目代码中并使用
-
2022年6月25日 解决了上传图片功能
-
TODO 无法创建自定义菜单 (Pdf上传功能, 视频上传功能);
-
TODO https://github.com/wangeditor-team/wangEditor/issues/4465 使用这里面说的建立自定义菜单
-
2022年7月5日 改为异步加载依赖 保证功能正常;
*
官方文档 https://www.wangeditor.com/v5/getting-started.html
*
将github 的源代码 下载下来 并执行
*
npm install
*
再在 git bash 中执行
*
npm run build 获取编译后的文件/packages/editor/dist 复制出来放在项目代码中并使用
*
2022年6月25日 解决了上传图片功能
*
TODO 无法创建自定义菜单 (Pdf上传功能, 视频上传功能);
*
TODO https://github.com/wangeditor-team/wangEditor/issues/4465 使用这里面说的建立自定义菜单
*
2022年7月5日 改为异步加载依赖 保证功能正常;
*
*
/
```
// toolbarKeys: [
// 'bold', 'underline',
// 'italic', 'through',
// 'code', 'sub',
// 'sup', 'clearStyle',
// 'color', 'bgColor',
// 'fontSize', 'fontFamily',
// 'indent', 'delIndent',
// 'justifyLeft', 'justifyRight',
// 'justifyCenter', 'justifyJustify',
// 'lineHeight', 'insertImage',
// 'deleteImage', 'editImage',
// 'viewImageLink', 'imageWidth30',
// 'imageWidth50', 'imageWidth100',
// 'divider', 'emotion',
// 'insertLink', 'editLink',
// 'unLink', 'viewLink',
// 'codeBlock', 'blockquote',
// 'headerSelect', 'header1',
// 'header2', 'header3',
// 'header4', 'header5',
// 'todo', 'redo', 'undo',
// 'fullScreen', 'enter',
// 'bulletedList', 'numberedList',
// 'insertTable', 'deleteTable',
// 'insertTableRow', 'deleteTableRow',
// 'insertTableCol', 'deleteTableCol',
// 'tableHeader', 'tableFullWidth',
// 'insertVideo', 'uploadVideo',
// 'editVideoSize', 'uploadImage',
// 'codeSelectLang',
// ],
```
zyd_public/request/proxyChangeUrl.js
浏览文件 @
da848831
import
{
getIsBei_Dian
}
from
'@/webPublic/zyd_public/utils/utils'
;
import
{
getIsBei_Dian
}
from
'@/webPublic/zyd_public/utils/utils'
;
export
function
proxyChangeUrl
(
url
){
export
function
proxyChangeUrl
(
url
){
if
(
process
.
env
.
NODE_ENV
===
'development'
&&
getIsBei_Dian
())
{
if
(
process
.
env
.
NODE_ENV
===
'development'
&&
getIsBei_Dian
()
&&
window
.
location
.
href
.
indexOf
(
'onestopmobile'
)
<=
-
1
)
{
url
=
url
.
replace
(
'https://yx.bpi.edu.cn/produce'
,
window
.
location
.
origin
+
'/produce'
);
url
=
url
.
replace
(
'https://yx.bpi.edu.cn/produce'
,
window
.
location
.
origin
+
'/produce'
);
url
=
url
.
replace
(
'http://scjoyedu.eicp.net:51352/produce'
,
window
.
location
.
origin
+
'/produce'
);
url
=
url
.
replace
(
'http://scjoyedu.eicp.net:51352/produce'
,
window
.
location
.
origin
+
'/produce'
);
}
}
...
...
zyd_public/utils/getHeaders.js
浏览文件 @
da848831
...
@@ -8,62 +8,62 @@ const isTest = getUrlInfo().test;
...
@@ -8,62 +8,62 @@ const isTest = getUrlInfo().test;
window
.
differenceBetweenServerAndClientTime
=
window
.
differenceBetweenServerAndClientTime
||
0
;
window
.
differenceBetweenServerAndClientTime
=
window
.
differenceBetweenServerAndClientTime
||
0
;
/**
/
/ /
**
* 混淆代码
//
* 混淆代码
* 2022年7月12日
//
* 2022年7月12日
* 钟是志
//
* 钟是志
* */
//
* */
function
_0x202e
(
_0x548f51
,
_0x50b3ff
)
{
//
function _0x202e(_0x548f51, _0x50b3ff) {
const
_0x568ad8
=
_0x568a
();
//
const _0x568ad8 = _0x568a();
return
_0x202e
=
function
(
_0x202e02
,
_0x19f086
)
{
//
return _0x202e = function (_0x202e02, _0x19f086) {
_0x202e02
=
_0x202e02
-
0x7d
;
//
_0x202e02 = _0x202e02 - 0x7d;
let
_0x29770a
=
_0x568ad8
[
_0x202e02
];
//
let _0x29770a = _0x568ad8[_0x202e02];
return
_0x29770a
;
//
return _0x29770a;
},
_0x202e
(
_0x548f51
,
_0x50b3ff
);
//
}, _0x202e(_0x548f51, _0x50b3ff);
}
//
}
//
(
function
(
_0x4c31fc
,
_0x463010
)
{
//
(function (_0x4c31fc, _0x463010) {
const
_0x552fa4
=
_0x202e
,
//
const _0x552fa4 = _0x202e,
_0x1cd81c
=
_0x4c31fc
();
//
_0x1cd81c = _0x4c31fc();
while
(
!!
[])
{
//
while (!![]) {
try
{
//
try {
const
_0xcda188
=
-
parseInt
(
_0x552fa4
(
0x8e
))
/
0x1
*
(
parseInt
(
_0x552fa4
(
0x84
))
/
0x2
)
+
-
parseInt
(
_0x552fa4
(
0x7d
))
/
0x3
+
parseInt
(
_0x552fa4
(
0x7f
))
/
0x4
+
-
parseInt
(
_0x552fa4
(
0x86
))
/
0x5
+
parseInt
(
_0x552fa4
(
0x88
))
/
0x6
*
(
parseInt
(
_0x552fa4
(
0x82
))
/
0x7
)
+
-
parseInt
(
_0x552fa4
(
0x80
))
/
0x8
+
parseInt
(
_0x552fa4
(
0x8a
))
/
0x9
*
(
parseInt
(
_0x552fa4
(
0x85
))
/
0xa
);
//
const _0xcda188 = -parseInt(_0x552fa4(0x8e)) / 0x1 * (parseInt(_0x552fa4(0x84)) / 0x2) + -parseInt(_0x552fa4(0x7d)) / 0x3 + parseInt(_0x552fa4(0x7f)) / 0x4 + -parseInt(_0x552fa4(0x86)) / 0x5 + parseInt(_0x552fa4(0x88)) / 0x6 * (parseInt(_0x552fa4(0x82)) / 0x7) + -parseInt(_0x552fa4(0x80)) / 0x8 + parseInt(_0x552fa4(0x8a)) / 0x9 * (parseInt(_0x552fa4(0x85)) / 0xa);
if
(
_0xcda188
===
_0x463010
)
break
;
else
_0x1cd81c
[
'push'
](
_0x1cd81c
[
'shift'
]());
//
if (_0xcda188 === _0x463010) break; else _0x1cd81c['push'](_0x1cd81c['shift']());
}
catch
(
_0x1d86df
)
{
//
} catch (_0x1d86df) {
_0x1cd81c
[
'push'
](
_0x1cd81c
[
'shift'
]());
//
_0x1cd81c['push'](_0x1cd81c['shift']());
}
//
}
}
//
}
}(
_0x568a
,
0xb25c4
));
//
}(_0x568a, 0xb25c4));
//
function
_0x568a
()
{
//
function _0x568a() {
const
_0x292465
=
[
'differenceBetweenServerAndClientTime'
,
'823318RXJXMw'
,
'457340BzvYDX'
,
'3527100qnMDjU'
,
'xgUserId'
,
'6362418YdxbkN'
,
'getTime'
,
'639OXEuzj'
,
'headers'
,
'bearer
\
x20'
,
'timestamp'
,
'1HcmGrw'
,
'3967845wgMCjN'
,
'log'
,
'151716ARnHER'
,
'9401504aZEgWQ'
,
'auth'
,
'7SfPUZN'
];
//
const _0x292465 = ['differenceBetweenServerAndClientTime', '823318RXJXMw', '457340BzvYDX', '3527100qnMDjU', 'xgUserId', '6362418YdxbkN', 'getTime', '639OXEuzj', 'headers', 'bearer\x20', 'timestamp', '1HcmGrw', '3967845wgMCjN', 'log', '151716ARnHER', '9401504aZEgWQ', 'auth', '7SfPUZN'];
_0x568a
=
function
()
{
//
_0x568a = function () {
return
_0x292465
;
//
return _0x292465;
};
//
};
return
_0x568a
();
//
return _0x568a();
}
//
}
//
//
export
function
getHeaders
(
_0x586d90
=
''
)
{
//
export function getHeaders(_0x586d90 = '') {
const
_0x489a38
=
_0x202e
,
//
const _0x489a38 = _0x202e,
_0x4fc1a2
=
getToken
(),
//
_0x4fc1a2 = getToken(),
_0x37ba84
=
getCurrentUser
()
||
{},
//
_0x37ba84 = getCurrentUser() || {},
_0x1db761
=
getUserInfo
()
||
{},
//
_0x1db761 = getUserInfo() || {},
_0x4e0063
=
_0x1db761
[
'id'
]
||
_0x37ba84
[
_0x489a38
(
0x87
)],
//
_0x4e0063 = _0x1db761['id'] || _0x37ba84[_0x489a38(0x87)],
_0x5a5180
=
new
Date
()[
_0x489a38
(
0x89
)]()
+
window
[
_0x489a38
(
0x83
)],
//
_0x5a5180 = new Date()[_0x489a38(0x89)]() + window[_0x489a38(0x83)],
_0x297709
=
_0x4fc1a2
+
_0x4e0063
+
_0x5a5180
,
//
_0x297709 = _0x4fc1a2 + _0x4e0063 + _0x5a5180,
_0xd71cea
=
{
'headers'
:
{
'Authorization'
:
_0x489a38
(
0x8c
)
+
_0x4fc1a2
}
};
//
_0xd71cea = { 'headers': { 'Authorization': _0x489a38(0x8c) + _0x4fc1a2 } };
return
getIsBei_Dian
()
&&
_0x4e0063
&&
(
_0xd71cea
[
_0x489a38
(
0x8b
)][
_0x489a38
(
0x81
)]
=
gg5xxxxx
(
_0x297709
),
_0xd71cea
[
'headers'
][
_0x489a38
(
0x8d
)]
=
_0x5a5180
,
isTest
&&
console
[
_0x489a38
(
0x7e
)]({
//
return getIsBei_Dian() && _0x4e0063 && (_0xd71cea[_0x489a38(0x8b)][_0x489a38(0x81)] = gg5xxxxx(_0x297709), _0xd71cea['headers'][_0x489a38(0x8d)] = _0x5a5180, isTest && console[_0x489a38(0x7e)]({
})),
_0xd71cea
;
//
})), _0xd71cea;
}
//
}
/**
/
/ /
**
* 混淆代码
//
* 混淆代码
* 2022年7月12日
//
* 2022年7月12日
* 钟是志
//
* 钟是志
* */
//
* */
export
function
getHeaders
Base
(
url
=
''
)
{
export
function
getHeaders
(
url
=
''
)
{
const
token
=
getToken
();
const
token
=
getToken
();
const
currentInfo
=
getCurrentUser
()
||
{};
const
currentInfo
=
getCurrentUser
()
||
{};
const
user
=
getUserInfo
()
||
{};
const
user
=
getUserInfo
()
||
{};
...
@@ -76,7 +76,8 @@ export function getHeadersBase(url = '') {
...
@@ -76,7 +76,8 @@ export function getHeadersBase(url = '') {
Authorization
:
`bearer
${
token
}
`
,
Authorization
:
`bearer
${
token
}
`
,
},
},
};
};
if
(
getIsBei_Dian
()
&&
userId
)
{
console
.
log
(
url
);
if
(
getIsBei_Dian
()
&&
userId
&&
window
.
location
.
href
.
indexOf
(
'/onestop'
)
<=
-
1
)
{
res
.
headers
.
auth
=
gg5xxxxx
(
secretString
);
res
.
headers
.
auth
=
gg5xxxxx
(
secretString
);
res
.
headers
.
timestamp
=
timestamp
;
res
.
headers
.
timestamp
=
timestamp
;
if
(
isTest
)
{
if
(
isTest
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论