diff --git a/front-end/mall4uni/src/pages/sub-category/sub-category.scss b/front-end/mall4uni/src/pages/sub-category/sub-category.scss index b4b2d57..261dd27 100644 --- a/front-end/mall4uni/src/pages/sub-category/sub-category.scss +++ b/front-end/mall4uni/src/pages/sub-category/sub-category.scss @@ -1,110 +1,138 @@ +/* 容器样式 */ .container { - background: #f4f4f4; + background: #f4f4f4; /* 设置背景颜色为浅灰色 */ } + +/* 分类标题栏样式 */ .category-tit { - width: 100%; - white-space: nowrap; - position: fixed; - top: 0px; - z-index: 999; - background-color: #fff; - border-bottom: 2rpx solid #f4f4f4; - font-size: 30rpx; + width: 100%; /* 宽度占满整个父元素 */ + white-space: nowrap; /* 禁止文本换行,确保所有分类项在一行显示 */ + position: fixed; /* 固定定位,使标题栏始终位于页面顶部 */ + top: 0px; /* 距离页面顶部0像素 */ + z-index: 999; /* 设置较高的堆叠顺序,确保标题栏在其他内容之上 */ + background-color: #fff; /* 背景颜色为白色 */ + border-bottom: 2rpx solid #f4f4f4; /* 底部边框,使用浅灰色实线 */ + font-size: 30rpx; /* 标题文字大小为30响应式像素 */ + .category-item { - display: inline-block; - padding: 20rpx 10rpx; - margin: 0 20rpx; - box-sizing: border-box; - font-size: 28rpx; + display: inline-block; /* 分类项作为行内块级元素显示,确保它们在同一行 */ + padding: 20rpx 10rpx; /* 内边距为上下20响应式像素,左右10响应式像素 */ + margin: 0 20rpx; /* 左右外边距为20响应式像素 */ + box-sizing: border-box; /* 确保padding和border包含在元素的width和height之内 */ + font-size: 28rpx; /* 分类项文字大小为28响应式像素 */ } } -.prod-item { - height: calc(100vh - 100rpx); -} + +/* 当前选中的分类项样式 */ .on { - border-bottom: 4rpx solid #e43130; - color: #e43130; + border-bottom: 4rpx solid #e43130; /* 底部边框,使用红色实线,表示当前选中 */ + color: #e43130; /* 文本颜色为红色 */ +} + +/* 商品项容器样式 */ +.prod-item { + height: calc(100vh - 100rpx); /* 高度为视口高度减去100响应式像素,确保与固定头部有足够的间距 */ } + +/* 隐藏滚动条样式 */ ::-webkit-scrollbar { - width: 0; - height: 0; - color: transparent; + width: 0; /* 滚动条宽度为0 */ + height: 0; /* 滚动条高度为0 */ + color: transparent; /* 滚动条颜色为透明 */ } + +/* 空状态样式 */ .empty { - margin-top: 200rpx; + margin-top: 200rpx; /* 顶部外边距为200响应式像素,确保空状态提示在页面中间 */ } + +/* 商品项样式 */ .prod-items { - width: 345rpx; - display: inline-block; - background: #fff; - padding-bottom: 20rpx; - box-sizing: border-box; - box-shadow: 0rpx 6rpx 8rpx rgba(58,134,185,0.2); + width: 345rpx; /* 商品项宽度为345响应式像素 */ + display: inline-block; /* 作为行内块级元素显示,确保它们在同一行 */ + background: #fff; /* 背景颜色为白色 */ + padding-bottom: 20rpx; /* 底部内边距为20响应式像素 */ + box-sizing: border-box; /* 确保padding和border包含在元素的width和height之内 */ + box-shadow: 0rpx 6rpx 8rpx rgba(58, 134, 185, 0.2); /* 添加轻微的阴影效果,增强立体感 */ + &:nth-child(2n-1) { - margin: 20rpx 10rpx 10rpx 20rpx; + margin: 20rpx 10rpx 10rpx 20rpx; /* 奇数商品项的外边距设置 */ } + &:nth-child(2n) { - margin: 20rpx 20rpx 10rpx 10rpx; + margin: 20rpx 20rpx 10rpx 10rpx; /* 偶数商品项的外边距设置 */ } + .hot-imagecont { .hotsaleimg { - width: 341rpx; - height: 341rpx; + width: 341rpx; /* 图片宽度为341响应式像素 */ + height: 341rpx; /* 图片高度为341响应式像素 */ } - font-size: 0; - text-align: center; + + font-size: 0; /* 移除默认字体大小,防止影响图片显示 */ + text-align: center; /* 图片居中对齐 */ } + .hot-text { .hotprod-text { - font-size: 28rpx; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + font-size: 28rpx; /* 商品名称文字大小为28响应式像素 */ + white-space: nowrap; /* 禁止文本换行 */ + overflow: hidden; /* 隐藏超出容器的内容 */ + text-overflow: ellipsis; /* 当文本溢出时显示省略号 */ } - margin-top: 20rpx; - padding: 0 10rpx; + + margin-top: 20rpx; /* 顶部外边距为20响应式像素 */ + padding: 0 10rpx; /* 左右内边距为10响应式像素 */ + .prod-info { - min-height: 30rpx; - font-size: 22rpx; - color: #999; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + min-height: 30rpx; /* 最小高度为30响应式像素 */ + font-size: 22rpx; /* 商品信息文字大小为22响应式像素 */ + color: #999; /* 文本颜色为灰色 */ + white-space: nowrap; /* 禁止文本换行 */ + overflow: hidden; /* 隐藏超出容器的内容 */ + text-overflow: ellipsis; /* 当文本溢出时显示省略号 */ } + .prod-text-info { - position: relative; - height: 70rpx; - line-height: 70rpx; - font-family: Arial; + position: relative; /* 相对定位,用于内部元素的绝对定位 */ + height: 70rpx; /* 高度为70响应式像素 */ + line-height: 70rpx; /* 行高设置为70响应式像素,确保文本垂直居中 */ + font-family: Arial; /* 字体系列为Arial */ + .hotprod-price { - display: inline; - font-size: 26rpx; - color: #eb2444; + display: inline; /* 价格文本作为行内元素显示 */ + font-size: 26rpx; /* 价格文字大小为26响应式像素 */ + color: #eb2444; /* 价格颜色为红色 */ } + .basket-img { - width: 50rpx; - height: 50rpx; - position: absolute; - right: 0; - bottom: 7rpx; - padding: 8rpx; + width: 50rpx; /* 购物车图标宽度为50响应式像素 */ + height: 50rpx; /* 购物车图标高度为50响应式像素 */ + position: absolute; /* 绝对定位,相对于最近的相对定位祖先元素 */ + right: 0; /* 购物车图标距离右侧0像素 */ + bottom: 7rpx; /* 购物车图标距离底部7响应式像素 */ + padding: 8rpx; /* 内边距为8响应式像素 */ } } } } + +/* 更多商品样式 */ .more-prod { .prod-text-right { .prod-info { - font-size: 22rpx; - color: #999; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + font-size: 22rpx; /* 商品信息文字大小为22响应式像素 */ + color: #999; /* 文本颜色为灰色 */ + white-space: nowrap; /* 禁止文本换行 */ + overflow: hidden; /* 隐藏超出容器的内容 */ + text-overflow: ellipsis; /* 当文本溢出时显示省略号 */ } } } + +/* 空状态占位样式 */ .empty-wrap { - color: #aaa; - text-align: center; - padding-top: 400rpx; + color: #aaa; /* 文本颜色为浅灰色 */ + text-align: center; /* 文本居中对齐 */ + padding-top: 400rpx; /* 顶部内边距为400响应式像素,确保空状态提示在页面中间 */ } diff --git a/front-end/mall4uni/src/pages/sub-category/sub-category.vue b/front-end/mall4uni/src/pages/sub-category/sub-category.vue index fa8ab78..6368320 100644 --- a/front-end/mall4uni/src/pages/sub-category/sub-category.vue +++ b/front-end/mall4uni/src/pages/sub-category/sub-category.vue @@ -1,71 +1,65 @@ diff --git a/front-end/mall4uni/src/pages/submit-order/submit-order.scss b/front-end/mall4uni/src/pages/submit-order/submit-order.scss index 97eadec..f82f12a 100644 --- a/front-end/mall4uni/src/pages/submit-order/submit-order.scss +++ b/front-end/mall4uni/src/pages/submit-order/submit-order.scss @@ -1,429 +1,489 @@ +/* 容器样式 */ .container { - background: #f4f4f4; + background: #f4f4f4; /* 设置背景颜色为浅灰色 */ } + +/* 提交订单区域样式 */ .submit-order { - margin-bottom: 100rpx; - padding-bottom: 160rpx; - .delivery-addr { - position: relative; - background: #fff; - .addr-icon { - width: 32rpx; - height: 32rpx; - display: block; - position: absolute; - left: 30rpx; - top: 24rpx; - image { - width: 100%; - height: 100%; + margin-bottom: 100rpx; /* 底部外边距为100响应式像素 */ + padding-bottom: 160rpx; /* 底部内边距为160响应式像素 */ + + .delivery-addr { /* 配送地址样式 */ + position: relative; /* 相对定位,用于内部元素的绝对定位 */ + background: #fff; /* 背景颜色为白色 */ + + .addr-icon { /* 地址图标样式 */ + width: 32rpx; /* 图标宽度为32响应式像素 */ + height: 32rpx; /* 图标高度为32响应式像素 */ + display: block; /* 作为块级元素显示 */ + position: absolute; /* 绝对定位,相对于最近的相对定位祖先元素 */ + left: 30rpx; /* 距离左侧30响应式像素 */ + top: 24rpx; /* 距离顶部24响应式像素 */ + + image { /* 图片样式 */ + width: 100%; /* 宽度占满父元素 */ + height: 100%; /* 高度占满父元素 */ } } - .user-info { - padding-top: 20rpx; - line-height: 48rpx; - word-wrap: break-word; - word-break: break-all; - overflow: hidden; - text-overflow: ellipsis; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - .item { - font-size: 30rpx; - margin-right: 30rpx; - vertical-align: top; - display: inline-block; + + .user-info { /* 用户信息样式 */ + padding-top: 20rpx; /* 顶部内边距为20响应式像素 */ + line-height: 48rpx; /* 行高设置为48响应式像素 */ + word-wrap: break-word; /* 允许长单词或URL地址换行到下一行 */ + word-break: break-all; /* 强制文本在任意字符处换行 */ + overflow: hidden; /* 隐藏超出容器的内容 */ + text-overflow: ellipsis; /* 当文本溢出时显示省略号 */ + display: -webkit-box; /* 使用Webkit盒模型 */ + -webkit-line-clamp: 1; /* 限制文本显示为1行 */ + -webkit-box-orient: vertical; /* 文本垂直排列 */ + + .item { /* 用户信息项样式 */ + font-size: 30rpx; /* 文字大小为30响应式像素 */ + margin-right: 30rpx; /* 右侧外边距为30响应式像素 */ + vertical-align: top; /* 垂直对齐方式为顶部 */ + display: inline-block; /* 作为行内块级元素显示 */ } } - .addr { - font-size: 26rpx; - line-height: 36rpx; - color: #999; - width: 90%; - padding-bottom: 20rpx; - margin-top: 15rpx; - word-wrap: break-word; + + .addr { /* 地址样式 */ + font-size: 26rpx; /* 文字大小为26响应式像素 */ + line-height: 36rpx; /* 行高设置为36响应式像素 */ + color: #999; /* 文本颜色为灰色 */ + width: 90%; /* 宽度为父元素的90% */ + padding-bottom: 20rpx; /* 底部内边距为20响应式像素 */ + margin-top: 15rpx; /* 顶部外边距为15响应式像素 */ + word-wrap: break-word; /* 允许长单词或URL地址换行到下一行 */ } - .arrow { - width: 15rpx; - height: 15rpx; - border-top: 2rpx solid #777; - border-right: 2rpx solid #777; - transform: rotate(45deg); - position: absolute; - right: 30rpx; - top: 60rpx; + + .arrow { /* 箭头样式 */ + width: 15rpx; /* 宽度为15响应式像素 */ + height: 15rpx; /* 高度为15响应式像素 */ + border-top: 2rpx solid #777; /* 上边框为2响应式像素宽的灰色实线 */ + border-right: 2rpx solid #777; /* 右边框为2响应式像素宽的灰色实线 */ + transform: rotate(45deg); /* 旋转45度形成箭头形状 */ + position: absolute; /* 绝对定位,相对于最近的相对定位祖先元素 */ + right: 30rpx; /* 距离右侧30响应式像素 */ + top: 60rpx; /* 距离顶部60响应式像素 */ } - .arrow.empty { - top: 39rpx; + + .arrow.empty { /* 空状态下的箭头样式 */ + top: 39rpx; /* 距离顶部39响应式像素 */ } } } -.delivery-addr { - .addr-bg { - .add-addr { - .plus-sign { - color: #eb2444; - border: 2rpx solid #eb2444; - padding: 0rpx 6rpx; - margin-right: 10rpx; + +.delivery-addr { /* 配送地址样式(重复定义,可能用于覆盖或扩展) */ + .addr-bg { /* 地址背景样式 */ + .add-addr { /* 添加地址按钮样式 */ + .plus-sign { /* 加号样式 */ + color: #eb2444; /* 文本颜色为红色 */ + border: 2rpx solid #eb2444; /* 边框为2响应式像素宽的红色实线 */ + padding: 0rpx 6rpx; /* 内边距为上下0响应式像素,左右6响应式像素 */ + margin-right: 10rpx; /* 右侧外边距为10响应式像素 */ } - font-size: 28rpx; - color: #666; - display: flex; - align-items: center; - padding: 30rpx 0; + + font-size: 28rpx; /* 文字大小为28响应式像素 */ + color: #666; /* 文本颜色为深灰色 */ + display: flex; /* 使用Flex布局 */ + align-items: center; /* 垂直居中对齐 */ + padding: 30rpx 0; /* 上下内边距为30响应式像素 */ } - padding: 0 30rpx; + + padding: 0 30rpx; /* 左右内边距为30响应式像素 */ } - .addr-bg.whole { - padding: 0 39rpx 0 77rpx; + + .addr-bg.whole { /* 整个地址背景样式 */ + padding: 0 39rpx 0 77rpx; /* 左右内边距分别为39响应式像素和77响应式像素 */ } } -.addr-bg { - .add-addr { - .plus-sign-img { - width: 32rpx; - height: 32rpx; - font-size: 0; - margin-right: 10rpx; - image { - width: 100%; - height: 100%; + +.addr-bg { /* 地址背景样式(重复定义,可能用于覆盖或扩展) */ + .add-addr { /* 添加地址按钮样式 */ + .plus-sign-img { /* 加号图片样式 */ + width: 32rpx; /* 宽度为32响应式像素 */ + height: 32rpx; /* 高度为32响应式像素 */ + font-size: 0; /* 移除默认字体大小,防止影响图片显示 */ + margin-right: 10rpx; /* 右侧外边距为10响应式像素 */ + + image { /* 图片样式 */ + width: 100%; /* 宽度占满父元素 */ + height: 100%; /* 高度占满父元素 */ } } } } -.prod-item { - background-color: #fff; - margin-top: 15rpx; - font-size: 28rpx; - .item-cont { - .prod-pic { - image { - width: 180rpx; - height: 180rpx; - width: 100%; - height: 100%; + +.prod-item { /* 商品项样式 */ + background-color: #fff; /* 背景颜色为白色 */ + margin-top: 15rpx; /* 顶部外边距为15响应式像素 */ + font-size: 28rpx; /* 文字大小为28响应式像素 */ + + .item-cont { /* 商品内容样式 */ + .prod-pic { /* 商品图片样式 */ + image { /* 图片样式 */ + width: 180rpx; /* 宽度为180响应式像素 */ + height: 180rpx; /* 高度为180响应式像素 */ + width: 100%; /* 宽度占满父元素 */ + height: 100%; /* 高度占满父元素 */ } - font-size: 0; - display: block; - width: 160rpx; - height: 160rpx; - overflow: hidden; - background: #fff; - margin-right: 16rpx; + + font-size: 0; /* 移除默认字体大小,防止影响图片显示 */ + display: block; /* 作为块级元素显示 */ + width: 160rpx; /* 宽度为160响应式像素 */ + height: 160rpx; /* 高度为160响应式像素 */ + overflow: hidden; /* 隐藏超出容器的内容 */ + background: #fff; /* 背景颜色为白色 */ + margin-right: 16rpx; /* 右侧外边距为16响应式像素 */ } - display: flex; - align-items: center; - padding: 30rpx; - border-bottom: 2rpx solid #f1f1f1; - .prod-info { - margin-left: 10rpx; - font-size: 28rpx; - width: 100%; - position: relative; - height: 160rpx; - -webkit-flex: 1; - -ms-flex: 1; - -webkit-box-flex: 1; - -moz-box-flex: 1; - flex: 1; - .prodname { - font-size: 28rpx; - line-height: 40rpx; - max-height: 86rpx; - overflow: hidden; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - text-overflow: ellipsis; - word-break: break-all; + + display: flex; /* 使用Flex布局 */ + align-items: center; /* 垂直居中对齐 */ + padding: 30rpx; /* 内边距为30响应式像素 */ + border-bottom: 2rpx solid #f1f1f1; /* 底部边框为2响应式像素宽的浅灰色实线 */ + + .prod-info { /* 商品信息样式 */ + margin-left: 10rpx; /* 左侧外边距为10响应式像素 */ + font-size: 28rpx; /* 文字大小为28响应式像素 */ + width: 100%; /* 宽度占满父元素 */ + position: relative; /* 相对定位,用于内部元素的绝对定位 */ + height: 160rpx; /* 高度为160响应式像素 */ + flex: 1; /* 占用剩余空间 */ + + .prodname { /* 商品名称样式 */ + font-size: 28rpx; /* 文字大小为28响应式像素 */ + line-height: 40rpx; /* 行高设置为40响应式像素 */ + max-height: 86rpx; /* 最大高度为86响应式像素 */ + overflow: hidden; /* 隐藏超出容器的内容 */ + display: -webkit-box; /* 使用Webkit盒模型 */ + -webkit-line-clamp: 2; /* 限制文本显示为2行 */ + -webkit-box-orient: vertical; /* 文本垂直排列 */ + text-overflow: ellipsis; /* 当文本溢出时显示省略号 */ + word-break: break-all; /* 强制文本在任意字符处换行 */ } - .prod-info-cont { - color: #999; - line-height: 40rpx; - margin-top: 10rpx; - font-size: 22rpx; - overflow: hidden; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - text-overflow: ellipsis; - word-break: break-all; + + .prod-info-cont { /* 商品信息内容样式 */ + color: #999; /* 文本颜色为灰色 */ + line-height: 40rpx; /* 行高设置为40响应式像素 */ + margin-top: 10rpx; /* 顶部外边距为10响应式像素 */ + font-size: 22rpx; /* 文字大小为22响应式像素 */ + overflow: hidden; /* 隐藏超出容器的内容 */ + display: -webkit-box; /* 使用Webkit盒模型 */ + -webkit-line-clamp: 1; /* 限制文本显示为1行 */ + -webkit-box-orient: vertical; /* 文本垂直排列 */ + text-overflow: ellipsis; /* 当文本溢出时显示省略号 */ + word-break: break-all; /* 强制文本在任意字符处换行 */ } } } - .order-num { - padding: 20rpx 30rpx; - display: flex; - justify-content: space-between; - font-size: 28rpx; - .clear-btn { - width: 32rpx; - height: 32rpx; - font-size: 0; - vertical-align: top; - margin-top: 6rpx; - margin-left: 42rpx; - position: relative; - &::after { - content: " "; - display: block; - position: absolute; - left: -10px; - top: 1px; - width: 1px; - height: 12px; - background: #ddd; + + .order-num { /* 订单数量样式 */ + padding: 20rpx 30rpx; /* 内边距为上下20响应式像素,左右30响应式像素 */ + display: flex; /* 使用Flex布局 */ + justify-content: space-between; /* 水平两端对齐 */ + font-size: 28rpx; /* 文字大小为28响应式像素 */ + + .clear-btn { /* 清空按钮样式 */ + width: 32rpx; /* 宽度为32响应式像素 */ + height: 32rpx; /* 高度为32响应式像素 */ + font-size: 0; /* 移除默认字体大小,防止影响图片显示 */ + vertical-align: top; /* 垂直对齐方式为顶部 */ + margin-top: 6rpx; /* 顶部外边距为6响应式像素 */ + margin-left: 42rpx; /* 左侧外边距为42响应式像素 */ + position: relative; /* 相对定位,用于内部元素的绝对定位 */ + + &::after { /* 清空按钮后的竖线样式 */ + content: " "; /* 生成伪元素 */ + display: block; /* 作为块级元素显示 */ + position: absolute; /* 绝对定位,相对于最近的相对定位祖先元素 */ + left: -10px; /* 距离左侧-10像素 */ + top: 1px; /* 距离顶部1像素 */ + width: 1px; /* 宽度为1像素 */ + height: 12px; /* 高度为12像素 */ + background: #ddd; /* 背景颜色为浅灰色 */ } - .clear-list-btn { - width: 100%; - height: 100%; - vertical-align: middle; + + .clear-list-btn { /* 清空列表按钮样式 */ + width: 100%; /* 宽度占满父元素 */ + height: 100%; /* 高度占满父元素 */ + vertical-align: middle; /* 垂直居中对齐 */ } } } - .total-num { - text-align: right; - padding: 20rpx 30rpx; - font-size: 28rpx; - .prodprice { - display: inline-block; - color: #333; + + .total-num { /* 总数量样式 */ + text-align: right; /* 文本右对齐 */ + padding: 20rpx 30rpx; /* 内边距为上下20响应式像素,左右30响应式像素 */ + font-size: 28rpx; /* 文字大小为28响应式像素 */ + + .prodprice { /* 商品价格样式 */ + display: inline-block; /* 作为行内块级元素显示 */ + color: #333; /* 文本颜色为深灰色 */ } - .prodcount { - margin-right: 20rpx; + + .prodcount { /* 商品数量样式 */ + margin-right: 20rpx; /* 右侧外边距为20响应式像素 */ } } - .price-nums { - .prodprice { - position: absolute; - bottom: 0; + + .price-nums { /* 价格和数量样式 */ + .prodprice { /* 商品价格样式 */ + position: absolute; /* 绝对定位,相对于最近的相对定位祖先元素 */ + bottom: 0; /* 距离底部0响应式像素 */ } - .prodcount { - position: absolute; - bottom: 5rpx; - right: 0; - color: #999; - font-family: verdana; + + .prodcount { /* 商品数量样式 */ + position: absolute; /* 绝对定位,相对于最近的相对定位祖先元素 */ + bottom: 5rpx; /* 距离底部5响应式像素 */ + right: 0; /* 距离右侧0响应式像素 */ + color: #999; /* 文本颜色为灰色 */ + font-family: verdana; /* 字体系列为Verdana */ } } } -.order-state { - display: flex; - align-items: center; + +.order-state { /* 订单状态样式 */ + display: flex; /* 使用Flex布局 */ + align-items: center; /* 垂直居中对齐 */ } -.order-msg { - background: #fff; - margin-top: 15rpx; - padding: 0 30rpx; - font-size: 28rpx; - .msg-item { - border-top: 2rpx solid #f1f1f1; - &:first-child { - border: 0; + +.order-msg { /* 订单消息样式 */ + background: #fff; /* 背景颜色为白色 */ + margin-top: 15rpx; /* 顶部外边距为15响应式像素 */ + padding: 0 30rpx; /* 左右内边距为30响应式像素 */ + font-size: 28rpx; /* 文字大小为28响应式像素 */ + + .msg-item { /* 消息项样式 */ + border-top: 2rpx solid #f1f1f1; /* 顶部边框为2响应式像素宽的浅灰色实线 */ + + &:first-child { /* 第一个消息项样式 */ + border: 0; /* 移除边框 */ } - .item { - position: relative; - display: flex; - padding: 16rpx 0; - align-items: center; - .item-tit { - line-height: 48rpx; + + .item { /* 消息项内容样式 */ + position: relative; /* 相对定位,用于内部元素的绝对定位 */ + display: flex; /* 使用Flex布局 */ + padding: 16rpx 0; /* 上下内边距为16响应式像素 */ + align-items: center; /* 垂直居中对齐 */ + + .item-tit { /* 消息标题样式 */ + line-height: 48rpx; /* 行高设置为48响应式像素 */ } - .item-txt { - -webkit-box-flex: 1; - -moz-box-flex: 1; - flex: 1; - font-family: arial; - max-height: 48rpx; - overflow: hidden; - line-height: 48rpx; - display: -webkit-box; - -webkit-line-clamp: 1; - -webkit-box-orient: vertical; - text-overflow: ellipsis; - word-break: break-all; + + .item-txt { /* 消息文本样式 */ + flex: 1; /* 占用剩余空间 */ + font-family: arial; /* 字体系列为Arial */ + max-height: 48rpx; /* 最大高度为48响应式像素 */ + overflow: hidden; /* 隐藏超出容器的内容 */ + line-height: 48rpx; /* 行高设置为48响应式像素 */ + display: -webkit-box; /* 使用Webkit盒模型 */ + -webkit-line-clamp: 1; /* 限制文本显示为1行 */ + -webkit-box-orient: vertical; /* 文本垂直排列 */ + text-overflow: ellipsis; /* 当文本溢出时显示省略号 */ + word-break: break-all; /* 强制文本在任意字符处换行 */ } - .item-txt.price { - padding: 0; - text-align: right; + + .item-txt.price { /* 价格文本样式 */ + padding: 0; /* 移除内边距 */ + text-align: right; /* 文本右对齐 */ } - input { - flex: 1; + + input { /* 输入框样式 */ + flex: 1; /* 占用剩余空间 */ } - .coupon-btn { - display: block; - margin: 0 30rpx; - line-height: 28rpx; - color: #999; + + .coupon-btn { /* 优惠券按钮样式 */ + display: block; /* 作为块级元素显示 */ + margin: 0 30rpx; /* 左右外边距为30响应式像素 */ + line-height: 28rpx; /* 行高设置为28响应式像素 */ + color: #999; /* 文本颜色为灰色 */ } - .arrow { - width: 15rpx; - height: 15rpx; - border-top: 2rpx solid #999; - border-right: 2rpx solid #999; - transform: rotate(45deg); - position: absolute; - right: 0rpx; + + .arrow { /* 箭头样式 */ + width: 15rpx; /* 宽度为15响应式像素 */ + height: 15rpx; /* 高度为15响应式像素 */ + border-top: 2rpx solid #999; /* 上边框为2响应式像素宽的灰色实线 */ + border-right: 2rpx solid #999; /* 右边框为2响应式像素宽的灰色实线 */ + transform: rotate(45deg); /* 旋转45度形成箭头形状 */ + position: absolute; /* 绝对定位,相对于最近的相对定位祖先元素 */ + right: 0rpx; /* 距离右侧0响应式像素 */ } } - .item.payment { - border-top: 2rpx solid #f1f1f1; - color: #eb2444; + + .item.payment { /* 支付项样式 */ + border-top: 2rpx solid #f1f1f1; /* 顶部边框为2响应式像素宽的浅灰色实线 */ + color: #eb2444; /* 文本颜色为红色 */ } - .item.coupon { - border-bottom: 2rpx solid #e1e1e1; + + .item.coupon { /* 优惠券项样式 */ + border-bottom: 2rpx solid #e1e1e1; /* 底部边框为2响应式像素宽的浅灰色实线 */ } } } -.submit-order-footer { - position: fixed; - bottom: 0; - width: 100%; - max-width: 750rpx; - background: #fff; - margin: auto; - display: -webkit-flex; - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: flex; - font-size: 26rpx; - box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05); - .sub-order { - flex: 1; - margin: 0 30rpx; - line-height: 100rpx; - display: block; - text-align: left; - font-size: 28rpx; - .item-txt { - .price { - display: inline; - color: #eb2444; - font-size: 28rpx; + +.submit-order-footer { /* 提交订单页脚样式 */ + position: fixed; /* 固定定位,确保始终位于页面底部 */ + bottom: 0; /* 距离页面底部0像素 */ + width: 100%; /* 宽度占满整个屏幕 */ + max-width: 750rpx; /* 最大宽度为750响应式像素 */ + background: #fff; /* 背景颜色为白色 */ + margin: auto; /* 水平居中 */ + display: -webkit-flex; /* 使用Webkit Flex布局 */ + display: -webkit-box; /* 使用Webkit盒模型 */ + display: -moz-box; /* 使用Mozilla盒模型 */ + display: -ms-flexbox; /* 使用IE Flex布局 */ + display: flex; /* 使用标准Flex布局 */ + font-size: 26rpx; /* 文字大小为26响应式像素 */ + box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05); /* 添加轻微的阴影效果 */ + + .sub-order { /* 订单提交按钮样式 */ + flex: 1; /* 占用剩余空间 */ + margin: 0 30rpx; /* 左右外边距为30响应式像素 */ + line-height: 100rpx; /* 行高设置为100响应式像素 */ + display: block; /* 作为块级元素显示 */ + text-align: left; /* 文本左对齐 */ + font-size: 28rpx; /* 文字大小为28响应式像素 */ + + .item-txt { /* 订单金额样式 */ + .price { /* 价格样式 */ + display: inline; /* 作为行内元素显示 */ + color: #eb2444; /* 文本颜色为红色 */ + font-size: 28rpx; /* 文字大小为28响应式像素 */ } } } - .footer-box { - padding: 0 10rpx; - width: 200rpx; - background: #eb2444; - text-align: center; - line-height: 100rpx; - color: #fff; + + .footer-box { /* 页脚按钮样式 */ + padding: 0 10rpx; /* 左右内边距为10响应式像素 */ + width: 200rpx; /* 宽度为200响应式像素 */ + background: #eb2444; /* 背景颜色为红色 */ + text-align: center; /* 文本居中对齐 */ + line-height: 100rpx; /* 行高设置为100响应式像素 */ + color: #fff; /* 文本颜色为白色 */ } } -.clearfix { - &:after { - content: " "; - display: table; - clear: both; + +.clearfix { /* 清除浮动样式 */ + &:after { /* 生成伪元素清除浮动 */ + content: " "; /* 生成空内容 */ + display: table; /* 作为表格元素显示 */ + clear: both; /* 清除浮动 */ } } -.popup-hide { - position: fixed; - top: 0; - bottom: 0; - left: 0; - right: 0; - z-index: 999; - background-color: rgba(0, 0, 0, 0.3); + +.popup-hide { /* 弹出层隐藏样式 */ + position: fixed; /* 固定定位,覆盖整个屏幕 */ + top: 0; /* 距离页面顶部0像素 */ + bottom: 0; /* 距离页面底部0像素 */ + left: 0; /* 距离页面左侧0像素 */ + right: 0; /* 距离页面右侧0像素 */ + z-index: 999; /* 设置较高的堆叠顺序,确保弹出层在其他内容之上 */ + background-color: rgba(0, 0, 0, 0.3); /* 背景颜色为半透明黑色 */ } -.popup-box { - position: absolute; - bottom: 0; - width: 100%; - height: 80%; - overflow: hidden; - background-color: #fff; + +.popup-box { /* 弹出层盒子样式 */ + position: absolute; /* 绝对定位,相对于最近的相对定位祖先元素 */ + bottom: 0; /* 距离页面底部0像素 */ + width: 100%; /* 宽度占满整个屏幕 */ + height: 80%; /* 高度为屏幕高度的80% */ + overflow: hidden; /* 隐藏超出容器的内容 */ + background-color: #fff; /* 背景颜色为白色 */ } -.popup-tit { - position: relative; - height: 46px; - line-height: 46px; - padding-left: 10px; - font-size: 16px; - color: #333; - font-weight: bold; + +.popup-tit { /* 弹出层标题样式 */ + position: relative; /* 相对定位,用于内部元素的绝对定位 */ + height: 46px; /* 高度为46像素 */ + line-height: 46px; /* 行高设置为46像素 */ + padding-left: 10px; /* 左侧内边距为10像素 */ + font-size: 16px; /* 文字大小为16像素 */ + color: #333; /* 文本颜色为深灰色 */ + font-weight: bold; /* 文本加粗 */ } -.close { - color: #aaa; - border-radius: 12px; - line-height: 20px; - text-align: center; - height: 20px; - width: 20px; - font-size: 18px; - padding: 1px; - top: 10px; - right: 10px; - position: absolute; - &::before { - content: "\2716"; + +.close { /* 关闭按钮样式 */ + color: #aaa; /* 文本颜色为浅灰色 */ + border-radius: 12px; /* 圆角半径为12像素 */ + line-height: 20px; /* 行高设置为20像素 */ + text-align: center; /* 文本居中对齐 */ + height: 20px; /* 高度为20像素 */ + width: 20px; /* 宽度为20像素 */ + font-size: 18px; /* 文字大小为18像素 */ + padding: 1px; /* 内边距为1像素 */ + top: 10px; /* 距离顶部10像素 */ + right: 10px; /* 距离右侧10像素 */ + position: absolute; /* 绝对定位,相对于最近的相对定位祖先元素 */ + + &::before { /* 生成关闭符号样式 */ + content: "\2716"; /* 使用Unicode字符表示关闭符号 */ } } -.coupon-tabs { - display: flex; - font-size: 14px; - justify-content: space-around; - border-bottom: 1px solid #f2f2f2; + +.coupon-tabs { /* 优惠券标签样式 */ + display: flex; /* 使用Flex布局 */ + font-size: 14px; /* 文字大小为14像素 */ + justify-content: space-around; /* 水平均匀分布 */ + border-bottom: 1px solid #f2f2f2; /* 底部边框为1像素宽的浅灰色实线 */ } -.coupon-tab { - padding: 10px 0; + +.coupon-tab { /* 优惠券标签项样式 */ + padding: 10px 0; /* 上下内边距为10像素 */ } -.coupon-tab.on { - border-bottom: 2px solid #eb2444; - font-weight: 600; + +.coupon-tab.on { /* 选中的优惠券标签项样式 */ + border-bottom: 2px solid #eb2444; /* 底部边框为2像素宽的红色实线 */ + font-weight: 600; /* 文本加粗 */ } -.popup-cnt { - height: calc(100% - 88px); - overflow: auto; - padding: 0 10px; - background: #f4f4f4; + +.popup-cnt { /* 弹出层内容样式 */ + height: calc(100% - 88px); /* 高度为弹出层盒子高度减去88像素 */ + overflow: auto; /* 允许滚动 */ + padding: 0 10px; /* 左右内边距为10像素 */ + background: #f4f4f4; /* 背景颜色为浅灰色 */ } -.coupon-ok { - position: fixed; - bottom: 0; - width: 100%; - height: 60px; - line-height: 50px; - font-size: 14px; - text-align: center; - box-shadow: 0px -1px 1px #ddd; - text { - border-radius: 20px; - display: inline-block; - height: 20px; - line-height: 20px; - width: 450rpx; - padding: 7px; - color: #fff; - box-shadow: -1px 3px 3px #aaa; + +.coupon-ok { /* 优惠券确认按钮样式 */ + position: fixed; /* 固定定位,确保始终位于页面底部 */ + bottom: 0; /* 距离页面底部0像素 */ + width: 100%; /* 宽度占满整个屏幕 */ + height: 60px; /* 高度为60像素 */ + line-height: 50px; /* 行高设置为50像素 */ + font-size: 14px; /* 文字大小为14像素 */ + text-align: center; /* 文本居中对齐 */ + box-shadow: 0px -1px 1px #ddd; /* 添加轻微的阴影效果 */ + + text { /* 按钮文本样式 */ + border-radius: 20px; /* 圆角半径为20像素 */ + display: inline-block; /* 作为行内块级元素显示 */ + height: 20px; /* 高度为20像素 */ + line-height: 20px; /* 行高设置为20像素 */ + width: 450rpx; /* 宽度为450响应式像素 */ + padding: 7px; /* 内边距为7像素 */ + color: #fff; /* 文本颜色为白色 */ + box-shadow: -1px 3px 3px #aaa; /* 添加轻微的阴影效果 */ } } -.botm-empty { - height: 60px; + +.botm-empty { /* 底部空白样式 */ + height: 60px; /* 高度为60像素 */ } -checkbox { - .wx-checkbox-input { - border-radius: 50%; - width: 35rpx; - height: 35rpx; + +checkbox { /* 复选框样式 */ + .wx-checkbox-input { /* 复选框输入框样式 */ + border-radius: 50%; /* 圆形边框 */ + width: 35rpx; /* 宽度为35响应式像素 */ + height: 35rpx; /* 高度为35响应式像素 */ } - .wx-checkbox-input.wx-checkbox-input-checked { - background: #eb2444; - border-color: #eb2444; - &::before { - text-align: center; - font-size: 22rpx; - color: #fff; - background: transparent; - transform: translate(-50%, -50%) scale(1); - -webkit-transform: translate(-50%, -50%) scale(1); + + .wx-checkbox-input.wx-checkbox-input-checked { /* 选中的复选框输入框样式 */ + background: #eb2444; /* 背景颜色为红色 */ + border-color: #eb2444; /* 边框颜色为红色 */ + + &::before { /* 选中符号样式 */ + text-align: center; /* 文本居中对齐 */ + font-size: 22rpx; /* 文字大小为22响应式像素 */ + color: #fff; /* 文本颜色为白色 */ + background: transparent; /* 背景颜色为透明 */ + transform: translate(-50%, -50%) scale(1); /* 居中并缩放 */ + -webkit-transform: translate(-50%, -50%) scale(1); /* Webkit浏览器兼容 */ } } } diff --git a/front-end/mall4uni/src/pages/submit-order/submit-order.vue b/front-end/mall4uni/src/pages/submit-order/submit-order.vue index 166ad64..e273adb 100644 --- a/front-end/mall4uni/src/pages/submit-order/submit-order.vue +++ b/front-end/mall4uni/src/pages/submit-order/submit-order.vue @@ -3,100 +3,82 @@ - > + + class="addr-bg" > - + - 新增收货地址 + 新增收货地址 - + + + class="addr-bg whole" > - + - {{ userAddr.province }}{{ userAddr.city }}{{ userAddr.area }}{{ userAddr.addr }} + {{ userAddr.province }}{{ userAddr.city }}{{ userAddr.area }}{{ userAddr.addr }} - + - + :key="index" > + @tap="toOrderDetailPage" > - + - {{ item.prodName }} + {{ item.prodName }} - {{ item.skuName }} + {{ item.skuName }} - - ¥ - - - {{ wxs.parsePrice(item.price)[0] }} - - - .{{ wxs.parsePrice(item.price)[1] }} - - - - x{{ item.prodCount }} + + {{ wxs.parsePrice(item.price)[0] }} + .{{ wxs.parsePrice(item.price)[1] }} + x{{ item.prodCount }} + - - 共{{ totalCount }}件商品 - + 共{{ totalCount }}件商品 合计: - - ¥ - - - {{ wxs.parsePrice(total)[0] }} - - - .{{ wxs.parsePrice(total)[1] }} - + + {{ wxs.parsePrice(total)[0] }} + .{{ wxs.parsePrice(total)[1] }} @@ -104,96 +86,58 @@ - + > - - 优惠券: - - - 暂无可用 - - - {{ coupons.totalLength ? coupons.totalLength : 0 }}张 - - + 优惠券: + 暂无可用 + {{ coupons.totalLength ? coupons.totalLength : 0 }}张 + + 买家留言: - + + placeholder="给卖家留言" + /> + - - 订单总额: - + 订单总额: - - ¥ - - - {{ wxs.parsePrice(total)[0] }} - - - .{{ wxs.parsePrice(total)[1] }} - + + {{ wxs.parsePrice(total)[0] }} + .{{ wxs.parsePrice(total)[1] }} - - 运费: - + 运费: - - ¥ - - - {{ wxs.parsePrice(transfee)[0] }} - - - .{{ wxs.parsePrice(transfee)[1] }} - + + {{ wxs.parsePrice(transfee)[0] }} + .{{ wxs.parsePrice(transfee)[1] }} - - 优惠金额: - + 优惠金额: - - -¥ - - - {{ wxs.parsePrice(shopReduce)[0] }} - - - .{{ wxs.parsePrice(shopReduce)[1] }} - + -¥ + {{ wxs.parsePrice(shopReduce)[0] }} + .{{ wxs.parsePrice(shopReduce)[1] }} 小计: - - ¥ - - - {{ wxs.parsePrice(actualTotal)[0] }} - - - .{{ wxs.parsePrice(actualTotal)[1] }} - + + {{ wxs.parsePrice(actualTotal)[0] }} + .{{ wxs.parsePrice(actualTotal)[1] }} @@ -206,21 +150,14 @@ 合计: - - ¥ - - - {{ wxs.parsePrice(actualTotal)[0] }} - - - .{{ wxs.parsePrice(actualTotal)[1] }} - + + {{ wxs.parsePrice(actualTotal)[0] }} + .{{ wxs.parsePrice(actualTotal)[1] }} - > 提交订单 @@ -228,69 +165,69 @@ - class="popup-hide" > - 优惠券 + 优惠券 /> + data-sts="1" - @tap="changeCouponSts" + @tap="changeCouponSts" > - 可用优惠券({{ coupons.canUseCoupons.length ? coupons.canUseCoupons.length : 0 }}) + 可用优惠券({{ coupons.canUseCoupons.length ? coupons.canUseCoupons.length : 0 }}) data-sts="2" - @tap="changeCouponSts" + @tap="changeCouponSts" > - 不可用优惠券({{ coupons.unCanUseCoupons.length ? coupons.unCanUseCoupons.length : 0 }}) + 不可用优惠券({{ coupons.unCanUseCoupons.length ? coupons.unCanUseCoupons.length : 0 }}) + - + + :key="index" > + order="true" + can-use="true" + @check-coupon="checkCoupon" /> - + + :key="index" > + order="true" + can-use="false" /> - + + class="coupon-ok" > - - 确定 - + 确定 @@ -298,230 +235,309 @@ diff --git a/front-end/mall4uni/src/pages/user/user.scss b/front-end/mall4uni/src/pages/user/user.scss index c5e82dc..22b29e6 100644 --- a/front-end/mall4uni/src/pages/user/user.scss +++ b/front-end/mall4uni/src/pages/user/user.scss @@ -1,222 +1,400 @@ +/* 定义容器样式 */ .container { + /* 设置背景颜色 */ background-color: #f7f7f7; + /* 设置底部内边距,以确保内容与底部有适当的空间 */ padding-bottom: 60rpx; } + +/* 用户信息模块样式 */ .userinfo { + /* 设置相对定位,以便其子元素可以使用绝对定位 */ position: relative; + /* 占满整个宽度 */ width: 100%; + /* 设置白色背景 */ background: #fff; + /* 文本居中显示 */ text-align: center; + /* 上下内边距,左右无内边距 */ padding: 30rpx 0; + .userinfo-con { + /* 设置固定宽度,使用户信息框在页面中心对齐 */ width: 240rpx; + /* 水平居中 */ margin: auto; + .userinfo-avatar { + /* 确保超出部分不显示 */ overflow: hidden; + /* 块级显示 */ display: block; + /* 设置头像的尺寸 */ width: 160rpx; height: 160rpx; + /* 圆形头像 */ border-radius: 50%; + /* 添加阴影效果 */ box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); + /* 水平居中 */ margin: auto; + image { + /* 设置图像的尺寸 */ width: 160rpx; height: 160rpx; } } + .userinfo-name { + /* 设置字体大小 */ font-size: 30rpx; + /* 加粗字体 */ font-weight: bold; + /* 与头像保持一定间距 */ margin-top: 20rpx; + /* 处理文本溢出 */ overflow: hidden; + /* 使用 WebKit 独有的多行文本截断 */ display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; + /* 当文本溢出时用省略号表示 */ text-overflow: ellipsis; + /* 允许单词内部断行 */ word-break: break-all; } } } + +/* 未登录用户的提示信息样式 */ .userinfo-none { + /* 使用 Flexbox 布局,使子元素垂直和水平居中 */ display: flex; + /* 内边距 */ padding: 30rpx; + /* 白色背景 */ background: #fff; + /* 子元素垂直居中 */ align-items: center; + .default-pic { + /* 右侧内边距 */ padding-right: 30rpx; + image { + /* 设置图像的尺寸 */ width: 160rpx; height: 160rpx; } } } + +/* 未登录状态下的按钮和文本样式 */ .none-login { button { + /* 按钮背景色为白色 */ background: #fff; + &::after { + /* 移除默认的按钮边框 */ border: 0; } } + .unlogin { + /* 设置字体大小 */ font-size: 30rpx; + /* 文本左对齐 */ text-align: left; + /* 移除上下内边距 */ padding: 0; } + .click-login { + /* 设置较小的字体大小 */ font-size: 26rpx; + /* 颜色较深 */ color: #777; + /* 文本左对齐 */ text-align: left; + /* 移除上下内边距 */ padding: 0; } } + +/* 绑定手机号的样式 */ .binding-phone { + /* 相对定位 */ position: relative; + /* 白色背景 */ background: #fff; + /* 固定高度 */ height: 80rpx; + /* 行高与高度相同,使文本垂直居中 */ line-height: 80rpx; + /* 内边距 */ padding: 0 30rpx; + /* 上下边框 */ border-top: 2rpx solid #f7f7f7; border-bottom: 2rpx solid #f7f7f7; + .show-tip { + /* 设置字体大小 */ font-size: 26rpx; } + .gotobinding { + /* 设置圆角 */ border-radius: 8rpx; + /* 字体大小 */ font-size: 28rpx; - color: #e24b4b; + /* 颜色为红色 */ + color: #e24b42; + /* 加粗字体 */ font-weight: bold; } } + +/* 列表内容样式 */ .list-cont { + /* 占满整个宽度 */ width: 100%; + /* 背景颜色 */ background: #f7f7f7; + /* 顶部外边距 */ margin-top: 20rpx; + .total-order { + /* 白色背景 */ background: #fff; + .order-tit { + /* 使用 Flexbox 布局 */ display: flex; + /* 两端对齐 */ justify-content: space-between; + /* 固定高度 */ height: 80rpx; + /* 行高与高度相同,使文本垂直居中 */ line-height: 80rpx; + /* 字体大小 */ font-size: 30rpx; + /* 下边框 */ border-bottom: 1px solid #f7f7f7; + /* 内边距 */ padding: 0 30rpx; + .checkmore { + /* 较小的字体大小 */ font-size: 22rpx; + /* 颜色较暗 */ color: #80848f; + /* 使用 Flexbox 布局 */ display: flex; + /* 垂直居中 */ align-items: center; } } + .procedure { + /* 使用 Flexbox 布局 */ display: flex; + /* 项目均匀分布 */ justify-content: space-around; + /* 项目垂直居中 */ align-items: center; + /* 字体大小 */ font-size: 25rpx; + /* 固定高度 */ height: 160rpx; + .items { + /* 相对定位 */ position: relative; + /* 使用 Flexbox 布局 */ display: flex; + /* 项目垂直排列 */ flex-direction: column; + /* 项目水平居中 */ align-items: center; + image { + /* 设置图像的尺寸 */ width: 70rpx; height: 70rpx; + /* 与下方文字保持间距 */ margin-bottom: 20rpx; } + .num-badge { + /* 绝对定位 */ position: absolute; + /* 设置徽章位置 */ top: -15rpx; right: -12rpx; + /* 颜色为红色 */ color: #eb2444; + /* 边框颜色为红色 */ border: 3rpx solid #eb2444; + /* 圆形 */ border-radius: 50rpx; + /* 白色背景 */ background: #fff; + /* 最小宽度 */ min-width: 30rpx; + /* 固定高度 */ height: 30rpx; + /* 行高与高度相同,使文本垂直居中 */ line-height: 30rpx; + /* 文本水平居中 */ text-align: center; + /* 内边距 */ padding: 2rpx; + /* 块级显示 */ display: block; } } } } + .my-menu { + /* 白色背景 */ background-color: #fff; + /* 顶部外边距 */ margin-top: 20rpx; + .memu-item { + /* 使用 Flexbox 布局 */ display: flex; + /* 项目垂直居中 */ align-items: center; + /* 项目两端对齐 */ justify-content: space-between; + /* 固定高度 */ height: 100rpx; + /* 下边框 */ border-bottom: 2rpx solid #f7f7f7; + /* 内边距 */ padding: 0 30rpx; + &:nth-child(1) { + /* 第一个项目的上边框 */ border-top: 2rpx solid #f7f7f7; } + &:last-child { + /* 最后一个项目的下边框移除 */ border-bottom: none; } + text { + /* 字体大小 */ font-size: 28rpx; } + image { + /* 设置图像的尺寸 */ width: 50rpx; height: 50rpx; + /* 与右侧文本保持间距 */ margin-right: 20rpx; } + .i-name { + /* 使用 Flexbox 布局 */ display: flex; + /* 项目垂直居中 */ align-items: center; } } } } + +/* 箭头样式 */ .arrowhead { + /* 设置箭头的尺寸 */ width: 15rpx; height: 15rpx; + /* 上边框 */ border-top: 2rpx solid #999; + /* 右边框 */ border-right: 2rpx solid #999; + /* 旋转45度形成箭头形状 */ transform: rotate(45deg); + /* 左侧外边距 */ margin-left: 10rpx; } + +/* 产品栏样式 */ .prod-col { + /* 顶部外边距 */ margin-top: 20rpx; + /* 白色背景 */ background: #fff; + /* 使用 Flexbox 布局 */ display: flex; + /* 项目均匀分布 */ justify-content: space-around; + /* 内边距 */ padding: 30rpx 0 10rpx 0; + /* 字体大小 */ font-size: 12px; + .col-item { + /* 文本居中 */ text-align: center; + .num { + /* 字体较大且加粗 */ font-size: 16px; font-weight: 700; + /* 颜色为蓝色 */ color: #3a86b9; } + .tit { + /* 行高 */ line-height: 34px; } } } + +/* 登出按钮样式 */ .log-out { + /* 内边距 */ padding: 20rpx; + /* 文本居中 */ text-align: center; + /* 顶部外边距 */ margin-top: 20rpx; } + .log-out-n { + /* 字体大小 */ font-size: 30rpx; + /* 水平居中 */ margin: auto; + /* 固定宽度 */ width: 200rpx; + /* 内边距 */ padding: 20rpx; + /* 圆角 */ border-radius: 10rpx; + /* 红色背景 */ background: #e43130; + /* 白色文字 */ color: #ffffff; } + +/* 自定义菜单按钮样式 */ button.memu-btn.memu-item { + /* 白色背景 */ background-color: #fff; + &:after { + /* 移除默认的按钮边框 */ border: 0; } } diff --git a/front-end/mall4uni/src/pages/user/user.vue b/front-end/mall4uni/src/pages/user/user.vue index 51aed0b..475bce8 100644 --- a/front-end/mall4uni/src/pages/user/user.vue +++ b/front-end/mall4uni/src/pages/user/user.vue @@ -1,221 +1,131 @@