Commit 3bd8fc9e0bcfd755e648212c7d0a06af71d58e13

Authored by zhiyangdu
1 parent b7c5f452

重置和确定

src/pages/myGiftBox/myGiftBox.vue
... ... @@ -130,8 +130,8 @@
130 130 </div>
131 131 <!-- 重置和确定 -->
132 132 <div class="bottom_btn">
133   - <div class="reset">重置</div>
134   - <div class="confirm">确定</div>
  133 + <div @click="onReset" class="reset">重置</div>
  134 + <div @click="onConfirm" class="confirm">确定</div>
135 135 </div>
136 136 </van-popup>
137 137 </div>
... ... @@ -214,7 +214,7 @@ export default {
214 214 tab_List: [
215 215 { name: "已揽件", status: 0 },
216 216 { name: "运输中", status: 1 },
217   - { name: "派送中", status: 1 }
  217 + { name: "派送中", status: 2 }
218 218 ]
219 219 },
220 220 {
... ... @@ -231,7 +231,8 @@ export default {
231 231 { name: "已关闭", status: 1 }
232 232 ]
233 233 }
234   - ] // 筛选数据
  234 + ], // 筛选数据
  235 + checkBtnList: []
235 236 };
236 237 },
237 238 components: {
... ... @@ -334,8 +335,11 @@ export default {
334 335 this.getorderGiveGiftList();
335 336 }
336 337 },
337   - // 选中按钮
  338 + /**
  339 + * 选中按钮事件
  340 + */
338 341 changBtn(item) {
  342 + this.checkBtnList.push(item.status);
339 343 if (item.show) {
340 344 this.$set(item, "show", false);
341 345 } else {
... ... @@ -343,6 +347,25 @@ export default {
343 347 }
344 348 },
345 349 /**
  350 + * 重置
  351 + */
  352 + onReset() {
  353 + this.screenList.forEach((obj, index)=>{
  354 + for(let item of obj.tab_List){
  355 + if (item.show) {
  356 + this.$set(item, "show", false);
  357 + }
  358 + }
  359 + });
  360 + },
  361 + /**
  362 + * 确定
  363 + */
  364 + onConfirm() {
  365 + // 获取选中的btn状态集合
  366 + let btnList = this.checkBtnList.join(",");
  367 + },
  368 + /**
346 369 * 下啦滑动加载更多
347 370 */
348 371 onInfiniteScroll() {
... ...