diff --git a/entry/src/main/ets/common/Constant.ets b/entry/src/main/ets/common/Constant.ets index c655661308ec605126bda54c1b09dc51c09e9e56..b899519e58bba65def0f8fbdcf10e39b9d8533be 100755 --- a/entry/src/main/ets/common/Constant.ets +++ b/entry/src/main/ets/common/Constant.ets @@ -29,7 +29,7 @@ export class CommonConstant { /** * Dialog text value. */ - static readonly WEB_ALERT_DIALOG_TEXT_VALUE: string = '恭喜您抽中:'; + static readonly WEB_ALERT_DIALOG_TEXT_VALUE: ResourceStr = $r('app.string.congratulate'); /** * Size. */ @@ -82,4 +82,4 @@ export class CommonConstant { static readonly MAIN_CONSTANT_BUTTON_WIDTH: string = '86.7%'; static readonly MAIN_CONSTANT_BUTTON_BORDER_RADIUS: number = 20; static readonly MAIN_CONSTANT_BUTTON_FONT_SIZE: number = 16; -} +} \ No newline at end of file diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 6250afa27870b9f851bb62ab9c86922c40444aa8..d1e94928ce215b5bbabf10a60d5419f637e341bd 100755 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -63,4 +63,4 @@ export default class EntryAbility extends UIAbility { hilog.isLoggable(0x0000, 'testTag', hilog.LogLevel.INFO); hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); } -} +} \ No newline at end of file diff --git a/entry/src/main/ets/pages/VuePage.ets b/entry/src/main/ets/pages/VuePage.ets index f893d2c68e94ae237901ab6fd9fa9d43dec5e9ca..d239570b0291419e8afd3a31eebfa2ae76997a67 100755 --- a/entry/src/main/ets/pages/VuePage.ets +++ b/entry/src/main/ets/pages/VuePage.ets @@ -33,14 +33,12 @@ class LinkClass { } } -const TITLE: string = '以上为Vue页面'; - @Entry @Component struct VuePage { - webController: webview.WebviewController = new webview.WebviewController(); @State params: object = router.getParams(); @State linkObj: LinkClass = new LinkClass(); + webController: webview.WebviewController = new webview.WebviewController(); build() { Stack({ alignContent: Alignment.TopStart }) { @@ -82,7 +80,7 @@ struct VuePage { controller: this.webController }) Column() { - Text(TITLE) + Text($r('app.string.tip_vue')) .fontSize(Const.WEB_CONSTANT_TEXT_VALUE_FONT_SIZE) .textAlign(TextAlign.Center) .fontColor($r('app.color.text_value_font_color')) diff --git a/entry/src/main/ets/pages/WebPage.ets b/entry/src/main/ets/pages/WebPage.ets index 450ad83220f3a6aa1d434d8741a05589cd365db7..2882b8802ee7a840fe78689c64eafc69839f9f2f 100755 --- a/entry/src/main/ets/pages/WebPage.ets +++ b/entry/src/main/ets/pages/WebPage.ets @@ -13,9 +13,8 @@ * limitations under the License. */ -import { router } from '@kit.ArkUI'; +import { promptAction, router } from '@kit.ArkUI'; import { webview } from '@kit.ArkWeb'; -import { promptAction } from '@kit.ArkUI'; import { CommonConstant as Const } from '../common/Constant'; class LinkClass { @@ -33,8 +32,6 @@ class LinkClass { } } -const TITLE: string = '以上为HTML页面'; - @Entry @Component struct WebPage { @@ -114,7 +111,7 @@ struct WebPage { }) Column() { - Text(TITLE) + Text($r('app.string.tip_html')) .fontSize(Const.WEB_CONSTANT_TEXT_VALUE_FONT_SIZE) .textAlign(TextAlign.Center) .fontColor($r('app.color.text_value_font_color')) diff --git a/entry/src/main/ets/viewmodel/NavigatorBean.ets b/entry/src/main/ets/viewmodel/NavigatorBean.ets index e09aa4a7c54e5b03e7cd028accb2c2ea64df3727..a7e610790a259ac1748c7de0e84a91dc7cce5574 100755 --- a/entry/src/main/ets/viewmodel/NavigatorBean.ets +++ b/entry/src/main/ets/viewmodel/NavigatorBean.ets @@ -26,5 +26,4 @@ export class NavigatorBean { * Prompt message. */ tips: Resource | string = ''; -} - +} \ No newline at end of file diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index c2a38440d4b15f1ec0df7d8db54cb30cd6a265c5..546e62e0451bf3f7f7d2b16db6c03a981bd5edd4 100755 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -79,6 +79,18 @@ { "name": "reason", "value": "Used to initiate network data requests." + }, + { + "name": "congratulate", + "value": "Congratulations on winning: " + }, + { + "name": "tip_vue", + "value": "The above is the Vue page." + }, + { + "name": "tip_html", + "value": "The above is the HTML page." } ] } \ No newline at end of file diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json index a768a80457cd3a4b88ea2abbfb8ee6c3c5158258..e23d670f30e5cd98c2b936daeda85c3213afd9d5 100755 --- a/entry/src/main/resources/en_US/element/string.json +++ b/entry/src/main/resources/en_US/element/string.json @@ -79,6 +79,18 @@ { "name": "reason", "value": "Used to initiate network data requests." + }, + { + "name": "congratulate", + "value": "Congratulations on winning: " + }, + { + "name": "tip_vue", + "value": "The above is the Vue page." + }, + { + "name": "tip_html", + "value": "The above is the HTML page." } ] } \ No newline at end of file diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json index 5c8c70e2a5052afb951c866bb6a6bca73f52ed7a..55a768daa45f27628d2f458db3ecca75719b9dc5 100755 --- a/entry/src/main/resources/zh_CN/element/string.json +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -79,6 +79,18 @@ { "name": "reason", "value": "Used to initiate network data requests." + }, + { + "name": "congratulate", + "value": "恭喜您抽中: " + }, + { + "name": "tip_vue", + "value": "以上为Vue页面" + }, + { + "name": "tip_html", + "value": "以上为HTML页面" } ] } \ No newline at end of file