Pārlūkot izejas kodu

Merge branch 'master' of http://git.huaml.com/zhh/front-end

shish 2 mēneši atpakaļ
vecāks
revīzija
b1f757fa18

+ 10 - 8
ghsPad/src/pages/home/components/leftArea.vue

@@ -306,15 +306,16 @@ export default {
         flex: 1;
         height: 0;
         border: 1px solid #eee;
+        background-color: #f3f6f4;
         & .show-item_box {
-            padding: 2upx;
+            padding: 3upx 4upx;
             position: relative;
             overflow: hidden;
             .delete-btn {
                 position: absolute;
-                top: 3upx;
-                right: 3upx;
-                bottom: 3upx;
+                top: 4upx;
+                right: 5upx;
+                bottom: 4upx;
                 width: 40upx;
                 display: flex;
                 align-items: center;
@@ -322,7 +323,7 @@ export default {
                 color: #FFFFFF;
                 font-size: 12upx;
                 background-color: #f56c6c;
-                border-radius: 2upx;
+                border-radius: 4upx;
             }
             & .item-body_box {
                 position: relative;
@@ -333,6 +334,7 @@ export default {
                 border-bottom: 3upx solid transparent;
                 transition: transform 0.2s;
                 z-index: 1;
+                box-shadow: 0 2upx 8upx rgba(0, 0, 0, 0.08);
                 &.is-swiped {
                     transform: translateX(-42upx);
                 }
@@ -340,10 +342,10 @@ export default {
                     border-bottom-color: #3385FF;
                 }
                 &.active {
-                    background-color: #d4d6d6;
+                    background-color: #ffffff;
                 }
                 &.not-active {
-                    background-color: #e7e9e9;
+                    background-color: #ffffff;
                 }
                 .item-price-num{
                     color:green;
@@ -398,4 +400,4 @@ export default {
         justify-content: space-around;
     }
 }
-</style>
+</style>

+ 27 - 20
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -680,26 +680,33 @@ export default {
 					return
 				}
                 
-				// 请求后端接口,获取限购花材信息
-				// let newList = list.map(item => {
-				// 	return {
-				// 		id: item.id,
-				// 		bigCount: item.bigCount,
-				// 		//smallCount: item.smallCount
-				// 	}
-				// })
-				// getLimitBuyInfo({ghsId: this.options.id, list: newList}).then(res => {
-				// 	const limitBuyInfo = Array.isArray(res.data) ? res.data : []
-				// 	const warnList = limitBuyInfo.filter(item => item.specialPrice === false && item.reachLimitBuyNum === true)
-				// 	if(warnList.length > 0){
-				// 		this.limitBuyWarnList = warnList
-				// 		this.cartItemShow = true
-				// 		this.$msg("有花材超出限购")
-				// 		return
-				// 	}
-				// 	this.limitBuyWarnList = []
-				// 	this.setLimitBuyInfoByType({ type: this.pageType, info: limitBuyInfo });
-				// })
+				// 请求后端接口,获取限购花材信息(仅 limitBuy > 0 的项参与校验)
+				let newList = list
+					.filter(item => Number(item.limitBuy) > 0)
+					.map(item => {
+						return {
+							id: item.id,
+							bigCount: item.bigCount,
+							//smallCount: item.smallCount
+						}
+					})
+				if (newList.length > 0) {
+					getLimitBuyInfo({ghsId: this.options.id, list: newList}).then(res => {
+						const limitBuyInfo = Array.isArray(res.data) ? res.data : []
+						const warnList = limitBuyInfo.filter(item => item.specialPrice === false && item.reachLimitBuyNum === true)
+						if(warnList.length > 0){
+							this.limitBuyWarnList = warnList
+							this.cartItemShow = true
+							this.$msg("有花材超出限购")
+							return
+						}
+						this.limitBuyWarnList = []
+						this.setLimitBuyInfoByType({ type: this.pageType, info: limitBuyInfo });
+					})
+				} else {
+					this.limitBuyWarnList = []
+					this.setLimitBuyInfoByType({ type: this.pageType, info: [] });
+				}
 				this.setSelectInfoByType({ type: this.pageType, info: list });
 				this.pageTo({url: '/admin/billing/affirmGhs?id='+this.options.id,type: 2})
 			} else {

+ 10 - 8
hdPad/src/pages/home/components/leftArea.vue

@@ -310,15 +310,16 @@ export default {
         flex: 1;
         height: 0;
         border: 1px solid #eee;
+        background-color: #f3f6f4;
         & .show-item_box {
-            padding: 2upx;
+            padding: 3upx 4upx;
             position: relative;
             overflow: hidden;
             .delete-btn {
                 position: absolute;
-                top: 3upx;
-                right: 3upx;
-                bottom: 3upx;
+                top: 4upx;
+                right: 5upx;
+                bottom: 4upx;
                 width: 40upx;
                 display: flex;
                 align-items: center;
@@ -326,7 +327,7 @@ export default {
                 color: #FFFFFF;
                 font-size: 12upx;
                 background-color: #f56c6c;
-                border-radius: 2upx;
+                border-radius: 4upx;
             }
             & .item-body_box {
                 position: relative;
@@ -337,6 +338,7 @@ export default {
                 border-bottom: 3upx solid transparent;
                 transition: transform 0.2s;
                 z-index: 1;
+                box-shadow: 0 2upx 8upx rgba(0, 0, 0, 0.08);
                 &.is-swiped {
                     transform: translateX(-42upx);
                 }
@@ -344,10 +346,10 @@ export default {
                     border-bottom-color: #8abf8a;
                 }
                 &.active {
-                    background-color: #d4d6d6;
+                    background-color: #ffffff;
                 }
                 &.not-active {
-                    background-color: #e7e9e9;
+                    background-color: #ffffff;
                 }
                 .item-price-num{
                     color:green;
@@ -402,4 +404,4 @@ export default {
         justify-content: space-around;
     }
 }
-</style>
+</style>

+ 25 - 18
mallApp/src/pages/item/item.vue

@@ -513,24 +513,31 @@ export default {
 					this.$msg("缺少店铺信息")
 					return
 				}
-				// let newList = list.map(item => {
-				// 	return {
-				// 		id: item.id,
-				// 		bigCount: item.bigCount
-				// 	}
-				// })
-				// getLimitBuyInfo({ ghsId, list: newList }).then(res => {
-				// 	const limitBuyInfo = Array.isArray(res.data) ? res.data : []
-				// 	const warnList = limitBuyInfo.filter(item => item.specialPrice === false && item.reachLimitBuyNum === true)
-				// 	if (warnList.length > 0) {
-				// 		this.limitBuyWarnList = warnList
-				// 		this.cartItemShow = true
-				// 		this.$msg("有花材超出限购")
-				// 		return
-				// 	}
-				// 	this.limitBuyWarnList = []
-				// 	this.setLimitBuyInfoByType({ type: this.pageType, info: limitBuyInfo });
-				// })
+				let newList = list
+					.filter(item => Number(item.limitBuy) > 0)
+					.map(item => {
+						return {
+							id: item.id,
+							bigCount: item.bigCount
+						}
+					})
+				if (newList.length > 0) {
+					getLimitBuyInfo({ ghsId, list: newList }).then(res => {
+						const limitBuyInfo = Array.isArray(res.data) ? res.data : []
+						const warnList = limitBuyInfo.filter(item => item.specialPrice === false && item.reachLimitBuyNum === true)
+						if (warnList.length > 0) {
+							this.limitBuyWarnList = warnList
+							this.cartItemShow = true
+							this.$msg("有花材超出限购")
+							return
+						}
+						this.limitBuyWarnList = []
+						this.setLimitBuyInfoByType({ type: this.pageType, info: limitBuyInfo });
+					})
+				} else {
+					this.limitBuyWarnList = []
+					this.setLimitBuyInfoByType({ type: this.pageType, info: [] });
+				}
 				this.setSelectInfoByType({ type: this.pageType, info: list });
 				let account = this.option.account ? this.option.account : 0
 				this.pageTo({url: '/pages/billing/affirmGhs?account='+account+'&hdId='+this.hdId,type:2})