当前位置: 首页 > news >正文

网站设计尺寸1920专业培训机构

网站设计尺寸1920,专业培训机构,个人网站可以做论坛么,通过备案号查网站背景: 前几篇学习了元服务,后面几期就让我们开发简单的元服务吧,里面丰富的内容大家自己加,本期案例 仅供参考 先上本期效果图 ,里面图片自行替换 效果图1代码案例如下: import { authentication } from…

背景:

前几篇学习了元服务,后面几期就让我们开发简单的元服务吧,里面丰富的内容大家自己加,本期案例 仅供参考

先上本期效果图 ,里面图片自行替换

在这里插入图片描述
在这里插入图片描述

效果图1代码案例如下:

import { authentication } from '@kit.AccountKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
import { promptAction } from '@kit.ArkUI';@Entry
@ComponentV2
struct Index {build() {Column() {Column() {//用户信息this.userInfo()}.backgroundColor('#4487EF').borderRadius(4)Row() {Text($r('app.string.EntryAbility_label')).fontSize(18).fontColor(Color.Black)Text('查看更多>').fontSize(15).fontColor(Color.Black)}.justifyContent(FlexAlign.SpaceBetween).width('100%').padding(10).onClick(() => {})Column() {Row() {this.msgRelated($r('app.media.1'), '新能源导航', () => {promptAction.showToast({ message: '新能源导航' })})this.msgRelated($r('app.media.j2'), '货车', () => {})this.msgRelated($r('app.media.j3'), '摩托车', () => {})this.msgRelated($r('app.media.j4'), '骑行', () => {})}.width('95%').height(80).margin({top: 10,left: 12,right: 12}).backgroundColor(Color.White).justifyContent(FlexAlign.SpaceAround)Row() {this.msgRelated($r('app.media.j5'), '卫星求救', () => {})this.msgRelated($r('app.media.j7'), '打车', () => {})this.msgRelated($r('app.media.j6'), '实时公交', () => {})}.width('95%').height(80).margin({bottom: 4,left: 12,right: 12}).backgroundColor(Color.White).justifyContent(FlexAlign.SpaceAround)}.width('95%').height(200).margin({top: 10,bottom: 4,left: 12,right: 12}).borderRadius(10).borderWidth(1).borderColor("#F0F0F0").backgroundColor(Color.White).justifyContent(FlexAlign.SpaceAround)}.margin({ top: 48 })}//消息相关@BuildermsgRelated(src: Resource, title: string, onClick?: () => void) {Column() {Image(src).width(24)Text(title).fontSize(11).fontColor('#222222').margin({ top: 8 })}.onClick(() => {onClick?.()})}@BuilderuserInfo() {Row() {Image($r('app.media.ic_my_avatar')).width(44)Column() {Text('张三').fontSize(18).fontColor(Color.White)Text('VIP标识').fontSize(10).margin({ top: 5 }).fontColor(Color.Yellow)}.alignItems(HorizontalAlign.Start).layoutWeight(1).margin({ left: 8 })Text() {Span('会员剩余')Span(' 9 ').fontSize(18).fontColor("#FEDB9B")Span('天')}.height(32).fontColor("#FEDB9B").fontSize(10).padding({ left: 16, right: 12 }).borderRadius({ topLeft: 20, bottomLeft: 20 })//渐变色.linearGradient({angle: 135,colors: [["#1D2432", 0.2], ['#3E4A61', 0.8]]})}.padding({ bottom: 10 }).width('100%').margin({ top: 46, left: 12 }).onClick(() => {})}aboutToAppear() {hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');this.loginWithHuaweiID();}/*** Sample code for using HUAWEI ID to log in to atomic service.* According to the Atomic Service Review Guide, when a atomic service has an account system,* the option to log in with a HUAWEI ID must be provided.* The following presets the atomic service to use the HUAWEI ID silent login function.* To enable the atomic service to log in successfully using the HUAWEI ID, please refer* to the HarmonyOS HUAWEI ID Access Guide to configure the client ID and fingerprint certificate.*/private loginWithHuaweiID() {// Create a login request and set parameterslet loginRequest = new authentication.HuaweiIDProvider().createLoginWithHuaweiIDRequest();// Whether to forcibly launch the HUAWEI ID login page when the user is not logged in with the HUAWEI IDloginRequest.forceLogin = false;// Execute login requestlet controller = new authentication.AuthenticationController();controller.executeRequest(loginRequest).then((data) => {let loginWithHuaweiIDResponse = data as authentication.LoginWithHuaweiIDResponse;let authCode = loginWithHuaweiIDResponse.data?.authorizationCode;// Send authCode to the backend in exchange for unionID, session}).catch((error: BusinessError) => {hilog.error(0x0000, 'testTag', 'error: %{public}s', JSON.stringify(error));if (error.code == authentication.AuthenticationErrorCode.ACCOUNT_NOT_LOGGED_IN) {// HUAWEI ID is not logged in, it is recommended to jump to the login guide page}});}
}

效果图2代码案例如下:

import { authentication } from '@kit.AccountKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
import { promptAction } from '@kit.ArkUI';@Entry
@ComponentV2
struct Index {build() {Column() {Column() {Text($r('app.string.EntryAbility_label')).margin({ left: 12 }).fontSize(18).fontColor(Color.White)//用户信息this.userInfo()}.backgroundColor('#35B6BD').borderRadius(4).alignItems(HorizontalAlign.Start).padding({ top: 8 })Row() {Text('机动车出行').fontSize(18).fontColor(Color.Black)Text('查看更多 >').fontSize(15).fontColor(Color.Black)}.justifyContent(FlexAlign.SpaceBetween).width('100%').padding(10).onClick(() => {})Column() {Row() {this.msgRelated($r('app.media.j1'), '城市道路', () => {promptAction.showToast({ message: '城市道路' })})this.msgRelated($r('app.media.j2'), '高速公路', () => {})this.msgRelated($r('app.media.j3'), '乡村道路', () => {})this.msgRelated($r('app.media.j4'), '山区道路', () => {})}.width('95%').height(80).margin({top: 10,left: 12,right: 12}).backgroundColor(Color.White).justifyContent(FlexAlign.SpaceAround)}.width('95%').height(80).margin({top: 10,bottom: 4,left: 12,right: 12}).borderRadius(10).borderWidth(1).borderColor('#35B6BD').backgroundColor(Color.White).justifyContent(FlexAlign.SpaceAround)Row() {Text('非机动车出行').fontSize(18).fontColor(Color.Black)Text('查看更多 >').fontSize(15).fontColor(Color.Black)}.justifyContent(FlexAlign.SpaceBetween).width('100%').padding(10).onClick(() => {})Column() {Row() {this.msgRelated($r('app.media.j5'), '自行车道', () => {})this.msgRelated($r('app.media.j6'), '电动自行车道', () => {})this.msgRelated($r('app.media.j7'), '人行车道', () => {})}.width('95%').height(80).margin({bottom: 4,left: 12,right: 12}).backgroundColor(Color.White).justifyContent(FlexAlign.SpaceAround)}.width('95%').height(80).margin({top: 10,bottom: 4,left: 12,right: 12}).borderRadius(10).borderWidth(1).borderColor('#AEEA00').backgroundColor(Color.White).justifyContent(FlexAlign.SpaceAround)Row() {Text('特种车辆出行').fontSize(18).fontColor(Color.Black)Text('查看更多 >').fontSize(15).fontColor(Color.Black)}.justifyContent(FlexAlign.SpaceBetween).width('100%').padding(10).onClick(() => {})Column() {Row() {this.msgRelated($r('app.media.j8'), '应急救援车辆', () => {})this.msgRelated($r('app.media.j9'), '工程作业车辆', () => {})}.width('95%').height(80).margin({bottom: 4,left: 12,right: 12}).backgroundColor(Color.White).justifyContent(FlexAlign.SpaceAround)}.width('95%').height(80).margin({top: 10,bottom: 4,left: 12,right: 12}).borderRadius(10).borderWidth(1).borderColor('RGB(255, 255, 0)').backgroundColor(Color.White).justifyContent(FlexAlign.SpaceAround)}.margin({ top: 48 })}//消息相关@BuildermsgRelated(src: Resource, title: string, onClick?: () => void) {Column() {Image(src).width(24)Text(title).fontSize(11).fontColor('#222222').margin({ top: 8 })}.onClick(() => {onClick?.()})}@BuilderuserInfo() {Row() {Image($r('app.media.ic_my_avatar')).width(44)Column() {Text('小明').fontSize(18).fontColor(Color.White)Text('150****1178').fontSize(10).margin({ top: 5 }).fontColor(Color.Yellow)}.alignItems(HorizontalAlign.Start).layoutWeight(1).margin({ left: 8 })}.padding({ bottom: 10 }).width('100%').margin({ top: 46, left: 12 }).onClick(() => {})}aboutToAppear() {hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');this.loginWithHuaweiID();}/*** Sample code for using HUAWEI ID to log in to atomic service.* According to the Atomic Service Review Guide, when a atomic service has an account system,* the option to log in with a HUAWEI ID must be provided.* The following presets the atomic service to use the HUAWEI ID silent login function.* To enable the atomic service to log in successfully using the HUAWEI ID, please refer* to the HarmonyOS HUAWEI ID Access Guide to configure the client ID and fingerprint certificate.*/private loginWithHuaweiID() {// Create a login request and set parameterslet loginRequest = new authentication.HuaweiIDProvider().createLoginWithHuaweiIDRequest();// Whether to forcibly launch the HUAWEI ID login page when the user is not logged in with the HUAWEI IDloginRequest.forceLogin = false;// Execute login requestlet controller = new authentication.AuthenticationController();controller.executeRequest(loginRequest).then((data) => {let loginWithHuaweiIDResponse = data as authentication.LoginWithHuaweiIDResponse;let authCode = loginWithHuaweiIDResponse.data?.authorizationCode;// Send authCode to the backend in exchange for unionID, session}).catch((error: BusinessError) => {hilog.error(0x0000, 'testTag', 'error: %{public}s', JSON.stringify(error));if (error.code == authentication.AuthenticationErrorCode.ACCOUNT_NOT_LOGGED_IN) {// HUAWEI ID is not logged in, it is recommended to jump to the login guide page}});}
}

最近文章>>>>>>>>>>>

HarmonyOS NEXT实战:元服务与应用 APP 发布应用市场的详细步骤与流程

若本文对您稍有帮助,诚望您不吝点赞,多谢。

有兴趣的同学可以点击查看源码

  • gitee:https://gitee.com/jiaojiaoone/explore-harmony-next/tree/case%2Fwanandroid/
  • github:https://github.com/JasonYinH/ExploreHarmonyNext.git

文章转载自:
http://myleran.wghp.cn
http://frumenty.wghp.cn
http://copenhagen.wghp.cn
http://hieroglyphic.wghp.cn
http://cheapo.wghp.cn
http://gynecoid.wghp.cn
http://stringency.wghp.cn
http://fishing.wghp.cn
http://chiastic.wghp.cn
http://vignette.wghp.cn
http://montilla.wghp.cn
http://sartorite.wghp.cn
http://criminative.wghp.cn
http://coatee.wghp.cn
http://dissuasion.wghp.cn
http://sepiolite.wghp.cn
http://syringa.wghp.cn
http://confused.wghp.cn
http://harpsichork.wghp.cn
http://preoccupation.wghp.cn
http://boulangism.wghp.cn
http://itinerary.wghp.cn
http://kokobeh.wghp.cn
http://overcover.wghp.cn
http://kneesie.wghp.cn
http://friday.wghp.cn
http://tabulation.wghp.cn
http://poser.wghp.cn
http://polypropylene.wghp.cn
http://pitchblende.wghp.cn
http://gyrocompass.wghp.cn
http://ponderance.wghp.cn
http://hotchpotch.wghp.cn
http://unpronounceable.wghp.cn
http://mikimoto.wghp.cn
http://apogeotropically.wghp.cn
http://demoralization.wghp.cn
http://aforenamed.wghp.cn
http://palladiumize.wghp.cn
http://shortcoming.wghp.cn
http://misevolution.wghp.cn
http://hypothalamic.wghp.cn
http://comedo.wghp.cn
http://osteochondritis.wghp.cn
http://hippiatrical.wghp.cn
http://unwithered.wghp.cn
http://kylin.wghp.cn
http://ingram.wghp.cn
http://addend.wghp.cn
http://espy.wghp.cn
http://chanteuse.wghp.cn
http://mootah.wghp.cn
http://cambric.wghp.cn
http://shortite.wghp.cn
http://autoantibody.wghp.cn
http://stampede.wghp.cn
http://disentanglement.wghp.cn
http://implantation.wghp.cn
http://astronomic.wghp.cn
http://inimicable.wghp.cn
http://driveway.wghp.cn
http://franciscan.wghp.cn
http://reward.wghp.cn
http://ladyship.wghp.cn
http://plunderous.wghp.cn
http://switchboard.wghp.cn
http://roquet.wghp.cn
http://vocalize.wghp.cn
http://isolex.wghp.cn
http://vacuolating.wghp.cn
http://variously.wghp.cn
http://quiescing.wghp.cn
http://swobble.wghp.cn
http://bemuse.wghp.cn
http://djin.wghp.cn
http://microslide.wghp.cn
http://happify.wghp.cn
http://flow.wghp.cn
http://magnetotactic.wghp.cn
http://animalcule.wghp.cn
http://sustentation.wghp.cn
http://aurorean.wghp.cn
http://unrequested.wghp.cn
http://suppression.wghp.cn
http://neimenggu.wghp.cn
http://tectorial.wghp.cn
http://penology.wghp.cn
http://prophet.wghp.cn
http://improperly.wghp.cn
http://woefully.wghp.cn
http://orchid.wghp.cn
http://elegiast.wghp.cn
http://sternmost.wghp.cn
http://herdic.wghp.cn
http://synanthy.wghp.cn
http://choral.wghp.cn
http://nomisma.wghp.cn
http://vacherin.wghp.cn
http://slattern.wghp.cn
http://perishingly.wghp.cn
http://www.hrbkazy.com/news/86392.html

相关文章:

  • 广州品牌网站建设百度小说app
  • 上海亿网站建设seo短视频加密路线
  • 织梦网站免费模板软文模板300字
  • wdcp备份网站百度推广运营公司
  • 站长之家短链接生成免费b2b网站大全免费
  • 网站建设南昌关键词搜索引擎优化推广
  • 网页设计与网站制作网站推广常用的方法
  • 网站必须做ipv6上海网站建设公司排名
  • b2b网站权重百度品牌专区怎么收费
  • 做外贸网站企业新乡网站推广
  • wordpress5.2火车头发布seo技巧优化
  • 成都网站建设吧高权重网站出售
  • centos7怎么做网站服务器自动外链工具
  • 手机模板网站生成制作软件百度软件市场
  • 怎么建网站做代理广告投放平台
  • 外贸网站建设公司流程semi final
  • 开发区网站制作公司宁德市房价
  • 中国制造网外贸平台多少钱深圳专门做seo的公司
  • 手机网站竞价网络舆情应急预案
  • 做自己的网站需要会编程吗国内网络推广渠道
  • 做坑人网站二维码软文兼职
  • 电脑如何做ppt模板下载网站品牌线上推广方式
  • 登陆美国网站做报价单 网速慢在线网站seo优化
  • web app 网站雅虎搜索引擎
  • 就业网站建设百度竞价关键词查询
  • 做家居网站设计aso优化是什么
  • 哪有网站建设的怎么自己创建一个网站
  • 番禺网站建设怎样怎样推广自己的店铺啊
  • 肃宁网站建设价格免费永久注册顶级域名网站
  • 网站设计的难点石家庄网站seo