|
@@ -1,10 +1,10 @@
|
|
|
-import { AppStorageKeyCollect, BasicType, YTAvoid, yTRouter, RouterPage } from 'basic'
|
|
|
|
|
|
|
+import { AppStorageKeyCollect, BasicType, YTAvoid } from 'basic'
|
|
|
import { webview } from '@kit.ArkWeb'
|
|
import { webview } from '@kit.ArkWeb'
|
|
|
|
|
|
|
|
|
|
|
|
|
// 隐私协议 说明页面
|
|
// 隐私协议 说明页面
|
|
|
|
|
+@Entry
|
|
|
@Component
|
|
@Component
|
|
|
-@RouterPage
|
|
|
|
|
struct PrivacyPage {
|
|
struct PrivacyPage {
|
|
|
@StorageProp(YTAvoid.SAFE_TOP_KEY) safeTop: number = 0
|
|
@StorageProp(YTAvoid.SAFE_TOP_KEY) safeTop: number = 0
|
|
|
// 倒计时
|
|
// 倒计时
|
|
@@ -22,14 +22,15 @@ struct PrivacyPage {
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
_onBack(){
|
|
_onBack(){
|
|
|
- yTRouter.pop()
|
|
|
|
|
- return true
|
|
|
|
|
|
|
+ this.getUIContext().getRouter().back()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 同意
|
|
// 同意
|
|
|
_onConfirm(){
|
|
_onConfirm(){
|
|
|
AppStorage.set(AppStorageKeyCollect.FIRST_ENTER_APP, true)
|
|
AppStorage.set(AppStorageKeyCollect.FIRST_ENTER_APP, true)
|
|
|
- yTRouter.clear()
|
|
|
|
|
|
|
+ this.getUIContext().getRouter().pushUrl({
|
|
|
|
|
+ url: 'pages/Index'
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
aboutToAppear(): void {
|
|
aboutToAppear(): void {
|
|
@@ -39,88 +40,79 @@ struct PrivacyPage {
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
build() {
|
|
build() {
|
|
|
- NavDestination() {
|
|
|
|
|
- Column({space: 40}) {
|
|
|
|
|
- Text('隐私政策及用户协议')
|
|
|
|
|
- .fontSize(18)
|
|
|
|
|
- .fontWeight(500)
|
|
|
|
|
- .fontColor(Color.Black)
|
|
|
|
|
-
|
|
|
|
|
- // Main
|
|
|
|
|
- Column({space: 10}){
|
|
|
|
|
- ForEach(this.forEach, (item: BasicType) => {
|
|
|
|
|
- Column({ space: 8 }) {
|
|
|
|
|
- Text(item.text)
|
|
|
|
|
- .fontColor(Color.Black)
|
|
|
|
|
- Row() {
|
|
|
|
|
- Web({
|
|
|
|
|
- src: item.message,
|
|
|
|
|
- controller: this.webviewController,
|
|
|
|
|
- renderMode: RenderMode.ASYNC_RENDER // 设置渲染模式
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- .height(225)
|
|
|
|
|
- .width('100%')
|
|
|
|
|
- .padding(8)
|
|
|
|
|
- .border({ width: 1 })
|
|
|
|
|
- }
|
|
|
|
|
- .alignItems(HorizontalAlign.Start)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ Column({space: 40}) {
|
|
|
|
|
+ Text('隐私政策及用户协议')
|
|
|
|
|
+ .fontSize(18)
|
|
|
|
|
+ .fontWeight(500)
|
|
|
|
|
+ .fontColor(Color.Black)
|
|
|
|
|
|
|
|
- Blank().height(10)
|
|
|
|
|
|
|
+ // Main
|
|
|
|
|
+ Column({space: 10}){
|
|
|
|
|
+ ForEach(this.forEach, (item: BasicType) => {
|
|
|
|
|
+ Column({ space: 8 }) {
|
|
|
|
|
+ Text(item.text)
|
|
|
|
|
+ .fontColor(Color.Black)
|
|
|
|
|
+ Row() {
|
|
|
|
|
+ Web({
|
|
|
|
|
+ src: item.message,
|
|
|
|
|
+ controller: this.webviewController,
|
|
|
|
|
+ renderMode: RenderMode.ASYNC_RENDER // 设置渲染模式
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ .height(225)
|
|
|
|
|
+ .width('100%')
|
|
|
|
|
+ .padding(8)
|
|
|
|
|
+ .border({ width: 1 })
|
|
|
|
|
+ }
|
|
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- Row(){
|
|
|
|
|
- Text('我不同意并返回')
|
|
|
|
|
- .fontSize(16)
|
|
|
|
|
- .fontWeight(400)
|
|
|
|
|
- .fontColor('#676767')
|
|
|
|
|
- .onClick(() => { this._onBack() })
|
|
|
|
|
|
|
+ Blank().height(10)
|
|
|
|
|
|
|
|
- Text(`我已全部了解${this.time != 0 ? ' ('+this.time+')' : '' }`)
|
|
|
|
|
- .fontSize(18)
|
|
|
|
|
- .fontWeight(500)
|
|
|
|
|
- .borderRadius(20)
|
|
|
|
|
- .fontColor('#FAFAFA')
|
|
|
|
|
- .enabled(this.time == 0)
|
|
|
|
|
- .backgroundColor(this.time == 0 ?'#7186F9' : '#ffacbaf3')
|
|
|
|
|
- .padding({ left: 20, top: 8, right: 20, bottom: 8 })
|
|
|
|
|
- .onClick(() => { this._onConfirm() })
|
|
|
|
|
- }
|
|
|
|
|
- .width('100%')
|
|
|
|
|
- .padding({top: 5, bottom: 5})
|
|
|
|
|
- .alignItems(VerticalAlign.Center)
|
|
|
|
|
- .justifyContent(FlexAlign.SpaceBetween )
|
|
|
|
|
|
|
+ Row(){
|
|
|
|
|
+ Text('我不同意并返回')
|
|
|
|
|
+ .fontSize(16)
|
|
|
|
|
+ .fontWeight(400)
|
|
|
|
|
+ .fontColor('#676767')
|
|
|
|
|
+ .onClick(() => { this._onBack() })
|
|
|
|
|
|
|
|
- Row(){
|
|
|
|
|
- Text('*请仔细阅读以上协议内容,点击同意表示您已充分理解并接受协议条款')
|
|
|
|
|
- .fontSize(10)
|
|
|
|
|
- .fontWeight(400)
|
|
|
|
|
- .fontColor('#F50000')
|
|
|
|
|
- }
|
|
|
|
|
- .padding({top: 5})
|
|
|
|
|
- .width("100%")
|
|
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
|
|
|
|
+ Text(`我已全部了解${this.time != 0 ? ' ('+this.time+')' : '' }`)
|
|
|
|
|
+ .fontSize(18)
|
|
|
|
|
+ .fontWeight(500)
|
|
|
|
|
+ .borderRadius(20)
|
|
|
|
|
+ .fontColor('#FAFAFA')
|
|
|
|
|
+ .enabled(this.time == 0)
|
|
|
|
|
+ .backgroundColor(this.time == 0 ?'#7186F9' : '#ffacbaf3')
|
|
|
|
|
+ .padding({ left: 20, top: 8, right: 20, bottom: 8 })
|
|
|
|
|
+ .onClick(() => { this._onConfirm() })
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
- .layoutWeight(1)
|
|
|
|
|
- .alignItems(HorizontalAlign.Start)
|
|
|
|
|
- .justifyContent(FlexAlign.Start)
|
|
|
|
|
|
|
+ .padding({top: 5, bottom: 5})
|
|
|
|
|
+ .alignItems(VerticalAlign.Center)
|
|
|
|
|
+ .justifyContent(FlexAlign.SpaceBetween )
|
|
|
|
|
+
|
|
|
|
|
+ Row(){
|
|
|
|
|
+ Text('*请仔细阅读以上协议内容,点击同意表示您已充分理解并接受协议条款')
|
|
|
|
|
+ .fontSize(10)
|
|
|
|
|
+ .fontWeight(400)
|
|
|
|
|
+ .fontColor('#F50000')
|
|
|
|
|
+ }
|
|
|
|
|
+ .padding({top: 5})
|
|
|
|
|
+ .width("100%")
|
|
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
- .height('100%')
|
|
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
.padding({left: 16, right: 16})
|
|
.padding({left: 16, right: 16})
|
|
|
- .alignItems(HorizontalAlign.Center)
|
|
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
|
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
|
|
+ .justifyContent(FlexAlign.Start)
|
|
|
}
|
|
}
|
|
|
|
|
+ .width('100%')
|
|
|
|
|
+ .height('100%')
|
|
|
|
|
+ .alignItems(HorizontalAlign.Center)
|
|
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
.backgroundColor(Color.White)
|
|
.backgroundColor(Color.White)
|
|
|
- .hideTitleBar(true)
|
|
|
|
|
.padding({ top: this.safeTop })
|
|
.padding({ top: this.safeTop })
|
|
|
- .onBackPressed(() => { return this._onBack() })
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-@Builder
|
|
|
|
|
-function PrivacyBuilder() {
|
|
|
|
|
- PrivacyPage()
|
|
|
|
|
-}
|
|
|