Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
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
Damon
study
Commits
75d9006f
Commit
75d9006f
authored
Aug 27, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/dev-fix-upload' into test
parents
60568931
5f5fd955
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
upload.js
src/common/upload.js
+4
-1
info.vue
src/pages/mine/info.vue
+0
-2
No files found.
src/common/upload.js
View file @
75d9006f
...
@@ -7,6 +7,9 @@ function getPhoto(type, token) {
...
@@ -7,6 +7,9 @@ function getPhoto(type, token) {
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
sourceType
,
//从相册选择
sourceType
:
sourceType
,
//从相册选择
success
:
function
(
res
)
{
success
:
function
(
res
)
{
uni
.
showLoading
({
title
:
'上传中...'
,
})
//上传七牛
//上传七牛
let
filePath
=
res
.
tempFiles
[
0
].
path
//为需要上传的文件
let
filePath
=
res
.
tempFiles
[
0
].
path
//为需要上传的文件
upload
(
filePath
,
token
)
upload
(
filePath
,
token
)
...
@@ -22,7 +25,7 @@ function getPhoto(type, token) {
...
@@ -22,7 +25,7 @@ function getPhoto(type, token) {
})
})
},
},
complete
:
function
()
{
complete
:
function
()
{
uni
.
hideLoading
()
},
},
})
})
})
})
...
...
src/pages/mine/info.vue
View file @
75d9006f
...
@@ -259,7 +259,6 @@ export default {
...
@@ -259,7 +259,6 @@ export default {
})
})
},
},
changeHead
()
{
changeHead
()
{
this
.
inUpload
()
//更换头像
//更换头像
upload
.
getPhoto
(
2
,
this
.
qiToken
).
then
((
res
)
=>
{
upload
.
getPhoto
(
2
,
this
.
qiToken
).
then
((
res
)
=>
{
this
.
student
.
avatarPath
=
process
.
uniEnv
.
qn_asset_url
+
res
.
key
this
.
student
.
avatarPath
=
process
.
uniEnv
.
qn_asset_url
+
res
.
key
...
@@ -279,7 +278,6 @@ export default {
...
@@ -279,7 +278,6 @@ export default {
})
})
},
},
changeCertPhoto
()
{
changeCertPhoto
()
{
this
.
inUpload
()
//更换证件头像
//更换证件头像
upload
.
getPhoto
(
2
,
this
.
qiToken
).
then
((
res
)
=>
{
upload
.
getPhoto
(
2
,
this
.
qiToken
).
then
((
res
)
=>
{
this
.
student
.
certificatePhotoPath
=
this
.
student
.
certificatePhotoPath
=
...
...
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