Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
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
Administrator
jd-vx-app
Commits
879b2edc
Commit
879b2edc
authored
May 27, 2022
by
肖健
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_cd' into dev_jd
parents
6d9718d6
9ecba1f5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
userInfo.vue
pagesD/pages/personal/userInfo.vue
+5
-4
No files found.
pagesD/pages/personal/userInfo.vue
View file @
879b2edc
...
...
@@ -246,7 +246,7 @@ export default {
success
:
function
(
res
)
{
const
tempFilePaths
=
res
.
tempFilePaths
;
uni
.
uploadFile
({
url
:
that
.
http
.
baseUrl
+
'/
common
/upload'
,
url
:
that
.
http
.
baseUrl
+
'/
app/user
/upload'
,
//url: 'http://192.168.2.21:7001/upload',//仅为示例,非真实的接口地址
method
:
'POST'
,
filePath
:
tempFilePaths
[
0
],
...
...
@@ -256,7 +256,8 @@ export default {
},
// 请求头一定要加,否则 iOS 图片上传会失败
header
:
{
'content-type'
:
'multipart/form-data'
'content-type'
:
'multipart/form-data'
,
'Authorization'
:
'Bearer '
+
uni
.
getStorageSync
(
'userToken'
)
},
success
:
(
res
)
=>
{
let
uploadData
=
JSON
.
parse
(
res
.
data
)
...
...
@@ -266,12 +267,12 @@ export default {
};
let
userInfoItem
=
{
type
:
1
,
val
:
uploadData
.
data
.
fileName
val
:
uploadData
.
data
.
url
};
that
.
http
.
httpTokenRequest
(
opts
,
userInfoItem
).
then
(
response
=>
{
if
(
response
.
data
.
code
==
200
)
{
that
.
$nextTick
(()
=>
{
that
.
image
=
that
.
http
.
baseUrl
+
uploadData
.
data
.
fileName
that
.
image
=
uploadData
.
data
.
url
})
}
})
...
...
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