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

@@ -311,18 +311,16 @@ export default {
getDataList(val) {
if (val) this.form = {};
this.loading = true;
getArticle(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.total = res.result.total;
this.data = [];
if (res.result.records.length > 0) {
this.data = res.result.records;
getArticle(this.searchForm)
.then((res) => {
if (res.success) {
this.total = res.result.total;
this.data = res.result.records?.length ? res.result.records : [];
}
}
});
this.total = this.data?.length;
this.loading = false;
})
.finally(() => {
this.loading = false;
});
},
handleSubmit() {
this.$refs.form.validate((valid) => {

View File

@@ -8,28 +8,35 @@
:rules="ruleValidate"
>
<el-form-item label="热词默认配置" prop="hotWordsSettingItems">
<div
class="item-label"
v-for="(item, index) in formValidate.hotWordsSettingItems"
:key="index"
>
<div>
<div class="item-keyword">
<div>热词:</div>
<el-input v-model="item.keywords" />
<div class="hotwords-config">
<div
class="item-label"
v-for="(item, index) in formValidate.hotWordsSettingItems"
:key="index"
>
<div class="item-fields">
<div class="item-keyword">
<div>热词:</div>
<el-input v-model="item.keywords" />
</div>
<div class="item-score">
<div>分数:</div>
<el-input-number :max="5" :min="0" v-model="item.score" />
</div>
</div>
<div class="item-score">
<div>分数:</div>
<el-input-number :max="5" :min="0" v-model="item.score" />
<div class="item-actions">
<el-button
type="primary"
@click="formValidate.hotWordsSettingItems.splice(index, 1)"
>
删除
</el-button>
<el-button v-if="index === formValidate.hotWordsSettingItems.length - 1" @click="addSetItem">
添加配置
</el-button>
</div>
</div>
<div>
<el-button type="primary" @click="formValidate.hotWordsSettingItems.splice(index, 1)">
删除
</el-button>
</div>
</div>
<el-button @click="addSetItem">添加配置</el-button>
</el-form-item>
<el-form-item label="每日持久化热词数量" prop="saveNum">
<el-input-number :min="0" v-model="formValidate.saveNum" />
@@ -109,8 +116,21 @@ export default {
margin-bottom: 10px;
display: flex;
align-items: center;
width: 500px;
width: 560px;
justify-content: space-between;
gap: 12px;
}
.item-fields {
flex: 1;
min-width: 0;
}
.item-actions {
display: flex;
align-items: center;
gap: 10px;
flex-shrink: 0;
}
.item-keyword,