mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-13 20:38:54 +08:00
fix: 增强错误处理与组件逻辑优化
- 在 App.vue 中添加 JSON 解析错误处理,确保站点信息获取的稳定性。 - 更新多个 API 请求,添加 loading 状态管理,提升用户体验。 - 在 Search.vue 中优化热词列表的解析逻辑,增强容错性。 - 改进购物车、地址管理等 API 请求参数,确保一致性与可用性。 - 新增用户中心布局组件,提升用户界面的一致性与可读性。
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<card _Title="优惠券列表" :_Tabs="statusNameList" @_Change="change" />
|
||||
<empty v-if="list.length == 0" />
|
||||
<ul class="coupon-list" v-else>
|
||||
<UserCenterLayout
|
||||
title="优惠券列表"
|
||||
:tabs="statusNameList"
|
||||
:active-tab="activeStatusIndex"
|
||||
@tab-change="change"
|
||||
>
|
||||
<empty v-if="list.length == 0" />
|
||||
<ul class="coupon-list" v-else>
|
||||
<li v-for="(item, index) in list" class="coupon-item" :key="index">
|
||||
<div class="c-left">
|
||||
<div>
|
||||
@@ -29,14 +34,18 @@
|
||||
<i class="circle-top"></i>
|
||||
<i class="circle-bottom"></i>
|
||||
</li>
|
||||
</ul>
|
||||
<el-pagination :total="total"
|
||||
@current-change="changePageNum"
|
||||
class="pageration"
|
||||
@size-change="changePageSize"
|
||||
:page-size="params.pageSize"
|
||||
layout="total, sizes, prev, pager, next"></el-pagination>
|
||||
<el-skeleton v-if="loading" fix></el-skeleton>
|
||||
</ul>
|
||||
<div class="pageration">
|
||||
<el-pagination
|
||||
:total="total"
|
||||
@current-change="changePageNum"
|
||||
@size-change="changePageSize"
|
||||
:page-size="params.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
/>
|
||||
</div>
|
||||
<el-skeleton v-if="loading" fix></el-skeleton>
|
||||
</UserCenterLayout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -64,6 +73,12 @@ export default {
|
||||
list: [], // 优惠券列表
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
activeStatusIndex() {
|
||||
const index = this.statusList.indexOf(this.params.memberCouponStatus);
|
||||
return index > -1 ? index : 0;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
// 获取优惠券列表
|
||||
@@ -204,6 +219,7 @@ export default {
|
||||
}
|
||||
|
||||
.pageration {
|
||||
text-align: right;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user