背景:
前几篇学习了元服务,后面几期就让我们开发简单的元服务吧,里面丰富的内容大家自己加,本期案例 仅供参考
先上本期效果图 ,里面图片自行替换
效果图1完整代码案例如下:
import { authentication } from '@kit.AccountKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
@Entry
@Component
struct Index {
build() {
Column({ space: 16 }) {
Text($r('app.string.EntryAbility_label')).fontSize(24).fontWeight(FontWeight.Bold).margin({ top: 10, left: 16 })
Column({ space: 10 }) {
Row() {
this.fuYong($r('app.media.img'), '西格拉姆', '艺术博物馆')
Column({ space: 6 }) {
Column({ space: 7 }) {
Image($r('app.media.img_1')).width(150).he