@ -1,46 +1,80 @@
< template >
< view id = "page" >
< view class = "Width100 Box BorderBox" :style ="bgUrl1" >
< view class = "Content BorderBox" >
< top -title :is-show-left ="false" : rightWidth = '120' >
< template slot = "right" >
< image : src = "$.imgSrc + '/mine/setting.png'" @click ="$.open('/pages/mine/setting')" mode = "aspectFit" class = "InlineBlock img" > < / image >
< image : src = "$.imgSrc + '/mine/chat.png'" mode = "aspectFit" @click ="$.open('/pages/mine/notice')" class = "InlineBlock img" > < / image >
< / template >
< / t o p - t i t l e >
< view class = "user Flex BorderBox" @ click = "checkObjEmpty(userInfo) ? $.open('/pages/logIn/userInfo'):$.open('/pages/logIn/logIn')" >
< u -avatar :src ="userInfo.headUrl" :size ="78" > < / u - a v a t a r >
< view class = "name FontS_50rpx FontBold MarginL_15rpx" >
< view class = "mine-box" >
< view class = 'info-box' >
< image :src ="userInfo.headUrl||base64Avatar"
@ click = "checkObjEmpty(userInfo) ? $.open('/pages/logIn/userInfo'):$.open('/pages/logIn/logIn')" > < / image >
< view class = "name FontS_50rpx FontBold MarginL_15rpx"
@ click = "checkObjEmpty(userInfo) ? $.open('/pages/logIn/userInfo'):$.open('/pages/logIn/logIn')" >
{ { userInfo . realName || userInfo . username || '请登录' } }
< / view >
<!-- < u -row justify = "space-between" gutter = "12" class = "static-box" >
< u -col span = "4" >
< view class = "item" >
< text >
1222
< / text >
< text class = "label" >
我排查的
< / text >
< / view >
< / u - c o l >
< u -col span = "4" >
< view class = "item" >
< text >
1222
< / text >
< text class = "label" >
我排查的
< / text >
< / view >
< view class = "func PositionR BorderR_20rpx BG_FFFFFF BorderBox" >
< view class = "title FontBold FontS_40rpx" >
常用功能
< / view >
< view class = "list Flex Flex_Warp" >
< view class = "item Flex MarginT_10rpx PositionR" v-for ="item in funcList" @click="handleClick(item)" :key="item.name" >
< image : src = "$.imgSrc + item.icon" mode = "aspectFit" > < / image >
< view class = "info" > { { item . name } } < / view >
< / view >
< / view >
< / u - c o l >
< u -col span = "4" >
< view class = "item" >
< text >
1222
< / text >
< text class = "label" >
我排查的
< / text >
< / view >
< / u - c o l >
< / u - r o w > - - >
< / view >
< u -cell -group class = "margin-top" >
< u -cell icon = "order" title = "警号" :value ="dataInfo.policeid" isLink > < / u - c e l l >
< u -cell icon = "account" title = "身份证号" :value ="dataInfo.cdescription" isLink > < / u - c e l l >
< u -cell icon = "phone" title = "联系方式" :value ="dataInfo.phone" isLink > < / u - c e l l >
< / u - c e l l - g r o u p >
< u -cell -group style = "margin-top:20rpx;padding:10rpx 20rpx" >
< u -cell icon = "lock" title = "修改密码" isLink @ click = 'possword' > < / u - c e l l >
< / u - c e l l - g r o u p >
< view class = "logout" @click ="showModal" > 退出登录 < / view >
< u -modal :show ="show" @confirm ="confirm" ref = "uModal" :asyncClose ="true" title = "是否要继续退出登录?"
: showCancelButton = "true" @ cancel = "show=false" > < / u - m o d a l >
< / view >
< / template >
< script >
const base64Avatar =
"data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC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c4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z" ;
import TopTitle from "../../components/top-title" ;
export default {
components : { TopTitle } ,
components : {
TopTitle
} ,
data ( ) {
return {
show : false ,
base64Avatar : base64Avatar ,
$ : this . $ ,
bgUrl1 : '' ,
userInfo : { } ,
timer : null ,
num : 0
num : 0 ,
dataInfo : { } ,
/ / f u n c L i s t : [
/ / { i d : 1 , n a m e : ' 个 人 信 息 ' , u r l : ' / p a g e s / l o g I n / u s e r I n f o ' , i c o n : ' / m i n e / u s e r i n f o . p n g ' } ,
/ / { i d : 2 , n a m e : ' 劳 务 保 险 ' , u r l : ' / p a g e s / m i n e / i n s u r a n c e ' , i c o n : ' / m i n e / i n s u r a n c e . p n g ' } ,
@ -52,9 +86,14 @@ export default {
}
} ,
computed : {
funcList ( ) {
return [ { id : 1 , name : '个人信息' , url : '/pages/logIn/userInfo' , icon : '/mine/userinfo.png' } ]
}
/ / f u n c L i s t ( ) {
/ / r e t u r n [ {
/ / i d : 1 ,
/ / n a m e : ' 个 人 信 息 ' ,
/ / u r l : ' / p a g e s / l o g I n / u s e r I n f o ' ,
/ / i c o n : ' / m i n e / u s e r i n f o . p n g '
/ / } ]
/ / }
} ,
onShow ( ) {
@ -62,44 +101,81 @@ export default {
const userInfo = this . $ . getData ( 'userInfo' )
if ( userInfo ) {
this . userInfo = userInfo
this . getInfo ( )
/ / c o n s o l e . l o g ( t h i s . u s e r I n f o )
}
/ / 顶 部 背 景 图
this . bgUrl1 = "background-image:url('" + this . $ . imgSrc + "/mine/mineBG.png');background-repeat: no-repeat;background-position: center top;background-size:100% 472rpx;"
/ / i f ( ! t o k e n ) {
/ / t h i s . $ . o p e n N e w ( ' / p a g e s / l o g I n / l o g I n ' )
/ / r e t u r n
/ / / / 顶 部 背 景 图
/ / t h i s . b g U r l 1 = " b a c k g r o u n d - i m a g e : u r l ( ' " + t h i s . $ . i m g S r c + " / m i n e / m i n e B G . p n g ' ) ; b a c k g r o u n d - r e p e a t : n o - r e p e a t ; b a c k g r o u n d - p o s i t i o n : c e n t e r t o p ; b a c k g r o u n d - s i z e : 1 0 0 % 4 7 2 r p x ; "
/ / / / i f ( ! t o k e n ) {
/ / / / t h i s . $ . o p e n N e w ( ' / p a g e s / l o g I n / l o g I n ' )
/ / / / r e t u r n
/ / / / }
/ / i f ( t h i s . u s e r I n f o . p r o j e c t R o l e < = 1 & & ! t h i s . t i m e r ) {
/ / t h i s . t i m e r = s e t I n t e r v a l ( ( ) = > {
/ / t h i s . g e t R e v i e w N u m ( )
/ / } , 1 0 * 1 0 0 0 )
/ / }
if ( this . userInfo . projectRole <= 1 && ! this . timer ) {
this . timer = setInterval ( ( ) => {
this . getReviewNum ( )
} , 10 * 1000 )
}
} ,
onHide ( ) {
this . timer && clearInterval ( this . timer )
/ / t h i s . t i m e r & & c l e a r I n t e r v a l ( t h i s . t i m e r )
} ,
onLoad ( ) {
} ,
methods : {
checkObjEmpty ( obj ) {
if ( JSON . stringify ( obj ) == '{}' ) {
return false
/ / 获 取 个 人 信 息
getInfo ( ) {
this . $request
. globalRequest (
"/hiddenDanger/auth/getOperatorInformation" ,
{
nuserid : this . userInfo . username ,
} ,
"GET"
)
. then ( ( res ) => {
if ( res . code === 200 ) {
this . dataInfo = res . result ;
} else {
this . $ . toast ( res . message )
}
return true
} ) ;
} ,
getBG ( url ) {
return "background-image:url('" + url + "');background-repeat: no-repeat;background-position: center top;background-size:100% 100%;"
/ / 修 改 密 码
possword ( ) {
/ / t h i s . $ . o p e n N e w ( ' / p a g e s / m i n e / p a s s w o r d ' )
uni . navigateTo ( {
url : '/pages/mine/password'
} )
} ,
handleClick ( row ) {
this . $ . open ( row . url )
showModal ( ) {
this . show = true ;
} ,
getReviewNum ( ) {
this . $request . globalRequest ( '/hyjg-admin/mapi/projectworker/getApplyWorkerCount' , { } , 'POST' ) . then ( res => {
if ( res . code == 0 ) {
this . num = res . data ;
}
} )
confirm ( ) {
setTimeout ( ( ) => {
this . $ . clearData ( ) ;
this . $ . openNew ( '/pages/logIn/logIn' ) ;
} , 1500 )
}
/ / c h e c k O b j E m p t y ( o b j ) {
/ / i f ( J S O N . s t r i n g i f y ( o b j ) = = ' { } ' ) {
/ / r e t u r n f a l s e
/ / }
/ / r e t u r n t r u e
/ / } ,
/ / g e t B G ( u r l ) {
/ / r e t u r n " b a c k g r o u n d - i m a g e : u r l ( ' " + u r l + " ' ) ; b a c k g r o u n d - r e p e a t : n o - r e p e a t ; b a c k g r o u n d - p o s i t i o n : c e n t e r t o p ; b a c k g r o u n d - s i z e : 1 0 0 % 1 0 0 % ; "
/ / } ,
/ / h a n d l e C l i c k ( r o w ) {
/ / t h i s . $ . o p e n ( r o w . u r l )
/ / } ,
/ / g e t R e v i e w N u m ( ) {
/ / t h i s . $ r e q u e s t . g l o b a l R e q u e s t ( ' / h y j g - a d m i n / m a p i / p r o j e c t w o r k e r / g e t A p p l y W o r k e r C o u n t ' , { } , ' P O S T ' ) . t h e n ( r e s = > {
/ / i f ( r e s . c o d e = = 0 ) {
/ / t h i s . n u m = r e s . d a t a ;
/ / }
/ / } )
/ / }
}
}
< / script >
@ -109,53 +185,151 @@ page{
background : # F2F2F2 ;
}
. Box {
padding : 30 rpx ;
padding - top : var ( -- status - bar - height ) ;
. img {
width : 50 rpx ;
. mine - box {
position : fixed ;
width : 100 % ;
height : 100 % ;
background - image : url ( '../../static/mine/background.png' ) ;
background - size : 100 % 100 % ;
. info - box {
padding - top : calc ( var ( -- status - bar - height ) + 80 rpx ) ;
width : 750 rpx ;
/* height: 667rpx; */
/* background: linear-gradient(#3677D9 0%, #45A3E6 28%, #F0F3F7 100%); */
border - radius : 0 px 0 px 0 px 0 px ;
display : flex ;
flex - direction : column ;
align - items : center ;
. name {
margin - top : 33 rpx ;
font - size : 40 rpx ;
}
. img : nth - of - type ( 2 ) {
margin - left : 20 rpx ;
image {
width : 170 rpx ! important ;
height : 170 rpx ! important ;
border : 8 rpx solid # ffffff ;
border - radius : 50 % ;
}
. Content {
. user {
height : 500 rpx ;
. static - box {
margin - top : 45 rpx ;
width : 710 rpx ;
height : 126 rpx ;
. u - col {
height : 126 rpx ;
border - radius : 13 rpx ;
. item {
height : 126 rpx ;
background : rgba ( 255 , 255 , 255 , 0.35 ) ;
border - radius : 13 rpx ;
padding : 21 rpx 0 ;
display : flex ;
flex - direction : column ;
align - items : center ;
justify - content : space - between ;
text {
font - family : Arial , Arial ;
font - weight : bold ;
font - size : 40 rpx ;
color : # 363 F4D ;
text - align : center ;
font - style : normal ;
text - transform : none ;
}
. label {
font - family : Source Han Sans CN , Source Han Sans CN ;
font - size : 28 rpx ;
font - weight : 400 ;
}
}
}
}
}
. func {
width : 100 % ;
height : 430 rpx ;
top : - 60 rpx ;
padding : 30 rpx ;
/deep/ . u - cell - group _ _wrapper . u - line {
border - bottom : none ! important ;
}
. title {
margin - bottom : 20 rpx ;
/deep/ . u - cell - group _ _wrapper . u - cell . u - line {
border - bottom : 1 px solid # E6E6E6 ! important ;
}
. list {
margin : auto ;
. item {
padding : 12 rpx ;
width : 25 % ;
justify - content : center ;
flex - direction : column ;
align - items : center ;
box - sizing : border - box ;
image {
width : 60 rpx ;
height : 60 rpx ;
margin - bottom : 20 rpx ;
. u - cell - group {
margin : 0 32 rpx ;
padding : 15 rpx 20 rpx ;
background - color : rgba ( 255 , 255 , 255 , 0.6 ) ;
border - radius : 13 rpx ;
/deep/ . u - cell _ _body {
. u - cell _ _title - text {
color : # 5 E6F8A ;
font - size : 30 rpx ;
margin - left : 8 rpx ;
}
. u - icon _ _icon {
color : # 5 E6F8A ;
font - size : 40 rpx ! important ;
margin - top : 6 rpx ;
}
. u - cell _ _value {
color : # 363 F4D ;
font - size : 28 rpx ;
position : relative ;
top : 2 rpx ;
}
. uicon - arrow - right {
margin - right : - 10 rpx ;
font - size : 30 rpx ! important ;
}
}
. u - cell : last - child / deep / . u - line {
border - bottom : none ! important ;
}
. u - cell : first - child / deep / . u - line {
border - top : none ! important ;
}
. u - line . border - top - color {
/* border-bottom-color: #E6E6E6!important; */
}
}
. margin - top {
margin - top : 40 rpx ;
}
. logout {
width : 690 rpx ;
background - color : rgba ( 255 , 255 , 255 , 0.6 ) ;
text - align : center ;
margin - top : 20 rpx ;
margin - left : 30 rpx ;
padding : 27 rpx 0 ;
border - radius : 13 rpx ;
font - size : 32 rpx ;
color : # 363 F4D ;
font - weight : 600 ;
}
}
/deep/ . u - modal {
width : 580 rpx ! important ;
}
< / style >