Forráskód Böngészése

聊天订单商品

zs 2 éve
szülő
commit
8bf720b831

+ 3 - 2
pages/message/index.vue

@@ -105,8 +105,9 @@
 					for (let val of list) {
 						if (val.last_chat) {
 							val.last_time = val.last_chat.time
-							let chat = val.last_chat.content.indexOf(config.stompUrl) != -1;
-							if (chat) val.last_chat = `[图片]`
+							if (val.last_chat.msg_type == '1') val.last_chat = `[图片]`
+							else if (val.last_chat.msg_type == '2') val.last_chat = `[商品]`
+							else if (val.last_chat.msg_type == '3') val.last_chat = `[订单]`
 							else val.last_chat = val.last_chat.content
 						}
 					}

+ 199 - 0
pagesMessage/message/components/goods_1.vue

@@ -0,0 +1,199 @@
+<template>
+	<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
+		<view class="list-scroll-view">
+			<view class="goods">
+				<view class="goods_1">
+					<view class="list" v-for="(item,index) in marketList" :key="index">
+						<image class="image" :src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
+						</image>
+						<view class="name textOver">
+							{{item.name}}
+						</view>
+						<view class="other">
+							<view class="money">
+								<view class="money_1">
+									<text>¥</text><text>{{item.sell_money||0}}</text>
+								</view>
+								<view class="money_2">
+									<text>¥</text><text>{{item.flow_money||0}}</text>
+								</view>
+							</view>
+						</view>
+						<view class="other" v-if="item.leader_price">
+							<view class="leader">
+								<text>团长价</text><text>¥</text><text>{{item.leader_price||0}}</text>
+							</view>
+						</view>
+						<view class="other" v-if="item.p_act">
+							<text class="label" v-for="(tag,index) in item.p_act" :key="index">{{tag}}</text>
+						</view>
+						<view class="button" @tap="toSend(item)">
+							<text>发送</text>
+						</view>
+						<view class="acttags">
+							<text v-for="(i,indexx) in item.actTagsShow" :key="indexx">{{i.label}}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</scroll-view>
+</template>
+
+<script>
+	export default {
+		props: {
+			marketList: {
+				type: Array
+			},
+		},
+		data() {
+			return {};
+		},
+		methods: {
+			// 分页
+			toPage(e) {
+				const that = this;
+				that.$emit('toPage')
+			},
+			// 发送
+			toSend(e) {
+				const that = this;
+				that.$emit('toSend', e)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.goods {
+		display: flex;
+		flex-direction: column;
+		background-color: var(--f2Color);
+		padding: 2vw 0;
+
+		.goods_1 {
+			display: flex;
+			justify-content: space-between;
+			flex-wrap: wrap;
+			padding: 0 2vw;
+
+			.list {
+				// break-inside: avoid;
+				position: relative;
+				width: 41vw;
+				background-color: var(--fffColor);
+				padding: 2vw;
+				margin: 0 0 2vw 0;
+				border-radius: 10px;
+
+				.image {
+					width: 100%;
+					height: 40vw;
+				}
+
+				.name {
+					font-size: var(--font14Size);
+				}
+
+				.other {
+					display: flex;
+					flex-direction: row;
+					padding: 1vw 0 0 0;
+
+					.money {
+						display: flex;
+
+						.money_1 {
+							color: var(--fFB1Color);
+							font-size: 12px;
+
+							text:last-child {
+								font-size: 16px;
+								padding: 0 0 0 1vw;
+							}
+						}
+
+						.money_2 {
+							font-size: 12px;
+							margin: 0 0 0 2vw;
+							color: var(--f99Color);
+
+							text {
+								text-decoration: line-through;
+							}
+
+							text:last-child {
+								font-size: 16px;
+								padding: 0 0 0 1vw;
+							}
+						}
+					}
+
+					.label {
+						font-size: 12px;
+						color: #FFA500;
+						border: 1px solid #FFA500;
+						border-radius: 5px;
+						padding: 0 1vw;
+						margin: 0 1vw 0 0;
+					}
+
+					.leader {
+						font-size: 12px;
+						text-align: center;
+						color: #23B67A;
+
+						text:last-child {
+							font-size: 16px;
+							padding: 0 0 0 1vw;
+						}
+					}
+				}
+
+				.button {
+					text-align: right;
+					margin: 2vw;
+
+					text {
+						font-size: 12px;
+						padding: 10rpx 20rpx;
+						border-radius: 20rpx;
+						color: #ffffff;
+						background-color: #FF4500;
+					}
+				}
+
+				.acttags {
+					position: absolute;
+					top: 2vw;
+					width: 93%;
+
+					text {
+						display: inline-block;
+						background-color: #ff0000;
+						color: #fff;
+						border-radius: 1vw;
+						padding: 0.5vw;
+						font-size: 12px;
+
+						margin: 0 1vw 0 0;
+					}
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+</style>

+ 456 - 0
pagesMessage/message/components/order_1.vue

@@ -0,0 +1,456 @@
+<template>
+	<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
+		<view class="list-scroll-view">
+			<view class="order">
+				<tabs :tabs="tabs" @tabsChange="tabsChange">
+					<view class="tabsList">
+						<view class="list" v-for="(item,index) in orderList" :key="index">
+							<view class="list_1" v-if="tabs.active=='0'">
+								<view class="goods">
+									<view class="goodsList" v-for="(tag,indexs) in item.goods" :key="indexs">
+										<view class="shopname">
+											<view class="shop" v-if="tag.is_set=='0'">
+												<view class="r">
+													<text class="set">套装</text> {{tag.name}}
+												</view>
+											</view>
+											<view class="shop" v-else>
+												<text class="iconfont icon-shangdian"></text>
+												<text>{{tag.shop_name}}</text>
+											</view>
+											<view class="status">
+												{{item.zhStatus}}
+											</view>
+										</view>
+										<view class="goodsList_1">
+											<view class="market" v-for="(tags,indexss) in tag.goods" :key="indexss">
+												<view class="market_1">
+													<image class="image"
+														:src="tags.goods.file&&tags.goods.file.length>0?tags.goods.file[0].url:''"
+														mode=""></image>
+												</view>
+												<view class="market_2">
+													<view class="goodsname textOver">
+														{{tags.goods.name}}
+													</view>
+													<view class="specs" v-if="tag.is_set=='0'">
+														{{tags.spec_name}}
+													</view>
+													<view class="specs" v-else>
+														{{tags.name}}
+													</view>
+													<text v-if="tags.gift.length>0" class="gift">赠品</text>
+													<text v-if="tags.sp_price" class="act">特价</text>
+												</view>
+												<view class="market_3" v-if="tag.is_set=='0'">
+													<view class="price">{{tags.set_num}}件/套x{{tags.set_num}}
+													</view>
+												</view>
+												<view class="market_3" v-else>
+													<view v-if="item.type=='0'" class="price">
+														¥{{tags.price||tags.sell_money}}
+													</view>
+													<view v-else class="price">
+														¥{{tags.group_config.money}}
+													</view>
+													<view class="num">
+														×{{tags.buy_num}}
+													</view>
+												</view>
+											</view>
+										</view>
+									</view>
+								</view>
+								<view class="other">
+									<text>共{{item.buy_num_total}}件商品</text>
+									<text>实付款¥{{item.real_pay}}</text>
+								</view>
+							</view>
+							<view class="list_2" v-else>
+								<view class="list_2_1">
+									<view class="shopname" v-if="item.is_set=='0'">
+										<view class="r">
+											<text class="set">套装</text> {{tag.name}}
+										</view>
+									</view>
+									<view class="shopname" v-else>
+										<text class="iconfont icon-shangdian"></text>
+										<text>{{item.shop.name}}</text>
+									</view>
+									<view class="status">
+										{{item.zhStatus}}
+									</view>
+								</view>
+								<view class="list_2_2" v-for="(tag,indexs) in item.goods" :key="indexs">
+									<view v-if="tag.is_set=='0'">
+										<view class="goods" v-for="(tags,indexss) in tag.goods" :key="indexss">
+											<view class="goods_1">
+												<image class="image"
+													:src="tags.goods.file&&tags.goods.file.length>0?tags.goods.file[0].url:''"
+													mode=""></image>
+											</view>
+											<view class="goods_2">
+												<view class="goodsname textOver">
+													{{tags.goods.name}}
+												</view>
+												<view class="specs">
+													{{tags.spec_name}}
+												</view>
+											</view>
+											<view class="goods_3">
+												<view class="price">{{tags.set_num}}件/套x{{tags.set_num}}
+												</view>
+											</view>
+										</view>
+										<view class="set">
+											<view class="set_1">套装价:¥{{tag.sell_money}}</view>
+											<view class="set_2">数量:×{{tag.buy_num}}</view>
+										</view>
+									</view>
+									<view v-else>
+										<view class="goods">
+											<view class="goods_1">
+												<image class="image" :src="tag.url" mode=""></image>
+											</view>
+											<view class="goods_2">
+												<view class="goodsname textOver">
+													{{tag.goods.name}}
+												</view>
+												<view class="specs">
+													{{tag.name}}
+												</view>
+												<text v-if="tag.gift.length>0" class="gift">赠品</text>
+												<text v-if="tag.sp_price" class="act">特价</text>
+											</view>
+											<view class="goods_3">
+												<view v-if="item.type=='0'" class="price">
+													¥{{tag.price||tag.sell_money}}
+												</view>
+												<view v-else class="price">
+													¥{{tag.group_config.money}}
+												</view>
+												<view class="num">
+													×{{tag.buy_num}}
+												</view>
+											</view>
+										</view>
+									</view>
+								</view>
+								<view class="other">
+									<text>共{{item.buy_num_total||0}}件商品</text>
+									<text>实付款¥{{item.real_pay}}</text>
+								</view>
+							</view>
+							<view class="button" @tap="toSend(item)">
+								<text>发送</text>
+							</view>
+						</view>
+					</view>
+				</tabs>
+			</view>
+		</view>
+	</scroll-view>
+</template>
+
+<script>
+	import tabs from '@/components/tabs/index.vue';
+	export default {
+		components: {
+			tabs
+		},
+		props: {
+			orderList: {
+				type: Array
+			},
+			status: {
+				type: String
+			},
+			tabs: {
+				type: Object
+			}
+		},
+		data() {
+			return {};
+		},
+		methods: {
+			// 分页
+			toPage(e) {
+				const that = this;
+				that.$emit('toPage')
+			},
+			// 选择选项卡
+			tabsChange(e) {
+				const that = this;
+				that.$emit('tabsChange', e)
+			},
+			// 发送
+			toSend(e) {
+				const that = this;
+				that.$emit('toSend', e)
+			}
+		},
+	}
+</script>
+
+<style lang="scss">
+	.order {
+		background-color: var(--f9Color);
+
+		.tabsList {
+
+			.list {
+				background-color: #fff;
+				border: 1px solid var(--f5Color);
+				padding: 2vw;
+				margin: 0 2vw 2vw 2vw;
+				border-radius: 5px;
+
+				.list_1 {
+					.goods {
+						.goodsList {
+							border-bottom: 1px solid #f1f1f1;
+
+							.shopname {
+								display: flex;
+								justify-content: space-between;
+								margin: 0 0 2vw 0;
+
+								.shop {
+									text:last-child {
+										padding: 0 0 0 2vw;
+									}
+
+									.r {
+										.set {
+											margin: 0 1vw 0 0;
+											font-size: 12px;
+											border-radius: 5px;
+											padding: 0 1vw;
+											color: #ffffff;
+											background-color: #FF6347;
+											border: 1px solid #FFA500;
+										}
+									}
+								}
+
+								.status {
+									text-align: right;
+									color: var(--ff0Color);
+									margin: 0 0 1vw 0;
+								}
+							}
+
+							.goodsList_1 {
+								.market {
+									display: flex;
+									padding: 0 0 2vw 0;
+
+									.market_1 {
+										width: 20vw;
+										height: 20vw;
+
+										.image {
+											width: 100%;
+											height: 100%;
+											border-radius: 5px;
+										}
+									}
+
+									.market_2 {
+										width: 55vw;
+										padding: 0 0 0 2vw;
+
+										.goodsname {
+											font-size: 16px;
+											margin: 0 0 1vw 0;
+										}
+
+										.specs {
+											font-size: 14px;
+											color: #858585;
+										}
+
+										.gift {
+											margin: 0 1vw 0 0;
+											font-size: 12px;
+											color: #FFA500;
+											border: 1px solid #FFA500;
+											border-radius: 5px;
+											padding: 0 1vw;
+										}
+
+										.act {
+											font-size: 12px;
+											border: 1px solid var(--fFB1Color);
+											color: var(--fFB1Color);
+											border-radius: 5px;
+											padding: 0 1vw;
+										}
+									}
+
+									.market_3 {
+										width: 15vw;
+										text-align: right;
+
+										.price {
+											color: #ff0000;
+										}
+									}
+								}
+							}
+						}
+					}
+
+					.other {
+						padding: 0 0 2vw 0;
+						margin: 2vw 0;
+						text-align: right;
+						border-bottom: 1px solid #f1f1f1;
+
+						text {
+							font-size: 14px;
+							padding: 0 0 0 2vw;
+						}
+					}
+				}
+
+				.list_2 {
+					.list_2_1 {
+						display: flex;
+						justify-content: space-between;
+						margin: 0 0 2vw 0;
+
+						.shopname {
+							text:last-child {
+								padding: 0 0 0 2vw;
+							}
+
+							.r {
+								.set {
+									margin: 0 1vw 0 0;
+									font-size: 12px;
+									border-radius: 5px;
+									padding: 0 1vw;
+									color: #ffffff;
+									background-color: #FF6347;
+									border: 1px solid #FFA500;
+								}
+							}
+						}
+
+						.status {
+							color: var(--ff0Color);
+						}
+					}
+
+					.list_2_2 {
+						border-bottom: 1px solid #f1f1f1;
+						padding-top: 1vw;
+
+						.goods {
+							display: flex;
+							padding: 0 0 2vw 0;
+
+							.goods_1 {
+								width: 20vw;
+								height: 20vw;
+
+								.image {
+									width: 100%;
+									height: 100%;
+									border-radius: 5px;
+								}
+							}
+
+							.goods_2 {
+								width: 55vw;
+								padding: 0 0 0 2vw;
+
+								.goodsname {
+									font-size: 16px;
+									margin: 0 0 1vw 0;
+								}
+
+								.specs {
+									font-size: 14px;
+									color: #858585;
+								}
+
+								.gift {
+									margin: 0 1vw 0 0;
+									font-size: 12px;
+									color: #FFA500;
+									border: 1px solid #FFA500;
+									border-radius: 5px;
+									padding: 0 1vw;
+								}
+
+								.act {
+									font-size: 12px;
+									border: 1px solid var(--fFB1Color);
+									color: var(--fFB1Color);
+									border-radius: 5px;
+									padding: 0 1vw;
+								}
+							}
+
+							.goods_3 {
+								width: 15vw;
+								text-align: right;
+
+								.price {
+									color: #ff0000;
+								}
+							}
+						}
+
+						.set {
+							display: flex;
+							padding: 2vw 0;
+							justify-content: space-between;
+							color: #ff0000;
+						}
+					}
+
+
+					.other {
+						padding: 0 0 2vw 0;
+						margin: 2vw 0;
+						text-align: right;
+						border-bottom: 1px solid #f1f1f1;
+
+						text {
+							font-size: 14px;
+							padding: 0 0 0 2vw;
+						}
+					}
+				}
+
+				.button {
+					text-align: right;
+
+					text {
+						font-size: 12px;
+						padding: 10rpx 20rpx;
+						border-radius: 20rpx;
+						color: #ffffff;
+						background-color: #FF4500;
+					}
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+</style>

+ 2 - 2
pagesMessage/message/components/submit_1.vue

@@ -97,11 +97,11 @@
 			},
 			// 发送商品
 			sendGoods() {
-				console.log('发送商品');
+				this.$emit('sendGoods');
 			},
 			// 发送订单
 			sendOrder() {
-				console.log('发送订单');
+				this.$emit('sendOrder');
 			},
 			//发送
 			send(msg, type) {

+ 493 - 60
pagesMessage/message/info.vue

@@ -25,9 +25,10 @@
 									<image :src="item.content" class="msg-img" mode="widthFix"></image>
 								</view>
 								<!-- 商品 -->
-								<view class="message img" v-else-if="item.msg_type =='2'">
+								<view class="message img" v-else-if="item.msg_type =='2'" @tap="toView(item)">
 									<view class="msg-goods">
-										<image :src="item.goodsInfo&&item.goodsInfo.file" class="image" mode="widthFix">
+										<image :src="item.goodsInfo&&item.goodsInfo.file" class="image"
+											mode="scaleToFill">
 										</image>
 										<view class="goods_1">
 											<view class="name textOver">{{item.goodsInfo&&item.goodsInfo.name}}</view>
@@ -45,15 +46,36 @@
 												<text class="label" v-for="(tag,index) in item.goodsInfo.act"
 													:key="index">{{tag}}</text>
 											</view>
-											<view class="button" @tap="toSend(item)" v-if="item.is_send=='0'">
+											<view class="button" @tap.stop="toSend(item)" v-if="item.is_send=='0'">
 												<text>发送连接</text>
 											</view>
 										</view>
 									</view>
 								</view>
 								<!-- 订单 -->
-								<view class="message img" v-else-if="item.msg_type =='3'">
-									<view class="msg-text">{{item.content}}</view>
+								<view class="message img" v-else-if="item.msg_type =='3'" @tap="toView(item)">
+									<view class="msg-order">
+										<view class="order_1">
+											<view class="image" v-for="(tago,index) in item.ordernfo.goods"
+												:key="index">
+												<image v-if="tago.file.length>0" :src="tago.file&&tago.file[0].url"
+													class="image" mode="scaleToFill">
+												</image>
+												<image v-else :src="tago.goods&&tago.goods.file[0].url" class="image"
+													mode="scaleToFill">
+												</image>
+											</view>
+										</view>
+										<view class="order_2">
+											<view class="no">订单号:{{item.ordernfo.no}}</view>
+											<view class="status">
+												<text>{{item.ordernfo.status}}</text>
+												<view class="button" @tap.stop="toSend(item)" v-if="item.is_send=='0'">
+													<text>发送连接</text>
+												</view>
+											</view>
+										</view>
+									</view>
 								</view>
 							</view>
 							<view class="msg-m msg-right" v-else-if="item.speaker == user._id">
@@ -69,9 +91,10 @@
 									<image :src="item.content" class="msg-img" mode="widthFix"></image>
 								</view>
 								<!-- 商品 -->
-								<view class="message img" v-else-if="item.msg_type =='2'">
+								<view class="message img" v-else-if="item.msg_type =='2'" @tap="toView(item)">
 									<view class="msg-goods">
-										<image :src="item.goodsInfo&&item.goodsInfo.file" class="image" mode="widthFix">
+										<image :src="item.goodsInfo&&item.goodsInfo.file" class="image"
+											mode="scaleToFill">
 										</image>
 										<view class="goods_1">
 											<view class="name textOver">{{item.goodsInfo&&item.goodsInfo.name}}</view>
@@ -89,15 +112,36 @@
 												<text class="label" v-for="(tag,index) in item.goodsInfo.act"
 													:key="index">{{tag}}</text>
 											</view>
-											<view class="button" @tap="toSend(item)" v-if="item.is_send=='0'">
+											<view class="button" @tap.stop="toSend(item)" v-if="item.is_send=='0'">
 												<text>发送连接</text>
 											</view>
 										</view>
 									</view>
 								</view>
 								<!-- 订单 -->
-								<view class="message img" v-else-if="item.msg_type =='3'">
-									<view class="msg-text">{{item.content}}</view>
+								<view class="message img" v-else-if="item.msg_type =='3'" @tap="toView(item)">
+									<view class="msg-order">
+										<view class="order_1">
+											<view class="images" v-for="(tago,index) in item.ordernfo.goods"
+												:key="index">
+												<image v-if="tago.file.length>0" :src="tago.file&&tago.file[0].url"
+													class="image" mode="scaleToFill">
+												</image>
+												<image v-else :src="tago.goods&&tago.goods.file[0].url" class="image"
+													mode="scaleToFill">
+												</image>
+											</view>
+										</view>
+										<view class="order_2">
+											<view class="no">订单号:{{item.ordernfo.no}}</view>
+											<view class="status">
+												<text>{{item.ordernfo.status}}</text>
+												<view class="button" @tap.stop="toSend(item)" v-if="item.is_send=='0'">
+													<text>发送连接</text>
+												</view>
+											</view>
+										</view>
+									</view>
 								</view>
 							</view>
 						</view>
@@ -105,18 +149,38 @@
 				</scroll-view>
 			</view>
 			<view class="two">
-				<submit_1 @inputs="inputs" @heights="heights"></submit_1>
+				<submit_1 @inputs="inputs" @heights="heights" @sendGoods="sendGoods" @sendOrder="sendOrder"></submit_1>
 			</view>
 		</view>
+		<!-- 规格 -->
+		<uni-popup ref="specShow" background-color="#fff" type="bottom" :is-mask-click="false">
+			<view class="popup">
+				<view class="close">
+					<text @click="toClose" class="iconfont icon-shanchu"></text>
+				</view>
+				<view class="info_1" v-if="popupShow=='1'">
+					<goods_1 :marketList="list" @toPage="toPage" @toSend="toGoods"></goods_1>
+				</view>
+				<view class="info_1" v-else-if="popupShow=='2'">
+					<order_1 :tabs="tabs" :status="status" :orderList="list" @toPage="toPage" @toSend="toOrder"
+						@tabsChange="tabsChange">
+					</order_1>
+				</view>
+			</view>
+		</uni-popup>
 	</mobile-frame>
 </template>
 
 <script>
 	import moment from 'moment';
 	import submit_1 from './components/submit_1.vue';
+	import goods_1 from './components/goods_1.vue';
+	import order_1 from './components/order_1.vue';
 	export default {
 		components: {
 			submit_1,
+			goods_1,
+			order_1,
 		},
 		data() {
 			return {
@@ -133,21 +197,33 @@
 				statusList: [],
 				// 历史记录
 				msgList: [],
+				// 订单列表
+				list: [],
+				status: '0',
+				tabs: {
+					active: '0',
+					menu: []
+				},
+				// 聊天记录
 				total: 0,
 				skip: 0,
-				limit: 10,
+				limit: 6,
 				page: 0,
 				// 判断是否跳到最后一条
 				is_bottom: true,
 				// 判断是否下拉刷新复位
 				triggered: false,
 				scrollToView: '', //滑动最后一条信息
+				// 规格弹框
+				popupShow: '1',
 			};
 		},
 		onShow: async function() {
 			const that = this;
-			that.clearPage();
-			if (that.id) await that.search()
+			if (that.id) {
+				await that.clearPage();
+				await that.search()
+			}
 			await that.searchOther();
 		},
 		onLoad: async function(e) {
@@ -179,8 +255,11 @@
 					success: async function(res) {
 						let user = that.$jwt(res.data);
 						if (user) {
-							let res;
-
+							// 查询状态
+							let arr = await that.$api(`/dictData`, 'GET', {
+								code: 'order_process'
+							})
+							if (arr.errcode == '0') that.$set(that, `statusList`, arr.data);
 							that.$set(that, `user`, user)
 						}
 					}
@@ -190,6 +269,16 @@
 			async searchOther() {
 				const that = this;
 				let res;
+				let statusList = that.statusList.filter((i) => {
+					return i.value != '-2' && i.value != '-3';
+				});
+				var menu = statusList.map((item) => {
+					return {
+						title: item.label,
+						active: item.value
+					}
+				})
+				that.$set(that.tabs, `menu`, menu)
 				// 发送商品信息
 				if (that.goods && that.goods.goods) {
 					// 商品
@@ -221,7 +310,7 @@
 							"act": act
 						}
 						let data = {
-							"_id": 'xx' + moment(new Date()).valueOf(),
+							"_id": 'goods' + moment(new Date()).valueOf(),
 							"speaker": that.user._id,
 							"content": that.goods.goods,
 							"goodsInfo": goodsInfo,
@@ -232,32 +321,32 @@
 						if (!that.id) data.shop = that.shop_id
 						else data.room = that.id
 						that.msgList.push(data);
-						// 跳转到最后一条数据 与前面的:id进行对照
-						// 如果是下拉刷新聊天记录不跳到最后一条
-						if (that.is_bottom == true) that.goBottom();
 					}
 				} else if (that.goods && that.goods.order) {
 					// 订单
 					if (that.goods.status == '0') res = await that.$api(`/order/${that.goods.order}`)
 					else res = await that.$api(`/orderDetail/${that.goods.order}`);
 					if (res.errcode == '0') {
-						// 查询状态
-						let arr = await that.$api(`/dictData`, 'GET', {
-							code: 'order_process'
-						})
-						if (arr.errcode == '0') that.$set(that, `statusList`, arr.data);
-						let status = arr.data.find(i => i.value == res.data.status)
+						let status = that.statusList.find(i => i.value == res.data.status)
 						// 过滤店铺订单
 						let shop_goods;
-						if (!that.id) shop_goods = res.data.goods.filter(i => i.shop == that.shop_id)
-						else shop_goods = res.data.goods.filter(i => i.shop == that.shop._id)
+						if (that.goods.status != '0') {
+							// 已支付订单
+							shop_goods = res.data.goods
+						} else {
+							// 未支付订单
+							if (!that.id) shop_goods = res.data.goods.filter(i => i.shop == that.shop_id)
+							else shop_goods = res.data.goods.filter(i => i.shop == that.shop._id)
+							if (shop_goods.length > 0) shop_goods = shop_goods[0].goods
+						}
 						let ordernfo = {
 							"no": res.data && res.data.no,
 							"goods": shop_goods,
-							"status": status.label || '暂无'
+							"status": status.label || '暂无',
+							"is_status": res.data.status
 						}
 						let data = {
-							"_id": 'dd' + moment(new Date()).valueOf(),
+							"_id": 'order' + moment(new Date()).valueOf(),
 							"speaker": that.user._id,
 							"content": that.goods.order,
 							"ordernfo": ordernfo,
@@ -268,16 +357,33 @@
 						if (!that.id) data.shop = that.shop_id
 						else data.room = that.id
 						that.msgList.push(data);
-						console.log(data);
-						// 跳转到最后一条数据 与前面的:id进行对照
-						// 如果是下拉刷新聊天记录不跳到最后一条
-						if (that.is_bottom == true) that.goBottom();
 					}
 				}
+				// 跳转到最后一条数据 与前面的:id进行对照
+				// 如果是下拉刷新聊天记录不跳到最后一条
+				if (that.is_bottom == true) that.goBottom();
 			},
 			// 查询历史记录
 			async search() {
 				const that = this;
+				// 查询房间信息
+				// 如果是下拉刷新聊天记录不请求房间信息
+				if (that.is_bottom == true) {
+					res = await that.$api(`/room/${that.id}`, `GET`, {}, 'chat')
+					if (res.errcode == '0') {
+						that.$set(that, `shop`, res.data && res.data.shop);
+						if (res.data && res.data.shop && res.data.shop.name) {
+							uni.setNavigationBarTitle({
+								title: res.data.shop.name
+							});
+						}
+					} else {
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none'
+						})
+					}
+				}
 				let info = {
 					skip: that.skip,
 					limit: that.limit,
@@ -292,6 +398,7 @@
 					msgList.sort(function(a, b) {
 						return a.time > b.time ? 1 : -1;
 					});
+					that.$set(that, `total`, res.total)
 					for (let val of msgList) {
 						if (val.msg_type == '2') {
 							// 商品
@@ -326,34 +433,40 @@
 								val.goodsInfo = goodsInfo
 								val.is_send = '1'
 							}
+						} else if (val.msg_type == '3') {
+							// 订单
+							res = await that.$api(`/viewOrder/getOrder/${val.content}`)
+							if (res.errcode == '0') {
+								let status = that.statusList.find(i => i.value == res.data.status)
+								// 过滤店铺订单
+								let shop_goods;
+								if (res.data.status != '0') {
+									// 已支付订单
+									shop_goods = res.data.goods
+								} else {
+									// 未支付订单
+									if (!that.id) shop_goods = res.data.goods.filter(i => i.shop == that.shop_id)
+									else shop_goods = res.data.goods.filter(i => i.shop == that.shop._id)
+									if (shop_goods.length > 0) shop_goods = shop_goods[0].goods
+								}
+								let ordernfo = {
+									"no": res.data && res.data.no,
+									"goods": shop_goods,
+									"status": status.label || '暂无',
+									"is_status": res.data.status
+								}
+								val.ordernfo = ordernfo
+								val.is_send = '1'
+							}
 						}
 					}
 					that.$set(that, `msgList`, msgList);
-					that.$set(that, `total`, res.total)
 				} else {
 					uni.showToast({
 						title: res.errmsg,
 						icon: 'none'
 					})
 				}
-				// 查询房间信息
-				// 如果是下拉刷新聊天记录不请求房间信息
-				if (that.is_bottom == true) {
-					res = await that.$api(`/room/${that.id}`, `GET`, {}, 'chat')
-					if (res.errcode == '0') {
-						that.$set(that, `shop`, res.data && res.data.shop);
-						if (res.data && res.data.shop && res.data.shop.name) {
-							uni.setNavigationBarTitle({
-								title: res.data.shop.name
-							});
-						}
-					} else {
-						uni.showToast({
-							title: res.errmsg,
-							icon: 'none'
-						})
-					}
-				}
 				let id = that.msgList.filter(i => {
 					if (i.speaker != that.user._id) return i.is_read = '0';
 				})
@@ -399,7 +512,6 @@
 				if (user._id) {
 					//时间间隔处理
 					let data = {
-						"room": that.id,
 						"speaker": user._id,
 						"content": e.message,
 						"time": moment().format('YYYY-MM-DD HH:mm:ss'),
@@ -407,11 +519,10 @@
 					};
 					// 发送给服务器消息
 					if (!that.id) data.shop = that.shop_id
+					else data.room = that.id
 					let res = await that.$api(`/chatRecord`, `POST`, data, 'chat');
 					if (res.errcode == '0') {
 						that.msgList.push(res.data);
-						// 发送websocket
-						that.$store.dispatch('websocketSend', res.data)
 					} else {
 						uni.showToast({
 							title: res.errmsg,
@@ -452,6 +563,236 @@
 					})
 				}
 			},
+			// 发送商品
+			async sendGoods() {
+				const that = this;
+				let res;
+				let info = {
+					skip: that.skip,
+					limit: that.limit,
+					shop: that.shop._id || that.shop_id
+				};
+				// 首页产品列表
+				res = await that.$api(`/viewGoods/indexGoodsList`, `GET`, {
+					...info
+				});
+				if (res.errcode == '0') {
+					let list = [...that.list, ...res.data];
+					that.$set(that, `list`, list);
+					that.$set(that, `total`, res.total)
+					that.$set(that, `popupShow`, '1')
+					that.$refs.specShow.open();
+				}
+			},
+			// 发送商品
+			async toGoods(e) {
+				const that = this;
+				let user = that.user
+				if (user._id) {
+					let res;
+					// 商品
+					res = await that.$api(`/viewGoods/goodsDetail`, `POST`, {
+						id: e._id
+					});
+					if (res.errcode == '0') {
+						let indexSpecs;
+						// 显示最低价格的规格信息,不考虑库存问题
+						if (res.data.specs && res.data.specs.length > 0) {
+							// 规格排序
+							indexSpecs = res.data.specs.sort(function(a, b) {
+								let i, j;
+								if (a.price) i = 'price'
+								else i = 'sell_money'
+								if (b.price) j = 'price'
+								else j = 'sell_money'
+								return a[i] - b[j];
+							})
+						}
+						let act = res.data.act.map(i => {
+							return i.tag
+						})
+						let goodsInfo = {
+							"file": res.data && res.data.goods && res.data.goods.file && res.data.goods
+								.file[0]
+								.url,
+							"name": res.data && res.data.goods && res.data.goods.name,
+							"spec": indexSpecs[0],
+							"act": act,
+						}
+						//时间间隔处理
+						let data = {
+							"speaker": user._id,
+							"content": e._id,
+							"time": moment().format('YYYY-MM-DD HH:mm:ss'),
+							"msg_type": '2',
+						};
+						if (!that.id) data.shop = that.shop_id
+						else data.room = that.id
+						res = await that.$api(`/chatRecord`, `POST`, data, 'chat');
+						if (res.errcode == '0') {
+							res.data.goodsInfo = goodsInfo
+							res.data.is_send = '1'
+							that.msgList.push(res.data);
+						} else {
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none'
+							})
+						}
+					}
+					// 跳转到最后一条数据 与前面的:id进行对照
+					that.goBottom();
+					that.toClose();
+				} else {
+					uni.showToast({
+						title: '未登录账号无法发送消息 ,请及时登录!',
+						icon: 'none'
+					})
+				}
+			},
+			// 分页
+			toPage(e) {
+				const that = this;
+				let list = that.list;
+				let limit = that.limit;
+				if (that.total > list.length) {
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					let page = that.page + 1;
+					that.$set(that, `page`, page)
+					let skip = page * limit;
+					that.$set(that, `skip`, skip)
+					if (that.popupShow == '1') that.sendGoods();
+					else that.sendOrder();
+					uni.hideLoading();
+				}
+			},
+			// 发送订单
+			async sendOrder() {
+				const that = this;
+				let user = that.user;
+				let status = that.status;
+				let info = {
+					skip: that.skip,
+					limit: that.limit,
+					customer: user._id,
+					shop: that.shop._id || that.shop_id,
+					status: status
+				}
+				let res;
+				if (status == '0') {
+					res = await that.$api(`/order`, 'GET', {
+						...info,
+					});
+				} else {
+					res = await that.$api(`/orderDetail`, 'GET', {
+						...info,
+					});
+				}
+				if (res.errcode == '0') {
+					let list = [...that.list, ...res.data];
+					for (let val of list) {
+						val.zhStatus = that.searchStatus(val.status)
+					}
+					that.$set(that, `list`, list);
+					that.$set(that, `total`, res.total)
+					that.$set(that, `popupShow`, '2')
+					that.$refs.specShow.open();
+				} else {
+					uni.showToast({
+						title: res.errmsg,
+						icon: 'none'
+					})
+				}
+			},
+			// 发送订单
+			async toOrder(e) {
+				const that = this;
+				let user = that.user
+				if (user._id) {
+					let res;
+					// 订单
+					if (e.status == '0') res = await that.$api(`/order/${e._id}`)
+					else res = await that.$api(`/orderDetail/${e._id}`);
+					if (res.errcode == '0') {
+						let status = that.statusList.find(i => i.value == res.data.status)
+						// 过滤店铺订单
+						let shop_goods;
+						if (e.status != '0') {
+							// 已支付订单
+							shop_goods = res.data.goods
+						} else {
+							// 未支付订单
+							if (!that.id) shop_goods = res.data.goods.filter(i => i.shop == that.shop_id)
+							else shop_goods = res.data.goods.filter(i => i.shop == that.shop._id)
+							if (shop_goods.length > 0) shop_goods = shop_goods[0].goods
+						}
+						let ordernfo = {
+							"no": res.data && res.data.no,
+							"goods": shop_goods,
+							"status": status.label || '暂无',
+							"is_status": res.data.status
+						}
+						//时间间隔处理
+						let data = {
+							"speaker": user._id,
+							"content": e._id,
+							"time": moment().format('YYYY-MM-DD HH:mm:ss'),
+							"msg_type": '3',
+						};
+						if (!that.id) data.shop = that.shop_id
+						else data.room = that.id
+						res = await that.$api(`/chatRecord`, `POST`, data, 'chat');
+						if (res.errcode == '0') {
+							res.data.ordernfo = ordernfo
+							res.data.is_send = '1'
+							that.msgList.push(res.data);
+						} else {
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none'
+							})
+						}
+					}
+					// 跳转到最后一条数据 与前面的:id进行对照
+					that.goBottom();
+					that.toClose();
+				} else {
+					uni.showToast({
+						title: '未登录账号无法发送消息 ,请及时登录!',
+						icon: 'none'
+					})
+				}
+			},
+			// 查询状态
+			searchStatus(e) {
+				const that = this;
+				let data = that.statusList.find((i) => i.value == e);
+				if (data) return data.label
+				else return '暂无'
+			},
+			// 选择选项卡
+			tabsChange(e) {
+				const that = this;
+				that.$set(that.tabs, `active`, e.active)
+				that.$set(that, `status`, e.active);
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+				that.sendOrder()
+			},
+			// 关闭弹框
+			toClose() {
+				const that = this;
+				that.$refs.specShow.close();
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			},
 			// 店铺
 			toShop() {
 				const that = this;
@@ -460,13 +801,28 @@
 					url: `/pagesHome/shop/index?id=${id}`
 				})
 			},
+			// 查看详情
+			toView(e) {
+				const that = this;
+				if (e.msg_type == '2') {
+					let id = e.content;
+					uni.navigateTo({
+						url: `/pagesHome/order/detail?id=${id}`
+					})
+				} else {
+					let status = e.ordernfo.is_status;
+					uni.navigateTo({
+						url: `/pagesMy/order/index?status=${status}`
+					})
+				}
+			},
 			//输入框高度
 			heights(e) {
 				const that = this;
 				that.goBottom();
 			},
 			// 滚动到底部
-			goBottom() {
+			async goBottom() {
 				const that = this;
 				that.scrollToView = '';
 				let lastItem = that.msgList.at(-1);
@@ -478,10 +834,10 @@
 			getFresh(e) {
 				const that = this;
 				that.triggered = true;
-				let list = that.msgList;
+				let msgList = that.msgList;
 				let limit = that.limit;
 				setTimeout(() => {
-					if (that.total > list.length) {
+					if (that.total > msgList.length) {
 						uni.showLoading({
 							title: '加载中',
 							mask: true
@@ -506,7 +862,7 @@
 				const that = this;
 				that.$set(that, `msgList`, [])
 				that.$set(that, `skip`, 0)
-				that.$set(that, `limit`, 10)
+				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 			},
 		}
@@ -647,6 +1003,60 @@
 								}
 							}
 						}
+
+						.msg-order {
+							width: 460rpx;
+							padding: 20rpx 10rpx;
+							background-color: #f0f0f0;
+							border-radius: 10rpx;
+
+							.order_1 {
+								display: flex;
+								flex-wrap: wrap;
+								margin: 10rpx 0;
+
+								.image {
+									width: 100rpx;
+									height: 100rpx;
+									border-radius: 10rpx;
+									margin: 0 5rpx 0 0;
+									border: 1rpx solid #858585;
+								}
+							}
+
+							.order_2 {
+								margin: 10rpx 0;
+
+								.no {
+									font-size: 12px;
+								}
+
+								.status {
+									display: flex;
+									justify-content: space-between;
+									margin: 5rpx 0;
+
+									text {
+										padding: 1rpx 2rpx;
+										border-radius: 5px;
+										font-size: 12px;
+										color: #ff0000;
+									}
+
+									.button {
+										text-align: right;
+
+										text {
+											font-size: 12px;
+											padding: 10rpx;
+											border-radius: 10rpx;
+											color: #FF4500;
+											background-color: #FFF8DC;
+										}
+									}
+								}
+							}
+						}
 					}
 
 					.msg-left {
@@ -688,6 +1098,29 @@
 		}
 	}
 
+	.uni-popup {
+		z-index: 9999 !important;
+	}
+
+	.popup {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 80vh;
+
+		.close {
+			text-align: right;
+			padding: 2vw;
+		}
+
+		.info_1 {
+			position: relative;
+			display: flex;
+			flex-direction: column;
+			height: 74vh;
+		}
+	}
+
 	.scroll-view {
 		position: absolute;
 		top: 0;