背景:
前几篇学习了元服务,后面几期就让我们开发简单的元服务吧,里面丰富的内容大家自己加,本期案例 仅供参考
先上本期效果图 ,里面图片自行替换
效果图1完整代码案例如下:
import { authentication } from '@kit.AccountKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
@Entry
@ComponentV2
struct Index {
build() {
Column() {
Image($r('app.media.diandongche')).width('100%')
.height(300)
Row() {
Column({ space: 5 }) {
Image($r('app.media.dizhi')).width(50).height(50)
Text('中关村一号')
}
.backgroundColor('#D8D8FB')
.borderWidth(1)
.borderColor('#FF7F00')
.borderRadius(10)
.width(