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
4aa2743b
Commit
4aa2743b
authored
Jul 27, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-v1.0.0' of git.banshouhui.com:wuzhenzhe/study into dev-v1.0.0
parents
a7a9e9a4
19fd5136
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
23 deletions
+52
-23
common.js
src/api/common.js
+2
-2
upload.js
src/common/upload.js
+2
-2
mine.vue
src/pages/index/mine.vue
+3
-3
certify.vue
src/pages/mine/certify.vue
+1
-0
company.vue
src/pages/mine/company.vue
+10
-0
info.vue
src/pages/mine/info.vue
+34
-16
No files found.
src/api/common.js
View file @
4aa2743b
let
commonApiFun
=
function
(
vm
)
{
const
globalUrl
=
process
.
uniEnv
||
{}
let
uCenterApiUrl
=
globalUrl
.
uCenter
Url
let
apiUrl
=
globalUrl
.
api
Url
let
loginWechatAuth
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/wxapp/unify/authorization'
,
params
)
let
payOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
'/pay/order'
,
params
)
let
payQuery
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/pay/query'
,
params
)
let
getQiNiuToken
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
uCenterApiUrl
+
'v1/tokens
'
,
params
)
await
vm
.
$u
.
get
(
apiUrl
+
'/rest/file/token/get
'
,
params
)
const
commonApi
=
{
loginWechatAuth
,
payOrder
,
...
...
src/common/upload.js
View file @
4aa2743b
...
...
@@ -46,7 +46,7 @@ function getPhoto(type, token) {
}
let
sourceType
=
type
==
1
?
[
'album'
]
:
[
'album'
,
'camera'
]
uni
.
chooseImage
({
count
:
6
,
//默认9
count
:
1
,
//默认9
sizeType
:
[
'original'
,
'compressed'
],
//可以指定是原图还是压缩图,默认二者都有
sourceType
:
sourceType
,
//从相册选择
success
:
function
(
res
)
{
...
...
@@ -87,7 +87,7 @@ function upload(filePath, token) {
},
complete
:
(
res
)
=>
{
if
(
res
.
statusCode
===
200
)
{
resolve
(
JSON
.
parse
(
res
.
data
).
key
)
resolve
(
JSON
.
parse
(
res
.
data
).
key
||
JSON
.
parse
(
res
.
data
).
src
)
}
else
{
reject
(
res
.
errMsg
)
}
...
...
src/pages/index/mine.vue
View file @
4aa2743b
...
...
@@ -58,7 +58,7 @@
<u-image
slot=
"icon"
width=
"36rpx"
height=
"4
0
rpx"
height=
"4
2
rpx"
:src=
"questionIcon"
></u-image>
</u-cell-item>
...
...
@@ -71,7 +71,7 @@
<u-image
slot=
"icon"
width=
"36rpx"
height=
"
40
rpx"
height=
"
36
rpx"
:src=
"serviceIcon"
></u-image>
</u-cell-item>
...
...
@@ -84,7 +84,7 @@
<u-image
slot=
"icon"
width=
"36rpx"
height=
"
40
rpx"
height=
"
34
rpx"
:src=
"settingIcon"
></u-image>
</u-cell-item>
...
...
src/pages/mine/certify.vue
View file @
4aa2743b
...
...
@@ -32,6 +32,7 @@
binderror=
""
bindload=
""
@
click=
"getBack"
style=
"margin-top: 30rpx"
/>
</view>
</view>
...
...
src/pages/mine/company.vue
View file @
4aa2743b
...
...
@@ -29,12 +29,21 @@ export default {
return
{
student
:
{
workUnit
:
''
,
isNotSet
:
null
,
},
}
},
computed
:
{},
onLoad
()
{
this
.
student
=
getApp
().
globalData
.
student
if
(
this
.
student
.
workUnit
==
''
||
!
this
.
student
.
workUnit
)
{
this
.
isNotSet
=
true
}
},
onUnload
()
{
if
(
this
.
isNotSet
)
{
this
.
student
.
workUnit
=
''
}
},
methods
:
{
submit
()
{
...
...
@@ -47,6 +56,7 @@ export default {
workUnit
:
this
.
student
.
workUnit
,
})
.
then
((
res
)
=>
{
this
.
isNotSet
=
false
this
.
$u
.
toast
(
'保存成功'
)
setTimeout
(()
=>
{
this
.
$u
.
route
({
...
...
src/pages/mine/info.vue
View file @
4aa2743b
...
...
@@ -24,7 +24,12 @@
></u-image>
</view>
</u-cell-item>
<u-cell-item
title=
"证件照"
@
click=
"changeCertPhoto"
>
<u-cell-item
title=
"证件照"
@
click=
"changeCertPhoto"
:arrow=
"false"
:hover-class=
"none"
>
<view
slot=
"right-icon"
>
<u-image
v-if=
"isupLoadCertPhoto"
...
...
@@ -32,7 +37,7 @@
height=
"120rpx"
:src=
"headCertPhoto"
></u-image>
<text
v-else
style=
"color:
blue;"
>
未
上传
</text>
<text
v-else
style=
"color:
#2953FF"
>
去
上传
</text>
</view>
</u-cell-item>
<u-cell-item
title=
"手机号"
:arrow=
"false"
:hover-class=
"none"
>
...
...
@@ -43,7 +48,8 @@
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhonenumber"
>
{{
getMobile
}}
<text
v-if=
"getMobile"
>
{{
getMobile
}}
</text>
<text
v-else
class=
"empty-value"
>
去绑定
</text>
</button>
</view>
</u-cell-item>
...
...
@@ -51,12 +57,18 @@
title=
"实名认证"
title-style=
"
{'font':'bold','font-size':'40rpx'}"
:value="getCertifyStatus"
:value-style="{
color: getCertifyStatus == '去认证' ? '#2953FF' : '#191C27',
}"
@click="goCertify"
>
</u-cell-item>
<u-cell-item
title=
"工作单位"
:value=
"getCompany"
:value-style=
"
{
color: getCompany == '去填写' ? '#2953FF' : '#191C27',
}"
@click="goCompany"
>
</u-cell-item>
</u-cell-group>
...
...
@@ -91,29 +103,32 @@ export default {
return
(
this
.
student
&&
this
.
student
.
identityNumber
)
||
false
},
getMobile
()
{
return
(
this
.
student
&&
this
.
student
.
phoneNumber
)
||
''
return
(
(
this
.
student
&&
this
.
student
.
phoneNumber
&&
this
.
student
.
phoneNumber
.
length
>
5
&&
this
.
student
.
phoneNumber
)
||
false
)
},
getCompany
()
{
return
(
this
.
student
&&
this
.
student
.
workUnit
)
||
''
return
(
this
.
student
&&
this
.
student
.
workUnit
)
||
'
去填写
'
},
getCertifyStatus
()
{
return
this
.
student
&&
!
this
.
student
.
isCertify
?
'去认证'
:
'已
认证'
return
this
.
student
&&
this
.
student
.
isCertify
?
'已认证'
:
'去
认证'
},
},
onLoad
()
{
this
.
$u
.
api
.
getQiNiuToken
({
type
:
'image'
}).
catch
((
data
)
=>
{
if
(
data
.
errMsg
==
'request:ok'
)
{
this
.
$u
.
api
.
getQiNiuToken
({
bucketName
:
'banshou-userprofile'
})
.
then
((
res
)
=>
{
this
.
token
=
data
.
data
.
token
//token为七牛云的token一般由后台接口提供
getApp
().
globalData
.
qiNiuToken
=
data
.
data
.
token
}
else
{
this
.
$u
.
toast
(
'获取token失败'
)
}
})
})
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
if
(
res
&&
res
.
identityNumber
)
{
res
.
isCertify
=
true
this
.
student
.
isCertify
=
true
}
this
.
student
=
res
})
},
...
...
@@ -268,8 +283,11 @@ page {
.mobile-button
{
width
:
115px
;
height
:
55rpx
;
background
:
none
;
font-size
:
28rpx
;
text-align
:
right
;
padding-right
:
0
;
}
button
:
:
after
{
border
:
none
;
...
...
@@ -290,7 +308,7 @@ button::after {
border-top-width
:
0
;
}
.
content
:
:
v-deep
.
u-cell__
value
{
color
:
#
191c27
;
.
empty-
value
{
color
:
#
2953ff
;
}
</
style
>
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