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
b616278a
Commit
b616278a
authored
Aug 05, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:弹窗样式修改
parent
7f883aff
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
33 deletions
+87
-33
cert.vue
src/pages/index/cert.vue
+19
-11
index.vue
src/pages/login/index.vue
+3
-1
certify.vue
src/pages/mine/certify.vue
+21
-4
company.vue
src/pages/mine/company.vue
+6
-1
info.vue
src/pages/mine/info.vue
+30
-12
setting.vue
src/pages/mine/setting.vue
+8
-4
No files found.
src/pages/index/cert.vue
View file @
b616278a
...
@@ -177,7 +177,10 @@ export default {
...
@@ -177,7 +177,10 @@ export default {
},
},
onShow
:
function
(
param
)
{
onShow
:
function
(
param
)
{
if
(
!
this
.
vuex_token
)
{
if
(
!
this
.
vuex_token
)
{
this
.
$u
.
toast
(
'请先登录'
)
this
.
$refs
.
uToast
.
show
({
title
:
'请先登录'
,
type
:
'error'
,
})
let
that
=
this
let
that
=
this
setTimeout
(
function
(){
setTimeout
(
function
(){
that
.
$u
.
route
({
that
.
$u
.
route
({
...
@@ -185,13 +188,6 @@ export default {
...
@@ -185,13 +188,6 @@ export default {
})
})
},
1000
)
},
1000
)
}
}
// try {
// if (param.tabs) {
// this.current = param.tabs
// this.swiperCurrent = param.tabs
// }
// } catch (e) {}
// this.tabsChange(this.current)
},
},
onUnload
(){
onUnload
(){
uni
.
hideLoading
()
uni
.
hideLoading
()
...
@@ -199,11 +195,19 @@ export default {
...
@@ -199,11 +195,19 @@ export default {
methods
:
{
methods
:
{
submit
(){
submit
(){
if
(
!
this
.
certId
){
if
(
!
this
.
certId
){
this
.
$u
.
toast
(
'请填写证件号码!'
)
this
.
$refs
.
uToast
.
show
({
title
:
'请填写证件号码!'
,
type
:
'error'
,
duration
:
2000
})
return
return
}
}
if
(
!
this
.
certName
){
if
(
!
this
.
certName
){
this
.
$u
.
toast
(
'请填写姓名!'
)
this
.
$refs
.
uToast
.
show
({
title
:
'请填写姓名!'
,
type
:
'error'
,
duration
:
2000
})
return
return
}
}
let
param
=
{
let
param
=
{
...
@@ -216,7 +220,11 @@ export default {
...
@@ -216,7 +220,11 @@ export default {
this
.
$u
.
api
.
getCertFromOut
(
param
).
then
((
res
)
=>
{
this
.
$u
.
api
.
getCertFromOut
(
param
).
then
((
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
!
res
){
if
(
!
res
){
this
.
$u
.
toast
(
'证书暂未公布'
)
this
.
$refs
.
uToast
.
show
({
title
:
'未查询到相关记录,请稍后再试'
,
type
:
'warning'
,
duration
:
2000
})
return
return
}
}
let
data
=
[]
let
data
=
[]
...
...
src/pages/login/index.vue
View file @
b616278a
...
@@ -44,7 +44,9 @@ export default {
...
@@ -44,7 +44,9 @@ export default {
},
},
},
},
onLoad
(
params
)
{
onLoad
(
params
)
{
this
.
returnUrl
=
decodeURIComponent
(
params
?.
path
)
if
(
params
&&
params
.
path
)
{
this
.
returnUrl
=
decodeURIComponent
(
params
.
path
)
}
},
},
methods
:
{
methods
:
{
wxLogin
()
{
wxLogin
()
{
...
...
src/pages/mine/certify.vue
View file @
b616278a
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +70,7 @@
</u-cell-item>
</u-cell-item>
</u-cell-group>
</u-cell-group>
</view>
</view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -129,7 +130,10 @@ export default {
...
@@ -129,7 +130,10 @@ export default {
!
this
.
student
.
identityNumber
||
!
this
.
student
.
identityNumber
||
!
this
.
student
.
certificateValidityDate
!
this
.
student
.
certificateValidityDate
)
{
)
{
this
.
$u
.
toast
(
'请上传身份证正反面信息'
)
this
.
$refs
.
uToast
.
show
({
title
:
'请上传身份证正反面信息'
,
type
:
'error'
,
})
return
return
}
}
this
.
$u
.
api
this
.
$u
.
api
...
@@ -141,7 +145,11 @@ export default {
...
@@ -141,7 +145,11 @@ export default {
name
:
this
.
student
.
name
,
name
:
this
.
student
.
name
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
$u
.
toast
(
'认证成功'
)
this
.
$refs
.
uToast
.
show
({
title
:
'认证成功'
,
type
:
'success'
,
duration
:
2000
,
})
this
.
student
.
isCertify
=
true
this
.
student
.
isCertify
=
true
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$u
.
route
({
this
.
$u
.
route
({
...
@@ -169,9 +177,13 @@ export default {
...
@@ -169,9 +177,13 @@ export default {
})
})
.
catch
((
data
)
=>
{
.
catch
((
data
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
hideToast
()
this
.
student
.
name
=
''
this
.
student
.
name
=
''
this
.
student
.
identityNumber
=
''
this
.
student
.
identityNumber
=
''
this
.
$u
.
toast
(
'识别身份证信息错误'
)
this
.
$refs
.
uToast
.
show
({
title
:
'识别身份证信息错误'
,
type
:
'error'
,
})
})
})
})
})
},
},
...
@@ -192,8 +204,13 @@ export default {
...
@@ -192,8 +204,13 @@ export default {
})
})
.
catch
((
data
)
=>
{
.
catch
((
data
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
uni
.
hideToast
()
this
.
student
.
certificateValidityDate
=
''
this
.
student
.
certificateValidityDate
=
''
this
.
$u
.
toast
(
'识别身份证信息错误'
)
this
.
$refs
.
uToast
.
show
({
title
:
'识别身份证信息错误'
,
type
:
'error'
,
duration
:
2000
,
})
})
})
})
})
},
},
...
...
src/pages/mine/company.vue
View file @
b616278a
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
</view>
</view>
<button
@
click=
"submit"
class=
"sub-input"
>
提交
</button>
<button
@
click=
"submit"
class=
"sub-input"
>
提交
</button>
</view>
</view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -53,7 +54,11 @@ export default {
...
@@ -53,7 +54,11 @@ export default {
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
isNotSet
=
false
this
.
isNotSet
=
false
this
.
$u
.
toast
(
'保存成功'
)
this
.
$refs
.
uToast
.
show
({
title
:
'保存成功'
,
type
:
'success'
,
duration
:
2000
,
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$u
.
route
({
this
.
$u
.
route
({
type
:
'back'
,
type
:
'back'
,
...
...
src/pages/mine/info.vue
View file @
b616278a
...
@@ -74,12 +74,12 @@
...
@@ -74,12 +74,12 @@
>
</u-cell-item>
>
</u-cell-item>
</u-cell-group>
</u-cell-group>
</view>
</view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
upload
from
'@/common/upload'
import
upload
from
'@/common/upload'
import
login
from
'@/common/login'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -118,12 +118,10 @@ export default {
...
@@ -118,12 +118,10 @@ export default {
},
},
onLoad
()
{
onLoad
()
{
this
.
refleshCode
()
this
.
refleshCode
()
this
.
$u
.
api
this
.
$u
.
api
.
getQiNiuToken
({
bucketName
:
'wsy-exam'
}).
then
((
res
)
=>
{
.
getQiNiuToken
({
bucketName
:
'wsy-exam'
})
this
.
qiToken
=
res
.
then
((
res
)
=>
{
getApp
().
globalData
.
qiNiuToken
=
res
this
.
qiToken
=
res
})
getApp
().
globalData
.
qiNiuToken
=
res
})
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
res
.
isCertify
=
res
.
isCertify
=
...
@@ -160,11 +158,19 @@ export default {
...
@@ -160,11 +158,19 @@ export default {
iv
:
e
.
detail
.
iv
,
iv
:
e
.
detail
.
iv
,
}
}
}
else
{
}
else
{
this
.
$u
.
toast
(
e
.
detail
.
errMsg
)
this
.
$refs
.
uToast
.
show
({
title
:
e
.
detail
.
errMsg
,
type
:
'error'
,
duration
:
2000
,
})
return
return
}
}
}
else
{
}
else
{
this
.
$u
.
toast
(
'授权失败,请重新授权'
)
this
.
$refs
.
uToast
.
show
({
title
:
'授权失败,请重新授权'
,
type
:
'error'
,
duration
:
2000
,
})
return
return
}
}
this
.
syncUserinfo
(
params
)
this
.
syncUserinfo
(
params
)
...
@@ -212,11 +218,19 @@ export default {
...
@@ -212,11 +218,19 @@ export default {
phoneNumber
:
res
.
phoneNumber
,
phoneNumber
:
res
.
phoneNumber
,
})
})
.
then
((
ret
)
=>
{
.
then
((
ret
)
=>
{
this
.
$u
.
toast
(
'绑定成功!'
)
this
.
$refs
.
uToast
.
show
({
title
:
'绑定成功!'
,
type
:
'success'
,
duration
:
2000
,
})
})
})
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
$u
.
toast
(
'请登录后再绑定'
)
this
.
$refs
.
uToast
.
show
({
title
:
'请登录后再绑定'
,
type
:
'warning'
,
duration
:
2000
,
})
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/login/index'
,
url
:
'pages/login/index'
,
params
:
{
params
:
{
...
@@ -246,7 +260,11 @@ export default {
...
@@ -246,7 +260,11 @@ export default {
})
})
},
},
toLogin
()
{
toLogin
()
{
this
.
$u
.
toast
(
'登录信息已失效,请重新登录'
)
this
.
$refs
.
uToast
.
show
({
title
:
'登录信息已失效,请重新登录'
,
type
:
'warning'
,
duration
:
2000
,
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/login/index'
,
url
:
'pages/login/index'
,
...
...
src/pages/mine/setting.vue
View file @
b616278a
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
></u-cell-item>
></u-cell-item>
</u-cell-group>
</u-cell-group>
<view
class=
"logout"
@
tap=
"logout"
>
退出登录
</view>
<view
class=
"logout"
@
tap=
"logout"
>
退出登录
</view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -23,22 +24,25 @@ export default {
...
@@ -23,22 +24,25 @@ export default {
onLoad
()
{},
onLoad
()
{},
methods
:
{
methods
:
{
upgrade
:
function
()
{
upgrade
:
function
()
{
wx
.
showToast
({
let
that
=
this
uni
.
showLoading
({
title
:
'正在更新版本...'
,
title
:
'正在更新版本...'
,
icon
:
'loading'
,
})
})
const
um
=
wx
.
getUpdateManager
()
const
um
=
wx
.
getUpdateManager
()
um
.
onCheckForUpdate
(
function
(
res
)
{
um
.
onCheckForUpdate
(
function
(
res
)
{
uni
.
hideLoading
()
if
(
res
.
hasUpdate
)
{
if
(
res
.
hasUpdate
)
{
um
.
onUpdateReady
(
function
()
{
um
.
onUpdateReady
(
function
()
{
um
.
applyUpdate
()
um
.
applyUpdate
()
wx
.
showToast
({
that
.
$refs
.
uToast
.
show
({
title
:
'更新完成'
,
title
:
'更新完成'
,
type
:
'success'
,
})
})
})
})
}
else
{
}
else
{
wx
.
showToast
({
that
.
$refs
.
uToast
.
show
({
title
:
'已是最新版本'
,
title
:
'已是最新版本'
,
type
:
'success'
,
})
})
}
}
})
})
...
...
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