HarmonyOS APP应用开发项目- MCA助手(Day02持续更新中~)

news2025/4/16 23:21:35

简言:

gitee地址:https://gitee.com/whltaoin_admin/money-controller-app.git
端云一体化开发在线文档:
https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/agc-harmonyos-clouddev-view-0000001700053733-V5
注:此App参照此教程进行二次修改:https://www.bilibili.com/video/BV1q5411v7o7


项目构建静态页面

钱包页面

  • 效果图

image.png
image.png

  • 结构:
  • image.png
主页面:Wallet.ets
子页面:addCard.ets
组件:
BankCardComponent 银行卡片
TitleComponent  顶部标题
  • 编写思路:
// 钱包页面和主页页面效果类似,复制其修改部分既可。

  • 代码
// 页面三:钱包 Wallet
import { BankCardComponent } from '../../components/BankCardComponent'
import TitleComponent from '../../components/TitleComponent'

@Component
export  default struct Wallet {
  build() {
    Column(){
      TitleComponent({title:"钱包",is_addIcon:true})
      Column(){
        // Text("您好,").width("100%").fontWeight(500)
        // Text("欢迎回来!").width("100%").fontWeight(500).fontSize(18).margin({top:5,bottom:15})
        // card
        Swiper(){
          BankCardComponent()
          BankCardComponent()
        }.loop(true)
        .autoPlay(true)
        .indicator(
          Indicator.dot().
          color(Color.White)
            .selectedColor(Color.White)
            .selectedItemWidth(20)
        ).borderRadius(20)

        // 功能分类
        Text("最近联系").width("100%").fontWeight(500).fontSize(18).margin({top:5,bottom:15}).margin({top:30,bottom:20})

        Row({space:20}){
          Image($r("app.media.avatar_icon")).width(50).borderRadius(8)
          Image($r("app.media.avatar_icon")).width(50).borderRadius(8)
          Image($r("app.media.avatar_icon")).width(50).borderRadius(8)
          Image($r("app.media.avatar_icon")).width(50).borderRadius(8)

        }.width("100%")

        // 功能分类
        Text("交易信息").width("100%").fontWeight(500).fontSize(18).margin({top:5,bottom:15}).margin({top:30,bottom:20})
        Column(){

          List(){
            ForEach((Array.from({length:10})),()=>{

              ListItem(){
                Row(){
                  Image($r("app.media.avatar_icon")).width(36).borderRadius(18).margin({left:5,right:5})
                  Column(){
                    Text("便利店").width("100%").fontSize(14).fontColor("#666")
                    Text("2024年6月29日").width("100%").fontSize(12).fontColor("#999")

                  }.layoutWeight(1)
                  Text("¥1250.50").backgroundColor("#ffffe0e0").borderRadius(20).width(100).height(35)
                    .textAlign(TextAlign.Center).fontSize(12).fontColor("#f00")
                }.width("100%").height(50).backgroundColor("#fffafafa").borderRadius(10).margin({bottom:10})
              }
            })

          }
        }.width("100%").layoutWeight(1)



      }.width("100%").layoutWeight(1).padding({left:20,right:20})

    }.width("100%").height("100%").backgroundColor("#ffffffff")
  }
}
// 添加银行卡 子页面:AddCard
import InputComponent from '../../components/InputComponent';
import TitleComponent from '../../components/TitleComponent';
@Extend(Text)
function  titleTextStyle(){
  .width("100%").fontWeight(500).fontSize(18).margin({top:30,bottom:20})
}
@Entry
@Component
struct AddCard {
  @State message: string = 'Hello World';

  build() {

   Column(){


    // titile
     TitleComponent({title:"添加新的银行卡",routerUrl:'',is_icon:true})
    // content
    Column({space:30}){
      Text("卡片信息").titleTextStyle()

      InputComponent({title:'银行卡号',placeholder:'XXXXXXXX  XXX XXXXXX',isInputIcon:false})
      InputComponent({title:'持卡人姓名',placeholder:'请输入持卡人姓名',isInputIcon:false})

      Row({space:10}){
        InputComponent({title:'CCV',placeholder:'2533',isInputIcon:false}).layoutWeight(1)
        InputComponent({title:'到期时间',placeholder:'30-06-2024',isInputIcon:false}).layoutWeight(1)
      }
      Button("下一步").width(228).backgroundColor("#ff09b19d").margin({top:50})
    }.width("100%").height("100%").padding({left:20,right:20})
   }.width("100%").height("100%").backgroundImage($r("app.media.pageBg"))
  }
}
// 银行卡片组件:BankCardComponent
@Component
export   struct BankCardComponent {
  build() {
    Column(){
      Row(){
        Text("中国银行").layoutWeight(1).fontColor(Color.White).fontSize(14).fontWeight(500)
        Image($r("app.media.card_icon")).width(36)
      }

      Text(){
        Span("¥").fontSize(12)
        Span("25,230,00").fontSize(24).fontWeight(700)
      }.width("100%").fontColor(Color.White).margin({top:20})
      Row(){
        Text("xxxxxxxxxx  xx xxxxx ").layoutWeight(1).fontColor(Color.White).fontSize(14).fontWeight(500)
        Text("26/24").fontColor(Color.White).fontSize(12).padding({right:40})
      }.margin({top:15})


    }.width("100%").height(150).backgroundColor("#ff09d7d3").padding(20)

  }
}
// 页面标题组件: TitleComponent
import text from '@ohos.graphics.text'
import router from '@ohos.router'

@Component
export  default struct TitleComponent {
  @Prop title :string
  @Prop is_icon:boolean
  @Prop is_addIcon:boolean
  @Prop routerUrl:string
  @Prop titleColor:string
  build() {

    Row(){
      if(this.is_icon){
        Image($r("app.media.Button_left")).width("44").height(30).objectFit(ImageFit.ScaleDown).borderRadius(5)
          .onClick(()=>{
            router.back()
          })
      }

      Text(this.title).fontColor(this.titleColor).fontWeight(700).fontSize(20).height(40).layoutWeight(1).textAlign(TextAlign.Center)

      if(this.is_addIcon){
        Text("+").fontColor(Color.White).fontSize(25).fontWeight(500).border({width:2})
          .borderRadius(30).width(25).height(25).fontColor(Color.Black).lineHeight(25).textAlign(TextAlign.Center).onClick(()=>{
            router.pushUrl({
              url:'pages/bank/AddCard'
            })
        })
      }
    }.width("100%").justifyContent(FlexAlign.SpaceBetween).padding({left:20,right:20,top:12,bottom:12})
  }
}

个人页面

  • 效果图

image.png
image.png
image.png

  • 结构
组件:
BankCardComponent 银行卡片
TitleComponent  顶部标题
InputDateComponent 选择日期弹框
InputComponent 普通表单输入框
页面:
  My 个人主页
  InfoEdit 个人信息修改页
  QrCodePage 个人信息二维码生成页

工具类:tools
  
  • 代码
// 页面四:个人信息页
import TitleComponent from '../../components/TitleComponent'
import router from '@ohos.router'
import { Router } from '@kit.ArkUI'


@Component
export  default struct My {
  build() {
    Column(){
      TitleComponent({title:"个人资料",titleColor:"#ffff"})

      Stack({alignContent:Alignment.Start}){
        Column().width("100%").height(120)
          .backgroundColor("#ffc3f6e1")
          .margin({top:50}).borderRadius(20).shadow({radius:10,color:"#fff"})
        Column(){
          Image($r("app.media.user")).width(66).height(66).borderRadius(22)
            .border({
            width:5,
            color:'#ff09b06d',
              style:BorderStyle.Solid
          }).shadow({radius:10,color:"#fff"})

          Text("追风的少年").offset({x:80,y:-30}).width("100%")
          Text("财富的意义,在于分享与贡献,而非单纯的积累。").fontSize(14).fontColor("#ff969191").margin({top:10})
            .offset({y:-10}).margin({right:10})
        }.width("100%").alignItems(HorizontalAlign.Start).margin({left:10})
        Image($r("app.media.right_i")).height(20).offset({
          y:60,x:270
        })

      }.width("100%").padding({left:30,right:30})


       Row(){
        Image($r("app.media.edit_icon")).height(30).margin({right:20})
        Text("编辑个人信息").layoutWeight(1).fontSize(14)
         Image($r("app.media.right_icon")).height(25)
       }.height(40).padding({left:5,right:10}).backgroundColor("#fff").margin(20)
      .borderRadius(10).shadow({radius:20,color:"#ff70e7d5"}).onClick(()=>{
        router.pushUrl({
          url:"pages/info/InfoEdit"
        })
       })

      Row(){
        Image($r("app.media.qrcode_icon_external")).height(25).margin({left:5,right:30})
        Text("个人二维码").layoutWeight(1).fontSize(14)
        Image($r("app.media.right_icon")).height(25)
      }.height(40).padding({left:5,right:10}).backgroundColor("#fff").margin(20)
      .borderRadius(10).shadow({radius:20,color:"#ff70e7d5"}).onClick(()=>{
        router.pushUrl({
          url :'pages/info/QrCodePage'
        })
      })







    }.width("100%").height("100%").backgroundImage($r("app.media.myPageBg"))
    .backgroundImageSize({width:"100%",height:"100%"})
  }
}
// 个人信息修改页
import InputComponent from '../../components/InputComponent';
import InputDateComponent from '../../components/InputDateComponent';
import TitleComponent from '../../components/TitleComponent';
@Extend(Text)
function  titleTextStyle(){
  .width("100%").fontWeight(500).fontSize(18).margin({top:30,bottom:20})
}
@Entry
@Component
struct InfoEdit {
  @State message: string = 'Hello World';
  selectedDate: Date = new Date("2010-1-1")

  build() {

    Column(){


      // titile
      TitleComponent({title:"编辑个人信息",routerUrl:'',is_icon:true})
      // content
      Column({space:30}){
        Text("个人信息").titleTextStyle()

        InputComponent({title:'姓名',placeholder:'请输入您的姓名',isInputIcon:false})
        InputComponent({title:'联系电话',placeholder:'请输入你的手机号码',isInputIcon:false})

        Row({space:10}){
          InputComponent({title:'性别',placeholder:'2533',isInputIcon:false}).layoutWeight(1)

          InputDateComponent ({title:'出生日期',placeholder:'30-06-2024',isInputIcon:false}).layoutWeight(1)

        }
        Button("下一步").width(228).backgroundColor("#ff09b19d").margin({top:50})
      }.width("100%").height("100%").padding({left:20,right:20})
    }.width("100%").height("100%").backgroundImage($r("app.media.pageBg"))
  }
}
// 个人信息二维码生成页

import TitleComponent from '../../components/TitleComponent';
import { randomColor } from '../../util/tools';

@Entry
@Component
struct QrCodePage {
  @State message: string = 'Hello World';
  @State BgColor :string = "#ffc2f17d"


  build() {
    Column() {
      // titile
      TitleComponent({title:"",routerUrl:'',is_icon:true})
      QRCode("1").margin({top:40}).height(200).aspectRatio(1).backgroundColor(Color.Transparent)
      Blank()

      Row({space:20}){

        Text("换个样式").onClick(()=>{
           this.BgColor = randomColor()
        })
        Text("|")
        Text("保存图片")
      }.width("100%").justifyContent(FlexAlign.Center).margin({bottom:20})


    }
    .height('100%').backgroundColor(this.BgColor)
    .width('100%')
  }
}
// 日期选择框
@Component
export  default struct InputDateComponent {
  @Prop title:string
  @Prop inputIcon:Resource
  @Prop placeholder:string
  @Prop  inputType:InputType=InputType.Normal
  @State changeStatus:boolean =false
  @Prop isInputIcon:boolean = true

  selectedDate: Date = new Date()
  build() {
    Column(){
      Text(this.title).width("100%").textAlign(TextAlign.Start).fontWeight(500)
        .fontSize(16).fontColor(Color.Black).margin({bottom:14})
      Row(){
        if (this.isInputIcon) {
          Image(this.inputIcon).width(40).aspectRatio(1)
        }

        TextInput({placeholder:this.placeholder})
          .onClick(()=>{

            DatePickerDialog.show({
              start: new Date("1970-1-1"),
              end: new Date("2100-12-31"),
              selected: this.selectedDate,
              showTime:true,
              useMilitaryTime:false,
              // disappearTextStyle: {color: Color.Pink, font: {size: '22fp', weight: FontWeight.Bold}},
              // textStyle: {color: '#ff00ff00', font: {size: '18fp', weight: FontWeight.Normal}},
              // selectedTextStyle: {color: '#ff182431', font: {size: '14fp', weight: FontWeight.Regular}},
              onDateAccept: (value: Date) => {
                // 通过Date的setFullYear方法设置按下确定按钮时的日期,这样当弹窗再次弹出时显示选中的是上一次确定的日期
                this.selectedDate = value
                console.info("DatePickerDialog:onDateAccept()" + value.toString())
              },
              onCancel: () => {
                console.info("DatePickerDialog:onCancel()")
              },
              onDateChange: (value: Date) => {
                console.info("DatePickerDialog:onDateChange()" + value.toString())
              }
            })
          })
          .onFocus(()=>{
            // 聚焦
            this.changeStatus=true
            console.log("result>>>",this.changeStatus)


          })
          .onBlur(()=>{
            // 失去
            this.changeStatus=false
            console.log("result>>>",this.changeStatus)
          })

          .layoutWeight(1)
          .backgroundColor(Color.Transparent)
          .type(this.inputType)




      }.width("100%").height(50).padding({left:10,right:10}).borderRadius(10)
      .border({
        width:2,color:this.changeStatus?"#002884":Color.White
      })
    }
  }
}
// 普通输入框
@Component
export  default struct InputComponent {
  @Prop title:string
  @Prop inputIcon:Resource
  @Prop placeholder:string
  @Prop  inputType:InputType=InputType.Normal
  @State changeStatus:boolean =false
  @Prop isInputIcon:boolean = true
  build() {
    Column(){
      Text(this.title).width("100%").textAlign(TextAlign.Start).fontWeight(500)
        .fontSize(16).fontColor(Color.Black).margin({bottom:14})
      Row(){
        if (this.isInputIcon) {
          Image(this.inputIcon).width(40).aspectRatio(1)
        }

        TextInput({placeholder:this.placeholder})
          .onFocus(()=>{
            // 聚焦
            this.changeStatus=true
            console.log("result>>>",this.changeStatus)
          })
          .onBlur(()=>{
            // 失去
            this.changeStatus=false
            console.log("result>>>",this.changeStatus)
          })

          .layoutWeight(1)
          .backgroundColor(Color.Transparent)
          .type(this.inputType)




      }.width("100%").height(50).padding({left:10,right:10}).borderRadius(10)
      .border({
        width:2,color:this.changeStatus?"#002884":"#ffcbcccd"
      })
    }
  }
}
// 随机颜色生成方法
// 十六进制的随机颜色
export  function randomColor():string{
  let color:string = "#"
  let colors:string[] = [
    "a","b", "c","d", "e","f",
    "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"
  ]
  for (let i = 0; i <8 ; i++) {
    color+=colors[Math.floor(Math.random()*15)]
  }
  return color
}

支付页面

  • 效果图

image.png

  • 结构
页面:PayPage
自定义弹框组件:PayCustomDialogExample
  • 代码
// 付款页

import TitleComponent from '../../components/TitleComponent';
import PayCustomDialogExample from './PayCustomDialogExample';

@Entry
@Component
struct PayPage {
  dialogController: CustomDialogController = new CustomDialogController({
    builder: PayCustomDialogExample(),
    alignment:DialogAlignment.Bottom,
    customStyle:true
  })

  onPageShow(): void {
    this.dialogController.open()
  }


  @State message: string = 'Hello World';


  build() {
    Column() {
      TitleComponent({title:"支付",is_icon:true})

    }
    .height('100%')
    .width('100%').backgroundColor("#ff5f5d5d")
  }
}
// 付款弹框组件

import InputComponent from '../../components/InputComponent'
@CustomDialog
export  default struct PayCustomDialogExample {
  controller: CustomDialogController = new CustomDialogController({
    builder: PayCustomDialogExample({}),
  })

  build() {
    Column() {
      Text("付款给").border({width:{bottom:1},color:'#ffe2e2e2'}).width("100%").lineHeight(20)
        .textAlign(TextAlign.Center).padding({top:10,bottom:10})
        .fontWeight(500).fontColor("#ff044a6e")

      Stack({alignContent:Alignment.Top}){
        Column().width("100%").height(80).shadow({radius:60,color:"#ffcfcfcf"}).borderRadius(20).margin({top:50})

        Column({space:5}){
          Image($r("app.media.HOS")).height(50).borderRadius(10).aspectRatio(2).margin({top:20})
          Text("HarmonyOS APP应用开发").fontSize(14).fontWeight(700)
          Text("2024-06-30").fontSize(12).fontColor("#666")
        }
      }.width("100%").padding({right:50,left:50,bottom:20})

      Text("支付账户").fontWeight(700).fontSize(18).height(40)
        .width("100%").padding({left:20})

      Row(){
        Column().width(50).backgroundColor("#0ff").height(30).margin(5).borderRadius(5)
        Column(){
          Text("中国银行储蓄卡").fontColor("#ff033048").fontSize(14).width("100%")
          Text("xxxxxx  xxxxx  xxxx ").fontColor("#999").fontSize(12).width("100%")
        }.layoutWeight(1)
        Image($r("app.media.right_icon")).width(20)
      }.height(40).margin({left:20,right:20}).shadow({radius:60,color:"#ffcfcfcf"}).borderRadius(10)
      Text("支付金额").fontWeight(700).fontSize(18).height(40)
        .width("100%").padding({left:20}).margin({top:10,bottom:10})

      Text("¥155.55").fontWeight(700).fontSize(24).height(40)

     Column({space:10}){
       InputComponent({title:'用户订单姓名',placeholder:'输入你的名称'})
       InputComponent({title:'用户订单电话号码',placeholder:'输入您的电话号码'})
     }.width("100%").padding({left:20,right:20})

      Button("下一步").width(228).backgroundColor("#ff09b19d").margin({top:50})
    }.height("100%").width("100%").margin({top:80}).borderRadius({topLeft:20,topRight:20}).backgroundColor(Color.White)
  }
}

day02 项目结构基本搭建完成,静态页面基本编写完成


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

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

相关文章

用人工智能大模型预报气象,中国气象局示范计划公开征集火热报名中

近日&#xff0c;中国气象局发布了人工智能气象预报大模型示范计划&#xff08;以下简称“示范计划”&#xff09;&#xff0c;推进气象大模型标准规范和有序发展&#xff0c;引导解决预报业务实际难题&#xff0c;促进人工智能气象预报大模型业务的应用转化、准入&#xff0c;…

k8s笔记——helm chat与k8s Operator区别

k8s Operator Kubernetes 为自动化而生。无需任何修改&#xff0c;你即可以从 Kubernetes 核心中获得许多内置的自动化功能。 你可以使用 Kubernetes 自动化部署和运行工作负载&#xff0c;甚至 可以自动化 Kubernetes 自身。 Kubernetes 的 Operator 模式概念允许你在不修改…

10位时间戳、13位时间戳、17位时间戳,以及在JavaScript中的格式转换

一、介绍 1、10位时间戳 2、13位时间戳 3、17位时间戳 4、时间戳转换工具 二、13位时间戳的转换 1、转标准日期 2、转格式化日期 三、10位时间戳的转换 1、转标准日期 2、转格式化日期 四、17位时间戳的转换 1、解析思路 2、解析过程 3、完整代码 4、新的问题 …

【学习笔记】Redis学习笔记——第5章 跳跃表

第5章 跳跃表 有序集合&#xff0c;ZSet关键组成部分&#xff0c;时间复杂度媲美平衡树&#xff0c;且实现简单。 5.1 跳跃表的实现 可以简单理解为每个节点会有一些指向后面跨越N个节点的指针&#xff0c;比如说Node1不仅有指向Node2的指针&#xff0c;还可以有Node5的&…

【分布式计算框架 MapReduce】高级编程—搜索日志数据分析

目录 一、对于 sogou_500w_utf 数据&#xff0c;使用 MapReduce 编程模型完成对以下数据的分析任务 1. 统计 2011-12-30 日搜索记录&#xff0c;每个时间段的搜索次数 &#xff08;1&#xff09;运行截图 &#xff08;2&#xff09; 源代码 2. 统计 2011-12-30 日 3 点至 …

SCCB协议介绍,以及与IIC协议对比

在之前的文章里已经介绍了IIC协议&#xff1a;iic通信协议 这篇内容主要介绍一下SCCB协议。 文章目录 SCCB协议&#xff1a;SCCB时序图iic时序图SCCB时序 VS IIC时序 总&#xff1a;SCCB协议常用在摄像头配置上面&#xff0c;例如OV5640摄像头&#xff0c;和IIC协议很相似&…

Kubernetes Artemis系列 | 使用 ArtemisCloud Operator 部署 artemis

目录 一、ArtemisCloud Operator 介绍二、部署ArtemisCloud Operator三、使用 ArtemisCloud Operator 部署 artemis四、管理队列五、缩减规模时消息迁移 一、ArtemisCloud Operator 介绍 ArtemisCloud Operator 是一个用于管理和部署云端基础设施的工具。它基于 Kubernetes 平…

ArtTS系统能力-通知的学习(3.1)

上篇回顾&#xff1a; ArtTS语言基础类库-容器类库内容的学习(2.10.2&#xff09; 本篇内容&#xff1a; ArtTS系统能力-通知的学习&#xff08;3.1&#xff09; 一、 知识储备 1. 基础类型通知 按内容分成四类&#xff1a; 类型描述NOTIFICATION_CONTENT_BASIC_TEXT普通文…

大物3错题整理

平衡位置&#xff1a;在O点上的位置 相位&#xff1a; 当N很大的时候&#xff0c;wxwywz。因此&#xff0c;平均平动动能除以3&#xff0c;就是能量均分定理。 W F在x上的积分 Π时无单位 180&#xff0c;就是单位 1rad&#xff0c;rad就是单位 左手定则、右手定则、安培定…

金融科技如何多角度助力小微企业融资

一、引言 在全球化与数字化交织的时代背景下&#xff0c;金融科技&#xff08;FinTech&#xff09;作为新兴力量&#xff0c;正逐步改变传统的金融业态&#xff0c;尤其在助力小微企业融资方面&#xff0c;金融科技展现出了多元化的价值和优势。本文将从不同角度探讨金融科技如…

数据同步软件有哪些

数据同步软件有哪些呢&#xff1f;随着企业规模的扩大&#xff0c;企业数据也积累得越来越多&#xff0c;万一发生宕机风险&#xff0c;那么这个损失将不可估量。所以为了容灾备用&#xff0c;我们往往需要将数据同步到另一台备胎服务器上&#xff0c;进行冗余。 那么需要同步的…

适配手机《植物大战僵尸杂交版》最新整合包,附Android、iOS、Windows保姆级教程和工具合集!

最近&#xff0c;新版的《植物大战僵尸杂交版》火爆全网啊&#xff01;许多小伙伴不知道手机和电脑怎样安装设置才能畅玩《杂交版》&#xff0c;所以今天阿星特意为大家准备了一份安装工具集。 里面有安卓、iOS及电脑端的安装包&#xff0c;包含安装视频教程、修改器、防闪退、…

论文阅读《One-Step Image Translation with Text-to-Image Models》

Abstract. 在这项工作中&#xff0c;我们解决了现有条件扩散模型的两个局限性&#xff1a;迭代去噪过程导致的推理速度慢&#xff0c;以及模型微调对配对数据的依赖。为了解决这些问题&#xff0c;我们引入了一种通用方法&#xff0c;通过对抗学习目标将单步扩散模型适应新任务…

【C++】string基本用法(常用接口介绍)

文章目录 一、string介绍二、string类对象的创建&#xff08;常见构造&#xff09;三、string类对象的容量操作1.size()和length()2.capacity()3.empty()4.clear()5.reserve()6.resize() 四、string类对象的遍历与访问1.operator[ ]2.正向迭代器begin()和end()3.反向迭代器rbeg…

昇思25天学习打卡营第10天 | 基于MindNLP+MusicGen生成自己的个性化音乐

基于MindNLPMusicGen生成自己的个性化音乐 MusicGen是来自Meta AI的Jade Copet等人提出的基于单个语言模型&#xff08;LM&#xff09;的音乐生成模型&#xff0c;能够根据文本描述或音频提示生成高质量的音乐样本&#xff0c;相关研究成果参考论文《Simple and Controllable …

Keepalive技术

文章目录 一、Keepalive基础vrrp技术Keepalived介绍Keepalived架构 二、 Keepalived 相关文件配置文件组成全局配置虚拟路由器配置 三、配置lvs和keepalive联动服务器架构抢占模式配置配置单播、组播配置通知模块日志功能脑裂现象 四、keepalived和nginx联动keepalive和其他应用…

html文章卡片

完成效果 中医网站的文本卡片制作&#xff0c;其中用到了grid布局 css基础知识回顾 阴影样式 好的阴影样式可以保存 box-shadow: 6px 6px 5px hsla(0, 0%, 0%, 0.02), 25px 25px 20px hsla(0, 0%, 0%, 0.03), 100px 100px 80px hsla(0, 0%, 0%, 0.05); grid-template-column…

Python的numpy简单使用

1.可以调用引入numpy里面的函数&#xff0c;如add可以把俩数相加&#xff0c;也可以创建一个数组arr&#xff0c;arr.shape是数组arr的属性&#xff0c;如果后有跟&#xff08;&#xff09;就是里面的一个函数 type()函数可以知道里面是什么类型 变量.shape可以知道这个变量是…

这些并发编程技术你都知道吗?

与其碌碌无为&#xff0c;不如兴风作浪。 虽然不是所有的系统都需要很多的并发编程技术&#xff0c;但是掌握常见的高并发秘籍&#xff0c;便能让我们的系统快起来&#xff0c;面对访问量的剧增从容应对。 接下来&#xff0c;为我们一起来看看常见的高并发技术有哪些。总结起来…

NAS教程丨铁威马如何登录 SSH终端?

适用型号&#xff1a; 所有TNAS 型号 如您有特殊操作需要通过 SSH 终端登录 TNAS&#xff0c;请参照以下指引&#xff1a; (注意: 关于以下操作步骤中的"cd /"的指令,其作用是使当前 SSH/Telnet 连接的位置切换到根目录,以免造成对卷的占用.请不要遗漏它.) Windows…