@ -5,7 +5,8 @@
< image : src = "$.imgSrc + '/scimg/logo1.png'" mode = "aspectFit" class = "Block Logo" > < / image >
< view class = "NavBox Width100 MarginT_60rpx" >
< view class = "Unit FloatL PositionR" v-for ="(item,index) in navList" @click="chooseNav(item.type)" >
< text class = "Block" : class = "currNav == item.type ? 'FontS_46rpx Color_1A1F39 FontBold':'FontS_42rpx Color_B4BAC9'" >
< text class = "Block"
: class = "currNav == item.type ? 'FontS_46rpx Color_1A1F39 FontBold':'FontS_42rpx Color_B4BAC9'" >
{ { item . label } } < / text >
< view class = "Line BG_0064FF PositionA" v-show ="currNav == item.type" > < / view >
< / view >
@ -27,18 +28,22 @@
<!-- < view class = "Num FloatL TextLeft MarginL_60rpx" > -- >
<!-- < text class = "InlineBlock FontS_34rpx Color_1A1F39 FontBold" > + 86 < / text > -- >
<!-- < / view > -- >
< input type = "text" placeholder = "请输入用户名" v-model ="logInData.phone" class="Height100 Input1 FloatL MarginL_60rpx FontS_32rpx" >
< input type = "text" placeholder = "请输入用户名" v -model = " logInData.phone "
class = "Height100 Input1 FloatL MarginL_60rpx FontS_32rpx" >
< view class = "ClearB" > < / view >
< / view >
< view class = "Input MarginT_40rpx BG_F6F7FB" v-if ="currNav == 1" >
< input type = "text" v-model ="logInData.validateCode" placeholder="请输入验证码" class="Height100 Input1 FloatL MarginL_60rpx FontS_32rpx" >
< input type = "text" v -model = " logInData.validateCode " placeholder = "请输入验证码"
class = "Height100 Input1 FloatL MarginL_60rpx FontS_32rpx" >
< view class = "CodeBox FloatR MarginR_60rpx" @click ="getCode" >
< text class = "Block FontS_28rpx" : class = "isCodeDisabled ? 'Color_B4BAC9':'Color_0064FF'" > { { btnText } } < / text >
< text class = "Block FontS_28rpx"
: class = "isCodeDisabled ? 'Color_B4BAC9':'Color_0064FF'" > { { btnText } } < / text >
< / view >
< view class = "ClearB" > < / view >
< / view >
< view class = "Input MarginT_40rpx BG_F6F7FB" >
< input type = "password" v-model ="logInData.password" placeholder="请输入您的密码" class="Height100 Input2 FloatL MarginL_60rpx FontS_32rpx" >
< input type = "password" v -model = " logInData.password " placeholder = "请输入您的密码"
class = "Height100 Input2 FloatL MarginL_60rpx FontS_32rpx" >
< view class = "ClearB" > < / view >
< / view >
< / view >
@ -53,8 +58,11 @@
< text class = "Block FloatL Color_0064FF FontS_26rpx" @click.stop ="checkAgree(3)" > 《 隐私协议 》 < / text >
< view class = "ClearB" > < / view >
< / view > -- >
< button type = "button" :disabled ="isDisabled" class = "Btn Block Width100 Color_FFFFFF FontS_36rpx FontBold" @click ="confirmSub" > {{ currNav = = 1 ? ' 注册 ' : ' 登录 ' }} < / button >
< text @click ="findPsw" class = "Block MarginT_40rpx TextCenter FontS_26rpx Color_0064FF" v-if ="currNav == 2" > 找回密码 ? < / text >
< button type = "button" :disabled ="isDisabled"
class = "Btn Block Width100 Color_FFFFFF FontS_36rpx FontBold"
@ click = "confirmSub" > { { currNav == 1 ? '注册' : '登录' } } < / button >
< text @click ="findPsw" class = "Block MarginT_40rpx TextCenter FontS_26rpx Color_0064FF"
v - if = "currNav == 2" > 找回密码 ? < / text >
< / view >
< / view >
< / view >
@ -72,7 +80,10 @@ export default {
isAgree : false ,
navList : [
/ / { t y p e : 1 , l a b e l : ' 注 册 ' } ,
{ type : 2 , label : '登录' } ,
{
type : 2 ,
label : '登录'
} ,
] ,
currNav : 2 ,
currType : 1 ,
@ -97,7 +108,8 @@ export default {
/ / 页 面 显 示
onShow ( ) {
/ / 顶 部 背 景 图
this . bgUrl1 = "background-image:url('" + this . $ . imgSrc + "/scimg/bg1.png');background-repeat: no-repeat;background-position: center top;background-size:100% 472rpx;"
this . bgUrl1 = "background-image:url('" + this . $ . imgSrc +
"/scimg/bg1.png');background-repeat: no-repeat;background-position: center top;background-size:100% 472rpx;"
} ,
/ / 计 算 属 性
computed : { } ,
@ -169,7 +181,10 @@ export default {
if ( res . code === 200 ) {
this . $ . toast ( '登录成功' )
this . $ . setData ( 'token' , res . result . nuserid )
this . $ . setData ( 'userInfo' , { username : res . result . nuserid , role : res . result . role } )
this . $ . setData ( 'userInfo' , {
username : res . result . nuserid ,
role : res . result . role
} )
setTimeout ( ( ) => {
this . $ . hideLoading ( '登录中...' )
this . isDisabled = false
@ -179,6 +194,9 @@ export default {
this . $ . toast ( res . message )
this . isDisabled = false
}
} ) . catch ( ( ) => {
this . isDisabled = false
this . $ . toast ( '连接服务器失败' )
} )
} ,
/ / 找 回 密 码
@ -199,8 +217,7 @@ export default {
this . $ . open ( even )
} ,
} ,
onReady ( ) {
} ,
onReady ( ) { } ,
/ / 页 面 卸 载
onUnload ( ) {
@ -213,8 +230,7 @@ export default {
} , 1500 ) ;
} ,
/ / 页 面 上 拉 触 底 事 件 的 处 理 函 数
onReachBottom ( ) {
} ,
onReachBottom ( ) { } ,
}
< / script >
@ -224,19 +240,22 @@ export default {
}
< / style >
< style lang = "scss" scoped >
. Box {
padding - top : var ( -- status - bar - height ) ;
. Content {
width : calc ( 100 % - 176 rpx ) ;
padding : 132 rpx 0 rpx 180 rpx 0 rpx ;
. Logo {
width : 150 rpx ;
height : 150 rpx ;
}
. NavBox {
. Unit {
margin - right : 110 rpx ;
. Line {
left : 50 % ;
transform : translateX ( - 50 % ) ;
@ -247,13 +266,16 @@ export default {
}
}
}
. TypeBox {
. Unit {
margin - right : 108 rpx ;
. Point {
width : 46 rpx ;
height : 46 rpx ;
}
. Border {
width : 46 rpx ;
height : 46 rpx ;
@ -261,39 +283,47 @@ export default {
}
}
}
. InputBox {
. Input {
height : 110 rpx ;
border - radius : 56 rpx ;
. CodeBox {
text {
line - height : 110 rpx ;
}
}
. Num {
width : 110 rpx ;
border - right : 4 rpx solid # DADADA ;
margin - top : 34 rpx ;
}
. Input1 {
width : calc ( 100 % - 260 rpx ) ;
}
. Input2 {
width : calc ( 100 % - 120 rpx ) ;
}
}
}
. Agree {
. Point {
width : 34 rpx ;
height : 34 rpx ;
}
. Border {
width : 34 rpx ;
height : 34 rpx ;
border : 2 rpx solid # B3BACB ;
}
}
. Btn {
margin - top : 196 rpx ;
height : 108 rpx ;