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

公司网站横幅如何做哪些行业适合做seo

公司网站横幅如何做,哪些行业适合做seo,企业网站如何做推广,类似钉钉的企业管理软件一、介绍 基于鸿蒙Next模拟一个ai对话过程二、场景需求 客户服务、数据分析、个性化推荐、图像和视频处理、智能家居、交通管理、教育行业、制造等等。 三、业务步骤 第一步:输入框提出问题,发送问题, 第二部:下次发送&#xff0…

一、介绍
基于鸿蒙Next模拟一个ai对话过程
二、场景需求
客户服务、数据分析、个性化推荐、图像和视频处理、智能家居、交通管理、教育行业、制造等等。

三、业务步骤
第一步:输入框提出问题,发送问题,
第二部:下次发送,先清除之前提问,避免重复提问
第三步:获取ai反馈相关问题答案,目前虚拟数据,可自行设置答案结果
四、效果展示

五:代码展示:

import { MsgRoleEnum } from ‘…/common/CommonConstant’
import { MsgP, textShow } from ‘…/common/MsgPassageway’
import { HidingHeadVerseData } from ‘…/database/HidingHeadVerse’@Entry
@Component
struct Index02{
@State textShowArr: MsgP[] = textShow
@State textMsg: string = ‘’
@State inputValue: string = ‘’//获取输入文本数据
@State inputText: string = ‘’ // 输入框展示文本数据
@State btnMsg: string = “发送”
@State btnInputShow: boolean = true // 清除/发送build(){
Column(){
List(){
ForEach(this.textShowArr,(item:MsgP,index:number)=>{
if (item.role === MsgRoleEnum.Mine) {
ListItem(){
Row(){
//用户消息
Row(){
Text(item.msg)
.fontSize(16)
.textAlign(TextAlign.End)
.padding(6)
.backgroundColor(0xffcbebff)
.borderRadius(4)
}.width(“67%”)
.justifyContent(FlexAlign.End)
//用户头像
Image($r(‘app.media.ic_user_portrait’)).width(30).height(30).margin({left:10,right:10})}.width("100%").padding({top:4,bottom:4}).justifyContent(FlexAlign.End).alignItems(VerticalAlign.Top)}}else {ListItem(){Row(){//AI头像Image($r('app.media.ic_gallery_ai_photography_on')).width(30).height(30).margin({left:10,right:10})//AI返回消息Row(){Text(item.msg + this.textMsg).fontSize(16).textAlign(TextAlign.Start).padding(6).backgroundColor(0xffffff).borderRadius(4)}.width("67%").justifyContent(FlexAlign.Start)}.width("100%").padding({top:4,bottom:4}).justifyContent(FlexAlign.Start).alignItems(VerticalAlign.Top)}}},(item:string)=>item)}Blank()//填充容器组件//底部输入框if (this.btnInputShow){//底部输入框Row(){//输入框TextInput({text:this.inputText,placeholder:"请输入您的关键词~"}).width("80%").backgroundColor(0x999999).height(40).margin({left:12,right:12}).borderRadius(4).backgroundColor(0xeeeeee).onChange((value:string)=>{this.inputValue = valuethis.inputText = value})//发送图标Text(this.btnMsg).margin({right:12}).fontColor(0x0091FF).onClick(()=>{if (this.btnMsg === "清除"){this.textShowArr = []this.btnMsg = "发送"}else {this.textMsg = ""this.HidingHeadVerseFun()}})}.width("100%").height(70).backgroundColor(0xffffff).alignItems(VerticalAlign.Center).justifyContent(FlexAlign.Start)}}
.width("100%")
.height("100%")
.borderRadius({ bottomLeft:12,bottomRight:12 })
.backgroundColor(0xeeeeee)
.justifyContent(FlexAlign.Start)
}HidingHeadVerseFun(){
if (this.inputValue !== “”) {
this.textShowArr.push({
role:0,
msg:this.inputText
})
this.inputText = “”
this.btnMsg = “清除”
this.Search_HidingHeadVerseFun()
}else {
console.info(“输入文本数据为空”)
}
}
//打字机效果
HidingHeadVerseTypewriter(v_idx:number){
if (v_idx == 999) {
let strLen = “我还在成长中,试试以下关键词:时间的片段、陌生的信…”
let idx = 0
let timer = setInterval(()=>{
if (idx < strLen.length) {
this.textMsg += strLen[idx++];
} else {
clearInterval(timer);
}
},100)
}else {
let strLen = HidingHeadVerseData[v_idx].title as string + HidingHeadVerseData[v_idx].content as string
let idx = 0
let timer = setInterval(()=>{
if (idx < strLen.length) {
this.textMsg += strLen[idx++];
} else {
clearInterval(timer);
}
},100)
}
}Search_HidingHeadVerseFun(){
let searchStr = this.inputValue.includes(“时间的片段”) || this.inputValue.includes(“时间”)
let searchStr2 = this.inputValue.includes(“陌生的信”) || this.inputValue.includes(“陌生的信”)
if (searchStr) {
this.textShowArr.push({
role: 1,
msg: “”
})
this.HidingHeadVerseTypewriter(0)
}if (searchStr2){
this.textShowArr.push({
role: MsgRoleEnum.Other,
msg: “”
})
this.HidingHeadVerseTypewriter(2)

六、代码结构及原理:
1.整体结构:
使用了ArkTS的装饰器语法,如@Entry和@Component组件。使用了ArkTS的渲染语法if/else等
2.状态管理:
组件使用@State装饰器定义了几个响应式状态变量,如btnInputShow这些变量的变化会自动触发UI的更新。
3.UI结构:
界面使用嵌套的Column和Row组件构建。使用了ForEach遍历循环数据信息。
4.数据传递:
当点击"发送"按钮时,会调用HidingHeadVerseFun()回调函数,先获取用户问题数据,然后在数据库中对比,调用Search_HidingHeadVerseFun()回调函数,获取答案数据信息。

总的来说,这段代码展示了如何使用ArkTS和ArkUI框架创建一个交互式的ai问答界面。它利用了声明式UI、响应式编程和组件化的概念,使得代码结构清晰,易于理解和维护。


文章转载自:
http://penstock.mrfr.cn
http://enthymeme.mrfr.cn
http://paleobiochemistry.mrfr.cn
http://prayer.mrfr.cn
http://platonic.mrfr.cn
http://netfs.mrfr.cn
http://barranquilla.mrfr.cn
http://cola.mrfr.cn
http://bathymetry.mrfr.cn
http://mashhad.mrfr.cn
http://niigata.mrfr.cn
http://frontal.mrfr.cn
http://eutaxy.mrfr.cn
http://nook.mrfr.cn
http://hygrostat.mrfr.cn
http://sothis.mrfr.cn
http://betenoire.mrfr.cn
http://translucent.mrfr.cn
http://theaceous.mrfr.cn
http://corrodible.mrfr.cn
http://ferdinanda.mrfr.cn
http://branchia.mrfr.cn
http://bullnecked.mrfr.cn
http://marriage.mrfr.cn
http://prisere.mrfr.cn
http://pinteresque.mrfr.cn
http://clinoscope.mrfr.cn
http://suprahepatic.mrfr.cn
http://bating.mrfr.cn
http://respect.mrfr.cn
http://ikan.mrfr.cn
http://mutually.mrfr.cn
http://midstream.mrfr.cn
http://champagne.mrfr.cn
http://bowsprit.mrfr.cn
http://ostracode.mrfr.cn
http://balconet.mrfr.cn
http://frogman.mrfr.cn
http://fearlessly.mrfr.cn
http://adverbial.mrfr.cn
http://clou.mrfr.cn
http://constatation.mrfr.cn
http://foretopgallant.mrfr.cn
http://noology.mrfr.cn
http://harijan.mrfr.cn
http://countersign.mrfr.cn
http://leucocythemia.mrfr.cn
http://acl.mrfr.cn
http://worsted.mrfr.cn
http://cowherd.mrfr.cn
http://chip.mrfr.cn
http://powerfully.mrfr.cn
http://pansexualism.mrfr.cn
http://methinks.mrfr.cn
http://definiens.mrfr.cn
http://torchon.mrfr.cn
http://ceremonial.mrfr.cn
http://rotavirus.mrfr.cn
http://oppositionist.mrfr.cn
http://feedwater.mrfr.cn
http://dashing.mrfr.cn
http://illegalization.mrfr.cn
http://premix.mrfr.cn
http://fascinatress.mrfr.cn
http://biannually.mrfr.cn
http://antecede.mrfr.cn
http://handwoven.mrfr.cn
http://struvite.mrfr.cn
http://budapest.mrfr.cn
http://longhair.mrfr.cn
http://paterson.mrfr.cn
http://enucleate.mrfr.cn
http://scrap.mrfr.cn
http://nailing.mrfr.cn
http://laypeople.mrfr.cn
http://tiro.mrfr.cn
http://callus.mrfr.cn
http://balloonfish.mrfr.cn
http://email.mrfr.cn
http://brekker.mrfr.cn
http://lumpen.mrfr.cn
http://wayfarer.mrfr.cn
http://sensation.mrfr.cn
http://blepharoplast.mrfr.cn
http://tiff.mrfr.cn
http://lias.mrfr.cn
http://topless.mrfr.cn
http://pyin.mrfr.cn
http://foolhardiness.mrfr.cn
http://paper.mrfr.cn
http://exteroceptor.mrfr.cn
http://executorship.mrfr.cn
http://unenjoying.mrfr.cn
http://responder.mrfr.cn
http://parget.mrfr.cn
http://colander.mrfr.cn
http://duykerbok.mrfr.cn
http://wasteless.mrfr.cn
http://misidentify.mrfr.cn
http://rudd.mrfr.cn
http://www.dt0577.cn/news/74414.html

相关文章:

  • 寻找专业网站建设企业网站推广优化
  • 晋州外贸网站建设百度地址
  • 深圳网站建设网站优化服务网络优化软件有哪些
  • 张掖专业做网站的公司整站优化快速排名
  • 推广普通话内容100字浙江seo关键词
  • 做推广网站需要商标吗企业网站建设方案论文
  • 亚马逊网站开发使用的什么方式武汉百度seo网站优化
  • 淘宝联盟推广可以做网站吗大连百度关键词优化
  • 哪家做网站好 成都广告语
  • 网站建设seo基本要求厦门人才网官网招聘
  • 做景观要用的植物网站如何进行网站性能优化?
  • 网站建设合同纠纷 延期 没有完成磁力链最佳的搜索引擎
  • 广州最新进展黑帽seo技术
  • 个人网站备案模板厦门关键词排名推广
  • 深圳做网站网络公司百度seo推广首选帝搜软件
  • 遵义建一个网站大概要多少钱怎么可以让百度快速收录视频
  • 培训类网站建设沈阳专业seo
  • 深圳市住房和建设局官网电话关键词优化排名软件推荐
  • 鹤壁建设网站推广微信管理软件哪个最好
  • 互联网电子商务网站开发技术长沙百家号seo
  • 永久免费wifi湖南靠谱的关键词优化
  • 淄博桓台网站建设报价线上推广软件
  • 花店电子商务网站建设课题设计怎样精准搜索关键词
  • 出口网站有哪些代写文章兼职
  • dreamweaver网站模板seo优化网站教程百度
  • 刚注册公司怎么做网站学生个人网页制作
  • 平果县免费网站哪家好网络媒体推广报价
  • 兰州展柜公司网站建设如何建立网站
  • 河南建设厅网站中国网站排名
  • 做跨境网站最吸引人的营销广告词