Эх сурвалжийг харах

卡密商品订单详情页样式调整

lsx 2 жил өмнө
parent
commit
2858113fca

+ 16 - 15
src/packageGoods/order/detail.vue

@@ -41,7 +41,8 @@
 				<view class="info">
 					<view class="info-title ells">{{ item.title }}</view>
 					<view class="info-num flex">
-						<view class="info-num-sku ells-one">规格:{{ item.properties || '-' }}</view>
+						<view class="info-num-sku ells-one" v-if="info.type === 1">规格:{{ item.properties || '-' }}</view>
+						<view class="info-num-sku ells-one" v-else></view>
 						<view class="info-num-goods">共{{ item.goodsNum }}件</view>
 					</view>
 				</view>
@@ -314,15 +315,15 @@
 			copyOrderId() {
 				uni.setClipboardData({
 					data: this.info.orderId,
-				});
-				// #ifdef MP-ALIPAY
-				this.$refs.uToast.show({
-					message: "内容已复制"
-				})
+				});
+				// #ifdef MP-ALIPAY
+				this.$refs.uToast.show({
+					message: "内容已复制"
+				})
 				// #endif
 			},
 
-			copyUseLink(data) {
+			copyUseLink(data) {
 				uni.setClipboardData({
 					data
 				});
@@ -333,7 +334,7 @@
 				// #endif
 			},
 
-			copyCardNo(data) {
+			copyCardNo(data) {
 				uni.setClipboardData({
 					data
 				});
@@ -344,7 +345,7 @@
 				// #endif
 			},
 
-			copyCardPwd(data) {
+			copyCardPwd(data) {
 				uni.setClipboardData({
 					data
 				});
@@ -690,12 +691,12 @@
 			&-card {
 				padding: 0 34rpx;
 
-				.cardList {
-					border-bottom: 2rpx solid #eee;
-					padding: 20rpx 0 10rpx 0;
+				.cardList {
+					border-bottom: 2rpx solid #eee;
+					padding: 20rpx 0 10rpx 0;
 				}
-				.cardList:first-child {
-					border-bottom: none;
+				.cardList:first-child {
+					border-bottom: none;
 				}
 				.card {
 					color: #999;
@@ -792,4 +793,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 19 - 15
src/packagePrize/prize/index.vue

@@ -64,7 +64,8 @@
 							<view class="desc flex">
 								<view class="ells title">{{ item.title }}</view>
 								<view class="num flex">
-									<view class="sku ells-one">规格:{{ item.properties || '-' }}</view>
+									<view class="sku ells-one" v-if="item.goodsType === 1">规格:{{ item.properties || '-' }}</view>
+									<view class="sku ells-one" v-else></view>
 									<view class="">共{{ item.goodsNum }}件</view>
 								</view>
 							</view>
@@ -409,12 +410,10 @@
 					})
 				}
 				let bool = this.list.every(res => res.checked ? item.goodsType == res.goodsType : item.goodsType)
-				if(bool){
-					this.$set(item, 'checked', e)
-				}else if(!bool && e == true){
-					uni.$u.toast('实物商品和卡密商品不能同时提货');
-					this.$set(item, 'checked', false)
+				if(!bool && e == true) {
+					uni.$u.toast('实物商品和卡密商品不能同时提货')
 				}
+        this.$set(item, 'checked', e)
 				let flag = this.list.every(item => item.checked == true)
 				this.checkedAll = flag
 				this.$forceUpdate()
@@ -438,6 +437,20 @@
 			// 立即提货
 			toSettlement() {
 				let arr = []
+        this.list.forEach(item => {
+          if (item.checked) {
+            arr.push(item)
+          }
+        })
+        if (!arr.length) {
+          uni.$u.toast('请选择商品');
+          return
+        }
+        let bool = this.list.every(res => res.checked ? arr[0].goodsType === res.goodsType : arr[0].goodsType)
+        if(!bool){
+          uni.$u.toast('实物商品和卡密商品不能同时提货');
+          return;
+        }
 				for (var i = 0; i < this.list.length; i++) {
 					//选中 && 是多sku && 不为盲豆兑换 && sku为空
 					if(this.list[i].checked && this.list[i].isMoreSku == 1 && this.list[i].inType.value != 2 && this.list[i].properties == ""){
@@ -480,15 +493,6 @@
 							})
 						return
 					}
-				} 
-				this.list.forEach(item => {
-					if (item.checked) {
-						arr.push(item)
-					}
-				})
-				if (!arr.length) {
-					uni.$u.toast('请选择商品');
-					return
 				}
 				uni.showLoading({
 					title: '提货中'