Răsfoiți Sursa

订单数量/今日特惠接口联调

zhaoxw 4 ani în urmă
părinte
comite
fa56039c0a

+ 23 - 4
pages/index/index.vue

@@ -48,7 +48,11 @@
 			</view>
 		</view>
 		<view class="index-title">
-			<view class="title-text">今日特惠</view>
+			<view class="title-text" @click="goToGoodList(null, 5)">今日特惠
+			    <view class="circular">
+			    	<text class="iconfont iconfangxiang"></text>
+			    </view>
+			</view>
 			<view class="title-tip">精品特价,限量抢购</view>
 		</view>
 		<view class="content-box" style="width: calc(100% - 24px);margin-left: 12px; display: flex;justify-content: space-between;">
@@ -152,8 +156,8 @@
 						type: 'warning',
 					})
 				})
-				NET.request(API.getPreferentialGoods, {}, 'GET').then(res => {
-					this.discountList = res.data
+				NET.request(API.getPreferentialGoods + '/1/2', {}, 'GET').then(res => {
+					this.discountList = res.data.list
 				}).catch(error => {
 					this.$refs.uTips.show({
 						title: '获取今日特惠商品列表失败',
@@ -280,10 +284,25 @@
 			.title-text {
 				height: 20px;
 				margin-bottom: 2px;
-				line-height: 20px;
+				line-height: 16px;
 				font-size: 15px;
 				font-family: PingFang SC;
 				color: #56a83a;
+				.circular {
+					width: 16px;
+					height: 16px;
+					background-color: #56a83a;
+					border-radius: 50%;
+					margin-left: 6px;
+					text-align: right;
+					display: inline-grid;
+				
+					.iconfont {
+						font-size: 14px;
+						color: #FFFFFF;
+						font-weight: bold;
+					}
+				}
 			}
 
 			.title-tip {

+ 52 - 4
pages/user/index.vue

@@ -38,19 +38,27 @@
 			</view>
 			<view class="order-box">
 				<view class="order-item" @click="orderClick(2)">
-					<view class="iconfont icondaifukuan order-item-icon"></view>
+					<view class="iconfont icondaifukuan order-item-icon">
+						<view v-if="num.unPay" class="order-item-icon-num">{{num.unPay}}</view>
+					</view>
 					<view class="order-item-text">待付款</view>
 				</view>
 				<view class="order-item" @click="orderClick(3)">
-					<view class="iconfont icondaifahuo order-item-icon"></view>
+					<view class="iconfont icondaifahuo order-item-icon">
+						<view v-if="num.unSend" class="order-item-icon-num">{{num.unSend}}</view>
+					</view>
 					<view class="order-item-text">待发货</view>
 				</view>
 				<view class="order-item" @click="orderClick(4)">
-					<view class="iconfont icondaishouhuo order-item-icon"></view>
+					<view class="iconfont icondaishouhuo order-item-icon">
+						<view v-if="num.unReceive" class="order-item-icon-num">{{num.unReceive}}</view>
+					</view>
 					<view class="order-item-text">待收货</view>
 				</view>
 				<view class="order-item" @click="orderClick(5)">
-					<view class="iconfont icondaipingjia order-item-icon"></view>
+					<view class="iconfont icondaipingjia order-item-icon">
+						<view v-if="num.unComment" class="order-item-icon-num">{{num.unComment}}</view>
+					</view>
 					<view class="order-item-text">待评价</view>
 				</view>
 			</view>
@@ -90,6 +98,12 @@
 					totalIntegral: '',
 					memberCouponNo: '',
 				},
+				num: {
+					unComment: 0, // 待评价
+					unPay: 0,  // 待付款
+					unReceive: 0, // 待收货
+					unSend: 0 // 待发货
+				}
 			}
 		},
 		onLoad() {
@@ -97,6 +111,7 @@
 		},
 		onShow() {
 			this.getBaseData()
+			this.getNum()
 		},
 		onPullDownRefresh() {
 			this.getBaseData()
@@ -116,6 +131,24 @@
 					})
 				})
 			},
+			// 获取订单数量
+			getNum() {
+				NET.request(API.getOrderNum, {}, 'GET').then(res => {
+					if (res.isSuccess) {
+					    this.num = res.data
+					} else {
+						this.$refs.uTips.show({
+							title: res.msg,
+							type: 'warning',
+						})
+					}
+				}).catch(error => {
+					this.$refs.uTips.show({
+						title: '获取个人信息失败',
+						type: 'warning',
+					})
+				})
+			},
 			//  我的种植
 			entrustClick() {
 				uni.navigateTo({
@@ -274,6 +307,21 @@
 					.order-item-icon {
 						color: #52A63A;
 						font-size: 30px;
+						display: flex;
+						position: relative;
+						.order-item-icon-num {
+							background: #ffffff;
+							width: 22px;
+							height: 20px;
+							font-size: 12px;
+							border-radius: 50%;
+							color: #52A63A;
+							text-align: center;
+							position: absolute; 
+							left: 20px;
+							border: 1px solid #52A63A;
+							line-height: 20px;
+						}
 					}
 
 					.order-item-text {

+ 1 - 1
pagesGood/goodList.vue

@@ -56,7 +56,7 @@
 			this.goodName = options.goodName ? options.goodName : ''
 			this.goodType = options.goodType
 			uni.setNavigationBarTitle({
-				title: this.goodType == 1 ? '商品列表' : (this.goodType == 3 ? '自助采摘' : (this.goodType == 4 ? '共享种植' : '拍卖'))
+				title: this.goodType == 1 ? '商品列表' : (this.goodType == 3 ? '自助采摘' : (this.goodType == 4 ? '共享种植' : this.goodType == 5 ? '今日特惠' :  '拍卖'))
 			});
 			this.getGoodsList()
 		},

+ 0 - 1
pagesGood/orderPay.vue

@@ -300,7 +300,6 @@
 						if (res.isSuccess) {
 							if (res.data) {
 								this.orderId = res.data.orderId
-								debugger
 								if (paySum == '0.00') {
 								    this.$refs.uTips.show({
 								    	title: '购买成功',

+ 19 - 3
pagesMain/logisticsDeatil.vue

@@ -5,7 +5,8 @@
 			<view class="express-text">物流单号:{{expressData.logisticCode}}</view>
 		</view>
 		<view class="express-list">
-			<uni-steps :options="expressList" active-color="#008AFF" direction="column" :active="0"></uni-steps>
+			<u-steps :list="expressList" :current="0" active-color="#008AFF" direction="column"></u-steps>
+			<!-- <uni-steps :options="expressList" active-color="#008AFF" direction="column" :active="0"></uni-steps> -->
 		</view>
 	</view>
 </template>
@@ -31,8 +32,9 @@
 				}
 				this.expressList = res.data.traces.map(site => {
 					return {
-						title: site.acceptStation,
-						desc: site.acceptTime
+						// title: site.acceptStation,
+						// desc: site.acceptTime,
+						name: site.acceptStation+'\n' +site.acceptTime,
 					}
 				})
 			}).catch(error => {
@@ -150,4 +152,18 @@
 			}
 		}
 	}
+	/deep/ .u-line-1 {
+				overflow: unset;
+				white-space: normal;
+				text-overflow: unset;
+				flex: 1;
+				// line-height:18px;
+				margin-bottom: 15px;
+				text-align: start;
+				font-size: 12px;
+			}
+	/deep/ .u-steps .u-steps__item--column .u-steps__item__line {
+				height: 100% !important;
+				top: 55% !important;
+			}
 </style>

+ 1 - 0
pagesMain/orderDetail.vue

@@ -268,6 +268,7 @@
 						}]
 				}
 				if (this.orderData.orderStatus == 4 && this.orderData.evaluateReplyStatus == 1) {
+					if (this.orderData.orderType !=3 && this.orderData.orderType !=4)
 					this.buttonGroup.push({
 						text: '评价',
 						backgroundColor: '#52A63A',

+ 7 - 5
pagesMain/orderItem.vue

@@ -3,7 +3,7 @@
 		<view class="shop-info" v-if="orderData" @click.stop="gotoShop()">
 			<text class="iconfont icondianpu"></text>
 			<text class="shop-name">{{orderData.supplierName}}</text>
-			<text class="iconfont iconfangxiang"></text>
+			<text class="iconfont iconfangxiang" v-if="orderData.tenantCode != 'admin'"></text>
 			<text class="order-type">{{orderData.auctionStatus == null ? getOrderType(orderData.orderStatus) : getAuctionType(orderData.auctionStatus)}}</text>
 		</view>
 		<view class="goods-list" v-if="orderData">
@@ -91,10 +91,12 @@
 		methods: {
 			//  跳转商铺
 			gotoShop() {
-				if (this.orderData.products.length) {
-					uni.navigateTo({
-						url: '/pagesGood/shopDetails?goodId=' + this.orderData.products[0].productId
-					});
+				if (this.orderData.tenantCode != 'admin') {
+				    if (this.orderData.products.length) {
+				    	uni.navigateTo({
+				    		url: '/pagesGood/shopDetails?goodId=' + this.orderData.products[0].productId
+				    	});
+				    }	
 				}
 			},
 			//  获取订单总价