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

wap移动建站系统西宁网站开发

wap移动建站系统,西宁网站开发,wordpress添加go,dw网页设计代码免费鸿蒙ArkUI学习实现一个轮播图、一个九宫格、一个图文列表。然后请求第三方HTTPAPI加载数据,使用了axios鸿蒙扩展库来实现第三方API数据加载并动态显示数据。 import {navigateTo } from ../common/Pageimport axios, {AxiosResponse } from ohos/axiosinterface IDa…

鸿蒙ArkUI学习实现一个轮播图、一个九宫格、一个图文列表。然后请求第三方HTTPAPI加载数据,使用了axios鸿蒙扩展库来实现第三方API数据加载并动态显示数据。

import {navigateTo
} from '../common/Page'import axios, {AxiosResponse
} from '@ohos/axios'interface IDataDataAttr {"title": string
}
interface IDataData {"img": string,"remark": string,"id": number,"title": string,"attr": IDataDataAttr
}
interface IData {"msg": string,"code": number,"data": IDataData[]
}@Entry
@Component
export struct Index {@Provide data: IData = {"code": 0,"msg": "","data": [{"title": "","remark": "","id": 0,"attr": {"title": ""},"img": ""}]}async dataApi() {try {const response: AxiosResponse = await axios.post < IData,AxiosResponse < IData > , null > ('https://php.diygw.com/article.php');this.data = response ? response.data : null} catch (error) {console.error(JSON.stringify(error));}}async onPageShow() {await this.dataApi()}async aboutToAppear() {await this.onPageShow()}build() {Column() {Navigation().width('100%').height('56vp').backgroundColor('#07c160').title(this.NavigationTitle()).titleMode(NavigationTitleMode.Mini).align(Alignment.Center).hideBackButton(true)Scroll() {Flex({direction: FlexDirection.Column}) {Flex() {Swiper() {Column() {Image($r('app.media.pic1')).objectFit(ImageFit.Fill).width('100%').height('150vp')Text('滑块一').width('100%').textAlign(TextAlign.Start).backgroundColor("rgba(0,0,0,0.28)").padding(10).position({y: 110})}Column() {Image($r('app.media.pic2')).objectFit(ImageFit.Fill).width('100%').height('150vp')Text('滑块二').width('100%').textAlign(TextAlign.Start).backgroundColor("rgba(0,0,0,0.28)").padding(10).position({y: 110})}Column() {Image($r('app.media.pic3')).objectFit(ImageFit.Fill).width('100%').height('150vp')Text('滑块三').width('100%').textAlign(TextAlign.Start).backgroundColor("rgba(0,0,0,0.28)").padding(10).position({y: 110})}}.interval(3000).autoPlay(true).loop(true).indicatorStyle({size: 30,selectedColor: '#fff',color: 'rgba(51, 51, 51, 0.39)'})}Grid() {ForEach(this.data.data, (item) => {GridItem() {Column({space: 5}) {Image(item.img).objectFit(ImageFit.Fill).width('42vp').height('42vp')Text(item.title).fontSize('12fp').width('100%').textAlign(TextAlign.Center)}.width('100%')}}, item => JSON.stringify(item));}.padding({top: '10vp',bottom: '10vp'}).height(Math.ceil(this.data.data.length / 3) * 71 + 20).columnsTemplate('1fr 1fr 1fr ').rowsGap(15).layoutDirection(GridDirection.Row)List() {ListItem() {Flex({direction: FlexDirection.Row,alignItems: ItemAlign.Center,}) {Image($r('app.media.grid1')).flexShrink(0).objectFit(ImageFit.Fill).width('42vp').height('42vp')Column() {Text('菜单一').fontSize('14fp').width('100%')Text('说明文字').fontSize('12fp').width('100%')}.padding({left: 5})Image($r('app.media.ic_arrow')).flexShrink(0).objectFit(ImageFit.Contain).width('12vp').height('24vp')}.width('100%')}.padding(15).borderWidth({bottom: 1}).borderColor('#efefef')ListItem() {Flex({direction: FlexDirection.Row,alignItems: ItemAlign.Center,}) {Image($r('app.media.grid2')).flexShrink(0).objectFit(ImageFit.Fill).width('42vp').height('42vp')Column() {Text('菜单二').fontSize('14fp').width('100%')Text('说明文字').fontSize('12fp').width('100%')}.padding({left: 5})Image($r('app.media.ic_arrow')).flexShrink(0).objectFit(ImageFit.Contain).width('12vp').height('24vp')}.width('100%')}.padding(15).borderWidth({bottom: 1}).borderColor('#efefef')ListItem() {Flex({direction: FlexDirection.Row,alignItems: ItemAlign.Center,}) {Image($r('app.media.grid3')).flexShrink(0).objectFit(ImageFit.Fill).width('42vp').height('42vp')Column() {Text('菜单三').fontSize('14fp').width('100%')Text('说明文字').fontSize('12fp').width('100%')}.padding({left: 5})Image($r('app.media.ic_arrow')).flexShrink(0).objectFit(ImageFit.Contain).width('12vp').height('24vp')}.width('100%')}.padding(15).borderWidth({bottom: 1}).borderColor('#efefef')}}.height('100%')}.height('100%').layoutWeight(1)}.alignItems(HorizontalAlign.Start).height('100%')}@BuilderNavigationTitle() {Column() {Text('首页').width('100%').textAlign(TextAlign.Center).height('28vp').fontSize('20fp').fontWeight(500).fontColor('#fff')}}}

http://www.yayakq.cn/news/67034/

相关文章:

  • 佛山营销型网站定制北京酷站科技有限公司
  • 昌邑网站制作建网站软件 优帮云
  • 厂家做网站小程序的模板
  • 排名好的青岛网站建设太仓网站建设
  • 2016企业网站源码沧州*网站建设
  • 企业做网站域名需要自己申请吗wordpress 导航下拉
  • html5国内网站欣赏设计方案汇报开场白
  • 网站设计西安学习今天
  • 做物流公司网站哪家好做销售在哪些网站发贴
  • 网站设计沟通效果图网站密码破解
  • 新乡网站建设策划优化搜索关键词
  • 辽宁智能网站建设推荐内容型网站有哪些
  • 长沙网站开发智能如何做网站报价
  • 佛山新网站制作咨询聊城做网站网络公司
  • 中山网站建设费用网站生成app客户端
  • 莱阳网站开发游戏介绍网站模板下载
  • 关于做网站的毕业设计凡科建设网站别人能进去么
  • 网站自助建站系统简历模板 个人简历
  • 好看的 网站后台模板企业 网站备案 法人
  • 河南省住房建设厅网站关键词检测
  • 运营怎么自学seo关键词分类
  • 织梦网站搬家手机网站建设如何
  • 做微博网站营销推广有哪些步骤
  • 哈尔滨企业建网站推广2022年小学生新闻摘抄十条
  • 网站建设平台方案怎么设计一个app
  • 交互式网站设计怎么做建设网站有什么网站
  • 网站seo诊断的主要内容单位做网站资料需要什么
  • vue.js做的网站江门微信网站建设
  • 网站首页制作公司seo工作室合作
  • 网站制作公司信科网络wordpress商城微信