| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536 | 
							- <template>
 
- 	<view>
 
- 		<view class="cont">
 
- 			<view class="bg"></view>
 
- 			<view class="inner">			
 
- 				<!-- 订单状态 -->
 
- 				<view class="order-status">
 
- 				 
 
- 					<!-- 待发货 -->
 
- 					<view v-if="order.status == 1" class="inner">
 
- 						<view class="img-box">
 
- 							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/520e24fba47441b3b0f73b5250bb0b57.png" mode=""></image>
 
- 						</view>
 
- 						<view class="status-box">
 
- 							<text class="status">待发货</text>
 
- 							<text class="desc">等待后台发货</text>
 
- 						</view>
 
- 					</view>
 
- 					<!-- 已发货、待收货 -->
 
- 					<view v-if="order.status == 2" class="inner">
 
- 						<view class="img-box">
 
- 							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/1e6ba423ff7e4537bef87a022d530015.png" mode=""></image>
 
- 						</view>
 
- 						<view class="status-box">
 
- 							<text class="status">待收货</text>
 
- 							<text class="desc">运输中</text>
 
- 						</view>
 
- 					</view>
 
- 					<!-- 已完成 -->
 
- 					<view v-if="order.status == 3" class="inner">
 
- 						<view class="img-box">
 
- 							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/0712ba14f3a648afa69c9912fcbf9b61.png" mode=""></image>
 
- 						</view>
 
- 						<view class="status-box">
 
- 							<text class="status">已完成</text>
 
- 							<text class="desc">订单已确认收货,交易完成</text>
 
- 						</view>
 
- 					</view>
 
- 					<!--交易取消 -->
 
- 					<view v-if="order.status == -1" class="inner">
 
- 						<view class="img-box">
 
- 							<image src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/app/newImages/02f95bd03e854a9c8076aef1e6c05e74.png" mode=""></image>
 
- 						</view>
 
- 						<view class="status-box">
 
- 							<text class="status">交易关闭</text>
 
- 							<text class="desc">订单已取消</text>
 
- 						</view>
 
- 					</view>
 
- 					 
 
- 				</view>
 
- 				<!-- 下单人信息 -->
 
- 				<view class="order-placer" v-if="order.userName!=null">
 
- 					<view class="inner">
 
- 						<image class="location" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/location.png" mode=""></image>
 
- 						<view class="info">
 
- 							<view class="name-phone">
 
- 								<text class="text">{{order.userName}}</text>
 
- 								<text class="text" v-if="order.userPhone!=null">{{order.userPhone}}</text>
 
- 							</view>
 
- 							<view class="address ellipsis2">
 
- 								{{order.userAddress}}
 
- 							</view>
 
- 						</view>
 
- 					</view>
 
- 				</view>
 
- 				<view class="content">
 
- 					<view class="goods-list">
 
- 						<view   class="item"  >
 
- 							<view class="img-box">
 
- 								<image :src="item.imgUrl==''?'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/drug.svg':item.imgUrl" mode="aspectFill"></image>
 
- 							</view>
 
- 							<view class="info-box">
 
- 								<view>
 
- 									<view class="name-box ellipsis2">
 
- 										 {{item.goodsName}}
 
- 									</view>
 
- 								</view>
 
- 								<view class="price-num">
 
- 									<view class="price">
 
- 										<text class="unit">积分:</text>
 
- 										<text class="num"  >{{item.integral}}</text>
 
- 									</view>
 
- 									<view class="num"  >x1</view>
 
- 								</view>
 
- 							</view>
 
- 						</view>
 
- 					</view>
 
- 					<!-- 订单信息 -->
 
- 					<view class="order-info">
 
- 						<view class="title">订单信息</view>
 
- 						<view class="item">
 
- 							<text class="label">订单编号</text>
 
- 							<view class="sn-box">
 
- 								<text class="text">{{order.orderCode}}</text>
 
- 								<view class="copy-btn" @click="copyOrderSn(order.orderCode)">复制</view>
 
- 							</view>
 
- 						</view>
 
- 						<view class="item">
 
- 							<text class="label">下单时间</text>
 
- 							<text class="text">{{order.createTime}}</text>
 
- 						</view>
 
- 					 
 
- 						<view   class="item">
 
- 							<text class="label">使用积分</text>
 
- 							<text class="text"  >¥{{order.integral}}</text>
 
- 						</view>
 
- 						<view   class="item" v-if="order.deliveryName!=null">
 
- 						 	<text class="label">物流公司</text>
 
- 						 	<text class="text"  >{{order.deliveryName}}</text>
 
- 						</view>
 
- 						<view   class="item" v-if="order.deliverySn!=null">
 
- 						 	<text class="label">物流单号</text>
 
- 						 	<text class="text"  >{{order.deliverySn}}</text>
 
- 						</view>
 
- 					</view>
 
- 				</view>
 
- 			</view>
 
- 		</view>
 
- 		<!-- 按钮 -->
 
- 		<view   class="btn-box">
 
- 			<view class="btn cancel">
 
- 				联系客服
 
- 				<button class='contact-btn' open-type="contact">
 
- 				</button>
 
- 			</view>
 
- 		</view>
 
- 	</view>
 
- </template>
 
- <script>
 
- 	
 
- 	import {getIntegralOrderById} from '@/api/integral.js'
 
- 	export default {
 
- 		data() {
 
- 			return {
 
- 				orderId:null,
 
- 				order:null,
 
- 				item:null,
 
- 		 
 
- 			};
 
- 		},
 
- 		onLoad(option) {
 
- 			this.orderId = option.orderId
 
- 		},
 
- 		onShow() {
 
- 			this.getIntegralOrderById()
 
- 		},
 
- 		methods: {
 
- 			getIntegralOrderById(){
 
- 				var data={orderId:this.orderId};
 
- 				getIntegralOrderById(data).then(res => {
 
- 					if(res.code==200){
 
- 						 this.order=res.data;
 
- 						 this.item=JSON.parse(this.order.itemJson) 
 
- 					}else{
 
- 						uni.showToast({
 
- 							icon:'none',
 
- 							title: "请求失败",
 
- 						});
 
- 						 
 
- 					}
 
- 				});
 
- 			},
 
- 			 
 
- 			// 复制订单编号
 
- 			copyOrderSn(text) {
 
- 				// 复制方法
 
- 				uni.setClipboardData({
 
- 					data:text,
 
- 					success:()=>{
 
- 						uni.showToast({
 
- 							title:'内容已成功复制到剪切板',
 
- 							icon:'none'
 
- 						})
 
- 					}
 
- 				});
 
- 			},
 
- 		}
 
- 	}
 
- </script>
 
- <style lang="scss">
 
- 	.cont{
 
- 		width: 100%;
 
- 		position: relative;
 
- 		.bg{
 
- 			width: 100%;
 
- 			height: 350upx;
 
- 			position: absolute;
 
- 			top: 0;
 
- 			left: 0;
 
- 			z-index: 1;
 
- 			background-color: #2583EB;
 
- 			background: linear-gradient(#2583EB, #2EDAD4);
 
- 			border-radius: 0rpx 0rpx 100rpx 100rpx;
 
- 		}
 
- 		.inner{
 
- 			position: relative;
 
- 			padding: 30upx 0rpx;
 
- 			width: 100%;
 
- 			height: 100%;
 
- 			z-index: 999;
 
- 			.order-status{
 
- 				display: flex;
 
- 				align-items: center;
 
- 				justify-content: space-between;
 
- 				padding: 0 30upx;
 
- 				.inner{
 
- 					display: flex;
 
- 					align-items: center;
 
- 					.img-box{
 
- 						width: 96upx;
 
- 						height: 96upx;
 
- 						margin-right: 30upx;
 
- 						image{
 
- 							width: 100%;
 
- 							height: 100%;
 
- 						}
 
- 					}
 
- 					.status-box{
 
- 						height: 96upx;
 
- 						display: flex;
 
- 						flex-direction: column;
 
- 						justify-content: center;
 
- 						.status{
 
- 							font-size: 40upx;
 
- 							font-family: PingFang SC;
 
- 							font-weight: bold;
 
- 							color: #FFFFFF;
 
- 							line-height: 1;
 
- 						}
 
- 						.desc{
 
- 							font-size: 26upx;
 
- 							font-family: PingFang SC;
 
- 							font-weight: 500;
 
- 							color: #FFFFFF;
 
- 							line-height: 1;
 
- 							margin-top: 30upx;
 
- 						}
 
- 					}
 
- 				}
 
- 			}
 
- 			.order-placer{
 
- 				margin-top: 30upx;
 
- 				padding: 0 20upx;
 
- 				.inner{
 
- 					box-sizing: border-box;
 
- 					border-radius: 16upx;
 
- 					height: 150upx;
 
- 					padding: 40upx 30upx;
 
- 					display: flex;
 
- 					align-items: center;
 
- 					background: #FFFFFF;
 
- 					.location{
 
- 						width: 24upx;
 
- 						height: 27upx;
 
- 						margin-right: 18upx;
 
- 						flex-shrink: 0;
 
- 					}
 
- 					.info{
 
- 						.name-phone{
 
- 							display: flex;
 
- 							align-items: center;
 
- 							.text{
 
- 								font-size: 28upx;
 
- 								font-family: PingFang SC;
 
- 								font-weight: bold;
 
- 								color: #333333;
 
- 								line-height: 1;
 
- 								margin-right: 20upx;
 
- 								&:last-child{
 
- 									margin-right: 0;
 
- 								}
 
- 							}
 
- 						}
 
- 						.address{
 
- 							font-size: 26upx;
 
- 							font-family: PingFang SC;
 
- 							font-weight: 500;
 
- 							color: #999999;
 
- 							line-height: 1.3;
 
- 							margin-top: 10upx;
 
- 						}
 
- 					}
 
- 				}
 
- 				
 
- 			}
 
- 		}
 
- 	}
 
- 	.content{
 
- 		margin: 20rpx 0rpx;
 
- 		padding: 0 20upx 140rpx 20upx;
 
- 		.goods-list{
 
- 			padding: 0 30upx;
 
- 			background-color: #FFFFFF;
 
- 			border-radius: 16upx;
 
- 			.item{
 
- 				padding: 30upx 0;
 
- 				border-bottom: 1px solid #EDEEEF;
 
- 				display: flex;
 
- 				align-items: center;
 
- 				.img-box{
 
- 					width: 160upx;
 
- 					height: 160upx;
 
- 					margin-right: 30upx;
 
- 					image{
 
- 						width: 100%;
 
- 						height: 100%;
 
- 					}
 
- 				}
 
- 				.info-box{
 
- 					width: calc(100% - 190upx);
 
- 					height: 160upx;
 
- 					display: flex;
 
- 					flex-direction: column;
 
- 					justify-content: space-between;
 
- 					.name-box{
 
- 						font-size: 28upx;
 
- 						font-family: PingFang SC;
 
- 						font-weight: 500;
 
- 						color: #111111;
 
- 						line-height: 40upx;
 
- 						.tag{
 
- 							display: inline-block;
 
- 							padding: 0 6upx;
 
- 							height: 30upx;
 
- 							background: linear-gradient(90deg, #2583EB 0%, #2EDAD4 100%);
 
- 							border-radius: 4upx;
 
- 							margin-right: 10upx;
 
- 							font-size: 22upx;
 
- 							font-family: PingFang SC;
 
- 							font-weight: bold;
 
- 							color: #FFFFFF;
 
- 							line-height: 30upx;
 
- 							float: left;
 
- 							margin-top: 7upx;
 
- 						}
 
- 					}
 
- 					.spec{
 
- 						margin-top: 18upx;
 
- 						font-size: 24upx;
 
- 						font-family: PingFang SC;
 
- 						font-weight: 500;
 
- 						color: #999999;
 
- 						line-height: 1;
 
- 					}
 
- 					.price-num{
 
- 						display: flex;
 
- 						align-items: center;
 
- 						justify-content: space-between;
 
- 						.price{
 
- 							display: flex;
 
- 							align-items: flex-end;
 
- 							.unit{
 
- 								font-size: 24upx;
 
- 								font-family: PingFang SC;
 
- 								font-weight: 500;
 
- 								color: #111111;
 
- 								line-height: 1.2;
 
- 								margin-right: 4upx;
 
- 							}
 
- 							.num{
 
- 								font-size: 32upx;
 
- 								font-family: PingFang SC;
 
- 								font-weight: 500;
 
- 								color: #111111;
 
- 								line-height: 1;
 
- 							}
 
- 						}
 
- 						.num{
 
- 							font-size: 24upx;
 
- 							font-family: PingFang SC;
 
- 							font-weight: 500;
 
- 							color: #999999;
 
- 							line-height: 1;
 
- 						}
 
- 					}
 
- 				}
 
- 			}
 
- 			.sub-total{
 
- 				height: 88upx;
 
- 				display: flex;
 
- 				align-items: center;
 
- 				justify-content: flex-end;
 
- 				.discount{
 
- 					font-size: 24upx;
 
- 					font-family: PingFang SC;
 
- 					font-weight: 500;
 
- 					color: #999999;
 
- 					line-height: 1;
 
- 					margin-right: 30upx;
 
- 				}
 
- 				.label{
 
- 					font-size: 24upx;
 
- 					font-family: PingFang SC;
 
- 					font-weight: 500;
 
- 					color: #999999;
 
- 				}
 
- 				.price{
 
- 					display: flex;
 
- 					align-items: flex-end;
 
- 					.unit{
 
- 						font-size: 24upx;
 
- 						font-family: PingFang SC;
 
- 						font-weight: 500;
 
- 						color: #FF6633;
 
- 						line-height: 1.2;
 
- 						margin-right: 4upx;
 
- 					}
 
- 					.num{
 
- 						font-size: 32upx;
 
- 						font-family: PingFang SC;
 
- 						font-weight: bold;
 
- 						color: #FF6633;
 
- 						line-height: 1;
 
- 					}
 
- 				}
 
- 			}
 
- 		}
 
- 		.order-info{
 
- 			margin-top: 20upx;
 
- 			background: #FFFFFF;
 
- 			border-radius: 16upx;
 
- 			padding: 40upx 30upx;
 
- 			.title{
 
- 				font-size: 30upx;
 
- 				font-family: PingFang SC;
 
- 				font-weight: bold;
 
- 				color: #222222;
 
- 				line-height: 1;
 
- 			}
 
- 			.item{
 
- 				margin-top: 40upx;
 
- 				display: flex;
 
- 				align-items: center;
 
- 				justify-content: space-between;
 
- 				.label{
 
- 					font-size: 26upx;
 
- 					font-family: PingFang SC;
 
- 					font-weight: 500;
 
- 					color: #666666;
 
- 					line-height: 1;
 
- 				}
 
- 				.text{
 
- 					font-size: 26upx;
 
- 					font-family: PingFang SC;
 
- 					font-weight: 500;
 
- 					color: #222222;
 
- 					line-height: 32upx;
 
- 				}
 
- 				.cont-text{
 
- 					font-size: 26upx;
 
- 					font-family: PingFang SC;
 
- 					font-weight: 500;
 
- 					color: #666666;
 
- 					.bold{
 
- 						color: #111111;
 
- 					}
 
- 				}
 
- 				.sn-box{
 
- 					display: flex;
 
- 					align-items: center;
 
- 					.copy-btn{
 
- 						width: 58upx;
 
- 						height: 32upx;
 
- 						line-height: 32upx;
 
- 						text-align: center;
 
- 						font-size: 22upx;
 
- 						font-family: PingFang SC;
 
- 						font-weight: 500;
 
- 						color: #222222;
 
- 						background: #F5F5F5;
 
- 						border-radius: 4upx;
 
- 						margin-left: 24upx;
 
- 					}
 
- 				}
 
- 				.check-box{
 
- 					display: flex;
 
- 					align-items: center;
 
- 					image{
 
- 						width: 14upx;
 
- 						height: 24upx;
 
- 						margin-left: 10upx;
 
- 					}
 
- 				}
 
- 			}
 
- 			.line{
 
- 				width: 100%;
 
- 				height: 1px;
 
- 				background: #F0F0F0;
 
- 				margin-top: 30upx;
 
- 			}
 
- 		}
 
- 	}
 
- 	.btn-box{
 
- 		z-index: 999;
 
- 		bottom: 0;
 
- 		width: 100%;
 
- 		position: fixed;
 
- 		height: 120upx;
 
- 		box-sizing: border-box;
 
- 		background: #FFFFFF;
 
- 		padding: 0 30upx;
 
- 		display: flex;
 
- 		align-items: center;
 
- 		justify-content: flex-end;
 
- 		.btn{
 
- 			position: relative;
 
- 			width: 155upx;
 
- 			height: 64upx;
 
- 			line-height: 64upx;
 
- 			font-size: 26upx;
 
- 			font-family: PingFang SC;
 
- 			font-weight: 500;
 
- 			text-align: center;
 
- 			border-radius: 32upx;
 
- 			margin-left: 15upx;
 
- 			&.cancel{
 
- 				
 
- 				border: 1px solid #DDDDDD;
 
- 				color: #666666;
 
- 			}
 
- 			&.pay{
 
- 				background: #2583EB;
 
- 				color: #FFFFFF;
 
- 			}
 
- 			.contact-btn {
 
- 				top: 0;
 
- 				position: absolute;
 
- 				width:100%;
 
- 				height:100%;
 
- 				opacity: 0;
 
- 			}
 
- 		}
 
- 	}
 
- </style>
 
 
  |