|
|
@@ -3,9 +3,6 @@ import { LoginCollect } from 'basic/src/main/ets/models/LoginCollect'
|
|
|
import { RegisterOrResetPassComp } from '../views/RegisterOrResetPassView'
|
|
|
import { LoginView } from '../views/LoginView'
|
|
|
|
|
|
-// import { OtherLoginMethods } from '../views/OtherLoginMethods'
|
|
|
-
|
|
|
-
|
|
|
@Builder
|
|
|
function LoginBuilder() {
|
|
|
NavDestination() {
|
|
|
@@ -34,7 +31,7 @@ struct LoginPage {
|
|
|
.fontWeight(400)
|
|
|
.alignSelf(ItemAlign.End)
|
|
|
.textAlign(TextAlign.Center)
|
|
|
- .fontColor($r('[basic].color.main_ac_color_light'))
|
|
|
+ .fontColor('#3E5100')
|
|
|
.onClick(() => {
|
|
|
yTRouter.routerBack()
|
|
|
})
|
|
|
@@ -47,20 +44,25 @@ struct LoginPage {
|
|
|
.lineHeight(40)
|
|
|
.fontSize(28)
|
|
|
.fontWeight(600)
|
|
|
- .fontColor($r('[basic].color.main_ac_color_dark'))
|
|
|
+ .fontColor('#0E2E1A')
|
|
|
}
|
|
|
.padding({ left: 16, })
|
|
|
.height(193)
|
|
|
.width('100%')
|
|
|
.alignItems(HorizontalAlign.Start)
|
|
|
+ }
|
|
|
+ .padding({ top: this.safeTop })
|
|
|
+ .backgroundImage($r('app.media.loginPage_Bg'))
|
|
|
+ .backgroundImageSize(ImageSize.Cover)
|
|
|
|
|
|
+ Column(){
|
|
|
Row() {
|
|
|
Text('注册')
|
|
|
.fontSize(16)
|
|
|
.fontWeight(600)
|
|
|
.layoutWeight(1)
|
|
|
- .fontColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? '#FF141111' : '#80141111')
|
|
|
- .backgroundColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? Color.White : Color.Transparent)
|
|
|
+ .fontColor(this.tabBarIndex == 0 ? '#FF141111' : '#80141111')
|
|
|
+ // .backgroundColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? 'rgba(255,255,255,0.5)' : Color.Transparent)
|
|
|
.textAlign(TextAlign.Center)
|
|
|
.height(48)
|
|
|
.borderRadius({ topLeft: 12, topRight: 12, bottomRight: this.tabBarIndex == 1 ? 12 : 0 })
|
|
|
@@ -68,19 +70,20 @@ struct LoginPage {
|
|
|
this.tabBarIndex = 0
|
|
|
this.tabController.changeIndex(0)
|
|
|
})
|
|
|
+
|
|
|
Text('登录')
|
|
|
.fontSize(16)
|
|
|
.fontWeight(600)
|
|
|
.borderRadius({
|
|
|
topLeft: 12,
|
|
|
topRight: 12,
|
|
|
- bottomLeft: this.tabBarIndex == 0 || this.tabBarIndex == 2 ? 12 : 0
|
|
|
+ bottomLeft: this.tabBarIndex == 0 ? 12 : 0
|
|
|
})
|
|
|
- .backgroundColor(this.tabBarIndex == 1 ? Color.White : Color.Transparent)
|
|
|
+ // .backgroundColor(this.tabBarIndex == 1 ? 'rgba(255,255,255,0.5)' : Color.Transparent)
|
|
|
.layoutWeight(1)
|
|
|
.height(48)
|
|
|
.textAlign(TextAlign.Center)
|
|
|
- .fontColor(this.tabBarIndex == 1 ? '#FF141111' : '#80141111')
|
|
|
+ .fontColor(this.tabBarIndex == 1 || this.tabBarIndex == 2 ? '#FF141111' : '#80141111')
|
|
|
.onClick(() => {
|
|
|
this.tabBarIndex = 1
|
|
|
this.tabController.changeIndex(1)
|
|
|
@@ -91,38 +94,35 @@ struct LoginPage {
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
.width('100%')
|
|
|
|
|
|
- }
|
|
|
- .padding({ top: this.safeTop })
|
|
|
- .linearGradient({ angle: 135, colors: [['#CAE2F9', -0.1571], ['#D4D1F4', 0.4709], ['#EDF5FD', 1.1235]] })
|
|
|
- .margin({ bottom: 20 })
|
|
|
-
|
|
|
-
|
|
|
- Tabs({ controller: this.tabController }) {
|
|
|
- TabContent() {
|
|
|
- RegisterOrResetPassComp({ loginCollect: new LoginCollect("register") })
|
|
|
+ Tabs({ controller: this.tabController }) {
|
|
|
+ TabContent() {
|
|
|
+ RegisterOrResetPassComp({ loginCollect: new LoginCollect("register") })
|
|
|
|
|
|
- }
|
|
|
- .padding({ left: 20, right: 20 })
|
|
|
+ }
|
|
|
+ .padding({ left: 20, right: 20 })
|
|
|
|
|
|
- TabContent() {
|
|
|
- LoginView({
|
|
|
- forgetPassClick: () => {
|
|
|
- this.tabBarIndex = 2
|
|
|
- this.tabController.changeIndex(2)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- .padding({ left: 20, right: 20 })
|
|
|
+ TabContent() {
|
|
|
+ LoginView({
|
|
|
+ forgetPassClick: () => {
|
|
|
+ this.tabBarIndex = 2
|
|
|
+ this.tabController.changeIndex(2)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ .padding({ left: 20, right: 20 })
|
|
|
|
|
|
- TabContent() {
|
|
|
- RegisterOrResetPassComp({ loginCollect: new LoginCollect("reset") })
|
|
|
+ TabContent() {
|
|
|
+ RegisterOrResetPassComp({ loginCollect: new LoginCollect("reset") })
|
|
|
+ }
|
|
|
+ .padding({ left: 20, right: 20 })
|
|
|
}
|
|
|
- .padding({ left: 20, right: 20 })
|
|
|
+ .scrollable(false)
|
|
|
+ .layoutWeight(1)
|
|
|
+ .barHeight(0)
|
|
|
+ .padding({top: 20})
|
|
|
}
|
|
|
- .scrollable(false)
|
|
|
- .layoutWeight(1)
|
|
|
- .barHeight(0)
|
|
|
-
|
|
|
+ .backgroundImage(this.tabBarIndex == 0 ? $r('app.media.loginPage_Bg_left') : $r('app.media.loginPage_Bg_right'))
|
|
|
+ .backgroundImageSize(ImageSize.Contain)
|
|
|
}
|
|
|
|
|
|
.padding({
|
|
|
@@ -132,4 +132,3 @@ struct LoginPage {
|
|
|
.height('100%')
|
|
|
}
|
|
|
}
|
|
|
-
|