Pārlūkot izejas kodu

商城筛选修改

hwb0 3 gadi atpakaļ
vecāks
revīzija
67308b21ed
1 mainītis faili ar 25 papildinājumiem un 4 dzēšanām
  1. 25 4
      pages/core/index.vue

+ 25 - 4
pages/core/index.vue

@@ -168,6 +168,7 @@
 				screenIndex: 0,
 				priceShow: false,
 				priceSort: null,
+				priceStep: 0,
 				screenShow: false,
 				initData: {},
 				coinNum:{
@@ -364,12 +365,19 @@
 				})
 			},
 			
-			
 			// 切换分类
 			changeClassify(e) {
-				console.log(e);
 				this.categoryId = e.categoryId
 				this.classifyIndex = e.index
+				this.screenIndex = 0
+				this.priceStep = 0
+				this.priceShow = false
+				this.priceSort = null
+				this.coinActionIndex = 0
+				this.screenShow = false
+				this.coinNum.endPrice = null
+				this.coinNum.startPrice = null
+				this.coinActionInfo = {}
 				this.pageList()
 			},
 			
@@ -377,10 +385,23 @@
 			changeScreen(num) {
 				this.screenIndex = num
 				if(num == 1) {
-					this.priceShow = !this.priceShow
-					this.priceSort = this.priceShow ? 1 : 2
+					if(this.priceStep == 0) {
+						this.priceStep ++
+						this.priceShow = true
+						this.priceSort = 1
+					} else if (this.priceStep == 1) {
+						this.priceStep ++
+						this.priceShow = false
+						this.priceSort = 2
+					} else if(this.priceStep == 2) {
+						this.priceStep = 0
+						this.priceShow = false
+						this.priceSort = null
+						this.screenIndex = 0
+					}
 					this.pageList()
 				} else if (num == 2) {
+					this.priceStep = 0
 					this.screenShow = !this.screenShow
 					this.priceShow = false
 					this.priceSort = null