Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
Project
Project
Details
Activity
Releases
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
zhengke
jz_Travel
Commits
37e6c6d2
Commit
37e6c6d2
authored
Apr 16, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
fcfd4cc7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
upload.vue
pages/bigredrnvelope/components/upload.vue
+14
-9
No files found.
pages/bigredrnvelope/components/upload.vue
View file @
37e6c6d2
...
...
@@ -75,6 +75,9 @@ export default {
filePath
:
res
.
tempFilePaths
[
0
],
encoding
:
"base64"
,
//编码格式
success
:
(
ans
)
=>
{
uni
.
showLoading
({
title
:
"上传中"
,
});
if
(
that
.
type
){
that
.
getImgInfo
(
ans
.
data
,
that
.
access_token
,
(
_res
)
=>
{
if
(
_res
.
data
.
direction
==
1
)
{
...
...
@@ -111,7 +114,15 @@ export default {
}
});
}
else
{
that
.
upFile
(
res
.
tempFilePaths
[
0
])
that
.
upFile
(
res
.
tempFilePaths
[
0
],
(
uploadRes
)
=>
{
let
BusinessLicense
=
JSON
.
parse
(
uploadRes
.
data
).
data
;
let
infor
=
{}
infor
.
BusinessLicense
=
BusinessLicense
console
.
log
(
"infor"
,
infor
);
that
.
$emit
(
'onSuccess'
,
infor
);
});
console
.
log
(
"res.tempFilePaths[0]"
,
res
.
tempFilePaths
[
0
]);
}
},
...
...
@@ -120,10 +131,7 @@ export default {
});
},
//图片上传
upFile
(
filePath
)
{
uni
.
showLoading
({
title
:
"上传中"
,
});
upFile
(
filePath
,
resCall
)
{
let
that
=
this
;
uni
.
uploadFile
({
url
:
that
.
action
,
...
...
@@ -134,11 +142,8 @@ export default {
},
success
:
(
uploadFileRes
)
=>
{
if
(
uploadFileRes
.
statusCode
==
200
)
{
let
data
=
JSON
.
parse
(
uploadFileRes
.
data
)
let
infor
=
{}
infor
.
BusinessLicense
=
data
.
data
that
.
$emit
(
'onSuccess'
,
infor
);
uni
.
hideLoading
()
resCall
(
uploadFileRes
);
}
else
{
wx
.
showToast
({
title
:
uploadFileRes
.
message
,
...
...
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