Browse Source

2023-8-14

hwq 1 year ago
parent
commit
9915f39ff9
2 changed files with 15 additions and 14 deletions
  1. 2 2
      pages/cart/cart2.vue
  2. 13 12
      pages/product/classify.vue

+ 2 - 2
pages/cart/cart2.vue

@@ -154,8 +154,8 @@
 			async loadData() {
 				let obj = this;
 				getCartList({
-					type:2
-				})
+						type: 2
+					})
 					.then(function(e) {
 						// 获取当前购物车物品增加数量
 						let nub = obj.cartList.length;

+ 13 - 12
pages/product/classify.vue

@@ -12,10 +12,10 @@
 					<view class="old-price">
 						<text class="old">¥{{good.ot_price}}</text>
 						<image src="../../static/icon/down.png" mode=""></image>
-						<text class="zj">直降{{good.price - good.ot_price}}元</text>
+						<text class="zj">直降{{good.ot_price - good.price}}元</text>
 					</view>
 					<view class="integral-wrap">
-						<text class="price">¥{{good.ot_price}}</text>
+						<text class="price">¥{{good.price}}</text>
 					</view>
 				</view>
 				<view class="btn">
@@ -26,12 +26,12 @@
 		<empty v-if="list.length === 0"></empty>
 		<view class="jg"></view>
 		<navigator url="/pages/cart/cart2">
-		<view class="cart">
-			<view class="text" v-if="total>0">
-				{{total}}
+			<view class="cart">
+				<view class="text" v-if="total>0">
+					{{total}}
+				</view>
+				<image class="cart-icon" src="/static/img/cartIcon.png" mode="scaleToFill"></image>
 			</view>
-			<image class="cart-icon" src="/static/img/cartIcon.png" mode="scaleToFill"></image>
-		</view>
 		</navigator>
 	</view>
 </template>
@@ -88,7 +88,7 @@
 					uni.navigateTo({
 						url: '/pages/product/product?isRz=1&id=' + ls.id
 					});
-				}else{
+				} else {
 					uni.navigateTo({
 						url: '/pages/product/product?id=' + ls.id
 					});
@@ -131,12 +131,12 @@
 		position: fixed;
 		right: 30rpx;
 		bottom: 60rpx;
-	
+
 		.cart-icon {
 			width: 150rpx;
 			height: 150rpx;
 		}
-	
+
 		.text {
 			background-color: $color-red;
 			color: #FFF;
@@ -149,8 +149,9 @@
 			text-align: center;
 			border-radius: 99rpx;
 		}
-	
+
 	}
+
 	page {
 		background: $page-color-base;
 	}
@@ -257,4 +258,4 @@
 
 		}
 	}
-</style>
+</style>