EP19 各个页面之间的跳转

embedded/2024/9/20 3:24:22/ 标签: css, 前端, html, uniapp

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

添加了几个 navigator

html"><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="shtml" title=css>css">html" title=css>css">.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

html"><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="shtml" title=css>css">html" title=css>css">.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 。

html"><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="shtml" title=css>css" scoped>html" title=css>css">.classify {padding: 30rpx;display: grid;grid-template-columns: repeat(3, 1fr);gap: 15rpx;}
</style>

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

新增的 公告详情 页面。

html"><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="shtml" title=css>css" scoped>html" title=css>css"></style>

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

新增了 返回 功能和 titlebar

html"><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="shtml" title=css>css" scoped>html" title=css>css">.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.ppmy.cn/embedded/114015.html

相关文章

windows使用tcpdump.exe工具进行抓包教程

windows主机安装一些抓包工具可能有些不方便&#xff0c;这里有一个tcpdump.exe工具直接免安装&#xff0c;可以直接使用进行抓包。&#xff08;工具下载见 附件&#xff09; tcpdump.exe使用教程 如下&#xff1a; 1&#xff1a;tcpdump -D 可查看网络适配器(注意前面的编号)…

OpenCV结构分析与形状描述符(23)确定一个点是否位于多边形内的函数pointPolygonTest()的使用

操作系统&#xff1a;ubuntu22.04 OpenCV版本&#xff1a;OpenCV4.9 IDE:Visual Studio Code 编程语言&#xff1a;C11 算法描述 进行点在轮廓内的测试。 该函数确定点是在轮廓内、轮廓外&#xff0c;还是位于一条边上&#xff08;或与顶点重合&#xff09;。它返回正值&…

C++ 条件变量:wait、wait_for、wait_until

前言 在C中&#xff0c;条件变量&#xff08;std::condition_variable&#xff09;是用来在多个线程之间同步执行流的一种机制。它们通常与互斥锁&#xff08;如std::mutex&#xff09;一起使用&#xff0c;以在特定条件满足时唤醒一个或多个线程。条件变量有三种使线程阻塞并…

机器人自主导航从零开始第四步———Rviz、Gazebo、Meshlab的安装

本文参考资料&#xff1a; rviz - ROS 维基 Gazebo : Tutorial : Ubuntu (gazebosim.org) 零. 什么是Rviz和Gazebo&#xff1a; Rviz是一个三维可视化工具&#xff0c;它利用已有的数据将数据可视化&#xff0c;并提供了可以显示图像、模型、表格、路径等信息的插件&#x…

JDeps 使用指南

JDeps 使用指南 jdeps 是一个 Java 类依赖分析工具&#xff0c;允许开发者深入分析 Java 应用程序的依赖情况&#xff0c;包括类、包、模块和 JDK 内部 API 的使用。下面详细介绍 jdeps 的常用命令和输出解释。 1. 基本依赖分析 jdeps path/to/yourapp.jar这个命令会分析指定…

34.贪心算法1

0.贪心算法 1.柠檬水找零&#xff08;easy&#xff09; . - 力扣&#xff08;LeetCode&#xff09; 题目解析 算法原理 代码 class Solution {public boolean lemonadeChange(int[] bills) {int five 0, ten 0;for (int x : bills) {if (x 5) // 5 元&#xff1a;直接收下…

基于vue框架的宠物店管理系统的设计与实现4czn0(程序+源码+数据库+调试部署+开发环境)系统界面在最后面。

系统程序文件列表 项目功能&#xff1a;用户,商品分类,服务类型,商品信息,商品订单,宠物服务,服务预约,服务评价,商品咨询 开题报告内容 基于Vue框架的宠物店管理系统的设计与实现开题报告 一、引言 随着宠物行业的蓬勃发展&#xff0c;宠物店作为宠物产品与服务的重要提供…

【代码】使用c#实现串口通信的基础模板

一、分享代码 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;using System.IO.Ports; using…

在 Red Hat 上安装 SQL Server 2022 并创建数据库

适用于&#xff1a; SQL Server - Linux 本快速入门介绍如何在 Red Hat Enterprise Linux (RHEL) 8.x 或 9.x 上安装 SQL Server 2022 (16.x)。然后可以使用 sqlcmd 进行连接&#xff0c;创建第一个数据库并运行查询。 注意&#xff1a;本教程需要用户输入和 Internet 连接。 …

高级java每日一道面试题-2024年9月16日-框架篇-Spring MVC和Struts的区别是什么?

如果有遗漏,评论区告诉我进行补充 面试官: 如何处理事务中的性能问题&#xff1f; 我回答: 在Java高级面试中&#xff0c;Spring MVC和Struts是两个常被提及的MVC框架&#xff0c;它们各自具有独特的特点和优势。以下是对这两个框架的详细比较&#xff1a; 架构设计方面 Sp…

UDS 诊断 - RequestFileTransfer(请求文件传输)(0x38)服务

UDS 诊断服务系列文章目录 诊断和通信管理功能单元 UDS 诊断 - DiagnosticSessionControl&#xff08;诊断会话控制&#xff09;&#xff08;0x10&#xff09;服务 UDS 诊断 - ECUReset&#xff08;ECU重置&#xff09;&#xff08;0x11&#xff09;服务 UDS 诊断 - SecurityA…

Linux命令---查看端口是否被占用

简介 在linux系统使用命令查找指定端口是否被占用。 命令 lsof -i:6379

【机器学习】参数学习的基本概念以及贝叶斯网络的参数学习和马尔可夫随机场的参数学习

引言 概率图模型参数学习是模型训练的关键环节&#xff0c;涉及贝叶斯网络和马尔可夫随机场的参数估计和结构确定 文章目录 引言一、参数学习任务1.1 定义1.2 常见参数学习任务类型1.2.1 监督学习中的参数学习1.2.2 无监督学习中的参数学习1.2.3 半监督学习中的参数学习1.2.4 强…

Apache subversion 编译流程

目录 1. 概述2. 依赖库简介2.1 Expat2.2 Apache apr2.3 Apache apr-iconv2.4 Apache apr-util2.5 Zlib2.6 OpenSSL2.7 Sqlite2.8 Apache Serf2.9 Apache subversion3. 编译3.1 Expat编译3.1.1 源码信息3.1.2 CMake-GUI3.1.3 编译步骤3.2 APR编译3.2.1 源码信息3.2.2 编译步骤3.…

解决使用nvm ls命令没有出现*的问题

一、引言 在输命令的时候不知道手误写了什么导致node命令用不了&#xff0c;查看环境变量配的nvm对应的路径没问题&#xff0c;试过网上说的修改文件夹名字但是没有用&#xff01;&#xff01; 输入 nvm ls 显示已下载的node版本&#xff0c;发现前面没有* 输入nvm use 使用其中…

基于Java+Mysql实现(web)大型企业管理系统

技术报告 第一章 系统概述 包括用户管理、权限管理、软件项目管理、软件模块管理、测试用例管理、测试任务分配、bug管理等功能。实现公司不同部门间团队协作&#xff0c;管理人员也能够更加有效的把控系统开发的进度。 本实验综合应用JavaWeb编程中的Servlet&#xff0c;JS…

golang 字符串浅析

go的字符串是只读的 测试源代码 package mainimport ("fmt""unsafe" )func swap(x, y string) (string, string) {return y, x }func print_string(obj *string, msg string) {string_ptr : (*[2]uintptr)(unsafe.Pointer(obj))first_obj_addr : string_…

大模型教程:使用 Milvus、vLLM 和 Llama 3.1 搭建 RAG 应用

vLLM 是一个简单易用的 LLM 推理服务库。加州大学伯克利分校于 2024 年 7 月将 vLLM 作为孵化项目正式捐赠给 LF AI & Data Foundation 基金会。欢迎 vLLM 加入 LF AI & Data 大家庭&#xff01;&#x1f389; 在主流的 AI 应用架构中&#xff0c;大语言模型&#xff…

HarmonyOS Next鸿蒙扫一扫功能实现

直接使用的是华为官方提供的api&#xff0c;封装成一个工具类方便调用。 import { common } from kit.AbilityKit; import { scanBarcode, scanCore } from kit.ScanKit;export namespace ScanUtil {export async function startScan(context: common.Context) : Promise<s…

python学习笔记目录

基于windows下docker安装HDDM-CSDN博客 在python中安装HDDM-CSDN博客&#xff08;这个办法没安装成功&#xff09;