lilei hai 8 meses
pai
achega
4bdc5e1989
Modificáronse 4 ficheiros con 42 adicións e 24 borrados
  1. 6 4
      pages/index/index.vue
  2. 19 19
      pagesB/cart/index.vue
  3. 1 1
      pagesB/procureOrderList.vue
  4. 16 0
      pagesB/shopiing/productDetail.vue

+ 6 - 4
pages/index/index.vue

@@ -389,8 +389,6 @@
 			},
 			// 初始化页面
 			pageInit(flag){
-				// 获取轮播数据,包括促销活动
-				this.getCarousel()
 				// 已登录
 				if(this.hasLogin){
 					// 已认证用户
@@ -494,6 +492,8 @@
 					this.$store.state.vuex_cartTotal = 0
 					this.showCatTab()
 				}
+				// 获取轮播数据,包括促销活动
+				this.getCarousel(1)
 				// 商品分类
 				this.getGoodType(flag)
 				// 获取推荐产品
@@ -503,6 +503,8 @@
 			showNoShopPage(flag){
 				this.productTypeList = []
 				this.productList = []
+				// 获取轮播数据,包括促销活动
+				this.getCarousel(0)
 				// 隐藏促销模块
 				this.hidePromoTab()
 				// 隐藏tab 购物车,显示tab视频
@@ -653,10 +655,10 @@
 				}
 			},
 			// 轮播图片
-			getCarousel(){
+			getCarousel(flag){
 				this.carouselList = []
 				// 获取所有促销活动数据
-				shopBannerList({}).then(res => {
+				shopBannerList({promoFlag:flag}).then(res => {
 					if(res.status == 200){
 						res.data&&res.data.map(item => {
 							item.image = item.imageUrl

+ 19 - 19
pagesB/cart/index.vue

@@ -352,24 +352,6 @@
 				// 判断是否全选
 				this.isAllChecked()
 			},
-			// 清空购物车
-			clearAll(){
-				const _this = this
-				uni.showModal({
-					title: '提示',
-					content: '确定清空购物车?',
-					confirmText: '确定',
-					success(res) {
-						if(res.confirm){
-							uni.showLoading({
-								title: '正在清空...',
-								mask: true
-							})
-							
-						}
-					}
-				})
-			},
 			// 全选
 			chooseAll(){
 				if(this.allDisabled){
@@ -515,6 +497,21 @@
 						const delSn = cartSn.filter(item => successList.find(k => k.productSn == item.productSn)).map(item => item.cartSn)
 						const removeList = res.data.removeList.map(item => item.productCode)
 						const selloutList = res.data.selloutList.map(item => item.productCode)
+						const promoChangeFlag = res.data.promoChangeFlag
+						// 活动变更
+						if(promoChangeFlag){
+							uni.showModal({
+								title: '提示',
+								content: '促销活动已变更,请刷新?',
+								confirmText:'确定刷新',
+								success(ret) {
+									if(ret.confirm){
+										_this.pageInit()
+									}
+								}
+							})
+							return
+						}
 						console.log(successList,delSn)
 						console.log(removeList,selloutList)
 						// 有已下架或已售罄产品提示
@@ -768,7 +765,8 @@
 						color: #666;
 						display: flex;
 						align-items: center;
-						margin-top: 2px;
+						flex-wrap: wrap;
+						justify-content: flex-end;
 						text{
 							margin-right: 5px;
 						}
@@ -799,6 +797,8 @@
 					.btns{
 						border-radius: 100rpx;
 						height: 36px;
+						padding: 0 10px;
+						min-width: 80px;
 					}
 				}
 			}

+ 1 - 1
pagesB/procureOrderList.vue

@@ -110,7 +110,7 @@
 			},
 			// tabs通知swiper切换
 			tabsChange(index) {
-				if(index != this.swiperCurrent){
+				if(index != this.swiperCurrent && this.status !='loading'){
 					this.list = []
 					this.status = "loading"
 					this.swiperCurrent = index;

+ 16 - 0
pagesB/shopiing/productDetail.vue

@@ -382,6 +382,22 @@
 								})
 								const removeList = res.data.removeList.map(item => item.productCode)
 								const selloutList = res.data.selloutList.map(item => item.productCode)
+								const promoChangeFlag = res.data.promoChangeFlag
+								// 活动变更
+								if(promoChangeFlag){
+									uni.showModal({
+										title: '提示',
+										content: '促销活动已变更,请刷新?',
+										confirmText:'确定刷新',
+										success(ret) {
+											if(ret.confirm){
+												_this.getDetail()
+												_this.showPopu = false
+											}
+										}
+									})
+									return
+								}
 								// 有已下架或已售罄产品提示
 								if(removeList.length || selloutList.length){
 									uni.showModal({