Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
3e9813e2
Commit
3e9813e2
authored
Dec 18, 2020
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 优化相关
parent
2f4d379e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
26 deletions
+25
-26
VersionPublish.js
src/pages/mobileConfig/menuconfig/VersionPublish.js
+25
-26
No files found.
src/pages/mobileConfig/menuconfig/VersionPublish.js
View file @
3e9813e2
...
...
@@ -145,16 +145,17 @@ export default props => {
init
();
},
[]);
useEffect
(()
=>
{
cons
ole
.
log
(
window
.
location
.
origin
)
;
cons
t
hurl
=
window
.
location
.
origin
;
getMobileFiles
({
client
:
clientName
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
const
{
data
}
=
res
;
let
fileName
=
data
.
apkPath
.
split
(
'/'
)[
data
.
apkPath
.
split
(
'/'
).
length
-
1
]
||
''
;
data
.
apkPath
.
split
(
'
\
\'
)[data.apkPath.split('
\\
').length - 1] || '';
let apkUrl = `${hurl}/${data.apkPath.replace(/
\\
/g, '
/
')}` || '';
setFileData({
...data,
fileName,
isRefresh
:
true
,
apkUrl
,
});
}
});
...
...
@@ -180,8 +181,8 @@ export default props => {
<div className={styles.row}>
<div className={styles.label}>下载地址:</div>
<div className="value">
<
a
href
=
"/MobileGCK/getApk"
target
=
"_blank"
>
{
`/MobileGCK/getApk`
}
<a href=
{fileData.apkUrl}
target="_blank">
{
fileData.apkUrl
}
</a>
</div>
</div>
...
...
@@ -212,29 +213,27 @@ export default props => {
maskClosable={false}
onCancel={() => setShowModal(false)}
onOk={submitForm}
confirmLoading={progress}
>
<
BaseForm
items
=
{
items
}
getForm
=
{
handleGetForm
}
/
>
<
div
className
=
{
styles
.
row
}
>
<
div
className
=
{
`
${
styles
.
label2
}
${
styles
.
required
}
`
}
>
apk
文件:
<
/div
>
<
input
ref
=
{
f
=>
{
fileEntity
.
current
=
f
;
}}
className
=
{
styles
[
'file-item'
]}
type
=
"file"
onChange
=
{
handleFileChange
}
/
>
<
Button
type
=
"primary"
onClick
=
{
handleUpload
}
>
{
fileSuccess
?
'上传成功'
:
'开始上传'
}
<
/Button
>
<
/div
>
{
progress
&&
(
<
div
className
=
{
styles
.
loadingBox
}
>
<
Spin
/>
<Spin spinning={progress} tip="loading...">
<BaseForm items={items} getForm={handleGetForm} />
<div className={styles.row}>
<div className={`${styles.label2} ${styles.required}`}>
apk文件:
</div>
<input
ref={f => {
fileEntity.current = f;
}}
className={styles['
file
-
item
']}
type="file"
onChange={handleFileChange}
/>
<Button type="primary" onClick={handleUpload}>
{fileSuccess ? '
上传成功
' : '
开始上传
'}
</Button>
</div>
)}
</Spin>
</Modal>
)}
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment