Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4f083e4f
authored
Apr 21, 2025
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
上传pdf文件添加大小限制
1 parent
9fb0c770
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.js
packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.js
View file @
4f083e4
...
@@ -197,6 +197,9 @@ Component({
...
@@ -197,6 +197,9 @@ Component({
let
tempFile
=
res
.
tempFiles
[
0
]
let
tempFile
=
res
.
tempFiles
[
0
]
let
fileName
=
tempFile
.
name
// 获取文件名
let
fileName
=
tempFile
.
name
// 获取文件名
let
fileType
=
fileName
.
split
(
'.'
).
pop
()
// 获取文件扩展名
let
fileType
=
fileName
.
split
(
'.'
).
pop
()
// 获取文件扩展名
if
(
tempFile
?.
size
>
1024
*
1024
*
10
)
{
return
wx
.
$util
.
showToast
(
'上传文件需≤10M,请压缩后重传或联系总部'
)
}
// 读取文件
// 读取文件
if
(
fileType
!=
'pdf'
)
return
wx
.
$util
.
showToast
(
'只可上传pdf类型文件'
)
if
(
fileType
!=
'pdf'
)
return
wx
.
$util
.
showToast
(
'只可上传pdf类型文件'
)
_this
.
setData
({
_this
.
setData
({
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment