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

Signed-off-by: liuboyan <632697560@qq.com>
简洁的备注

liuboyan 4 жил өмнө
parent
commit
2ac994ecfb

+ 2 - 0
config/api.js

@@ -95,6 +95,8 @@ module.exports = {
 	getMessageList: WX_API_BASE + 'app/order/user/my/orderList/orderDetail/leaMsgList/',
 	//  发布留言
 	addMessage: WX_API_BASE + 'app/order/user/my/orderList/orderDetail/leaMsgList/addLeaMsg',
+	//  查询物流信息
+	getLogisticsDeatil: WX_API_BASE + 'app/order/getShippingTrace/',
 	
 	
 	//  查询共享种植委托列表

+ 54 - 2
pagesGood/evaluateList.vue

@@ -5,15 +5,22 @@
 				<cover-image class="assess-head" :src="item.headimg"></cover-image>
 				<view class="assess-info">
 					<view class="assess-name">{{item.nickname}}</view>
-					<view class="assess-date">{{item.replyTime}}</view>
+					<view class="assess-date">{{item.evaluateTime}}</view>
 					<view class="assess-sore-box">
 						<u-rate v-model="item.score" active-color="#FFAE21"></u-rate>
 					</view>
-					<view class="assess-text">{{item.replyContent}}</view>
+					<view class="assess-text">{{item.evaluateContent}}</view>
 					<view class="assess-img-box">
 						<cover-image class="img-col" v-for="site in item.evaluateImgs" :key="site" :src="site.imgUrl"></cover-image>
 					</view>
 				</view>
+				<view class="shop-reply-box">
+					<view class="shop-head">
+						<view class="iconfont icondianpu"></view>
+						<view class="shop-name">店家回复</view>
+					</view>
+					<view class="shop-reply">{{item.replyContent}}</view>
+				</view>
 			</view>
 		</scroll-view>
 		<u-top-tips ref="uTips"></u-top-tips>
@@ -155,6 +162,51 @@
 						}
 					}
 				}
+
+				.shop-reply-box {
+					width: 100%;
+					float: left;
+					background: #F5F5F5;
+					border-radius: 5px;
+					margin-top: 10px;
+
+					.shop-head {
+						width: 100%;
+						height: 36px;
+						float: left;
+						box-sizing: border-box;
+						padding: 10px 12px;
+
+						.icondianpu {
+							width: 16px;
+							height: 16px;
+							float: left;
+							color: #52A63A;
+							font-size: 20px;
+							margin-right: 8px;
+						}
+
+						.shop-name {
+							height: 16px;
+							float: left;
+							font-size: 15px;
+							font-family: PingFang SC;
+							color: #52A63A;
+							line-height: 16px;
+						}
+					}
+
+					.shop-reply {
+						width: 100%;
+						float: left;
+						box-sizing: border-box;
+						padding: 0 12px 12px 12px;
+						font-size: 12px;
+						font-family: PingFang SC;
+						color: #666666;
+						line-height: 16px;
+					}
+				}
 			}
 
 			.assess-row:first-child {

+ 2 - 2
pagesGood/goodDetails.vue

@@ -42,11 +42,11 @@
 				<cover-image class="assess-head" :src="item.headimg"></cover-image>
 				<view class="assess-info">
 					<view class="assess-name">{{item.nickname}}</view>
-					<view class="assess-date">{{item.replyTime}}</view>
+					<view class="assess-date">{{item.evaluateTime}}</view>
 					<view class="assess-sore-box">
 						<u-rate v-model="item.score" active-color="#FFAE21"></u-rate>
 					</view>
-					<view class="assess-text">{{item.replyContent}}</view>
+					<view class="assess-text">{{item.evaluateContent}}</view>
 					<view class="assess-img-box">
 						<cover-image class="img-col" v-for="site in item.evaluateImgs" :key="site" :src="site.imgUrl"></cover-image>
 					</view>

+ 22 - 17
pagesMain/logisticsDeatil.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="container">
 		<view class="express-info">
-			<view class="express-text">物流公司:{{expressData.text}}</view>
-			<view class="express-text">物流单号:{{expressData.text}}</view>
+			<view class="express-text">物流公司:{{expressData.company}}</view>
+			<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>
@@ -17,25 +17,30 @@
 		data() {
 			return {
 				expressData: {
-					text: ''
+					company: '',
+					logisticCode: '',
 				},
-				expressList: [{
-					title: '买家下单',
-					desc: '2018-11-11'
-				}, {
-					title: '卖家发货',
-					desc: '2018-11-12'
-				}, {
-					title: '买家签收',
-					desc: '2018-11-13'
-				}, {
-					title: '交易完成',
-					desc: '2018-11-14'
-				}]
+				expressList: []
 			}
 		},
 		onLoad(options) {
-
+			NET.request(API.getLogisticsDeatil + 'shunfeng/' + options.logisticCode, {}, 'POST').then(res => {
+				this.expressData = {
+					company: '顺丰',
+					logisticCode: res.data.logisticCode,
+				}
+				this.expressList = res.data.traces.map(site => {
+					return {
+						title: site.acceptStation,
+						desc: site.acceptTime
+					}
+				})
+			}).catch(error => {
+				this.$refs.uTips.show({
+					title: error.data.msg,
+					type: 'warning',
+				})
+			})
 		},
 		methods: {}
 	}

+ 1 - 1
pagesMain/messageForm.vue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<view class="message-form">
 			<u-cell-group :border="false">
-				<u-field type="textarea" placeholder="请对商品进行回复" v-model="formData.leaMsgContent" label-width="0"></u-field>
+				<u-field type="textarea" placeholder="请输入留言" v-model="formData.leaMsgContent" label-width="0"></u-field>
 			</u-cell-group>
 			<u-upload :action="uploadUrl" :form-data="uploadData" @on-success="uploadSuccess" @on-error="uploadError" @on-remove="uploadRemove"></u-upload>
 		</view>

+ 5 - 9
pagesMain/messageList.vue

@@ -2,11 +2,11 @@
 	<view class="container">
 		<scroll-view class="message-list-box" scroll-y="true" @scrolltolower="handleLoadMore()">
 			<view class="message-row" v-for="(item, index1) in messageList" :key="index1">
-				<cover-image class="message-head" :src="item.imgUrl"></cover-image>
+				<cover-image class="message-head" :src="item.headImg"></cover-image>
 				<view class="message-info-box">
-					<view class="message-name">{{item.leaMsgType}}xx</view>
-					<view class="message-date">{{item.leaMsgTime}}xx</view>
-					<view class="message-text">{{item.leaMsgContent}}xx</view>
+					<view class="message-name">{{item.userName}}</view>
+					<view class="message-date">{{item.leaMsgTime}}</view>
+					<view class="message-text">{{item.leaMsgContent}}</view>
 					<view class="message-img-box" v-for="(site, index2) in item.orderLeaImgResVOs" :key="index2">
 						<cover-image class="message-img" :src="site.imgUrl"></cover-image>
 					</view>
@@ -30,11 +30,7 @@
 				tenantCode: '',
 				pageIndex: 1,
 				isOver: false,
-				messageList: [{
-					orderLeaImgResVOs: []
-				}, {
-					orderLeaImgResVOs: []
-				}],
+				messageList: [],
 			}
 		},
 		onLoad(options) {

+ 60 - 61
pagesMain/orderDetail.vue

@@ -103,7 +103,6 @@
 				},
 				orderData: {
 					orderId: '',
-					orderStatus: 1,
 					addOrderTime: '',
 					recName: '',
 					recMobile: '',
@@ -135,59 +134,6 @@
 		},
 		onLoad(options) {
 			this.userData = uni.getStorageSync("userData")
-			this.orderStatus = options.orderStatus
-			switch (this.orderStatus) {
-				case '1':
-					this.buttonGroup = [{
-						text: '取消订单',
-						backgroundColor: '#75BD60',
-						color: '#fff'
-					}, {
-						text: '立即支付',
-						backgroundColor: '#52A63A',
-						color: '#fff'
-					}]
-					break;
-				case '2':
-					this.buttonGroup = [{
-						text: '申请售后',
-						backgroundColor: '#75BD60',
-						color: '#fff'
-					}, {
-						text: '自助采摘',
-						backgroundColor: '#52A63A',
-						color: '#fff'
-					}]
-					break;
-				case '3':
-					this.buttonGroup = [{
-						text: '申请售后',
-						backgroundColor: '#52A63A',
-						color: '#fff'
-					}, {
-						text: '确认收货',
-						backgroundColor: '#52A63A',
-						color: '#fff'
-					}, {
-						text: '追踪物流',
-						backgroundColor: '#52A63A',
-						color: '#fff'
-					}]
-					break;
-				case '4':
-					this.buttonGroup = [{
-						text: '申请售后',
-						backgroundColor: '#75BD60',
-						color: '#fff'
-					}]
-					break;
-				default:
-					this.buttonGroup = [{
-						text: '申请售后',
-						backgroundColor: '#52A63A',
-						color: '#fff'
-					}]
-			}
 			NET.request(API.getOrderDetail, {
 				flag: 1,
 				orderId: options.orderId,
@@ -200,7 +146,59 @@
 				} else {
 					this.goodType = 2
 				}
-				if (this.orderStatus == 4 && this.orderData.evaluateReplyStatus == 1) {
+				switch (JSON.stringify(this.orderData.orderStatus)) {
+					case '1':
+						this.buttonGroup = [{
+							text: '取消订单',
+							backgroundColor: '#75BD60',
+							color: '#fff'
+						}, {
+							text: '立即支付',
+							backgroundColor: '#52A63A',
+							color: '#fff'
+						}]
+						break;
+					case '2':
+						this.buttonGroup = [{
+							text: '申请售后',
+							backgroundColor: '#75BD60',
+							color: '#fff'
+						}, {
+							text: '自助采摘',
+							backgroundColor: '#52A63A',
+							color: '#fff'
+						}]
+						break;
+					case '3':
+						this.buttonGroup = [{
+							text: '申请售后',
+							backgroundColor: '#52A63A',
+							color: '#fff'
+						}, {
+							text: '确认收货',
+							backgroundColor: '#52A63A',
+							color: '#fff'
+						}, {
+							text: '追踪物流',
+							backgroundColor: '#52A63A',
+							color: '#fff'
+						}]
+						break;
+					case '4':
+						this.buttonGroup = [{
+							text: '申请售后',
+							backgroundColor: '#75BD60',
+							color: '#fff'
+						}]
+						break;
+					default:
+						this.buttonGroup = [{
+							text: '申请售后',
+							backgroundColor: '#52A63A',
+							color: '#fff'
+						}]
+				}
+				if (this.orderData.orderStatus == 4 && this.orderData.evaluateReplyStatus == 1) {
 					this.buttonGroup.push({
 						text: '评价',
 						backgroundColor: '#52A63A',
@@ -259,7 +257,7 @@
 			},
 			//  操作
 			orderHandle(e) {
-				if (this.orderStatus == 1) {
+				if (this.orderData.orderStatus == 1) {
 					if (e.index == 0) {
 						//  取消订单
 						this.modalContent = '请确定是否取消订单'
@@ -287,12 +285,12 @@
 							})
 						})
 					} else {
-						if (this.orderStatus == 2) {
+						if (this.orderData.orderStatus == 2) {
 							//  自助采摘
 							uni.navigateTo({
 								url: '/pagesGood/pickVideo?orderId=' + this.orderData.orderId
 							});
-						} else if (this.orderStatus == 3) {
+						} else if (this.orderData.orderStatus == 3) {
 							if (e.index == 1) {
 								//  确认收货
 								this.modalContent = '请确定是否确认收货'
@@ -373,7 +371,7 @@
 				}
 			},
 			//  跳转留言列表
-			goToMessage(){
+			goToMessage() {
 				uni.navigateTo({
 					url: '/pagesMain/messageList?orderId=' + this.orderData.orderId + '&tenantCode=' + this.orderData.tenantCode
 				});
@@ -758,12 +756,13 @@
 						.message-img-box {
 							width: 100%;
 							float: left;
-							.message-img{
+
+							.message-img {
 								width: 76px;
 								height: 76px;
 								object-fit: cover;
 								float: left;
-								margin: 0  10px 10px 0;
+								margin: 0 10px 10px 0;
 							}
 						}
 					}

+ 1 - 1
pagesMain/orderItem.vue

@@ -150,7 +150,7 @@
 				} else if (type == 6) {
 					//  追踪物流
 					uni.navigateTo({
-						url: '/pagesMain/logisticsDeatil?orderId=' + this.orderData.orderId
+						url: '/pagesMain/logisticsDeatil?logisticCode=' + this.orderData.logisticCode
 					});
 				} else if (type == 7) {
 					//  评价

+ 11 - 6
static/iconfont.css

@@ -1,11 +1,12 @@
 @font-face {
 	font-family: 'iconfont';
-	src: url('https://at.alicdn.com/t/font_2119167_0vxmohirmj4.eot');
-	src: url('https://at.alicdn.com/t/font_2119167_0vxmohirmj4?#iefix') format('embedded-opentype'),
-		url('https://at.alicdn.com/t/font_2119167_0vxmohirmj4.woff2') format('woff2'),
-		url('https://at.alicdn.com/t/font_2119167_0vxmohirmj4.woff') format('woff'),
-		url('https://at.alicdn.com/t/font_2119167_0vxmohirmj4.ttf') format('truetype'),
-		url('https://at.alicdn.com/t/font_2119167_0vxmohirmj4.svg#iconfont') format('svg');
+	/* project id 2119167 */
+	src: url('http://at.alicdn.com/t/font_2119167_u21b8ogkchd.eot');
+	src: url('http://at.alicdn.com/t/font_2119167_u21b8ogkchd.eot?#iefix') format('embedded-opentype'),
+		url('http://at.alicdn.com/t/font_2119167_u21b8ogkchd.woff2') format('woff2'),
+		url('http://at.alicdn.com/t/font_2119167_u21b8ogkchd.woff') format('woff'),
+		url('http://at.alicdn.com/t/font_2119167_u21b8ogkchd.ttf') format('truetype'),
+		url('http://at.alicdn.com/t/font_2119167_u21b8ogkchd.svg#iconfont') format('svg');
 }
 
 .iconfont {
@@ -16,6 +17,10 @@
 	-moz-osx-font-smoothing: grayscale;
 }
 
+.iconshangchuan1:before {
+	content: "\e64c";
+}
+
 .iconzuo:before {
 	content: "\e633";
 }