|
32 | 32 | </section>
|
33 | 33 | <section class="category_right">
|
34 | 34 | <ul>
|
35 |
| - <li v-for="(item, index) in categoryDetail" v-if="index" :key="item.id" class="category_right_li" @click="getCategoryIds(item.id, item.name)" :class="{category_right_choosed: restaurant_category_ids == item.id || (!restaurant_category_ids)&&index == 0}"> |
| 35 | + <li v-for="(item, index) in categoryDetail" v-if="index" :key="index" class="category_right_li" @click="getCategoryIds(item.id, item.name)" :class="{category_right_choosed: restaurant_category_ids == item.id || (!restaurant_category_ids)&&index == 0}"> |
36 | 36 | <span>{{item.name}}</span>
|
37 | 37 | <span>{{item.count}}</span>
|
38 | 38 | </li>
|
|
137 | 137 | <section style="width: 100%;">
|
138 | 138 | <header class="filter_header_style">配送方式</header>
|
139 | 139 | <ul class="filter_ul">
|
140 |
| - <li v-for="item in Delivery" :key="item.id" class="filter_li" @click="selectDeliveryMode(item.id)"> |
| 140 | + <li v-for="(item, index) in Delivery" :key="index" class="filter_li" @click="selectDeliveryMode(item.id)"> |
141 | 141 | <svg :style="{opacity: (item.id == 0)&&(delivery_mode !== 0)? 0: 1}">
|
142 | 142 | <use xmlns:xlink="http://www.w3.org/1999/xlink" :xlink:href="delivery_mode == item.id? '#selected':'#fengniao'"></use>
|
143 | 143 | </svg>
|
|
148 | 148 | <section style="width: 100%;">
|
149 | 149 | <header class="filter_header_style">商家属性(可以多选)</header>
|
150 | 150 | <ul class="filter_ul" style="paddingBottom: .5rem;">
|
151 |
| - <li v-for="(item,index) in Activity" :key="item.id" class="filter_li" @click="selectSupportIds(index, item.id)"> |
| 151 | + <li v-for="(item,index) in Activity" :key="index" class="filter_li" @click="selectSupportIds(index, item.id)"> |
152 | 152 | <svg v-show="support_ids[index].status" class="activity_svg">
|
153 | 153 | <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#selected"></use>
|
154 | 154 | </svg>
|
@@ -284,6 +284,7 @@ export default {
|
284 | 284 | },
|
285 | 285 | //选中Category右侧列表的某个选项时,进行筛选,重新获取数据并渲染
|
286 | 286 | getCategoryIds(id, name) {
|
| 287 | + console.log(id, name) |
287 | 288 | this.restaurant_category_ids = id;
|
288 | 289 | this.sortBy = "";
|
289 | 290 | this.foodTitle = this.headTitle = name;
|
|
0 commit comments