鸿蒙完整项目-仿盒马App(一)首页静态页面

news2025/5/31 3:53:48

跟着鸿蒙小林博主,练习下项目~记录下首页的搭建,后续继续完善和整体项目完成会进行布局修改,先按照博主的跟做,后续在改
在这里插入图片描述
1.分为底部整体框架搭建
2.首页布局(顶部搜索、新人专享、金刚区(两个不同集合数据)、图片海报、三个分区、瀑布流列表)。组件单独写的
在这里插入图片描述

  1. MainPages
@Entry
@Component
  /**
   *首页
   */
struct MainPages {
  @State isCheck_Index_One: boolean = true
  @State currentIndex: number = 0


  //底部ui
  @Builder
  tabBuilder(title: string, targetIndex: number, selectedImg: Resource, normalImg: Resource) {
    Column() {
      Image(this.currentIndex === targetIndex ? selectedImg : normalImg)
        .width(this.isCheck_Index_One && targetIndex === 0 ? 50 : 25)
        .height(this.isCheck_Index_One && targetIndex === 0 ? 50 : 25)
        .borderRadius(this.isCheck_Index_One && targetIndex === 0 ? 25 : 0)

      Text(title)
        .margin({ top: 5 })
        .fontSize(14)
        .margin({ top: 5 })
        .fontWeight(this.currentIndex === targetIndex ? FontWeight.Bold : FontWeight.Normal)
        .fontColor('#6B6B6B')
    }
    .width('100%')
    .height(50)
    .justifyContent(FlexAlign.Center)
  }



  build() {
    //底部导航栏
    Column() {
      Tabs({ barPosition: BarPosition.End }) {
        TabContent() {
          //首页布局
          HomeUI()

        }
        .tabBar(this.tabBuilder("首页", 0, $r('app.media.me_image'), $r('app.media.index1_not_check')))

        TabContent() {
          Text('分类').fontSize(30)
        }
        .tabBar(this.tabBuilder("分类", 1, $r('app.media.index2_check'), $r('app.media.index2_not_check')))

        TabContent() {
          Text('购物车').fontSize(30)
        }
        .tabBar(this.tabBuilder("购物车", 2, $r('app.media.index3_check'), $r('app.media.index3_not_check')))

        TabContent() {
          Text('我的').fontSize(30)
        }
        .tabBar(this.tabBuilder("我的", 3, $r('app.media.index4_check'), $r('app.media.index4_not_check')))
      }
      .onChange((index: number) => {
        this.currentIndex = index
        if (index === 0) {
          this.isCheck_Index_One = true
        } else {
          this.isCheck_Index_One = false
        }

      })
    }
    .linearGradient({
      angle: 180,
      colors: [[0xff0000, 0], [0xff6666, 0.2], [0xffffff, 1]]
    })
    .width('100%').height('100%')
  }
}
  1. HomeUI
//首页布局
@Component
@Preview
export struct HomeUI {
  @State locationName: string = ''
  @State coupons: ESObject[] = [
    { amount: "¥10", desc: "新人专享" },
    { amount: "¥20", desc: "新人专享" },
    { amount: "¥10", desc: "新人专享" },
    { amount: "¥30", desc: "新人专享" }
  ]

  /**
   *新用户
   */
  @Builder
  CouponComponent() {
    Column() {
      Row() {
        Text("新人专享卷")
          .fontSize(24)
          .fontColor('#FF0000')
        Text("前三单免运费")
          .fontSize(14)
          .fontColor('#888888')
          .margin({ left: 10 })

      }
      .width('100%')
      .padding(16)
    }

    List({ space: 10 }) {
      ForEach(this.coupons, (item: ESObject) => {
        ListItem() {
          Column() {
            Text(item.amount)
              .fontSize(22)
              .fontColor('#FF4444')
              .margin({ bottom: 8 })

            Text(item.desc)
              .fontSize(14)
              .fontColor('#999999')
          }
        }
      })
    }

  }

  build() {
    Scroll(){
      Column() {
        HomeTopBar({ locationName: this.locationName })
        CommonSearBar({
          onSearchClick: () => {
            console.debug('测试点击')
          }
        });
        CouponComponent()
          .margin({ top: 15, left: 10, right: 10 })
        //金刚区
        SplitLayout()
        //海报区
        Image("https://img0.baidu.com/it/u=2721636467,4123351490&fm=253&fmt=auto&app=138&f=JPEG?w=1000&h=500")
          .width("95%")
          .height(100)
          .margin({top:10})
          .borderRadius(20)
          .objectFit(ImageFit.Fill)
        //三个海报
        SpecialColumn()
          .margin({ top: 15, left: 10, right: 10,bottom:10 })
        //瀑布流列表
        WaterFlowGoods()
          .margin({  left: 10, right: 10})
      }

    }.width('100%').height('100%')

  }
}

3.首页里面的搜索组件

/**
 *搜索组件
 */
@Component
export struct CommonSearBar {
  @State searchText: string = ''
  private onSearchClick?: () => void

  build() {
    Row() {
      Image($r('app.media.search'))
        .width(24)
        .height(24)
        .margin({ left: 12 })

      Text(this.searchText || "请输入搜索内容")
        .width('70%')
        .height(35)
        .backgroundColor(Color.White)
        .padding({ left: 5 })
        .fontSize(16)

      Text('搜索')
        .width(90)
        .layoutWeight(1)
        .fontSize(16)
        .fontColor(Color.White)
        .backgroundColor('#FF0000')
        .borderRadius(20)
        .padding({ top: 5, bottom: 5 })
        .textAlign(TextAlign.Center)
    }
    .height(40)
    .width('90%')
    .padding(1)
    .backgroundColor('#F5F5F5')
    .borderRadius(28)
    .onClick(() => {
      this.onSearchClick?.()
    })
  }
}

4.CouponComponent首页新用户领劵

/**
 *首页新用户领劵
 */
@Component
export struct CouponComponent {
  @State coupons: ESObject[] = [
    { amount: "¥10", desc: "新人专享" },
    { amount: "¥20", desc: "新人专享" },
    { amount: "¥10", desc: "新人专享" },
    { amount: "¥30", desc: "新人专享" }
  ]

  build() {
    Column() {
      Row() {
        Text("新人专享券")
          .fontSize(24)
          .fontColor('#FF0000')

        Text("前三单免运费")
          .fontSize(14)
          .fontColor('#888888')
          .margin({ left: 10 })
      }
      .width('100%')
      .padding(10)

      List({ space: 10 }) {
        ForEach(this.coupons, (item: ESObject) => {
          ListItem() {

            Column() {
              Text(item.amount)
                .fontSize(22)
                .fontColor('#FF4444')
                .margin({ bottom: 8 })

              Text(item.desc)
                .fontSize(14)
                .fontColor('#999999')
            }
            .width(80)
            .padding(16)
            .backgroundColor('#FFFFFF')
            .borderRadius(8)
          }

        })
      }
      .width('100%')
      .height(100)
      .margin({left:20})
      .listDirection(Axis.Horizontal)

      Button('立即领取')
        .width(200)
        .height(40)
        .backgroundColor('#FF0000')
        .fontColor(Color.White)
        .borderRadius(20)
        .margin({ top:20,bottom: 16 })

    }
    .backgroundColor("#F5F5F5")
    .width('100%')
    .height('33%')
    .borderRadius(10)

  }
}

5.SplitLayout金刚区+海报

/**
 *金刚区
 */
@Component
@Preview
export struct SplitLayout {
  build() {
    Column() {
      Grid() {
        ForEach(HomeData.topData, (row: ESObject) => {
          ForEach(row, (item: ESObject) => {
            GridItem() {
              Column() {
                Image(item.image)
                  .width(40)
                  .height(40)
                  .borderRadius(20)
                  .margin({ top: 5 })
                Text(item.title)
                  .padding(1)
                  .fontSize(16)
                  .fontColor(Color.Black)
                  .textAlign(TextAlign.Center)
              }

            }
          })
        })

      }
      .columnsTemplate('1fr 1fr 1fr 1fr ')
      .height(200)

      List({ space: 25 }) {
        ForEach(HomeData.bottomData, (item: ESObject) => {
          ListItem(){
            Column(){
              Image(item.image)
                .width(40)
                .height(40)
                .borderRadius(15)
              Text(item.title)
                .textAlign(TextAlign.Center)
                .fontColor(Color.Black)
                .fontSize(16)
                .padding(5)
            }
          }
        })
      }
      .scrollBar(BarState.Off)
      .margin({left:10})
      .height(70)
      .listDirection(Axis.Horizontal)

    }
    .alignItems(HorizontalAlign.Start)
    .height(310)
    .width('95%')
    .margin({ top: 20 })
    .backgroundColor('#F5F5F5')
    .padding(16)
    .borderRadius(20)
  }
}

6.三个海报SpecialColumn

@Component
@Preview
export struct SpecialColumn {
  build() {
    Row(){
      Column() {
        Row() {
          Text('今日疯抢')
            .fontSize(16)
            .fontWeight(FontWeight.Bold)
            .fontColor(Color.Black)

          Blank()

          Text('一元秒杀')
            .fontSize(10)
            .fontColor(Color.White)
            .backgroundColor(Color.Red)
            .borderRadius({ topLeft: 8, bottomRight: 8 })
            .padding(2)
        }
        Text('立省两元')
          .fontSize(10)
          .fontColor('#999999')
          .margin({ top: 4 })
        List({ space: 10 }) {

          ForEach(HomeData.priceInfo,(priceInfo:ESObject)=>{
            ListItem() {
              Column() {
                Image(priceInfo.image)
                  .width(40)
                  .height(50)
                  .margin({ bottom: 8 })
                  .objectFit(ImageFit.Cover)

                Row() {
                  Text(priceInfo.oldPrice)
                    .fontSize(12)
                    .fontColor('#999999')
                    .decoration({ type: TextDecorationType.LineThrough })

                  Blank()

                  Text(priceInfo.newPrice)
                    .fontSize(14)
                    .fontColor(Color.Red)
                }
              }
              .margin({ top: 12 })
              .padding(8)
              .borderRadius(8)
            }
          })

        }
        .listDirection(Axis.Horizontal)
        .width('100%')
        .height(100)
      }
      .borderRadius(8)
      .alignItems(HorizontalAlign.Start)
      .linearGradient({
        direction: GradientDirection.Bottom, // 渐变方向
        colors: [["#F8D7D8", 0.0], ["#FEFFFF", 0.3]]
      })
      .width('45%')
      .padding(10)


      Column() {
        Text('尝鲜盒子')
          .fontSize(16)
          .fontColor(Color.Black)
          .fontWeight(FontWeight.Bold)

        Text('一分钱试吃')
          .fontSize(10)
          .fontColor('#999999')
          .margin({ top: 4 })
        Column() {
          Image(HomeData.priceInfo[0].image)
            .width(40)
            .height(50)
            .margin({ bottom: 8 })
            .objectFit(ImageFit.Cover)



          Text(HomeData.priceInfo[0].newPrice)
            .fontSize(14)
            .fontColor(Color.Red)

        }
        .margin({ top: 12 })
        .padding(10)

      }
      .borderRadius(8)

      .linearGradient({
        direction: GradientDirection.Bottom, // 渐变方向
        colors: [["#FCECD0", 0.0], ["#FEFFFF", 0.3]]
      })
      .width('25%')
      .padding(10)

      Column() {
        Text('健康生活')
          .fontSize(16)
          .fontColor(Color.Black)
          .fontWeight(FontWeight.Bold)

        Text('果蔬榨榨杯')
          .fontSize(10)
          .fontColor('#999999')
          .margin({ top: 4 })
        Column() {
          Image(HomeData.priceInfo[1].image)
            .width(40)
            .height(50)
            .margin({ bottom: 8 })
            .objectFit(ImageFit.Cover)
          Text(HomeData.priceInfo[1].newPrice)
            .fontSize(14)
            .fontColor(Color.Red)
        }
        .margin({ top: 12 })
        .padding(10)

      }
      .linearGradient({
        direction: GradientDirection.Bottom, // 渐变方向
        colors: [["#BFE4CB", 0.0], ["#FEFFFF", 0.3]]
      })
      .borderRadius(8)

      .width('25%')
      .padding(10)
    }
    .width('100%')
    .height(150)
    .justifyContent(FlexAlign.SpaceBetween)

  }

}

7.瀑布流 WaterFlowGoods()

/**
 *首页瀑布流
 */
@Component
@Preview
export struct WaterFlowGoods {
  @State goodsList: Array<GoodsItem> = [
    {
      image: "https://img1.baidu.com/it/u=499325528,1576211670&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=667",
      name: "红颜草莓",
      spec: "早熟",
      originalPrice: "¥39",
      price: "¥19"
    },
    {
      image: "https://img0.baidu.com/it/u=3907484858,1857304284&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
      name: "沙地红心西瓜",
      spec: "脆甜",
      originalPrice: "¥13",
      price: "¥9.9"
    }
    ,
    {
      image: "https://img0.baidu.com/it/u=3907484858,1857304284&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
      name: "芒果",
      spec: "香甜",
      originalPrice: "¥23",
      price: "¥19.9"
    } ,
    {
      image: "https://img0.baidu.com/it/u=3907484858,1857304284&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
      name: "海南菠萝",
      spec: "脆酸甜",
      originalPrice: "¥43",
      price: "¥29.9"
    }
  ]

  @State columns: number = 2

  build() {
    //瀑布流
    WaterFlow(){
      ForEach(this.goodsList,(item:GoodsItem)=>{
        FlowItem(){
          //布局
          Column(){
            Image(item.image)
              .width('100%')
              .borderRadius({topLeft:10,topRight:10})

            Column(){
              Text(item.name)
                .fontSize(16)
                .fontColor('#333')
                .margin({ bottom: 4 })
              Text(item.spec)
                .fontSize(12)
                .fontColor('#666')
                .margin({ bottom: 8 })
              Row(){
                Text(item.originalPrice)
                  .fontSize(12)
                  .fontColor('#999')
                  .decoration({ type: TextDecorationType.LineThrough })
                Text(item.price)
                  .fontSize(16)
                  .fontColor(Color.Red)
                  .margin({left:10})
                Blank()
                Column(){
                  Image($r('app.media.cart'))
                    .width(20)
                    .height(20)
                }
                .justifyContent(FlexAlign.Center)
                .width(36)
                .height(36)
                .backgroundColor("#ff2bd2fa")
                .borderRadius(18)
              }
              .width('100%')
              .justifyContent(FlexAlign.SpaceBetween)

            }
            .alignItems(HorizontalAlign.Start)
            .padding(12)
          }
          .backgroundColor(Color.White)
          .borderRadius(12)
        }
        .margin({ bottom: 12 })
      })
    }
    .margin({top:30})
    //设置列数
    .columnsTemplate('1fr 1fr')
    .columnsGap(12)
  }
}

8.数据类HomeData

export class  HomeData{
  static  topData: ESObject[][] = [
    [
      { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.iqeBi3j390BfpXYkfwL7ZwHaIC?w=168&h=182&c=7&r=0&o=5&dpr=2&pid=1.7", title: "当季水果" },
      { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.45Yw7hjv6Pya3G4AkSXV7gHaE6?w=268&h=180&c=7&r=0&o=5&dpr=2&pid=1.7", title: "有机蔬菜" },
      { image: "https://tse4-mm.cn.bing.net/th/id/OIP-C.D4joDEE4liDJ24JkH8vT7wHaE8?w=274&h=183&c=7&r=0&o=5&dpr=2&pid=1.7", title: "进口水产" },
      { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qlXw3xeqY17Pz4Zes2XO9wHaGn?w=221&h=197&c=7&r=0&o=5&dpr=2&pid=1.7", title: "散养家禽" },
      { image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.iiVk_wx6cKy6Qz-GORTrBQHaE7?w=280&h=187&c=7&r=0&o=5&dpr=2&pid=1.7", title: "五谷杂粮" }
    ],
    [

      { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.45Yw7hjv6Pya3G4AkSXV7gHaE6?w=268&h=180&c=7&r=0&o=5&dpr=2&pid=1.7", title: "有机蔬菜" },
      { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qlXw3xeqY17Pz4Zes2XO9wHaGn?w=221&h=197&c=7&r=0&o=5&dpr=2&pid=1.7", title: "散养家禽" },

      { image: "https://tse4-mm.cn.bing.net/th/id/OIP-C.D4joDEE4liDJ24JkH8vT7wHaE8?w=274&h=183&c=7&r=0&o=5&dpr=2&pid=1.7", title: "进口水产" },
      { image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.iiVk_wx6cKy6Qz-GORTrBQHaE7?w=280&h=187&c=7&r=0&o=5&dpr=2&pid=1.7", title: "五谷杂粮" },
      { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.iqeBi3j390BfpXYkfwL7ZwHaIC?w=168&h=182&c=7&r=0&o=5&dpr=2&pid=1.7", title: "当季水果" }

    ]
  ]

  static bottomData: ESObject[] = [
    { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.iqeBi3j390BfpXYkfwL7ZwHaIC?w=168&h=182&c=7&r=0&o=5&dpr=2&pid=1.7", title: "尝夏鲜" },
    { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.45Yw7hjv6Pya3G4AkSXV7gHaE6?w=268&h=180&c=7&r=0&o=5&dpr=2&pid=1.7", title: "烧烤露营" },
    { image: "https://tse4-mm.cn.bing.net/th/id/OIP-C.D4joDEE4liDJ24JkH8vT7wHaE8?w=274&h=183&c=7&r=0&o=5&dpr=2&pid=1.7", title: "厨卫百货" },
    { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qlXw3xeqY17Pz4Zes2XO9wHaGn?w=221&h=197&c=7&r=0&o=5&dpr=2&pid=1.7", title: "天天会员价" },
    { image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.iiVk_wx6cKy6Qz-GORTrBQHaE7?w=280&h=187&c=7&r=0&o=5&dpr=2&pid=1.7", title: "盒马NB" },
    { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.iqeBi3j390BfpXYkfwL7ZwHaIC?w=168&h=182&c=7&r=0&o=5&dpr=2&pid=1.7", title: "自有产品" },
    { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.45Yw7hjv6Pya3G4AkSXV7gHaE6?w=268&h=180&c=7&r=0&o=5&dpr=2&pid=1.7", title: "每日秒杀" },
    { image: "https://tse4-mm.cn.bing.net/th/id/OIP-C.D4joDEE4liDJ24JkH8vT7wHaE8?w=274&h=183&c=7&r=0&o=5&dpr=2&pid=1.7", title: "好劵连连" },
    { image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qlXw3xeqY17Pz4Zes2XO9wHaGn?w=221&h=197&c=7&r=0&o=5&dpr=2&pid=1.7", title: "清洁纸品" },
    { image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.iiVk_wx6cKy6Qz-GORTrBQHaE7?w=280&h=187&c=7&r=0&o=5&dpr=2&pid=1.7", title: "敬请期待" }
  ]

   static  priceInfo: ESObject = [
    {
      image: "https://tse3-mm.cn.bing.net/th/id/OIP-C.n_NQx-NMBlbYSU0fvKlMfwHaHa?w=213&h=213&c=7&r=0&o=5&dpr=2&pid=1.7",
      oldPrice: "¥99",
      newPrice: "¥79"
    },  {
    image: "https://tse2-mm.cn.bing.net/th/id/OIP-C.qHml5NfgkGlIvftvCc6krAHaE8?w=270&h=180&c=7&r=0&o=5&dpr=2&pid=1.7",
    oldPrice: "¥99",
    newPrice: "¥79"
  }
  ]
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2388888.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

39-居住证管理系统(小程序)

技术栈: springBootVueMysqlUni-app 功能点: 群众端 警方端 管理员端 群众端: 1.首页: 轮播图展示、公告信息列表 2.公告栏: 公告查看及评论 3.我的: 联系我们: 可在线咨询管理员问题 实时回复 居住证登记申请 回执单查看 领证信息查看 4.个人中心: 个人信息查看及修改…

WPF【11_4】WPF实战-重构与美化(MVVM 架构)

11-9 【理论】MVVM 架构 在 WPF 项目中&#xff0c;我们主要采用的是一种类似 MVC 的架构&#xff0c;叫做 MVVM。 MVVM 继承了 MVC 的理念&#xff0c;是 Model-View-ViewModel 的缩写&#xff0c;中文意思是模型、视图、视图模型。这三个词分开看我们都能看懂&#xff0c;不…

计算逆时针夹角(有向角度)——CAD c# 实现两条线(向量)的逆时针夹角

效果如下&#xff1a; 附部分代码如下&#xff1a; public void 逆时针夹角Demo(){// 获取当前 CAD 文档和编辑器Document doc Application.DocumentManager.MdiActiveDocument;Editor ed doc.Editor;Database db doc.Database;try{Point3d vec1Start, vec1End;if (!GetTwoP…

【Linux】进程 信号的产生

&#x1f33b;个人主页&#xff1a;路飞雪吖~ &#x1f320;专栏&#xff1a;Linux 目录 一、掌握Linux信号的基本概念 &#x1f320;前台进程 VS 后台进程 &#x1f320; 小贴士&#xff1a; &#x1fa84;⼀个系统函数 --- signal() &#x1fa84;查看信号 --- man 7 sign…

机器学习中的维度、过拟合、降维

1. 维度灾难 当我们谈论机器学习模型在处理数据时遇到的困难&#xff0c;一个常常被提及的词便是“维度灾难”&#xff08;Curse of Dimensionality&#xff09;。这不是科幻小说里的情节&#xff0c;而是数学和计算世界里真实存在的困境。它指的正是&#xff1a;当数据集的特…

关于git的使用

下载git 可以去git的官网下载https://git-scm.com/downloads 也可以去找第三方的资源下载&#xff0c;下载后是一个exe应用程序&#xff0c;直接点开一直下一步就可以安装了 右键任意位置显示这两个就代表成功&#xff0c;第一个是git官方的图形化界面&#xff0c;第二个是用…

预约按摩小程序源码介绍

基于ThinkPHP、FastAdmin和UniApp开发的预约按摩小程序源码&#xff0c;ThinkPHP作为后端框架&#xff0c;以其高效稳定著称&#xff0c;能妥善处理数据逻辑与业务规则。FastAdmin作为后台管理框架&#xff0c;极大简化了后台管理系统的搭建与维护。UniApp则让小程序具备跨平台…

Elasticsearch创建快照仓库报错处理

创建快照仓库报错&#xff1a; 根据报错提示的信息&#xff0c;问题可能出在 Elasticsearch 的配置中。当你尝试创建一个文件系统&#xff08;fs&#xff09;类型的快照仓库时&#xff0c;虽然已经指定了 location 参数&#xff0c;但 Elasticsearch 仍然报错&#xff0c;这通…

使用DDR4控制器实现多通道数据读写(十三)

一、概述 在上一章节中使用仿真简单验证了interconnect的功能&#xff0c;使用四个axi4的主端口同时发起读写命令&#xff0c;经过interconnect后&#xff0c;将这些读写指令依次发给ddr4控制器。Ddr4控制器响应后再依次将响应发送到各个通道。从而实现多通道读写ddr4控制器的功…

谷歌Veo vs Sora:AI视频生成技术的巅峰对决

&#x1f525;「炎码工坊」技术弹药已装填&#xff01; 点击关注 → 解锁工业级干货【工具实测|项目避坑|源码燃烧指南】 ——从架构到实践&#xff0c;解析音画同步、物理模拟与长视频生成的破局之战 一、技术架构&#xff1a;双雄对垒&#xff0c;殊途同归&#xff1f; 谷歌…

基于Spring boot+vue的中医养生系统的设计与实现(源码+论文+部署+安装+调试+售后)

感兴趣的可以先收藏起来&#xff0c;还有大家在毕设选题&#xff0c;项目以及论文编写等相关问题都可以给我留言咨询&#xff0c;我会一一回复&#xff0c;希望帮助更多的人。 系统背景 在健康中国战略持续推进与全民健康意识显著提升的时代背景下&#xff0c;中医养生作为中…

31.第二阶段x64游戏实战-封包-线程发包

免责声明&#xff1a;内容仅供学习参考&#xff0c;请合法利用知识&#xff0c;禁止进行违法犯罪活动&#xff01; 本次游戏没法给 内容参考于&#xff1a;微尘网络安全 上一个内容&#xff1a;30.第二阶段x64游戏实战-认识网络数据包发送流程 代码跳转 ws2_32.send跳转sen…

Unity数字人开发笔记

开源工程地址&#xff1a;https://github.com/zhangliwei7758/unity-AI-Chat-Toolkit 先致敬zhangliwei7758&#xff0c;开放这个源码 一、建立工程 建立Unity工程&#xff08;UnityAiChat&#xff09;拖入Unity-AI-Chat-Toolkit.unitypackage打开chatSample工程&#xff0c;可…

嵌入式开发--STM32G431无法正常运行程序,BOOT0与CAN冲突

故障现象 今天开发STM32G431时遇到一个问题&#xff0c;板子打样回来后&#xff0c;焊接完成&#xff0c;可以烧程序&#xff0c;可以读FLASH&#xff0c;却死活不能运行&#xff0c;也不能进仿真调试。 故障定位 经过排查&#xff0c;发现将隔离芯片π121M31拆除&#xff0…

程序环境与预处理

一、程序的翻译环境和执行环境 翻译环境&#xff1a;将源代码转化为可执行的机器指令 执行环境&#xff1a;执行代码 1、翻译环境 流程&#xff1a; 二、运行环境 程序执行过程&#xff1a; 三、预编译阶段 1、预定义符号 __FILE__ //进行编译的原文件名 __LINE__ //文…

《Java 单例模式:从类加载机制到高并发设计的深度技术剖析》

【作者简介】“琢磨先生”--资深系统架构师、985高校计算机硕士&#xff0c;长期从事大中型软件开发和技术研究&#xff0c;每天分享Java硬核知识和主流工程技术&#xff0c;欢迎点赞收藏&#xff01; 一、单例模式的核心概念与设计目标 在软件开发中&#xff0c;我们经常会遇…

全志F1c200开发笔记——移植根文件系统

1.下载buildroot Index of /downloads/ 使用2018.02.11版本 直链下载 https://buildroot.org/downloads/buildroot-2018.02.11.tar.gz 2.配置 进入buildroot压缩包目录下&#xff0c;使用命令解压并进入工作目录 tar -xf buildroot-2018.02.11.tar.gz cd buildroot-2018.…

[yolov11改进系列]基于yolov11引入自注意力与卷积混合模块ACmix提高FPS+检测效率python源码+训练源码

[ACmix的框架原理] 1.1 ACMix的基本原理 ACmix是一种混合模型&#xff0c;结合了自注意力机制和卷积运算的优势。它的核心思想是&#xff0c;传统卷积操作和自注意力模块的大部分计算都可以通过1x1的卷积来实现。ACmix首先使用1x1卷积对输入特征图进行投影&#xff0c;生成一组…

Java NIO编程:构建高性能网络应用

1.Java NIO 核心概念与架构 1. 传统 BIO 与 NIO 的对比 特性 BIO (Blocking I/O) NIO (Non-blocking I/O) I/O 模型 阻塞 非阻塞 / 异步 线程模式 每个连接一个线程 单线程管理多个连接 数据处理单位 字节流 / 字符流 缓冲区 (Buffer) 核心组件 Socket, ServerSoc…

如何实现高性能超低延迟的RTSP或RTMP播放器

随着直播行业的快速发展&#xff0c;RTSP和RTMP协议成为了广泛使用的流媒体传输协议&#xff0c;尤其是在实时视频直播领域&#xff0c;如何构建一个高性能超低延迟的直播播放器&#xff0c;已经成为了决定直播平台成功与否的关键因素之一。作为音视频直播SDK技术老兵&#xff…