EP19 各个页面之间的跳转

文件路径: E:/homework/uniappv3tswallpaper/pages/index/index.vue

添加了几个 navigator

<template><view class="homeLayout pageBg"><custom-nav-bar title="推荐"></custom-nav-bar><view class="banner"><swiper :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000" circular="true"indicator-color="rgba(255,255,255,0.5)" indicator-active-color="rgba(255,255,255,1)"><swiper-item v-for="item in 3"><image src="../../common/images/banner1.jpg" mode="scaleToFill"></image></swiper-item></swiper></view><view class="notice"><view class="left"><uni-icons type="sound-filled" size="20"></uni-icons><text class="text">公告</text></view><view class="center"><swiper :autoplay="true" :interval="3000" :duration="1000" circular vertical><swiper-item v-for="item in 4"><navigator url="/pages/notice/detail">文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容文字内容</navigator></swiper-item></swiper></view><view class="right"><uni-icons type="forward" size="16" color="#333"></uni-icons></view></view><view class="select"><common-title><template #name>每日推荐</template><template #custom><view class="date"><uni-icons type="calendar"></uni-icons><view class="text"><uni-dateformat :date="Date.now()" format="dd号" /></view></view></template></common-title><view class="content"><scroll-view scroll-x="true"><view class="box" v-for="item in 8" @click="goPreview"><image src="../../common/images/classify1.jpg" mode="aspectFill"></image></view></scroll-view></view></view><view class="theme"><common-title><template #name>专题精选</template><template #custom><navigator url="">More+</navigator></template></common-title><view class="content"><theme-item v-for="item in 8"></theme-item><theme-item :isMore="true"></theme-item></view></view></view>
</template><script setup>const goPreview = () => {uni.navigateTo({url: '/pages/preview/preview'});}
</script><style lang="scss">.homeLayout {.banner {width: 750rpx;padding: 30rpx 0;swiper {width: 100%;height: 340rpx;&-item {width: 100%;height: 100%;padding: 0 30rpx;image {width: 100%;height: 100%;border-radius: 10rpx;}}}}.notice {margin: 0 30rpx;display: flex;flex-direction: row;flex-wrap: nowrap;align-content: center;justify-content: center;align-items: center;background: gray;border-radius: 80rpx;height: 80rpx;line-height: 80rpx;.left {width: 140rpx;display: flex;flex-direction: row;flex-wrap: nowrap;align-content: center;justify-content: center;align-items: center;:deep() {.uni-icons {color: $brand-theme-color !important;}}.text {color: $brand-theme-color;font-weight: 600;font-size: 28rpx;}}.center {flex: 1;height: 100%;swiper {height: 100%;&-item {// 以下三条是实现 文字长度超过显示宽度时展示省略号 的关键操作overflow: hidden;white-space: nowrap;text-overflow: ellipsis;// 以上三条height: 100%;color: $text-font-color-3;font-size: 30rpx;// flex布局与 text-overflow: ellipsis;属性 冲突// display: flex;// flex-direction: row;// flex-wrap: nowrap;// align-content: center;// align-items: center;// justify-content: flex-start;align-content: end;align-items: end;}}}.right {width: 70rpx;display: flex;flex-direction: row;flex-wrap: nowrap;align-content: center;align-items: center;justify-content: center;}}.select {padding: 50rpx 30rpx 0 30rpx;scroll-view {white-space: nowrap;.box {display: inline-block;width: 200rpx;height: 430rpx;margin-right: 15rpx;image {height: 100%;width: 100%;}}:last-child {margin-right: 0;border-radius: 10rpx;}}.date {display: flex;flex-direction: row;flex-wrap: nowrap;align-content: center;justify-content: center;align-items: center;color: $brand-theme-color;:deep() {.uni-icons {color: $brand-theme-color !important;}}}}.theme {padding: 50rpx 30rpx;.content {display: grid;gap: 15rpx;grid-template-columns: repeat(3, 1fr);}}}
</style>

文件路径: E:/homework/uniappv3tswallpaper/pages/classlist/classlist.vue

添加了 navigator

<template><view class="classlist"><custom-nav-bar></custom-nav-bar><view class="content"><navigator url="/pages/preview/preview" class="item" v-for="item in 10"><image src="../../common/images/preview2.jpg" mode="aspectFill"></image></navigator></view></view>
</template><script setup></script><style lang="scss">.classlist {.content {display: grid;grid-template-columns: repeat(3, 1fr);gap: 5px;padding: 5rpx;.item {height: 440rpx;width: 100%;image {height: 100%;width: 100%;display: block;}}}}
</style>

文件路径: E:/homework/uniappv3tswallpaper/pages/classify/classify.vue

添加了 titlebar 。

<template><view class="classLayout pageBg"><custom-nav-bar title="分类"></custom-nav-bar><view class="classify"><theme-item v-for="item in 15"></theme-item></view></view>
</template><script setup></script><style lang="scss" scoped>.classify {padding: 30rpx;display: grid;grid-template-columns: repeat(3, 1fr);gap: 15rpx;}
</style>

文件路径: E:/homework/uniappv3tswallpaper/pages/notice/detail.vue

新增的 公告详情 页面。

<template><view class="noticeLayout"><view class="title"><view class="tag"><uni-tag inverted text="置顶" type="error"></uni-tag></view><view class="font"></view></view><view class="info"><view class="item"></view><view class="item"><uni-dateformat :date="Date.now()" format="yyyy-MM-dd hh:mm:ss" /></view></view><view class="content"></view></view>
</template><script setup></script><style lang="scss" scoped></style>

文件路径: E:/homework/uniappv3tswallpaper/pages/preview/preview.vue

新增了 返回 功能和 titlebar

<template><view class="preview" @click="changeMask"><swiper circular="true"><swiper-item v-for="item in 5"><view class="swiper-item"><image src="../../common/images/preview1.jpg" mode="aspectFill"></image></view></swiper-item></swiper></view><view class="mask" v-show="maskState"><view class="goback" :style="{top:getStatusBarHeight() + 'px', height: getTitleBarHeight() + 'px'}"@click="goBack"><uni-icons type="back" size="20" color="#fff"></uni-icons></view><view class="num">3 / 5</view><view class="time"><uni-dateformat :date="new Date()" format="hh:mm" /></view><view class="date"><uni-dateformat :date="new Date()" format="MM月dd日" /></view><view class="footer"><view class="box" @click="open"><uni-icons type="info" size="28"></uni-icons><view class="text">信息</view></view><view class="box" @click="clickScore"><uni-icons type="star" size="28"></uni-icons><view class="text">评分</view></view><view class="box"><uni-icons type="download" size="28"></uni-icons><view class="text">下载</view></view></view><uni-popup ref="infoPopup" type="bottom"><view class="infoPopup"><view class="popHead"><view class="twoSide"> </view><view class="title">壁纸信息</view><view class="close twoSide" @click="clickInfoClose"><uni-icons type="closeempty" size="18" color="#999"></uni-icons></view></view><view class="popContent"><scroll-view scroll-y show-scrollbar="false"><view class="content"><view class="row"><view class="label">壁纸ID:</view><view class="labelContent"><text selectable="" class="value">165498642</text></view></view><view class="row"><view class="label">分类:</view><view class="labelContent"><text class="value">明星美女</text></view></view><view class="row"><view class="label">发布者:</view><view class="labelContent"><text class="value">呱呱呱</text></view></view><view class="row"><view class="label">评分:</view><view class="labelContent rateBox"><uni-rate readonly="true" touchable="true" value="3.6" size="16" /><text class="value">5分</text></view></view><view class="row"><view class="label">摘要:</view><view class="labelContent"><textclass="value">摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要摘要</text></view></view><view class="row"><view class="label">标签:</view><view class="labelContent tabs" v-for="item in 3"><text class="value tab">标签名</text></view></view><view class="copyright">建军事基地附件四哦那个佛哦放假哦计算机的佛i就哦i放到i杰佛i明尼苏达解耦i九年级哦i就欧锦好的话念佛哦你发的时间了哦ijoin的方式哦i</view></view></scroll-view></view></view></uni-popup><uni-popup ref="scorePopup" type="center" :is-mask-click="ture"><view class="scorePopup"><view class="popHead"><view class="title_out"><view class="title">壁纸信息</view></view><view class="close" @click="clickScoreClose"><uni-icons type="closeempty" size="18" color="#999"></uni-icons></view></view><view class="popContent"><view class="scoreStars"><uni-rate v-model="value" @change="scoreStarsChange" :value="scoreNumVal" allow-half="true" /></view><view class="scoreNum">{{scoreNumVal}} 分</view></view><view class="scoreButton"><button class="subScore" @click="subScore" :disabled="!scoreNumVal">确认评分</button></view></view></uni-popup></view>
</template><script setup>import {ref} from 'vue';import {getStatusBarHeight,getTitleBarHeight} from '@/utils/system.js'const maskState = ref(true);const infoPopup = ref(null);const scorePopup = ref(null);const scoreNumVal = ref(0);// 打开遮罩层const changeMask = () => {maskState.value = !maskState.value};// 打开信息层const open = () => {infoPopup.value.open()}// 关闭信息层const clickInfoClose = () => {infoPopup.value.close()}// 打开评分const clickScore = () => {scorePopup.value.open()}// 关闭评分const clickScoreClose = () => {scorePopup.value.close()}// score评分const scoreStarsChange = (e) => {scoreNumVal.value = e.value}// 点击确认提交const subScore = () => {console.log(scoreNumVal.value)}// 返回上一层const goBack = () => {uni.navigateBack();}
</script><style lang="scss" scoped>.preview {width: 100%;height: 100vh;swiper {width: 100%;height: 100%;.swiper-item {height: 100%;width: 100%;image {height: 100%;width: 100%;}}}}.mask {&>view {position: absolute;left: 0%;right: 0%;margin: auto;width: fit-content;color: #fff;}.goback {width: 79rpx;height: 79rpx;background: rgba(0, 0, 0, 0.5);left: 30rpx;margin-left: 0;border-radius: 100px;top: 0;backdrop-filter: blur(10rpx);border: 1rpx solid rbga(255, 255, 255, 0.3);display: flex;align-items: center;justify-content: center;}// position: relative; // 需要的是相对于整个屏幕的绝对位置,所以在这里不设置这个属性.num {top: 10vh;background: rgba(0, 0, 0, 0.3);backdrop-filter: blur(10rpx);padding: 8rpx 18rpx;border-radius: 40rpx;font-size: 28rpx;}.time {top: calc(10vh + 160rpx);font-size: 140rpx;font-weight: 100;line-height: 1rem;text-shadow: 0 4rpx rgba(0, 0, 0, 0.3);}.date {top: calc(10vh + 280rpx);font-size: 34rpx;text-shadow: 0 4rpx rgba(0, 0, 0, 0.3);}.footer {bottom: 10vh;background: rgba(255, 255, 255, 0.8);width: 65vw;height: 120rpx;border-radius: 120rpx;display: flex;flex-direction: row;flex-wrap: nowrap;align-content: center;justify-content: space-evenly;align-items: center;.box {display: flex;flex-direction: column;flex-wrap: nowrap;align-content: center;justify-content: center;align-items: center;padding: 2rpx 12rpx;.text {color: $text-font-color-2;font-size: 26rpx;}}}.infoPopup {background: #fff;padding: 30rpx;border-radius: 30rpx 30rpx 0 0;overflow: hidden;color: black;.popHead {display: flex;flex-direction: row;flex-wrap: nowrap;align-content: center;justify-content: space-between;align-items: center;.title {color: $text-font-color-2;font-size: 26rpx;}.close {// padding: 6rpx;}}.popContent {height: 60vh;scroll-view {height: 100%;.content {.row {display: flex;flex-direction: row;flex-wrap: nowrap;align-content: center;align-items: center;justify-content: center;padding: 16rpx 0;font-size: 32rpx;line-height: 1.7rem;.label {width: 25%;text-align: right;color: $text-font-color-3;font-size: 30rpx;}.labelContent {flex: 1;width: 0;}.rateBox {display: flex;flex-direction: row;flex-wrap: nowrap;align-content: center;justify-content: flex-start;align-items: center;.value {font-size: 26rpx;color: $text-font-color-3 ;padding-left: 25rpx;}}.tabs {display: flex;flex-wrap: wrap;.tab {border: 1px solid $brand-theme-color;color: $brand-theme-color;font-size: 22rpx;padding: 10rpx 30rpx;border-radius: 40rpx;line-height: 1rem;margin: 0 10rpx 10rpx 0;width: fit-content;}}}.copyright {font-size: 22rpx;padding: 20rpx;background: #f6f6f6;color: #666;border-radius: 10rpx;margin: 20rpx 0;line-height: 1.6rem;width: 100%;}}}}}.scorePopup {width: 70vw;height: 25vh;background-color: #fff;padding: 30rpx;border-radius: 30rpx;.popHead {display: flex;flex-wrap: wrap;flex-direction: row-reverse;.title_out {width: 100%;height: 0;.title {color: $text-font-color-2;font-size: 26rpx;text-align: center;}}.close {padding: 0 6rpx;}}.popContent {display: flex;flex-direction: row;flex-wrap: nowrap;align-content: center;justify-content: space-evenly;align-items: center;padding-top: 70rpx;.scoreNum {text-align: right;width: 100rpx;color: #feca43;}}.scoreButton {padding: 80rpx 70rpx 0 70rpx;}}}
</style>

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

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

相关文章

Pointnet++改进59:全网首发MogaBlock(2024最新模块)|用于在纯基于卷积神经网络的模型中进行判别视觉表示学习,具有良好的复杂性和性能权衡

简介:1.该教程提供大量的首发改进的方式,降低上手难度,多种结构改进,助力寻找创新点!2.本篇文章对Pointnet++特征提取模块进行改进,加入MogaBlock,提升性能。3.专栏持续更新,紧随最新的研究内容。 目录 1.理论介绍 2.修改步骤 2.1 步骤一 2.2 步骤二 2.3 步骤三 1.…

pdf怎么删除空白页?分享5个删除pdf页面的方法(批量删除法)

pdf文件因其跨平台、格式稳定的特性&#xff0c;已成为我们工作、学习中不可或缺的一部分。那么在编辑pdf格式文档中&#xff0c;总会遇到一些难题&#xff0c;比如说pdf怎么删除空白页 pdf与word一样&#xff0c;具备了多种编辑功能&#xff0c;只不过是word倾向于编辑&#x…

gitlab集成CI/CD,shell方式部署

目录 1.首先安装好gitlab和gitlab-runner&#xff0c;这两个&#xff0c;看我以往的教程 2.注册新的 Runner 3. 步骤 3.1 Enter the GitLab instance URL (for example, https://gitlab.com/): 3.2 Enter the registration token: 3.3 Enter a description for the runner: 3…

Python模块和包:自定义模块和包③

文章目录 一、模块1.1 什么是模块1.2 创建模块1.3 导入模块1.4 模块的命名空间 二、包2.1 什么是包2.2 创建包2.3 导入包2.4 包的命名空间 三、综合详细例子3.1 项目结构3.2 模块代码student.pycourse.pymanager.py 3.3 主程序代码main.py 3.4 运行结果 四、总结 Python模块和包…

Java 中的运算符重载

在这篇文章中&#xff0c;我们将深入探讨 Java 中 Operator 重载的迷人世界。尽管 Java 本身不支持运算符重载&#xff0c;但我们将发现 Manifold 如何使用该功能扩展 Java。我们将探讨它的好处、局限性和用例&#xff0c;尤其是在科学和数学代码方面。 我们还将探索 Manifold …

高清8k电脑壁纸分享

Hello&#xff01;欢迎各位新老朋友来看小弟博客&#xff0c;祝大家事业顺利&#xff0c;财源广进&#xff01;&#xff01; 主题&#xff1a;高清壁纸分享 文件太大上传不上去&#x1f605;&#x1f605;&#x1f605;&#x1f605;&#x1f605;&#xff0c;需要的朋友自取&…

国货美妆品牌整合营销多少钱?

合作咨询联系竑图 hongtu201988 化妆品品牌线上推广费用到底高不高&#xff0c;需要多少钱&#xff0c;是每个经营者最为关注的问题。结合中小美妆品牌在网络上的费用投入&#xff0c;有一个大致的范围&#xff1a;几千元到几十万不等/年&#xff01;品牌越大&#xff0c;投入越…

什么鬼?主备同步正常,备库查询表空间使用结果却是空的?

作者介绍&#xff1a;老苏&#xff0c;10余年DBA工作运维经验&#xff0c;擅长Oracle、MySQL、PG、Mongodb数据库运维&#xff08;如安装迁移&#xff0c;性能优化、故障应急处理等&#xff09; 公众号&#xff1a;老苏畅谈运维 欢迎关注本人公众号&#xff0c;更多精彩与您分享…

Centos Stream 9根目录扩容

要将 sda 的剩余空间扩展给 cs-root&#xff0c;可以按照以下步骤进行操作。假设你已经有剩余的未分配空间在 sda 上。 步骤 1&#xff1a;查看当前磁盘分区情况 首先&#xff0c;确保你有未分配的空间在 sda 上。 lsblk步骤 2&#xff1a;创建新的分区 使用 fdisk 或 par…

C++vector类的模拟实现

个人主页&#xff1a;C忠实粉丝 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 C忠实粉丝 原创 模拟实现vector类 收录于专栏【C语法基础】 本专栏旨在分享学习C的一点学习笔记&#xff0c;欢迎大家在评论区交流讨论&#x1f48c; 目录 前置说明 1. vecto…

数据结构2——单链表

目录 1.链表 1.1链表的概念及结构 1.2 链表的分类 ​编辑2.无头单链表的实现 1. 节点 2.遍历链表 3.动态增加新节点 4.查找&#xff08;修改&#xff09; 5.插入 5.1 尾插 5.2 头插 5.3 在pos之前插入x 5.4 在pos之后插入x 6.删除 6.1 尾删 6.2 头删 6.3 删除…

YOLOv10改进,YOLOv10损失函数更换为Powerful-IoU(2024年最新IOU),助力高效涨点

改进前训练结果: 改进后的结果: 摘要 边界框回归(BBR)是目标检测中的核心任务之一,BBR损失函数显著影响其性能。然而,观察到现有基于IoU的损失函数存在不合理的惩罚因子,导致回归过程中锚框扩展,并显著减缓收敛速度。为了解决这个问题,深入分析了锚框扩展的原因。针…

狂神说多线程01

线程实现&#xff08;重点&#xff09; 多线程三个方法 继承Thread类 ⭐️实现Runnable 实现callable&#xff08;了解&#xff09; 线程状态 出生-&#xff1f; 线程同步&#xff08;重点&#xff09; &#xff08;多个线程操作同一个对象&#xff0c;那个对象出现了不安…

RP2040 CXX SDK PIO应用例程

RP2040 CXX SDK PIO应用例程 &#x1f4cd;DS18B20 PIO参考项目例程&#xff1a;https://github.com/jondurrant/RP2040PIO-DS18B20&#x1f4cd;DHT11 PIO 参考项目例程&#xff1a;https://github.com/vmilea/pico_dht 在官方的SDK pico-examples中有关PIO的例程有20个&#…

828华为云征文 | 云服务器Flexus X实例,Docker集成搭建Halo博客平台

828华为云征文 | 云服务器Flexus X实例&#xff0c;Docker集成搭建Halo博客平台 Halo博客平台是一款基于Java的开源博客系统&#xff0c;以其简单易用、功能强大、美观大方等特点而受到广泛欢迎&#xff0c;采用了多种先进的技术框架&#xff0c;包括Freemarker模板引擎、Vue.j…

【STM32】【rt-thread】startup_stm32f405xx.S文件解读

startup_stm32f405xx.S文件解读 一、代码全文 /********************************************************************************* file startup_stm32f405xx.s* author MCD Application Team* brief STM32F405xx Devices vector table for GCC based toolcha…

每日OJ题_牛客_ 游游的you(贪心+模拟)

目录 牛客_ 游游的you&#xff08;贪心模拟&#xff09; 解析代码 牛客_ 游游的you&#xff08;贪心模拟&#xff09; 游游现在有a个y&#xff0c;b个o&#xff0c;c个u&#xff0c;他想用这些字母拼成一个字符串。 三个相邻的字母是"you"可以获得2分&#xff0c…

室内院内常见的不知名蚊虫(昆虫)图鉴和防治方法

文章目录 蟑螂形态特征出现源头危害性防治方法 跳蚤形态特征出现源头危害性防治方法 臭虫&#xff0c;又名木蚤、床虱、壁虱形态特征出现源头危害性防治方法 尘螨形态特征出现源头危害性防治方法 蛾蚋&#xff08;ru&#xff09;&#xff0c;又名蛾蠓&#xff08;měng&#xf…

解密.baxia勒索病毒:.baxia勒索病毒的攻击手法及防护建议

导言 在当前网络安全形势日益严峻的背景下&#xff0c;勒索软件的威胁正不断升级&#xff0c;其中.baxia勒索病毒尤为突出。作为一种新型恶意软件&#xff0c;.baxia病毒通过加密用户的文件并要求支付赎金来获取解密密钥&#xff0c;对个人和企业的安全构成了严重威胁。随着其…

医院预约|基于springBoot的医院预约挂号系统设计与实现(附项目源码+论文+数据库)

私信或留言即免费送开题报告和任务书&#xff08;可指定任意题目&#xff09; 目录 一、摘要 二、相关技术 三、系统设计 四、数据库设计 五、核心代码 六、论文参考 七、源码获取 一、摘要 近年来&#xff0c;信息化管理行业的不断兴起&#xff0c;使得人们的日…