WanAndroid(鸿蒙版)开发的第六篇

前言

DevEco Studio版本:4.0.0.600

WanAndroid的API链接:玩Android 开放API-玩Android - wanandroid.com

其他篇文章参考:

1、WanAndroid(鸿蒙版)开发的第一篇

2、WanAndroid(鸿蒙版)开发的第二篇

3、WanAndroid(鸿蒙版)开发的第三篇

4、WanAndroid(鸿蒙版)开发的第四篇

5、WanAndroid(鸿蒙版)开发的第五篇

6、WanAndroid(鸿蒙版)开发的第六篇

效果

​ 

我的页面实现

从UI效果上可以看出是头部的背景+头像 和下面的业务item,因此整体可以使用RelativeContainer布局,业务item可以用column实现。

1、UI界面实现

build() {
   RelativeContainer() {
      Image($r('app.media.ic_background_mine'))
         .width('100%')
         .height(240)
         .id('imageBg')
         .alignRules({
            top: { anchor: '__container__', align: VerticalAlign.Top },
            middle: { anchor: '__container__', align: HorizontalAlign.Center }
         })

      CircleImageView({
         src: $r("app.media.ic_icon"), //本地图片资源
         radius: 60,
         border_Width: 1,
         border_Color: Color.Pink,
      }).id('imageIcon')
         .margin({ top: 50 })
         .alignRules({
            top: { anchor: '__container__', align: VerticalAlign.Top },
            middle: { anchor: '__container__', align: HorizontalAlign.Center }
         })

      Text(decodeURIComponent(this.userName))
         .fontSize(20)
         .fontColor(Color.Black)
         .fontWeight(FontWeight.Bold)
         .id('textUsername')
         .margin({ top: 20 })
         .alignRules({
            top: { anchor: 'imageIcon', align: VerticalAlign.Bottom },
            middle: { anchor: '__container__', align: HorizontalAlign.Center }
         })

      Column() {
         Row() {
            Text('我的收藏')
               .fontColor(Color.Black)
               .margin({ left: 15 })

            Image($r("app.media.ic_mine_next"))
               .width(25)
               .height(22)
               .margin({ right: 15 })
         }
         .justifyContent(FlexAlign.SpaceBetween)
         .width('100%')
         .height(50)
         .margin({ top: 10 })
         .borderRadius(10)
         .backgroundColor('#66CCCCCC')
         .onClick(() => {
            if (this.isLogin) {
               router.pushUrl({ url: 'pages/mine/MineCollectPage' })
            } else {
               router.pushUrl({
                  url: 'pages/LoginPage',
                  params: {
                     hideJump: true
                  }
               })
            }
         })

         Row() {
            Text('个人积分')
               .fontColor(Color.Black)
               .margin({ left: 15 })

            Image($r("app.media.ic_mine_next"))
               .width(25)
               .height(22)
               .margin({ right: 15 })
         }
         .justifyContent(FlexAlign.SpaceBetween)
         .width('100%')
         .height(50)
         .margin({ top: 20 })
         .borderRadius(10)
         .backgroundColor('#66CCCCCC')
         .onClick(() => {
            if (this.isLogin) {
               router.pushUrl({ url: 'pages/mine/MineIntegralPage' })
            } else {
               router.pushUrl({
                  url: 'pages/LoginPage',
                  params: {
                     hideJump: true
                  }
               })
            }
         })

         Row() {
            Text('关于我们')
               .fontColor(Color.Black)
               .margin({ left: 15 })

            Image($r("app.media.ic_mine_next"))
               .width(25)
               .height(22)
               .margin({ right: 15 })
         }
         .justifyContent(FlexAlign.SpaceBetween)
         .width('100%')
         .height(50)
         .margin({ top: 20 })
         .borderRadius(10)
         .backgroundColor('#66CCCCCC')
         .onClick(() => {
            router.pushUrl({ url: 'pages/mine/MineAboutPage' })
         })

         Row() {
            Text('退出登录')
               .fontColor(Color.Black)
               .margin({ left: 15 })

            Image($r("app.media.ic_mine_next"))
               .width(25)
               .height(22)
               .margin({ right: 15 })
         }
         .justifyContent(FlexAlign.SpaceBetween)
         .width('100%')
         .height(50)
         .margin({ top: 20 })
         .borderRadius(10)
         .backgroundColor('#66CCCCCC')
         .visibility(this.isLogin ? Visibility.Visible : Visibility.None)
         .onClick(() => {
            this.dialogController.open()
         })

      }.id('columnSetting')
      .padding({ left: 10, right: 10 })
      .alignRules({
         top: { anchor: 'imageBg', align: VerticalAlign.Bottom },
         middle: { anchor: '__container__', align: HorizontalAlign.Center }
      }).width('100%')
   }
   .backgroundColor(Color.White)
   .width('100%')
   .height('100%')
}

2、退出登录弹窗

private dialogController = new CustomDialogController({
   builder: LoginOutDialog({ onLoginOut: () => {
      this.onLoginOut()
   } }),
   customStyle: true,
   alignment: DialogAlignment.Center,
})

3、执行退出登录请求

private onLoginOut() {
   HttpManager.getInstance()
      .request<LoginOutBean>({
         method: RequestMethod.GET,
         url: 'https://www.wanandroid.com/user/logout/json' //wanAndroid的API:Banner
      })
      .then((result: LoginOutBean) => {
         LogUtils.info(TAG, "result: " + JSON.stringify(result))
         if (result.errorCode == 0) {
            this.clearUserData()
            //跳转到登录界面
            router.replaceUrl({ url: 'pages/LoginPage' })
         }
      })
      .catch((error) => {
         LogUtils.info(TAG, "error: " + JSON.stringify(error))
      })
}

4、清除用户数据

private clearUserData() {
   AppStorage.Set(Constants.APPSTORAGE_USERNAME, '')
   AppStorage.Set(Constants.APPSTORAGE_PASSWORD, '')
   AppStorage.Set(Constants.APPSTORAGE_ISLOGIN, false)
}

我的收藏

1、获取收藏数据

private getCollectData() {
   HttpManager.getInstance()
      .request<CollectBean>({
         method: RequestMethod.GET,
         header: { "Cookie": `loginUserName=${this.userName}; token_pass=${this.token_pass}` },
         url: `https://www.wanandroid.com/lg/collect/list/${this.pageNum}/json` //wanAndroid的API:积分排行
      })
      .then((result: CollectBean) => {
         LogUtils.info(TAG, "getCollectData  result: " + JSON.stringify(result))
         if (this.isRefresh) {
            this.controller.finishRefresh()
         } else {
            this.controller.finishLoadMore()
         }
         if (result.errorCode == 0) {
            if (this.isRefresh) {
               this.collectListData = result.data.datas
            } else {
               if (result.data.datas.length > 0) {
                  this.collectListData = this.collectListData.concat(result.data.datas)
               } else {
                  promptAction.showToast({ message: '没有更多数据啦!' })
               }
            }
         }
         this.dialogController.close()
      })
      .catch((error) => {
         LogUtils.info(TAG, "error: " + JSON.stringify(error))
         if (this.isRefresh) {
            this.controller.finishRefresh()
         } else {
            this.controller.finishLoadMore()
         }
         this.dialogController.close()
      })
}

2、UI界面实现

build() {
      Column() {
         AppTitleBar({ title: "我的收藏" })

         RefreshListView({
            list: this.collectListData,
            controller: this.controller,
            isEnableLog: true,
            paddingRefresh: { left: 10, right: 10, top: 5, bottom: 5 },
            refreshLayout: (item: CollectItemBean, index: number): void => this.itemLayout(item, index),
            onItemClick: (item: CollectItemBean, index: number) => {
               LogUtils.info(TAG, "点击了:index: " + index + " item: " + item)
               router.pushUrl({
                  url: 'pages/WebPage',
                  params: {
                     title: item.title,
                     uriLink: this.isValidUrl(item.link) ? item.link : 'https://www.wanandroid.com/' + item.link  //规避部分情况下偶现link链接不完整
                  }
               }, router.RouterMode.Single)
            },
            onRefresh: () => {
               //下拉刷新
               this.isRefresh = true
               this.pageNum = 0
               this.getCollectData()
            },
            onLoadMore: () => {
               //上拉加载
               this.isRefresh = false
               this.pageNum++
               this.getCollectData()
            }
         }).flexShrink(1)
      }
      .width('100%')
      .height('100%')
      .backgroundColor('#F1F3F5')
   }

   @Builder
   itemLayout(item: CollectItemBean, index: number) {
      RelativeContainer() {
         //标题
         Text(HtmlUtils.formatStr(item.title))
            .fontColor('#333333')
            .fontWeight(FontWeight.Bold)
            .maxLines(2)
            .textOverflow({
               overflow: TextOverflow.Ellipsis
            })
            .fontSize(20)
            .id("textTitle")
            .alignRules({
               top: { anchor: 'textAuthor', align: VerticalAlign.Bottom },
               left: { anchor: '__container__', align: HorizontalAlign.Start }
            })

         //更新时间
         Text("作者:" + item.author /*+ "\t分类:" + item.chapterName*/ + "\t\t收藏时间:" + item.niceDate)
            .fontColor('#666666')
            .fontSize(14)
            .id("textNiceDate")
            .alignRules({
               bottom: { anchor: '__container__', align: VerticalAlign.Bottom },
               left: { anchor: '__container__', align: HorizontalAlign.Start }
            })
      }
      .width('100%')
      .height(90)
      .padding(10)
      .borderRadius(10)
      .backgroundColor(Color.White)
   }

个人积分

1、获取积分数据

private getIntegralData() {
   HttpManager.getInstance()
      .request<IntegralBean>({
         method: RequestMethod.GET,
         header: { "Cookie": `loginUserName=${this.userName}; token_pass=${this.token_pass}` },
         url: `https://www.wanandroid.com/lg/coin/userinfo/json` //wanAndroid的API:积分排行
      })
      .then((result: IntegralBean) => {
         this.IntegralDataState = true
         LogUtils.info(TAG, "getIntegralData  result: " + JSON.stringify(result))
         if (result.errorCode == 0) {
            this.userIntegralData = result.data
         }
         LogUtils.info(TAG, "IntegralDataState: " + this.IntegralDataState + "  LeaderboardDataState: " + this.LeaderboardDataState)
         if (this.IntegralDataState && this.LeaderboardDataState) {
            this.dialogController.close()
         }
      })
      .catch((error) => {
         this.IntegralDataState = true
         LogUtils.info(TAG, "error: " + JSON.stringify(error))
         LogUtils.info(TAG, "IntegralDataState: " + this.IntegralDataState + "  LeaderboardDataState: " + this.LeaderboardDataState)
         if (this.IntegralDataState && this.LeaderboardDataState) {
            this.dialogController.close()
         }
      })
}

//积分排行
private getLeaderboardData() {
   HttpManager.getInstance()
      .request<LeaderboardBean>({
         method: RequestMethod.GET,
         header: {
            "Content-Type": "application/json"
         },
         url: `https://www.wanandroid.com/coin/rank/1/json` //wanAndroid的API:积分排行
      })
      .then((result: LeaderboardBean) => {
         this.LeaderboardDataState = true
         LogUtils.info(TAG, "getLeaderboardData  result: " + JSON.stringify(result))
         if (result.errorCode == 0) {
            this.leaderboardListData = result.data.datas
         }
         LogUtils.info(TAG, "IntegralDataState: " + this.IntegralDataState + "  LeaderboardDataState: " + this.LeaderboardDataState)
         if (this.IntegralDataState && this.LeaderboardDataState) {
            this.dialogController.close()
         }
      })
      .catch((error) => {
         this.LeaderboardDataState = true
         LogUtils.info(TAG, "error: " + JSON.stringify(error))
         LogUtils.info(TAG, "IntegralDataState: " + this.IntegralDataState + "  LeaderboardDataState: " + this.LeaderboardDataState)
         if (this.IntegralDataState && this.LeaderboardDataState) {
            this.dialogController.close()
         }
      })
}

2、UI界面实现

build() {
   Column() {
      AppTitleBar({ title: '个人积分' })

      Row() {
         Text('个人积分信息')
            .fontSize(20)
            .fontWeight(FontWeight.Bold)

         Text('积分获取列表 >>')
            .fontSize(14)
            .fontColor('#66666666')
            .fontWeight(FontWeight.Bold)
            .onClick(() => {
               router.pushUrl({ url: 'pages/mine/PointAcquisitionPage' })
            })
      }
      .width('100%')
      .justifyContent(FlexAlign.SpaceBetween)
      .height(50)
      .padding({ left: 15, right: 15 })
      .backgroundColor('#66CCCCCC')

      Stack() {
         Column() {
            Text(decodeURIComponent(this.userName))
               .fontColor(Color.Black)
               .fontSize(28)
               .margin({ top: 5, bottom: 5 })
               .fontWeight(FontWeight.Bold)

            Text('积分:' + this.userIntegralData.coinCount)
               .fontColor(Color.Red)
               .margin({ top: 10, bottom: 10 })
               .fontSize(20)

            Text('等级:' + this.userIntegralData.level)
               .fontColor(Color.Green)
               .margin({ top: 10, bottom: 10 })
               .fontSize(20)

            Text('排名:' + this.userIntegralData.rank)
               .fontColor('#1296db')
               .margin({ top: 10, bottom: 10 })
               .fontSize(20)
         }
         .alignItems(HorizontalAlign.Start)
         .padding(10)
         .borderRadius(10)
         .backgroundColor('#F1F3F5')
         .width('100%')
      }.width('100%')
      .padding({ left: 10, right: 10, top: 15, bottom: 15 })

      //积分排行榜
      Row() {
         Text('积分排行榜')
            .fontSize(20)
            .fontWeight(FontWeight.Bold)

         Text('更多信息 >>')
            .fontSize(14)
            .fontColor('#66666666')
            .fontWeight(FontWeight.Bold)
            .onClick(() => {
               router.pushUrl({ url: 'pages/mine/LeaderboardPage' })
            })
      }
      .width('100%')
      .justifyContent(FlexAlign.SpaceBetween)
      .height(50)
      .padding({ left: 15, right: 15 })
      .backgroundColor('#66CCCCCC')

      if (this.leaderboardListData.length > 3) {
         LeaderboardItemLayout({ item: this.leaderboardListData[0] }).padding(10)
         LeaderboardItemLayout({ item: this.leaderboardListData[1] }).padding(10)
         LeaderboardItemLayout({ item: this.leaderboardListData[2] }).padding(10)
      }

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

3、效果

关于我们界面实现

1、效果

2、原理分析

要实现‘关于我们’文字和背景图片随着手指滑动而变化的效果。监听最外层布局的滑动事件,然后动态设置绝对偏移量(通过position方法实现)。

图片设置绝对偏移量

Image($r('app.media.ic_background_mine'))
   .width('100%')
   .height(this.imageHeight)
   .position({ x: 0, y: this.offsetY - this.pullMaxHeight })

‘关于我们’文字根据滑动距离动态设置大小

Text('关于我们')
   .fontColor(Color.White)
   .fontSize(this.fontSize)
   .position({ x: this.textInitialX, y: this.textInitialY + this.textPositionY })

底部内容设置绝对偏移量

Column() {
           //......
         }
         .padding(10)
         .position({ y: this.imageHeight + this.offsetY - this.pullMaxHeight })

3、详细代码

import LogUtils from '@app/BaseLibrary/src/main/ets/utils/LogUtils'
import router from '@ohos.router';

const TAG = 'MineAboutPage--- ';

/**
 * 关于我们
 */
@Entry
@Component
struct MineAboutPage {
   // 列表y坐标偏移量
   @State offsetY: number = 0
   // 按下的y坐标
   private downY = 0
   // 上一次手指抬起后的背景偏移量
   private lastUpOffsetY = 0
   //上一次手指抬起后的文字偏移量
   private lastUpTextPositionY = 0
   // 下拉的最大高度
   private pullMaxHeight: number = 100
   //收缩后title的高度
   private pushMaxHeight: number = 56
   //图片高度
   private imageHeight: number = 300
   //文字初始偏移量,x
   private textInitialX: number = 60
   //文字初始偏移量,y
   private textInitialY: number = 60
   //文字初始大小
   private textFontSize: number = 40
   @State fontSize: number = this.textFontSize
   @State textPositionY: number = 0
   @State pushStatus: boolean = false

   build() {
      Column() {
         Stack() {
            Image($r('app.media.ic_background_mine'))
               .width('100%')
               .height(this.imageHeight)
               .position({ x: 0, y: this.offsetY - this.pullMaxHeight })

            Image($r('app.media.ic_back_white'))
               .width(26)
               .height(26)
               .margin({ left: 20, right: 20, top: 15 })
               .onClick(() => {
                  router.back()
               })

            Text('关于我们')
               .fontColor(Color.White)
               .fontSize(this.fontSize)
               .position({ x: this.textInitialX, y: this.textInitialY + this.textPositionY })
         }
         .alignContent(Alignment.TopStart)
         .width('100%')
         .height(this.imageHeight - this.pullMaxHeight)
         .id('stackHeader')
         .alignRules({
            left: { anchor: '__container__', align: HorizontalAlign.Start },
            top: { anchor: '__container__', align: VerticalAlign.Top }
         })

         Column() {
            Text("APP介绍:")
               .fontColor(Color.Black)
               .fontSize(25)
               .fontWeight(FontWeight.Bold)
               .alignSelf(ItemAlign.Start)
            Text("\t这是一款鸿蒙应用,基于鸿洋大佬WanAndroid的API进行开发,目前主要功能包括:登录、注册,搜索,首页,导航,项目,个人信息等模块。")
               .lineHeight(25)
               .fontSize(20)
               .fontColor(Color.Black)
               .margin({ top: 10 })
            Text() {
               Span('\t可以在').fontSize(20)
               Span('WanAndroid(鸿蒙)')
                  .decoration({ type: TextDecorationType.Underline, color: Color.Blue }).fontSize(18)
                  .onClick(() => {
                     router.pushUrl({
                        url: 'pages/WebPage',
                        params: {
                           title: 'WanAndroid(鸿蒙)',
                           uriLink: 'https://blog.csdn.net/abner_crazy/category_12565384.html',
                           isShowCollect: false,
                        }
                     }, router.RouterMode.Single)
                  })
                  .fontColor(Color.Blue)
               Span('专栏中关注项目相关介绍,后续会在该专栏中更新项目开发相关知识点,欢迎大家在专栏下方留言进行沟通交流。')
                  .fontSize(20)
            }
            .lineHeight(25)
            .margin({ top: 20 })

         }
         .padding(10)
         .position({ y: this.imageHeight + this.offsetY - this.pullMaxHeight })
      }
      .onTouch((event) => this.touchEvent(event))
      .width('100%')
      .height('100%')

   }

   touchEvent(event: TouchEvent) {
      switch (event.type) {
         case TouchType.Down: // 手指按下
         // 记录按下的y坐标
            this.downY = event.touches[0].y
            break
         case TouchType.Move: // 手指移动
            this.touchMovePull(event.touches[0].y)
            break
         case TouchType.Up: // 手指抬起
         case TouchType.Cancel: // 触摸意外中断
            if (this.offsetY > 0) {
               this.pushStatus = false
               this.setOriginalStatus()
            } else { //手指抬起后在初始态上面,即上划
               this.pushStatus = true
               this.lastUpOffsetY = this.offsetY
               this.lastUpTextPositionY = this.textPositionY
            }
            break
      }
   }

   // 手指移动,处理下拉
   touchMovePull(touchesY: number) {
      //最大差值
      let maxHeight = this.imageHeight - this.pullMaxHeight - this.pushMaxHeight
      // 滑动的偏移量
      let offset = touchesY - this.downY

      // 偏移量的值缓慢增加
      let height = offset * 0.50
      if (this.pushStatus) {
         this.offsetY = height + this.lastUpOffsetY > this.pullMaxHeight ? this.pullMaxHeight : height + this.lastUpOffsetY
      } else {
         this.offsetY = height > this.pullMaxHeight ? this.pullMaxHeight : height
      }
      LogUtils.info(TAG, " offsetY: " + this.offsetY + " height: " + height + "  lastUpOffsetY: " + this.lastUpOffsetY)

      //滑到title高度停止
      if (this.offsetY < -maxHeight) {
         this.offsetY = -maxHeight
      }

      //文字Y轴偏移量
      if (this.pushStatus) {
         this.textPositionY = this.lastUpTextPositionY + offset * 0.16 /*> 104 ? 104 : this.lastUpTextPositionY + offset * 0.16*/
      } else {
         this.textPositionY = offset * 0.16
      }

 
      if (this.textPositionY < -42) {
         this.textPositionY = -42
      }

     
      if (this.textFontSize + this.textPositionY * 0.4762 <= this.textFontSize) {
         this.fontSize = this.textFontSize + this.textPositionY * 0.4762
      } else {
         this.fontSize = this.textFontSize
      }

      LogUtils.info(TAG, "touchMovePull   offsetY: " + this.offsetY + " textPositionY: "
         + this.textPositionY + "  pushStatus: " + this.pushStatus + "    fontSize: " + this.fontSize)
   }

   setOriginalStatus() {
      animateTo({
         duration: 300,
      }, () => {
         this.offsetY = 0
         this.textPositionY = 0
      })
   }
}

总结:

到这篇文章为止整个WanAndroid(鸿蒙)版本的功能开发基本完成了,后续会继续更新一些优化点,大家可以关注后面更新内容~~

源代码地址:WanHarmony: WanAndroid的鸿蒙版本

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

GO语言:函数、方法、面向对象

本文分享函数的定义、特性、defer陷阱、异常处理、单元测试、基准测试等以及方法和接口相关内容 1 函数 函数的定义 func 函数名(参数列表) (返回值列表) { // 函数体&#xff08;实现函数功能的代码&#xff09; } 匿名函数的定义就是没有函数名&#xff0c;可以当做一个函…

第十九章 linux部署scrapyd

文章目录 1. linux部署python环境1. 部署python源文件环境2. 下载python3. 解压安装包4. 安装5. 配置环境变量6. 检查是否安装成功7. 准备python使用的包8. 安装scrapyd 1. linux部署python环境 1. 部署python源文件环境 yum install gcc patch libffi-devel python-devel zl…

【源码阅读】EVMⅢ

参考[link](https://blog.csdn.net/weixin_43563956/article/details/127725385 大致流程如下&#xff1a; 编写合约 > 生成abi > 解析abi得出指令集 > 指令通过opcode来映射成操作码集 > 生成一个operation 以太坊虚拟机的工作流程&#xff1a; 由solidity语言编…

WordPress站点如何实现发布文章即主动推送到神马搜索引擎?

平时boke112百科很少关注到神马搜索引擎&#xff0c;近日有站长留言想要实现WordPress站点发布文章就主动推送到神马搜索引擎&#xff0c;而且推送成功就自动添加一个自定义字段&#xff0c;以防重复推送。 登录进入神马站长平台后才知道神马也有一个API推送功能&#xff0c;不…

软件工程-第11章 内容总结

如果不想读这本书&#xff0c;直接看这一章即可。 11.1 关于软件过程范型 11.2 关于软件设计方法

SQLiteC/C++接口详细介绍sqlite3_stmt类(一)

返回目录&#xff1a;SQLite—免费开源数据库系列文章目录 上一篇&#xff1a;SQLiteC/C接口详细介绍sqlite3_stmt类简介 下一篇&#xff1a;SQLiteC/C接口详细介绍sqlite3_stmt类&#xff08;二&#xff09; ​ 序言&#xff1a; 本文开始了SQLite的第二个类的详细介绍…

【技术栈】Spring Cache 简化 Redis 缓存使用

​ SueWakeup 个人主页&#xff1a;SueWakeup 系列专栏&#xff1a;学习技术栈 个性签名&#xff1a;保留赤子之心也许是种幸运吧 ​ 本文封面由 凯楠&#x1f4f8; 友情提供 目录 本栏传送门 1. Spring Cache 介绍 2. Spring Cache 常用注解 注&#xff1a;手机端浏览本文章…

TCP/IP ⽹络模型

TCP/IP ⽹络模型 对于同⼀台设备上的进程间通信&#xff0c;有很多种⽅式&#xff0c;⽐如有管道、消息队列、共享内存、信号等⽅式&#xff0c;⽽对于不同设备上的进程间通信&#xff0c;就需要⽹络通信&#xff0c;⽽设备是多样性的&#xff0c;所以要兼容多种多样的设备&am…

[PwnThyBytes 2019]Baby_SQL

[PwnThyBytes 2019]Baby_SQL 查看源码发现 下载源码&#xff0c;首先观察index.php 首先进入index.php&#xff0c;会执行session_start();启动session这里通过foreach将所有的环境变量的值都遍历了一遍&#xff0c;并且都使用了addslashes()进行转义&#xff0c;然后就定义了…

【论文阅读】(DALL-E)Zero-Shot Text-to-Image Generation

&#xff08;DALL-E&#xff09;Zero-Shot Text-to-Image Generation 引用&#xff1a; Ramesh A, Pavlov M, Goh G, et al. Zero-shot text-to-image generation[C]//International conference on machine learning. Pmlr, 2021: 8821-8831. 论文链接&#xff1a; [2102.120…

3D开发工具HOOPS在船舶设计中的应用以及其价值优势

在当今数字化时代&#xff0c;船舶设计领域也不例外地受益于先进的技术和工具。HOOPS 3D图形SDK&#xff08;Software Development Kit&#xff09;作为一种强大的工具&#xff0c;在船舶设计中发挥着越来越重要的作用。它为设计师们提供了一种高效、灵活且功能丰富的方式来处理…

Android Studio实现内容丰富的安卓外卖平台

获取源码请点击文章末尾QQ名片联系&#xff0c;源码不免费&#xff0c;尊重创作&#xff0c;尊重劳动 项目编号122 1.开发环境android stuido jdk1.8 eclipse mysql tomcat 2.功能介绍 安卓端&#xff1a; 1.注册登录 2.查看公告 3.查看外卖分类 4.购物车&#xff0c; 5.个人中…

nodejs基于vue超市信息管理系统flask-django-php

互联网的快速发展&#xff0c;使世界各地的各种组织的管理方式发生了根本性的变化&#xff0c;我国政府、企业等组织在上个世纪90年代就已开始考虑使用互联网来管理信息。由于以前的种种因素&#xff0c;比如网络的普及率不高&#xff0c;用户对它的认知度不够&#xff0c;以及…

GPT实战系列-智谱GLM-4的模型调用

GPT实战系列-智谱GLM-4的模型调用 GPT专栏文章&#xff1a; GPT实战系列-实战Qwen通义千问在Cuda 1224G部署方案_通义千问 ptuning-CSDN博客 GPT实战系列-ChatGLM3本地部署CUDA111080Ti显卡24G实战方案 GPT实战系列-Baichuan2本地化部署实战方案 GPT实战系列-让CodeGeeX2帮…

创建自己的“百度网盘”(部署owncloud)

[rootlocalhost html]# cd /root/[rootlocalhost ~]# wget https://download.com/server/stable/owncloud-10.12.0.zip --no-check-certificate #下载当前的owncloud代码包[rootlocalhost ~]# yum -y install unzip #安装解压工具[rootlocalhost ~]# unzip owncloud-10.12.0.zi…

HarmonyOS开发:超详细介绍如何开源静态共享包,实现远程依赖

前言 当我们开发了一个独立的功能&#xff0c;想让他人进行使用&#xff0c;一般的方式就是开源出去&#xff0c;有源码的方式&#xff0c;也有文件包的形式&#xff0c;当然了也有远程依赖的方式&#xff0c;比如在Android中&#xff0c;我们可以提供源码&#xff0c;也可以打…

【PG数据库】PostgreSQL 转储详细操作流程

1.pg_dump pg_dump 是用于备份一种 PostgreSQL 数据库的工具。即使数据库正在被并发使用&#xff0c;它也能创建一致的备份。pg_dump不阻塞其他用户访问数据库&#xff08;读取或写入&#xff09;。 pg_dump 只转储单个数据库。要备份一个集簇中 对于所有数据库公共的全局对象…

基于python失物招领系统-安卓-flask-django-nodejs-php

随着现在网络的快速发展&#xff0c;网络的应用在各行各业当中&#xff0c;利用网络来做这个失物招领的网站&#xff0c;随之就产生了“失物招领 ”&#xff0c;这样用户就可以利用平台来发布信息。 对于本失物招领 的设计来说&#xff0c; 它是应用mysql数据库、安卓等技术动…

路由器的端口映射能实现什么?

路由器的端口映射是一项重要的网络配置功能&#xff0c;它可以帮助实现局域网内外的设备之间的通信。通过端口映射&#xff0c;我们可以在公网上访问局域网内的设备&#xff0c;方便的进行远程访问、共享文件和资源等操作。 什么是端口映射&#xff1f; 在介绍端口映射之前&am…

【RabbitMQ | 第七篇】RabbitMQ实现JSON、Map格式数据的发送与接收

文章目录 7.RabbitMQ实现JSON、Map格式数据的发送与接收7.1消息发送端7.1.1引入依赖7.1.2yml配置7.1.3RabbitMQConfig配置类——&#xff08;非常重要&#xff09;&#xff08;1&#xff09;创建交换器方法&#xff08;2&#xff09;创建队列方法&#xff08;3&#xff09;绑定…
最新文章