feat: 增强组件功能与样式优化

- 在多个组件中添加了新的属性和方法以提升功能性,如在卡片组件中引入 _ActiveTab 属性以管理活动标签。
- 优化了商品详情和商户页面的收藏逻辑,确保在未登录状态下引导用户登录。
- 更新了轮播组件的路由解析逻辑,增强了用户体验。
- 改进了投诉列表和收藏列表的样式,提升了响应式布局和可读性。
- 在全局配置中添加了对开发环境的错误处理,提升了调试体验。
This commit is contained in:
田香琪
2026-06-25 16:52:46 +08:00
parent 1b2e980fb6
commit ec948b5496
86 changed files with 1741 additions and 1050 deletions

View File

@@ -10,7 +10,7 @@
{{ item.name }}
</el-breadcrumb-item>
</el-breadcrumb>
<div class="store-collect" v-if="!takeDownSale">
<div class="store-collect" v-if="!takeDownSale && goodsMsg.data">
<span class="mr_10" v-if="goodsMsg.data">
<router-link :to="'Merchant?id=' + goodsMsg.data.storeId">{{
goodsMsg.data.storeName
@@ -176,14 +176,23 @@ export default {
},
async collect () {
// 收藏店铺
const storeId = this.goodsMsg.data && this.goodsMsg.data.storeId;
if (!storeId) {
return;
}
if (!this.Cookies.getItem("userInfo")) {
this.$Message.warning("请先登录");
this.$router.push("/login");
return;
}
if (this.storeCollected) {
let cancel = await cancelStoreCollect("STORE", this.goodsMsg.data.storeId);
let cancel = await cancelStoreCollect("STORE", storeId);
if (cancel.success) {
this.$Message.success("已取消收藏");
this.storeCollected = false;
}
} else {
let collect = await collectStore("STORE", this.goodsMsg.data.storeId);
let collect = await collectStore("STORE", storeId);
if (collect.code === 200) {
this.storeCollected = true;
this.$Message.success("收藏店铺成功,可以前往个人中心我的收藏查看");