【vue3.0】25.0 某东到家( 廿五)——真机调试

2023-12-16 05:30

本文主要是介绍【vue3.0】25.0 某东到家( 廿五)——真机调试,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

真机联调方式

一种方式是手机和电脑连同一个局域网,也就是同一个WiFi
运行项目会在终端显示ip连接的地址:

image.png

因为目前我的是手机热点,需下面的方式:
如果是手机开热点给电脑用,可以win+R键输入ipconfig查询本机ip,然后在手机浏览器上直接打开ip:8080即可

image.png

比如我的就是需要访问 192.168.24.113::8080
image.png
image.png
image.png
image.png
image.png
image.png

这里可以看到购物车的加减号有点问题。
首先需要准备2个图标:
image.png

调整 src\views\shop\Content.vue
<template><div class="content"><div class="category"><div:class="{category__item: true,'category__item--active': currentTab === item.tab}"v-for="item in categories":key="item.tab"@click="handleTabClick(item.tab)">{{ item.name }}</div></div><div class="product"><div class="product__item" v-for="item in list" :key="item._id"><img class="product__item__img" :src="item.imgUrl" /><div class="product__item__detail"><h4 class="product__item__title">{{ item.name }}</h4><p class="product__item__sales">月售{{ item.sales }}件</p><p class="product__item__price"><span class="product__item__yen"> &yen;{{ item.price }} </span><span class="product__item__origin"> &yen;{{ item.oldPrice }} </span></p></div><div class="product__number"><spanclass="product__number__minus"@click="() => {changeCartItem(shopId, item._id, item, -1, shopName)}"><i class="custom-icon custom-icon-reduce"></i></span>{{ getProductCartCount(shopId, item._id) }}<spanclass="product__number__plus"@click="() => {changeCartItem(shopId, item._id, item, 1, shopName)}"><i class="custom-icon custom-icon-add"></i></span></div></div></div></div>
</template><script>
......
</script><style lang="scss" scoped>@import '@/style/viriables.scss';@import '@/style/mixins.scss';.content {display: flex;position: absolute;left: 0;right: 0;top: 1.6rem;bottom: 0.5rem;}.category {overflow-y: scroll;width: 0.76rem;background: $search-bg-color;height: 100%;&__item {line-height: 0.4rem;text-align: center;font-size: 0.14rem;color: $content-font-color;&--active {background: $bg-color;}}}.product {overflow-y: scroll;flex: 1;&__item {position: relative;display: flex;padding: 0.12rem 0.16rem;margin: 0 0.16rem;border-bottom: 0.01rem solid $content-bg-color;// 配合解决超出长度以省略号显示而不会出现换行&__detail {overflow: hidden;}&__img {width: 0.68rem;height: 0.68rem;margin-right: 0.16rem;}&__title {margin: 0;line-height: 0.2rem;font-size: 0.14rem;color: $content-font-color;// 超出长度以省略号显示而不会出现换行@include ellipsis;}&__sales {margin: 0.06rem 0;line-height: 0.16rem;font-size: 0.12rem;color: $content-font-color;}&__price {margin: 0;line-height: 0.2rem;font-size: 0.14rem;color: $height-light-font-color;}&__yen {font-size: 0.12rem;}&__origin {margin-left: 0.06rem;line-height: 0.2rem;font-size: 0.12rem;color: $light-font-color;text-decoration: line-through; //中划线}// 购物车选购数量和加减号.product__number {position: absolute;right: 0rem;bottom: 0.12rem;line-height: 0.18rem;// 边框白色&__minus {position: relative;top: 0.01rem;color: $medium-font-color;margin-right: 0.05rem;}//无边框,背景蓝色&__plus {position: relative;top: 0.01rem;color: $btn-bg-color;margin-left: 0.05rem;}}}}
</style>

调整src\views\shop\Cart.vue

<template><!-- 蒙层 --><div class="mask" v-if="showCart && calculations.total > 0" @click="handleCartShowChange"></div><div class="cart"><div class="product" v-show="showCart && calculations.total > 0"><div class="product__header"><div class="product__header__all" @click="setCartItemsChecked(shopId)"><i:class="['product__header__all__icon','custom-icon',calculations.isAllChecked? 'custom-icon-radio-checked': 'custom-icon-radio-unchecked']"></i><span class="product__header__all__text">全选</span></div><div class="product__header__clear"><span class="product__header__clear__btn" @click="cleanCartProducts(shopId)">清空购物车</span></div></div><div class="product__item" v-for="item in productList" :key="item._id"><div class="product__item__checked" @click="changeCartItemChecked(shopId, item._id)"><i:class="['custom-icon',item.checked == true ? 'custom-icon-radio-checked' : 'custom-icon-radio-unchecked']"></i></div><img class="product__item__img" :src="item.imgUrl" /><div class="product__item__detail"><h4 class="product__item__title">{{ item.name }}</h4><p class="product__item__price"><span class="product__item__yen"> &yen;{{ item.price }} </span><span class="product__item__origin"> &yen;{{ item.oldPrice }} </span></p></div><div class="product__number"><spanclass="product__number__minus"@click="() => {0changeCartItemInfo(shopId, item._id, item, -1)}"><i class="custom-icon custom-icon-reduce"></i></span>{{ getProductCartCount(shopId, item._id) }}<spanclass="product__number__plus"@click="() => {changeCartItemInfo(shopId, item._id, item, 1)}"><i class="custom-icon custom-icon-add"></i></span></div></div></div><div class="check"><div class="check__icon" @click="handleCartShowChange"><img src="/i18n/9_16/img/basket.png" alt="" class="check__icon__img" /><div class="check__icon__tag">{{ calculations.total }}</div></div><div class="check__info">总计:<span class="check__info__price">&yen; {{ calculations.totalPrice }}</span></div><div class="check__btn" v-show="calculations.totalPrice > 0"><router-link :to="{ path: `/orderConfirmation/${shopId}` }"> 去结算 </router-link></div></div></div>
</template><script>
......
</script>
<style lang="scss" scoped>@import '@/style/viriables.scss';@import '@/style/mixins.scss';.mask {position: fixed;left: 0;right: 0;bottom: 0;top: 0;background: rgba(0, 0, 0, 0.5);z-index: 1;}.cart {position: absolute;left: 0;right: 0;bottom: 0;z-index: 2;background: $bg-color;}.product {overflow-y: scroll;flex: 1;background: $bg-color;&__header {display: flex;line-height: 0.52rem;border-bottom: 0.01rem solid $content-bg-color;font-size: 0.14rem;color: $content-font-color;&__all {width: 0.64rem;margin-left: 0.18rem;&__icon {display: inline-block;vertical-align: top;font-size: 0.2rem;margin-right: 0.05rem;color: $btn-bg-color;}&__text {display: inline-block;margin-left: 0.04rem;line-height: 0.52rem;}}&__clear {flex: 1;text-align: right;margin-right: 0.16rem;&__btn {display: inline-block;}}}&__item {position: relative;display: flex;padding: 0.12rem 0.16rem;margin: 0 0.16rem;border-bottom: 0.01rem solid $content-bg-color;&__checked {line-height: 0.5rem;margin-right: 0.2rem;color: $btn-bg-color;i {font-size: 0.25rem;}}// 配合解决超出长度以省略号显示而不会出现换行&__detail {overflow: hidden;}&__img {width: 0.46rem;height: 0.46rem;margin-right: 0.16rem;}&__title {margin: 0;line-height: 0.2rem;font-size: 0.14rem;color: $content-font-color;// 超出长度以省略号显示而不会出现换行@include ellipsis;}&__price {margin: 0.06rem 0 0 0;line-height: 0.2rem;font-size: 0.14rem;color: $height-light-font-color;}&__yen {font-size: 0.12rem;}&__origin {margin-left: 0.06rem;line-height: 0.2rem;font-size: 0.12rem;color: $light-font-color;text-decoration: line-through; //中划线}// 购物车选购数量和加减号.product__number {position: absolute;right: 0rem;line-height: 0.18rem;bottom: 0.26rem;// 边框白色&__minus {position: relative;top: 0.01rem;color: $medium-font-color;margin-right: 0.05rem;}//无边框,背景蓝色&__plus {position: relative;top: 0.01rem;color: $btn-bg-color;margin-left: 0.05rem;}}}}.check {display: flex;box-sizing: border-box; //往内塞入borderline-height: 0.49rem;height: 0.49rem;border-top: 0.01rem solid $content-bg-color;&__icon {width: 0.84rem;position: relative;&__img {margin: 0.12rem auto;display: block;width: 0.28rem;height: 0.28rem;}&__tag {// 乘以2然后等比例缩小position: absolute;left: 0.46rem;top: 0.04rem;padding: 0 0.04rem;min-width: 0.2rem;height: 0.2rem;line-height: 0.2rem;text-align: center;background-color: $height-light-font-color;border-radius: 0.1rem;font-size: 0.12rem;color: $bg-color;transform: scale(0.5);transform-origin: left center;}}&__info {flex: 1;color: $content-font-color;font-size: 0.12rem;&__price {line-height: 0.49rem;color: $height-light-font-color;font-size: 0.18rem;}}&__btn {width: 0.98rem;background-color: #4fb0f9;text-align: center;color: $bg-color;font-size: 0.14rem;// 去掉a标签的下划线a {color: $bg-color;text-decoration: none; //去掉文本修饰}}}
</style>

修改src\views\orderConfirmation\TopArea.vue

......
<style lang="scss" scoped>@import '@/style/viriables.scss';.top {position: relative;height: 1.96rem;background-size: 100% 1.59rem;/* 渐变轴为0度,相当于从下到上,高度4%位置从rgba(0, 145, 255, 0) 开始渐变到高度50%位置的蓝色(#0091ff)结束 */background-image: linear-gradient(0deg, rgba(0, 145, 255, 0) 4%, $btn-bg-color 50%);background-repeat: no-repeat;&__header {position: relative;padding-top: 0.26rem;line-height: 0.24rem;color: $bg-color;text-align: center;font-size: 0.16rem;&__back {position: absolute;font-size: 0.22rem;left: 0.18rem;}}&__receiver {position: absolute;left: 0.18rem;right: 0.18rem;bottom: 0rem;height: 1.11rem;background: $bg-color;border-radius: 0.04rem;&__title {line-height: 0.22rem;padding: 0.16rem 0 0.14rem 0.16rem;font-size: 0.16rem;color: $content-font-color;}&__address {line-height: 0.2rem;padding: 0 0.4rem 0 0.16rem;font-size: 0.16rem;color: $content-font-color;}&__info {padding: 0.06rem 0 0 0.16rem;&__name &__phone {margin-right: 0.1rem;line-height: 0.18rem;font-size: 0.12rem;color: $content-font-color;}}&__icon {//旋转180度transform: rotate(180deg);position: absolute;right: 0.16rem;top: 0.53rem;font-size: 0.16rem;color: $medium-font-color;}}}
</style>

http://www.taodudu.cc/news/show-8391075.html

相关文章:

  • [乡土民间故事_徐苟三传奇]第廿五回_请课酒计耍刘财主
  • 运营四十二章经(廿五)---知乎的盈利方式
  • OpenCV + CPP 系列(廿五)模板匹配(Template Match)
  • Unity热更新方案C#Like(廿五)-实战:示范如何建立初始包CSharpLikeFreeDemo项目
  • 5月14日第壹简报,星期日,农历三月廿五
  • 69家中国企业闯入全球500强 数量超日本排第二
  • 怎样让excel中的文字旋转一定的角度?
  • 安卓实现文字(TextView)旋转,包括文字角标
  • 51单片机编译警告笔记一(WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS)
  • WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
  • 米安网python培训
  • 米安代码审计 06 PHPYUN V3.0 任意文件上传漏洞
  • 米安代码审计 08 ThinkSNS 垂直平行越权
  • 米安代码审计 05 文件上传漏洞
  • 米安代码审计 07 越权漏洞
  • 米安代码审计 01 php.ini 安全配置
  • 米安代码审计 03 文件解析漏洞
  • 每个人心中都有片极乐净土——leo读《监控》
  • 基于视觉AI算法的周界防范边缘计算网关
  • 几种常见的周界报警方案原理对比
  • 科普:周界泄漏电缆系统的工作原理以及系统特点
  • IOTOS物联中台开发驱动支持精华隆周界子系统设备
  • tps协议和onvif协议_近海风电场项目视频监控及周界安全防范系统设备技术协议...
  • 全球及中国综合周界安全系统行业调查研究及前景投资分析报告2021年版
  • EZStation3.0画面不显示周界功能智能标记框
  • 程序员这样「赚外快」,被判一年九个月
  • 判断某一年的某个月的天数
  • 3D游戏编程_作业三_牧师与魔鬼
  • Stage.3 —— 太阳系
  • 使用python模块nmap,读取excel数据对多个ip端口探活扫描
  • 这篇关于【vue3.0】25.0 某东到家( 廿五)——真机调试的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



    http://www.chinasem.cn/article/499272

    相关文章

    Vue3 的 shallowRef 和 shallowReactive:优化性能

    大家对 Vue3 的 ref 和 reactive 都很熟悉,那么对 shallowRef 和 shallowReactive 是否了解呢? 在编程和数据结构中,“shallow”(浅层)通常指对数据结构的最外层进行操作,而不递归地处理其内部或嵌套的数据。这种处理方式关注的是数据结构的第一层属性或元素,而忽略更深层次的嵌套内容。 1. 浅层与深层的对比 1.1 浅层(Shallow) 定义

    这15个Vue指令,让你的项目开发爽到爆

    1. V-Hotkey 仓库地址: github.com/Dafrok/v-ho… Demo: 戳这里 https://dafrok.github.io/v-hotkey 安装: npm install --save v-hotkey 这个指令可以给组件绑定一个或多个快捷键。你想要通过按下 Escape 键后隐藏某个组件,按住 Control 和回车键再显示它吗?小菜一碟: <template

    【 html+css 绚丽Loading 】000046 三才归元阵

    前言:哈喽,大家好,今天给大家分享html+css 绚丽Loading!并提供具体代码帮助大家深入理解,彻底掌握!创作不易,如果能帮助到大家或者给大家一些灵感和启发,欢迎收藏+关注哦 💕 目录 📚一、效果📚二、信息💡1.简介:💡2.外观描述:💡3.使用方式:💡4.战斗方式:💡5.提升:💡6.传说: 📚三、源代码,上代码,可以直接复制使用🎥效果🗂️目录✍️

    【前端学习】AntV G6-08 深入图形与图形分组、自定义节点、节点动画(下)

    【课程链接】 AntV G6:深入图形与图形分组、自定义节点、节点动画(下)_哔哩哔哩_bilibili 本章十吾老师讲解了一个复杂的自定义节点中,应该怎样去计算和绘制图形,如何给一个图形制作不间断的动画,以及在鼠标事件之后产生动画。(有点难,需要好好理解) <!DOCTYPE html><html><head><meta charset="UTF-8"><title>06

    ASIO网络调试助手之一:简介

    多年前,写过几篇《Boost.Asio C++网络编程》的学习文章,一直没机会实践。最近项目中用到了Asio,于是抽空写了个网络调试助手。 开发环境: Win10 Qt5.12.6 + Asio(standalone) + spdlog 支持协议: UDP + TCP Client + TCP Server 独立的Asio(http://www.think-async.com)只包含了头文件,不依

    如何在Visual Studio中调试.NET源码

    今天偶然在看别人代码时,发现在他的代码里使用了Any判断List<T>是否为空。 我一般的做法是先判断是否为null,再判断Count。 看了一下Count的源码如下: 1 [__DynamicallyInvokable]2 public int Count3 {4 [__DynamicallyInvokable]5 get

    计算机毕业设计 大学志愿填报系统 Java+SpringBoot+Vue 前后端分离 文档报告 代码讲解 安装调试

    🍊作者:计算机编程-吉哥 🍊简介:专业从事JavaWeb程序开发,微信小程序开发,定制化项目、 源码、代码讲解、文档撰写、ppt制作。做自己喜欢的事,生活就是快乐的。 🍊心愿:点赞 👍 收藏 ⭐评论 📝 🍅 文末获取源码联系 👇🏻 精彩专栏推荐订阅 👇🏻 不然下次找不到哟~Java毕业设计项目~热门选题推荐《1000套》 目录 1.技术选型 2.开发工具 3.功能

    Vue3项目开发——新闻发布管理系统(六)

    文章目录 八、首页设计开发1、页面设计2、登录访问拦截实现3、用户基本信息显示①封装用户基本信息获取接口②用户基本信息存储③用户基本信息调用④用户基本信息动态渲染 4、退出功能实现①注册点击事件②添加退出功能③数据清理 5、代码下载 八、首页设计开发 登录成功后,系统就进入了首页。接下来,也就进行首页的开发了。 1、页面设计 系统页面主要分为三部分,左侧为系统的菜单栏,右侧

    【VUE】跨域问题的概念,以及解决方法。

    目录 1.跨域概念 2.解决方法 2.1 配置网络请求代理 2.2 使用@CrossOrigin 注解 2.3 通过配置文件实现跨域 2.4 添加 CorsWebFilter 来解决跨域问题 1.跨域概念 跨域问题是由于浏览器实施了同源策略,该策略要求请求的域名、协议和端口必须与提供资源的服务相同。如果不相同,则需要服务器显式地允许这种跨域请求。一般在springbo