twt 2 anni fa
parent
commit
9ee81ee1ee
5 ha cambiato i file con 94 aggiunte e 53 eliminazioni
  1. 1 1
      pages.json
  2. 7 3
      pages/index/index.vue
  3. 41 20
      pages/shop/confirm.vue
  4. 29 28
      pages/shop/goodsDetail.vue
  5. 16 1
      pages/shop/shop.vue

+ 1 - 1
pages.json

@@ -232,7 +232,7 @@
     ],
 	"tabBar": {
 		"color": "#8a8a8a",
-		"selectedColor": "#FF4F00",
+		"selectedColor": "#D53533",
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"list": [{

+ 7 - 3
pages/index/index.vue

@@ -160,7 +160,11 @@
 					</view>
 					<view class="hotGoodsLineRIght">
 						<view class="goodsName">{{item.name}}</view>
-					    <view class="Sold">已售 {{item.saleQty}}</view>
+					    <view class="Sold">
+							<view v-if="item.showLabel&&item.showLabel.indexOf('2')!=-1">
+								已售 {{item.saleQty}}
+							</view>
+						</view>
 						<view class="goodsPrice">
 							<view class="goodsPrice1">{{item.saleLabel}}</view>
 							<view class="goodsPrice2">¥</view>
@@ -980,8 +984,8 @@
 		font-weight: 400;
 		color: #999999;
 		padding-top: 8rpx;
-		padding-left: 5rpx;
-			text-decoration:line-through;
+		padding-left: 10rpx;
+		text-decoration:line-through;
 	}
 	.Sold{
 		font-weight: 400;

+ 41 - 20
pages/shop/confirm.vue

@@ -34,8 +34,8 @@
 			</view>
 			<view class="contLine">
 				<view class="contlineLeft">车型</view>
-				<view class="contlineRight">
-					<span class="carModel">{{carInfo.carModel}}</span>
+				<view class="contlineRight carModelRight" @click="goCarlist">
+					<span class="carModel">{{carInfo.carModel?carInfo.carModel:'选择车辆'}}</span>
 					<image src="../../static/timg/icon_arrow_right.png" mode="" class="contlineRightJt"></image>
 				</view>
 			</view>
@@ -66,7 +66,7 @@
 	<view style="height:120rpx"></view>
 	<view class="bottomBox">
 		<view class="bottomLeft">
-			<view class="bottomLeftLine">合计: <span>¥</span> <span class="bottomPrice">{{totalMoney}}</span> </view>
+			<view class="bottomLeftLine">合计 <span>¥</span> <span class="bottomPrice">{{totalMoney}}</span> </view>
 			<view class="bottomLeftLine2">总优惠:¥{{yhMoney}}</view>
 		</view>
 		<view class="bottomBtn" @click="submit">提交订单</view>
@@ -94,12 +94,13 @@
 				customerName:'',
 				mobilePhone:'',
 				comment:'',
+				mydata:'',
 			}
 		},
 		onLoad(opt) {
 			this.shopID=opt.shopID;
 			this.shopName=opt.shopName;
-			this.carInfo=this.$store.state.carInfo;
+			
 			this.goodsnum=opt.itemQty;
 			//console.log(this.carInfo)
 			this.userInfo = uni.getStorageSync("userInfo");
@@ -111,8 +112,17 @@
 			]
 			var b=a.map(i=>i.name);
 			console.log(b) */
+			this.$http('openreservation/getInfo', {
+				lat:  '',
+				lng:'',
+			}, 'GET').then(res => {
+				this.mydata = res.data
+			    this.mobilePhone=this.mydata.customerInfo.mobilePhone
+			})
+		},
+		onShow() {
+			this.carInfo=this.$store.state.carInfo;
 		},
-		
 		methods: {
 			submit(){
 				var jsonArray = [];
@@ -225,6 +235,11 @@
 					url:'../index/index'
 				})
 			},
+			goCarlist(){
+				uni.navigateTo({
+					url:'../user/addCar/cailist'
+				})
+			},
 			calculation(type){
 				if(type==1){
 					if(this.goodsnum>1){
@@ -244,14 +259,15 @@
 					if(this.goodsInfo.scribingPrice){
 						var wyh=this.goodsInfo.scribingPrice*this.goodsnum;
 						this.yhMoney=wyh-this.totalMoney;
-						this.yhMoney=this.yhMoney.tofixed(2)
+						console.log(this.yhMoney)
+						this.yhMoney=this.yhMoney.toFixed(2)
 					}else{
 						this.yhMoney=0
 					}
-					this.totalMoney=this.totalMoney.tofixed(2)
+					this.totalMoney=this.totalMoney.toFixed(2)
 				}else{
 					this.totalMoney=this.goodsInfo.scribingPrice*this.goodsnum
-					this.totalMoney=this.totalMoney.tofixed(2)
+					this.totalMoney=this.totalMoney.toFixed(2)
 					this.yhMoney=0
 				}
 			}
@@ -273,7 +289,7 @@
 	bottom: 0;
 }
 .bottomLeft{
-	padding-top: 25rpx;
+	padding-top: 23rpx;
 	padding-left: 30rpx;
 }
 .bottomLeftLine{
@@ -285,6 +301,7 @@
 }
 .bottomPrice{
 	font-size: 32rpx;
+	font-weight: 500;
 }
 .bottomLeftLine2{
 	color: #999999;
@@ -323,12 +340,15 @@
 	
 }
 .carModel{
-	    width: 500rpx;
+	    width: 400rpx;
 	    display: inline-block;
 		white-space: nowrap;
 		overflow: hidden;
 		text-overflow: ellipsis;
 }
+.carModelRight{
+	display: flex;justify-content: space-between;
+}
 .contlineRight{
 	color: #333333;
 	line-height: 40rpx;
@@ -353,13 +373,13 @@
 }
 .topBox{
 	height: 140rpx;
-	background: #FF0000;
+	background: #D53533;
 	width: 750rpx;
 }
 .yuanhu{
 	width: 750rpx;
 	height: 30rpx;
-	background: #FF0000;
+	background: #D53533;
 	border-radius: 0 0 100% 100%;
 }
 .goodsBox{
@@ -397,14 +417,14 @@
 	display: flex;
 }
 .numJj{
-width: 44rpx;
-height: 44rpx;
-background: #F4F5F7;
-border-radius: 0px 6rpx 6rpx 0px;	
-text-align: center;
-line-height: 44rpx;
-font-size: 30rpx;
-color: #F4F5F7;
+	width: 44rpx;
+	height: 44rpx;
+	background: #F4F5F7;
+	border-radius: 0px 6rpx 6rpx 0px;	
+	text-align: center;
+	line-height: 44rpx;
+	font-size: 32rpx;
+	color: #999999;
 }
 .goodsnum{
 	width: 88rpx;
@@ -425,6 +445,7 @@ color: #F4F5F7;
 .goodsPrice{
 	color: #333333;
 	font-size: 32rpx;
+	font-weight: 500;
 }
 .goodsPrice1{
 	color: #333333;

+ 29 - 28
pages/shop/goodsDetail.vue

@@ -13,7 +13,7 @@
 	<view class="shopCont">
 		<view class="shopCtop">
 			<view class="goodsPrice">
-				<view class="goodsPrice1">{{info.saleLabel}}</view>
+				<view class="goodsPrice1" v-if="info.saleLabel">{{info.saleLabel}}</view>
 				<view class="goodsPrice2">¥</view>
 				<view class="goodsPrice3">{{info.salePrice?info.salePrice:info.scribingPrice}}</view>
 				<view class="goodsPrice4" v-if="info.scribingPrice">¥{{info.scribingPrice}}</view>
@@ -87,9 +87,9 @@
 	<view class="goodsDetail" v-if="info.details">
 		<view class="goodsDetailTitle">商品详情</view>
 		<!-- <view v-html="info.details" style="background: #fff;"></view> -->
-		 <rich-text :nodes="info.details" style="font-size: 0px;background: #fff;"></rich-text>
+		 <rich-text :nodes="info.details" style="background: #fff;"></rich-text>
 	</view>
-	<view style="height: 120rpx;"></view>
+	<view style="height: 120rpx;padding-bottom: env(safe-area-inset-bottom)"></view>
 	
 	<view class="bottomBox">
 		<view class="bottomImgBox" @click="goINdex">
@@ -116,9 +116,10 @@
 					</view>
 					<view class="hotGoodsLineRIght">
 						<view class="goodsName2">{{info.name}}</view>
-					    <view class="Sold">已售 {{info.saleQty}}</view>
+					    <view class="Sold" v-if="item.showLabel&&item.showLabel.indexOf('2')!=-1">
+							已售 {{info.saleQty}}</view>
 						<view class="goodsPrice">
-							<view class="goodsPrice11">{{info.saleLabel}}</view>
+							<view class="goodsPrice11" v-if="info.saleLabel">{{info.saleLabel}}</view>
 							<view class="goodsPrice22">¥</view>
 							<view class="goodsPrice33">{{info.salePrice?info.salePrice:info.scribingPrice}}</view>
 							<view class="goodsPrice44" v-if="info.scribingPrice">¥{{info.scribingPrice}}</view>
@@ -261,6 +262,7 @@
 	height: 120rpx;
 	background: #FFFFFF;
 	box-shadow: 0px -2px 10px 0px rgba(153,153,153,0.2000);
+	padding-top: 20rpx;
 }
 .buyBox{
 	width: 750rpx;
@@ -280,7 +282,6 @@
 	line-height: 74rpx;
 	color: #FFFFFF;
 	font-size: 30rpx;
-	margin-top: 23rpx;
 	margin-left: 30rpx;
 }
 .buyShopRightJt{
@@ -310,14 +311,14 @@
 	font-size: 24rpx;
 }
 .numJj{
-width: 44rpx;
-height: 44rpx;
-background: #F4F5F7;
-border-radius: 0px 6rpx 6rpx 0px;	
-text-align: center;
-line-height: 44rpx;
-font-size: 30rpx;
-color: #F4F5F7;
+	width: 44rpx;
+	height: 44rpx;
+	background: #F4F5F7;
+	border-radius: 0px 6rpx 6rpx 0px;	
+	text-align: center;
+	line-height: 44rpx;
+	font-size: 32rpx;
+	color: #999999;
 }
 .bugNUmLeft{
 	display: flex;
@@ -344,13 +345,14 @@ color: #F4F5F7;
 	left: 0;
 	bottom: 0;
 	width: 750rpx;
-	height: 648rpx;
+	height: 688rpx;
 	background: #FFFFFF;
 	border-radius: 26rpx 26rpx 0px 0px;
 }
 .buyNumBox{
 	padding: 30rpx;
     padding-top: 10rpx;
+	padding-top: 70rpx;
 }
 .buyContCh{
 	position: absolute;
@@ -401,13 +403,14 @@ color: #F4F5F7;
 		font-weight: 400;
 		color: #FF0000;
 		padding-top: 8rpx;
+		padding-right: 10rpx;
 	}
 	.goodsPrice22{
 		font-size: 22rpx;
 		font-weight: 400;
 		color: #FF0000;
 		padding-top: 8rpx;
-		padding-left: 5rpx;
+		
 	}
 	.goodsPrice33{
 		font-size: 32rpx;
@@ -420,7 +423,7 @@ color: #F4F5F7;
 		color: #999999;
 		padding-top: 8rpx;
 		padding-left: 5rpx;
-			text-decoration:line-through;
+		text-decoration:line-through;
 	}
 	
 	
@@ -432,6 +435,7 @@ color: #F4F5F7;
 	position: fixed;left: 0;
 	bottom: 0;
 	display: flex;
+	padding-bottom: env(safe-area-inset-bottom);
 }
 .bottomTxt{
 	color: #666666;font-size: 22rpx;
@@ -458,7 +462,6 @@ color: #F4F5F7;
 }
 .goodsDetailTitle{
 	color: #333333;
-	line-height: 42px;
 	font-size: 30rpx;
 	font-weight: 500;
 	background: #FFFFFF;
@@ -523,7 +526,7 @@ color: #F4F5F7;
 	padding: 0 20rpx;
 }
 .fwlcTitle{
-	color: #333333;font-size: 30rpx;
+	color: #333333;font-size: 30rpx;font-weight: 500;
 }
 .fuwuliucBox{
   background: #FFFFFF;
@@ -583,23 +586,19 @@ color: #F4F5F7;
 	font-weight: 400;
 	color: #FF0000;
 	padding-top: 14rpx;
+	padding-right: 14rpx;
 }
 .goodsPrice2{
 	font-size: 28rpx;
 	font-weight: 400;
 	color: #FF0000;
 	padding-top: 10rpx;
-	padding-left: 14rpx;
-}
-.goodsPrice3{
-	font-size:28rpx;
-	font-weight: 400;
-	color: #FF0000;
-	padding-right: 10rpx;
+	
 }
+
 .goodsPrice3{
 	font-size: 40rpx;
-	font-weight: 400;
+	font-weight: 500;
 	color: #FF0000;
 }
 .goodsPrice4{
@@ -607,12 +606,14 @@ color: #F4F5F7;
 	font-weight: 400;
 	color: #999999;
 	padding-top: 14rpx;
+	text-decoration:line-through;
+	padding-left: 10rpx;
 }
 .Sold{
 		font-weight: 400;
 		color: #999999;
 		font-size: 24rpx;
-		padding-top: 16rpx;
+		padding-top: 18rpx;
 }
 .goodsName{
 	font-size: 30rpx;

+ 16 - 1
pages/shop/shop.vue

@@ -54,7 +54,11 @@
 	   				</view>
 	   				<view class="hotGoodsLineRIght">
 	   					<view class="goodsName">{{item.name}}</view>
-	   				    <view class="Sold">已售 {{item.saleQty}}</view>
+	   				    <view class="Sold" >
+							<view v-if="item.showLabel&&item.showLabel.indexOf('2')!=-1">
+								已售 {{item.saleQty}}
+							</view>
+						</view>
 	   					<view class="goodsPrice">
 	   						<view class="goodsPrice1">{{item.saleLabel}}</view>
 	   						<view class="goodsPrice2">¥</view>
@@ -334,6 +338,14 @@
 			this.page++;
 			this.getlistOpenGoodsPage()
 			//console.log("shanglas")
+		},
+		onPullDownRefresh(){
+			this.list=[];
+			this.page=1;
+			this.getlistOpenGoodsPage();
+			setTimeout(() => {
+					uni.stopPullDownRefresh(); // 关闭下拉刷新 
+			}, 2000);
 		}
 	}
 </script>
@@ -483,12 +495,15 @@ z-index: 11;
 		color: #999999;
 		padding-top: 8rpx;
 		text-decoration:line-through;
+		padding-left: 10rpx;
 	}
 	.Sold{
 		font-weight: 400;
 		color: #999999;
 		font-size: 24rpx;
 		padding-top: 8rpx;
+		line-height: 30rpx;
+		height: 30rpx;
 	}
 	.authorizBox{
 		width: 100vw;