Skip to content

Commit 19e0a8f

Browse files
committed
fix:家具评分
1 parent 6e48289 commit 19e0a8f

7 files changed

Lines changed: 62 additions & 28 deletions

File tree

src/assets/css/common/search.less

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,17 @@
268268
}
269269
}
270270

271+
&.is-disabled {
272+
cursor: not-allowed;
273+
274+
.el-checkbox-button__inner,
275+
.el-radio-button__inner {
276+
cursor: not-allowed;
277+
background-color: #e1dfdf;
278+
color: #b8b8b8;
279+
}
280+
}
281+
271282
&.is-checked {
272283
.el-checkbox-button__inner {
273284
box-shadow: none;

src/assets/css/furniture/pc/single.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@
169169
.purple {
170170
background: #b381cc;
171171
}
172+
173+
.score {
174+
width: auto;
175+
min-width: 56px;
176+
background: #81b0cc;
177+
}
172178
}
173179

174180
.u-meta {

src/components/PvxSearch.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,16 @@
5858
<div v-if="fItem.type === 'radio'" class="check-box-wrapper">
5959
<div class="name">{{ fItem.name }}</div>
6060
<el-radio-group v-model="formData[fItem.key]">
61-
<el-radio-button class="type-item"
61+
<el-radio-button
62+
class="type-item"
6263
:class="{ active: radioItem.value === formData[fItem.key] }"
63-
v-for="radioItem in fItem.options" :key="radioItem.type"
64-
:label="radioItem.key">{{ radioItem.value }}</el-radio-button>
64+
v-for="radioItem in fItem.options"
65+
:key="radioItem.key || radioItem.value"
66+
:label="radioItem.key"
67+
:disabled="radioItem.disabled"
68+
>
69+
{{ radioItem.value }}
70+
</el-radio-button>
6571
</el-radio-group>
6672
</div>
6773
</div>

src/components/PvxSearchMobile.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@
103103
class="type-item"
104104
:class="{ active: radioItem.value === formData[fItem.key] }"
105105
v-for="radioItem in fItem.options"
106-
:key="radioItem.type"
106+
:key="radioItem.key || radioItem.value"
107107
:label="radioItem.key"
108-
>{{ radioItem.value }}</el-radio-button
108+
:disabled="radioItem.disabled"
109109
>
110+
{{ radioItem.value }}
111+
</el-radio-button>
110112
</el-radio-group>
111113
</div>
112114
</div>

src/views/furniture/Index.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ export default {
152152
value: "庐园广记",
153153
},
154154
{
155-
key: "isMatch",
156-
value: "园宅会赛",
155+
key: "scoreCostPerformance",
156+
value: "评分性价比",
157+
disabled: true,
157158
},
158159
],
159160
},

src/views/furniture/Single.vue

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,16 @@
1212
{{ data.szName }}
1313
<i class="u-interact" v-if="data.bInteract"></i>
1414
</div>
15-
<div class="u-attrs">
16-
<span class="u-attr" v-if="data.Attribute1"
17-
><span class="u-label blue">观赏</span>{{ data.Attribute1 }}</span
18-
>
19-
<span class="u-attr" v-if="data.Attribute2"
20-
><span class="u-label pink">实用</span>{{ data.Attribute2 }}</span
21-
>
22-
<span class="u-attr" v-if="data.Attribute3"
23-
><span class="u-label yellow">坚固</span>{{ data.Attribute3 }}</span
24-
>
25-
<span class="u-attr" v-if="data.Attribute4"
26-
><span class="u-label green">风水</span>{{ data.Attribute4 }}</span
27-
>
28-
<span class="u-attr" v-if="data.Attribute5"
29-
><span class="u-label purple">趣味</span>{{ data.Attribute5 }}</span
15+
<!-- <div class="u-attrs">
16+
<span class="u-attr" v-if="data.Attribute1"><span class="u-label blue">观赏</span>{{ data.Attribute1 }}</span>
17+
<span class="u-attr" v-if="data.Attribute2"><span class="u-label pink">实用</span>{{ data.Attribute2 }}</span>
18+
<span class="u-attr" v-if="data.Attribute3"><span class="u-label yellow">坚固</span>{{ data.Attribute3 }}</span>
19+
<span class="u-attr" v-if="data.Attribute4"><span class="u-label green">风水</span>{{ data.Attribute4 }}</span>
20+
<span class="u-attr" v-if="data.Attribute5"><span class="u-label purple">趣味</span>{{ data.Attribute5 }}</span>
21+
</div> -->
22+
<div class="u-attrs" v-if="data.Record || data.Record === 0">
23+
<span class="u-attr"
24+
><span class="u-label score">装修评分</span>{{ data.Record }}</span
3025
>
3126
</div>
3227
<div class="u-metas">

src/views/furniture/miniprogram/index.vue

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@
3939
<div v-for="(item, index) in searchProps" :key="index">
4040
<div class="u-filtrate-title">{{ item.name }}</div>
4141
<div class="u-box">
42-
<div class="u-item" :class="{ active: getActiveStatus(item, item2) }"
43-
v-for="(item2, index2) in item.options" :key="index2" @click="
42+
<div
43+
class="u-item"
44+
:class="{ active: getActiveStatus(item, item2), disabled: item2.disabled }"
45+
v-for="(item2, index2) in item.options"
46+
:key="index2"
47+
@click="
4448
setSearchParams(item.key == 'nCatag1Index' ? item.key : item2.paramsKey, item2)
45-
">
49+
"
50+
>
4651
{{ item.key == "nCatag1Index" ? item2.name : item2.value }}
4752
</div>
4853
</div>
@@ -200,9 +205,9 @@ export default {
200205
paramsKey: "isSet",
201206
},
202207
{
203-
key: "1",
204-
value: "园宅会赛",
205-
paramsKey: "isMatch",
208+
key: "scoreCostPerformance",
209+
value: "评分性价比",
210+
disabled: true,
206211
},
207212
],
208213
},
@@ -300,6 +305,8 @@ export default {
300305
return item_c.key == this.queryParams[item_c.paramsKey];
301306
},
302307
setSearchParams(key, item2) {
308+
if (item2.disabled) return;
309+
303310
if (key == "nCatag1Index") {
304311
this.queryParams[key] = item2.id;
305312
return;
@@ -507,6 +514,12 @@ export default {
507514
background: #fedaa3;
508515
}
509516
517+
&.disabled {
518+
cursor: not-allowed;
519+
color: @fontColor-dark3;
520+
background: rgba(255, 255, 255, 0.03);
521+
}
522+
510523
&.top {
511524
.w(calc(calc(100% - 1rem) / 2));
512525
}

0 commit comments

Comments
 (0)