|
@@ -6,14 +6,6 @@ import { LoginView } from '../views/LoginView'
|
|
|
// import { OtherLoginMethods } from '../views/OtherLoginMethods'
|
|
// import { OtherLoginMethods } from '../views/OtherLoginMethods'
|
|
|
|
|
|
|
|
|
|
|
|
|
-@Builder
|
|
|
|
|
-function LoginBuilder() {
|
|
|
|
|
- NavDestination() {
|
|
|
|
|
- LoginPage()
|
|
|
|
|
- }
|
|
|
|
|
- .hideTitleBar(true)
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
@Component
|
|
@Component
|
|
|
struct LoginPage {
|
|
struct LoginPage {
|
|
|
@StorageProp(YTAvoid.SAFE_TOP_KEY) private safeTop: number = 0
|
|
@StorageProp(YTAvoid.SAFE_TOP_KEY) private safeTop: number = 0
|
|
@@ -34,7 +26,7 @@ struct LoginPage {
|
|
|
.fontWeight(400)
|
|
.fontWeight(400)
|
|
|
.alignSelf(ItemAlign.End)
|
|
.alignSelf(ItemAlign.End)
|
|
|
.textAlign(TextAlign.Center)
|
|
.textAlign(TextAlign.Center)
|
|
|
- .fontColor($r('[basic].color.main_ac_color_light'))
|
|
|
|
|
|
|
+ .fontColor('#FF926340')
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
yTRouter.routerBack()
|
|
yTRouter.routerBack()
|
|
|
})
|
|
})
|
|
@@ -47,7 +39,7 @@ struct LoginPage {
|
|
|
.lineHeight(40)
|
|
.lineHeight(40)
|
|
|
.fontSize(28)
|
|
.fontSize(28)
|
|
|
.fontWeight(600)
|
|
.fontWeight(600)
|
|
|
- .fontColor($r('[basic].color.main_ac_color_dark'))
|
|
|
|
|
|
|
+ .fontColor('#FF663815')
|
|
|
}
|
|
}
|
|
|
.padding({ left: 16, })
|
|
.padding({ left: 16, })
|
|
|
.height(193)
|
|
.height(193)
|
|
@@ -56,27 +48,32 @@ struct LoginPage {
|
|
|
|
|
|
|
|
Row() {
|
|
Row() {
|
|
|
Text('注册')
|
|
Text('注册')
|
|
|
|
|
+ .height(48)
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
.fontWeight(600)
|
|
.fontWeight(600)
|
|
|
.layoutWeight(1)
|
|
.layoutWeight(1)
|
|
|
- .fontColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? '#FF141111' : '#80141111')
|
|
|
|
|
- .backgroundColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? Color.White : Color.Transparent)
|
|
|
|
|
.textAlign(TextAlign.Center)
|
|
.textAlign(TextAlign.Center)
|
|
|
- .height(48)
|
|
|
|
|
|
|
+ .border({ width: this.tabBarIndex == 0 || this.tabBarIndex == 2 ?
|
|
|
|
|
+ { top: 1, right: 1, bottom: 0 } :
|
|
|
|
|
+ { top: 0, right: 0, bottom: 1 },
|
|
|
|
|
+ color: Color.White })
|
|
|
|
|
+ .fontColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? '#FF141111' : '#80141111')
|
|
|
.borderRadius({ topLeft: 12, topRight: 12, bottomRight: this.tabBarIndex == 1 ? 12 : 0 })
|
|
.borderRadius({ topLeft: 12, topRight: 12, bottomRight: this.tabBarIndex == 1 ? 12 : 0 })
|
|
|
|
|
+ .backgroundColor(this.tabBarIndex == 0 || this.tabBarIndex == 2 ? 'rgba(255, 255, 255, 0.3)' : Color.Transparent)
|
|
|
.onClick(() => {
|
|
.onClick(() => {
|
|
|
this.tabBarIndex = 0
|
|
this.tabBarIndex = 0
|
|
|
this.tabController.changeIndex(0)
|
|
this.tabController.changeIndex(0)
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
Text('登录')
|
|
Text('登录')
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
.fontWeight(600)
|
|
.fontWeight(600)
|
|
|
- .borderRadius({
|
|
|
|
|
- topLeft: 12,
|
|
|
|
|
- topRight: 12,
|
|
|
|
|
- bottomLeft: this.tabBarIndex == 0 || this.tabBarIndex == 2 ? 12 : 0
|
|
|
|
|
- })
|
|
|
|
|
- .backgroundColor(this.tabBarIndex == 1 ? Color.White : Color.Transparent)
|
|
|
|
|
|
|
+ .border({ width: this.tabBarIndex == 1 ?
|
|
|
|
|
+ { top: 1, left: 1, bottom: 0 } :
|
|
|
|
|
+ { top: 0, left: 0, bottom: 1 },
|
|
|
|
|
+ color: Color.White })
|
|
|
|
|
+ .borderRadius({ topLeft: 12, topRight: 12, bottomLeft: this.tabBarIndex == 0 || this.tabBarIndex == 2 ? 12 : 0 })
|
|
|
|
|
+ .backgroundColor(this.tabBarIndex == 1 ? 'rgba(255, 255, 255, 0.3)' : Color.Transparent)
|
|
|
.layoutWeight(1)
|
|
.layoutWeight(1)
|
|
|
.height(48)
|
|
.height(48)
|
|
|
.textAlign(TextAlign.Center)
|
|
.textAlign(TextAlign.Center)
|
|
@@ -87,20 +84,16 @@ struct LoginPage {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ .width('100%')
|
|
|
.alignItems(VerticalAlign.Center)
|
|
.alignItems(VerticalAlign.Center)
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
- .width('100%')
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
.padding({ top: this.safeTop })
|
|
.padding({ top: this.safeTop })
|
|
|
- .linearGradient({ angle: 135, colors: [['#CAE2F9', -0.1571], ['#D4D1F4', 0.4709], ['#EDF5FD', 1.1235]] })
|
|
|
|
|
- .margin({ bottom: 20 })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tabs({ controller: this.tabController }) {
|
|
Tabs({ controller: this.tabController }) {
|
|
|
TabContent() {
|
|
TabContent() {
|
|
|
RegisterOrResetPassComp({ loginCollect: new LoginCollect("register") })
|
|
RegisterOrResetPassComp({ loginCollect: new LoginCollect("register") })
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
.padding({ left: 20, right: 20 })
|
|
.padding({ left: 20, right: 20 })
|
|
|
|
|
|
|
@@ -119,17 +112,21 @@ struct LoginPage {
|
|
|
}
|
|
}
|
|
|
.padding({ left: 20, right: 20 })
|
|
.padding({ left: 20, right: 20 })
|
|
|
}
|
|
}
|
|
|
- .scrollable(false)
|
|
|
|
|
- .layoutWeight(1)
|
|
|
|
|
.barHeight(0)
|
|
.barHeight(0)
|
|
|
-
|
|
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ .scrollable(false)
|
|
|
|
|
+ .backgroundColor('rgba(255, 255, 255, 0.3)')
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- .padding({
|
|
|
|
|
-
|
|
|
|
|
- bottom: this.safeBottom
|
|
|
|
|
- })
|
|
|
|
|
.height('100%')
|
|
.height('100%')
|
|
|
|
|
+ .padding({ bottom: this.safeBottom })
|
|
|
|
|
+ .linearGradient({ colors: [['#99F1D132', 0], ['#00F1D132', 0.5]] })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+@Builder
|
|
|
|
|
+function LoginBuilder() {
|
|
|
|
|
+ NavDestination() {
|
|
|
|
|
+ LoginPage()
|
|
|
|
|
+ }
|
|
|
|
|
+ .hideTitleBar(true)
|
|
|
|
|
+}
|