Browse Source

2023-5-22

cmy 2 years ago
parent
commit
520afe0f55

+ 1 - 1
pages/home/category.vue

@@ -43,7 +43,7 @@
 										<text class="fen">/{{item.unit_name}}</text>
 										<text class="fen">/{{item.unit_name}}</text>
 									</view>
 									</view>
 								</view>
 								</view>
-								<view class="gocar position-relative" @click.stop="Addcar(item)">
+								<view class="gocar position-relative" v-if="item.is_barrel==0" @click.stop="Addcar(item)">
 									<image src="/static/image/img21.png" mode="scaleToFill"></image>
 									<image src="/static/image/img21.png" mode="scaleToFill"></image>
 									<view class="corner" v-if="item.cart_num > 0">
 									<view class="corner" v-if="item.cart_num > 0">
 										<text>{{ item.cart_num }}</text>
 										<text>{{ item.cart_num }}</text>

+ 2 - 1
pages/home/order.vue

@@ -88,7 +88,7 @@
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
-					<uni-load-more v-if="tabItem.orderList.length>0" :status="tabItem.loadingType"></uni-load-more>
+					<uni-load-more v-if="!(tabItem.orderList.length==0&&tabItem.loaded === true)" :status="tabItem.loadingType"></uni-load-more>
 				</scroll-view>
 				</scroll-view>
 			</swiper-item>
 			</swiper-item>
 		</swiper>
 		</swiper>
@@ -187,6 +187,7 @@
 					navItem.page = 1;
 					navItem.page = 1;
 					navItem.orderList = [];
 					navItem.orderList = [];
 					navItem.loadingType = 'more';
 					navItem.loadingType = 'more';
+					navItem.loaded=false;
 					//tab切换只有第一次需要加载数据
 					//tab切换只有第一次需要加载数据
 				}
 				}
 				if (navItem.loadingType === 'loading') {
 				if (navItem.loadingType === 'loading') {

+ 86 - 22
pages/order/WriteOff.vue

@@ -10,7 +10,8 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="qr-content flex-center">
 			<view class="qr-content flex-center">
-				<uqrcode :loading='loading' :auto='false' :start='false' sizeUnit='rpx' ref="qrcode" canvas-id="qrcode" :value="item.verify_code" size="500"></uqrcode>
+				<uqrcode :loading='loading' :auto='false' :start='false' sizeUnit='rpx' ref="qrcode" canvas-id="qrcode"
+					:value="item.verify_code" size="500"></uqrcode>
 			</view>
 			</view>
 			<view class="text-code">
 			<view class="text-code">
 				{{item.verify_code}}
 				{{item.verify_code}}
@@ -20,6 +21,12 @@
 			<view class="tip-icon top-right"></view>
 			<view class="tip-icon top-right"></view>
 			<view class="tip-icon bottom-right"></view>
 			<view class="tip-icon bottom-right"></view>
 		</view>
 		</view>
+		<view class="flex bottomBox">
+			<view class="buttomBottom" @click="shopLi">
+				联系商家
+			</view>
+			<view class="buttomBottom bgYellow" @click="shopNext">前往商家</view>
+		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -34,7 +41,7 @@
 				item: {
 				item: {
 					verify_code: ''
 					verify_code: ''
 				},
 				},
-				loading:true
+				loading: true
 			};
 			};
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
@@ -48,16 +55,33 @@
 				orderDetail({}, obj.orderId).then(e => {
 				orderDetail({}, obj.orderId).then(e => {
 					obj.item = e.data;
 					obj.item = e.data;
 					obj.$refs.qrcode.make({
 					obj.$refs.qrcode.make({
-					  success: () => {
-						  obj.loading=false;
-					    console.log('生成成功');
-					  },
-					  fail: err => {
-					    console.log(err)
-					  }
+						success: () => {
+							obj.loading = false;
+							console.log('生成成功');
+					 },
+						fail: err => {
+							console.log(err)
+						}
 					});
 					});
 				});
 				});
-			}
+			},
+			// 联系商家
+			shopLi() {
+				uni.makePhoneCall({
+					phoneNumber: this.item.system_store.phone //仅为示例
+				});
+			},
+			// 前往商家
+			shopNext() {
+				// 打开地图导航
+				uni.openLocation({
+					latitude: +this.item.system_store.latitude,
+					longitude: +this.item.system_store.longitude,
+					fail(e) {
+						console.log(e);
+					}
+				})
+			},
 		}
 		}
 	};
 	};
 </script>
 </script>
@@ -66,54 +90,94 @@
 	page {
 	page {
 		background-color: $base-color;
 		background-color: $base-color;
 	}
 	}
-	.qr-box{
+
+	.qr-box {
 		color: $font-color-dark;
 		color: $font-color-dark;
 		background-color: #FFF;
 		background-color: #FFF;
 		text-align: center;
 		text-align: center;
 		margin: 0 30rpx;
 		margin: 0 30rpx;
-		.title-box{
+
+		.title-box {
 			padding-top: 50rpx;
 			padding-top: 50rpx;
 			padding-bottom: 30rpx;
 			padding-bottom: 30rpx;
 			background-color: #F5F5F5;
 			background-color: #F5F5F5;
-			.title{
+
+			.title {
 				font-weight: bold;
 				font-weight: bold;
 				font-size: 44rpx;
 				font-size: 44rpx;
 			}
 			}
-			.tip-text{
+
+			.tip-text {
 				font-size: $font-sm;
 				font-size: $font-sm;
 				color: $font-color-light;
 				color: $font-color-light;
 			}
 			}
 		}
 		}
-		.qr-content{
+
+		.qr-content {
 			padding-top: 110rpx;
 			padding-top: 110rpx;
 		}
 		}
-		.tip-icon{
+
+		.tip-icon {
 			position: absolute;
 			position: absolute;
 			background-color: $base-color;
 			background-color: $base-color;
 			border-radius: 99rpx;
 			border-radius: 99rpx;
 			width: 100rpx;
 			width: 100rpx;
 			height: 100rpx;
 			height: 100rpx;
 		}
 		}
-		.top-left,.bottom-left{
+
+		.top-left,
+		.bottom-left {
 			left: -40rpx;
 			left: -40rpx;
 		}
 		}
-		.top-right,.bottom-right{
+
+		.top-right,
+		.bottom-right {
 			right: -40rpx;
 			right: -40rpx;
 		}
 		}
-		.bottom-left,.bottom-right{
+
+		.bottom-left,
+		.bottom-right {
 			bottom: -40rpx;
 			bottom: -40rpx;
 		}
 		}
-		.top-left,.top-right{
+
+		.top-left,
+		.top-right {
 			top: -40rpx;
 			top: -40rpx;
 		}
 		}
-		.text-code{
+
+		.text-code {
 			font-size: 44rpx;
 			font-size: 44rpx;
 			font-weight: bold;
 			font-weight: bold;
 			padding-top: 60rpx;
 			padding-top: 60rpx;
 			padding-bottom: 110rpx;
 			padding-bottom: 110rpx;
 		}
 		}
 	}
 	}
-	.content{
+
+	.content {
 		padding-top: 90rpx;
 		padding-top: 90rpx;
 	}
 	}
+
+	.bottomBox {
+		justify-content: space-around;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		border-top: 1px solid $border-color-light;
+
+		.buttomBottom {
+			width: 50%;
+			text-align: center;
+			padding: 30rpx 80rpx;
+			line-height: 1;
+			color: $base-color;
+			font-size: $font-base;
+			background-color: #FFF;
+
+			&.bgYellow {
+				color: #FFFFFF;
+				background: $bg-gradual;
+			}
+		}
+	}
 </style>
 </style>

+ 6 - 39
pages/product/common/productBottom.vue

@@ -8,9 +8,9 @@
 			<image class="icon" src="../../../static/icon/goodsAddCart.png" mode="widthFix"></image>
 			<image class="icon" src="../../../static/icon/goodsAddCart.png" mode="widthFix"></image>
 			<text>购物车</text>
 			<text>购物车</text>
 		</view> -->
 		</view> -->
-		<view class="action-btn-group">
-			<button type="primary" class=" action-btn add-cart-btn margin-r-30" @click="buy(2)">加入购物车</button>
-			<button type="primary" class=" action-btn  buy-now-btn margin-r-30" @click="buy(1)">立即购买</button>
+		<view class="action-btn-group flex" >
+			<button type="primary" v-if="goodsObjact.is_barrel==0" class=" action-btn add-cart-btn" @click="buy(2)">加入购物车</button>
+			<button type="primary" class=" action-btn  buy-now-btn" @click="buy(1)">立即购买</button>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -70,39 +70,9 @@ export default {
 	.icon{
 	.icon{
 		width: 50rpx ;
 		width: 50rpx ;
 	}
 	}
-	.p-b-btn {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		font-size: $font-sm;
-		color: $font-color-base;
-		width: 96rpx;
-		height: 80rpx;
-		.iconfont {
-			font-size: 40rpx;
-			line-height: 48rpx;
-			color: $font-color-light;
-		}
-		&.active,
-		&.active .iconfont {
-			color: $uni-color-primary;
-		}
-		.iconlikefill {
-			font-size: 46rpx;
-		}
-		image {
-			width: 56rpx;
-			height: 58rpx;
-		}
-	}
 	.action-btn-group {
 	.action-btn-group {
-		display: flex;
 		height: 76rpx;
 		height: 76rpx;
-		border-radius: 100px;
-		overflow: hidden;
-		margin-left: 20rpx;
-		position: relative;
+		padding-right:30rpx;
 		flex-grow: 1;
 		flex-grow: 1;
 		&:after {
 		&:after {
 			content: '';
 			content: '';
@@ -115,21 +85,18 @@ export default {
 			border-right: 1px solid rgba(255, 255, 255, 0.5);
 			border-right: 1px solid rgba(255, 255, 255, 0.5);
 		}
 		}
 		.action-btn {
 		.action-btn {
-			display: flex;
-			align-items: center;
-			justify-content: center;
 			width: 250rpx;
 			width: 250rpx;
 			height: 100%;
 			height: 100%;
 			font-size: $font-base;
 			font-size: $font-base;
-			padding: 0;
 			border-radius: 100px;
 			border-radius: 100px;
 			flex-grow: 1;
 			flex-grow: 1;
-			background: transparent;
+			margin-left: 30rpx;
 			&.buy-now-btn {
 			&.buy-now-btn {
 				background: linear-gradient(90deg, #3C82E6, #5395F5);
 				background: linear-gradient(90deg, #3C82E6, #5395F5);
 				color: #FFFFFF;
 				color: #FFFFFF;
 			}
 			}
 			&.add-cart-btn {
 			&.add-cart-btn {
+				background: transparent;
 				color: #5395F5;
 				color: #5395F5;
 				border: 1px solid  #5395F5;
 				border: 1px solid  #5395F5;
 			}
 			}

+ 27 - 10
pages/water/waterUse.vue

@@ -12,19 +12,36 @@
 				v-if="navList[tabCurrentIndex].loaded === true && navList[tabCurrentIndex].orderList.length === 0">
 				v-if="navList[tabCurrentIndex].loaded === true && navList[tabCurrentIndex].orderList.length === 0">
 			</empty>
 			</empty>
 			<!-- #endif -->
 			<!-- #endif -->
-			<view class="good flex" v-for="item in navList[tabCurrentIndex].orderList">
-				<image :src="item.product.image" mode="" class="good-image"></image>
-				<view class="right">
-					<view class="good-name ">
-						<view class="clamp2">
-							{{item.product.store_name}}
+			<view @click="navTo( '/pages/order/orderDetail?id=' + item.order_id )"
+				v-for="(item, index) in navList[tabCurrentIndex].orderList" :key="index" class="order-item position-relative">
+				<view class="i-top b-b flex">
+					<view class="order-code flex">
+						<view class="no">
+							订单编号:
+						</view>
+						<view>
+							{{ item.order_id }}
+						</view>
+					</view>
+					<text class="font-size-sm" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
+					<!-- <text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text> -->
+				</view>
+			
+				<scroll-view v-if="item.cartInfo.length > 0" class="goods-box" scroll-x>
+					<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
+						<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill">
+						</image>
+						<view class="good-name clamp">
+							{{goodsItem.productInfo.attrInfo.suk}}*{{goodsItem.cart_num}}
 						</view>
 						</view>
 					</view>
 					</view>
-					<view class="good-key">
-						{{item.product.keyword}}
+				</scroll-view>
+				<view class="info-info">
+					<view class="js">
+						共{{item.cartInfo.length}}件
 					</view>
 					</view>
-					<view class="good-price">
-						剩余<text class="num">{{item.certificate_num}}</text>张
+					<view class="hj">
+						合计:¥{{item.pay_price}}
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>