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
bfca8aa6
Commit
bfca8aa6
authored
Aug 11, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-fix-auth' into test
parents
b47e92d1
2ec167e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
upload.js
src/common/upload.js
+0
-3
info.vue
src/pages/mine/info.vue
+8
-1
No files found.
src/common/upload.js
View file @
bfca8aa6
...
@@ -31,9 +31,6 @@ function getPhoto(type, token) {
...
@@ -31,9 +31,6 @@ function getPhoto(type, token) {
//上传七牛
//上传七牛
function
upload
(
filePath
,
token
)
{
function
upload
(
filePath
,
token
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
showLoading
({
title
:
'上传中...'
,
})
let
key
=
let
key
=
new
Date
().
getTime
()
+
Math
.
random
(
1000
)
+
filePath
.
split
(
'/'
).
pop
()
//key为自定义文件名
new
Date
().
getTime
()
+
Math
.
random
(
1000
)
+
filePath
.
split
(
'/'
).
pop
()
//key为自定义文件名
uni
.
uploadFile
({
uni
.
uploadFile
({
...
...
src/pages/mine/info.vue
View file @
bfca8aa6
...
@@ -117,12 +117,16 @@ export default {
...
@@ -117,12 +117,16 @@ export default {
},
},
},
},
onLoad
()
{
onLoad
()
{
uni
.
showLoading
({
title
:
'加载中'
,
})
getApp
().
trackPage
(
'我的信息'
)
getApp
().
trackPage
(
'我的信息'
)
this
.
$u
.
api
.
getQiNiuToken
({
bucketName
:
'wsy-exam'
}).
then
((
res
)
=>
{
this
.
$u
.
api
.
getQiNiuToken
({
bucketName
:
'wsy-exam'
}).
then
((
res
)
=>
{
this
.
qiToken
=
res
this
.
qiToken
=
res
getApp
().
globalData
.
qiNiuToken
=
res
getApp
().
globalData
.
qiNiuToken
=
res
})
})
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
uni
.
hideLoading
()
if
(
res
)
{
if
(
res
)
{
res
.
isCertify
=
res
.
isCertify
=
res
&&
res
.
identityNumber
&&
res
.
identityNumber
.
length
>
5
res
&&
res
.
identityNumber
&&
res
.
identityNumber
.
length
>
5
...
@@ -157,6 +161,7 @@ export default {
...
@@ -157,6 +161,7 @@ export default {
})
})
return
return
}
else
if
(
e
.
detail
.
encryptedData
&&
e
.
detail
.
iv
)
{
}
else
if
(
e
.
detail
.
encryptedData
&&
e
.
detail
.
iv
)
{
this
.
inGetPhone
()
//允许授权-解析-更新手机号
//允许授权-解析-更新手机号
params
=
{
params
=
{
encryptedData
:
e
.
detail
.
encryptedData
,
encryptedData
:
e
.
detail
.
encryptedData
,
...
@@ -211,13 +216,15 @@ export default {
...
@@ -211,13 +216,15 @@ export default {
})
})
},
},
inUpload
()
{
inUpload
()
{
if
(
uni
.
getSystemInfoSync
().
platform
===
'android'
)
{
return
}
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'上传中...'
,
title
:
'上传中...'
,
})
})
},
},
refleshCode
()
{
refleshCode
()
{
let
that
=
this
let
that
=
this
this
.
inGetPhone
()
uni
.
login
({
uni
.
login
({
provider
:
'weixin'
,
provider
:
'weixin'
,
success
:
(
code_res
)
=>
{
success
:
(
code_res
)
=>
{
...
...
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