feat: 新增全局布局样式并提升组件响应式表现

- 在 global-layout.scss 中引入全局布局样式,统一页面宽度与对齐方式
- 更新多个组件与页面以优化响应式,包括宽度、间距及 flex 布局等调整
- 在 API 请求中增加 loading 状态管理,改善用户体验
- 优化领券中心与商品详情页,提升功能与 UI 一致性
This commit is contained in:
田香琪
2026-06-23 10:17:35 +08:00
parent c1447b4376
commit 8a60e23214
129 changed files with 5236 additions and 2232 deletions

View File

@@ -143,8 +143,35 @@ export default {
font-size: 13px;
position: relative;
}
.order-row,
.order-item-view {
display: flex;
align-items: center;
> [span] {
box-sizing: border-box;
padding: 0 8px;
}
> [span='12'] {
flex: 0 0 50%;
max-width: 50%;
}
> [span='4'] {
flex: 0 0 16.666667%;
max-width: 16.666667%;
}
> [span='6'] {
flex: 0 0 25%;
max-width: 25%;
}
}
.order-item-view {
padding: 10px 20px;
align-items: flex-start;
}
.order-item {
text-align: center;

View File

@@ -470,29 +470,36 @@ export default {
},
distribution() {
// 获取分销商信息
distribution().then((res) => {
if (res.result) {
this.result = res.result;
let type = res.result.distributionStatus;
if (type === "PASS") {
this.status = 2;
this.getGoodsData();
} else if ( type === "REFUSE") {
distribution()
.then((res) => {
if (res?.result) {
this.result = res.result;
const type = res.result.distributionStatus;
if (type === "PASS") {
this.status = 2;
this.getGoodsData();
} else if (type === "REFUSE") {
this.status = 0;
} else if (type === "RETREAT") {
this.status = 4;
} else if (type === "APPEAL") {
this.status = 5;
} else {
this.status = 1;
}
} else if (res?.code === 22000) {
// 分销功能未开启
this.status = 3;
} else {
// 没有资格申请,显示申请表单
this.status = 0;
} else if (type === "RETREAT") {
this.status = 4;
}else if (type === "APPEAL") {
this.status = 5;
}else {
this.status = 1;
}
} else if (!res.data.success && res.data.code === 22000) {
this.status = 3;
} else {
// 没有资格申请 先去实名认证
this.status = 0;
}
});
})
.catch((err) => {
if (err?.code === 22000) {
this.status = 3;
}
});
},
},
};

View File

@@ -10,12 +10,10 @@
<!-- 物流评分服务评分 -->
<div class="delivery-rate">
<div class="fontsize_16">物流服务评价</div>
<div class="color999">
<span>物流评价<el-rate disabled :value="Number(orderGoods.deliveryScore)" /></span>
<span>服务评价<el-rate disabled :value="Number(orderGoods.serviceScore)" /></span>
<span
>服务评价<el-rate disabled :value="Number(orderGoods.descriptionScore)"
/></span>
<div class="color999 delivery-rate-items">
<span>物流评价<el-rate disabled :model-value="Number(orderGoods.deliveryScore) || 0" /></span>
<span>服务评价<el-rate disabled :model-value="Number(orderGoods.serviceScore) || 0" /></span>
<span>描述评价<el-rate disabled :model-value="Number(orderGoods.descriptionScore) || 0" /></span>
</div>
</div>
<!-- 添加订单评价 左侧商品详情 右侧评价框 -->
@@ -133,13 +131,29 @@ export default {
display: flex;
align-items: center;
margin-top: 20px;
height: 50px;
min-height: 50px;
border-bottom: 1px solid #eee;
> div:nth-child(1) {
width: 120px;
font-weight: bold;
}
}
.delivery-rate-items {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 16px;
}
.delivery-rate-items :deep(.el-rate) {
--el-rate-fill-color: #ffb400;
--el-rate-disabled-fill-color: #ffb400;
}
:deep(.el-rate__icon.is-active) {
color: #ffb400;
}
.goods-eval li {
display: flex;
border-bottom: 1px solid #eee;