| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 | 
							- <template>
 
- 	<view class="content">
 
- 		<view class="inner">
 
- 			<view class="top">
 
- 				<text class="title">支付成功</text>
 
- 				 <image class="icon" src="https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/success.png" ></image>
 
- 				 <view   class="btn-box">
 
- 				 	<view class="btn cancel" @click="goOrderDetails(order.id)"> 查看订单</view>
 
- 				 </view>
 
- 			</view>
 
- 			<!-- 订单详情查看 -->
 
- 			<view class="order-info">
 
- 				<view class="title">订单信息</view>
 
- 				<view class="item">
 
- 					<text class="label">订单编号</text>
 
- 					<view class="sn-box">
 
- 						<view>
 
- 							<view class="text" v-for="item in order.orderCodes" :key="item">{{item}}</view>
 
- 						</view>
 
- 						<view class="copy-btn" @click="copyOrderSn(orderCode)">复制</view>
 
- 					</view>
 
- 				</view>
 
- 				<view class="item">
 
- 					<text class="label">下单时间</text>
 
- 					<text class="text">{{order.createTime}}</text>
 
- 				</view>
 
- 				 
 
- 			</view>
 
- 			
 
- 		</view>
 
- 		 
 
- 	</view>
 
- </template>
 
- <script>
 
- 	export default {
 
- 		data() {
 
- 			return {
 
- 				order:null,
 
- 				orderCode: "",
 
- 				ids: []
 
- 			}
 
- 		},
 
- 		onLoad(option) {
 
- 			this.order=JSON.parse(decodeURIComponent(option.order))
 
- 			// orderCodes和ids字段表示店铺订单
 
- 			this.orderCode = this.order && this.order.orderCodes ? this.order.orderCodes.join(',') : this.order.orderCode || '';
 
- 			this.ids = this.order && this.order.ids ? this.order.ids : this.order.id ?  [this.order.id] : [];
 
- 			uni.$emit('refreshOrder');
 
- 		},
 
- 		methods: {
 
- 			copyOrderSn(text) {
 
- 				// 复制方法
 
- 				uni.setClipboardData({
 
- 					data:text,
 
- 					success:()=>{
 
- 						uni.showToast({
 
- 							title:'内容已成功复制到剪切板',
 
- 							icon:'none'
 
- 						})
 
- 					}
 
- 				});
 
- 			},
 
- 			goOrderDetails(id){
 
- 				if(this.ids && this.ids.length > 1) {
 
- 					uni.navigateTo({
 
- 						url: '/pages_user/shopping/storeOrder?status='
 
- 					})
 
- 				} else {
 
- 					uni.redirectTo({
 
- 						url: "/pages_user/shopping/storeOrderDetail?id="+this.ids[0]
 
- 					}) 
 
- 				}
 
- 			}
 
- 		}
 
- 	}
 
- </script>
 
- <style lang="scss" scoped>
 
- 	page{
 
- 		height: 100%;
 
- 	}
 
- 	.content{
 
- 		height: 100%;
 
- 		display: flex;
 
- 		flex-direction: column;
 
- 		justify-content: space-between;
 
- 		.inner{
 
- 			padding: 20upx;
 
- 			.top{
 
- 				box-sizing: border-box;
 
- 				background: #FFFFFF;
 
- 				border-radius: 16upx;
 
- 				display: flex;
 
- 				flex-direction: column;
 
- 				align-items: center;
 
- 				padding: 50upx 0upx;
 
- 				.title{
 
- 					font-size: 40upx;
 
- 					font-family: PingFang SC;
 
- 					font-weight: 500;
 
- 					color: #222222;
 
- 					line-height: 1;
 
- 					text-align: center;
 
- 				}
 
- 				.icon{
 
- 					margin: 60upx 0upx;
 
- 					width: 100upx;
 
- 					height: 100upx;
 
- 				}
 
- 				 
 
- 			}
 
- 			 
 
- 			.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;
 
- 						}
 
- 					}
 
- 					 
 
- 				}
 
- 				.line{
 
- 					width: 100%;
 
- 					height: 1px;
 
- 					background: #F0F0F0;
 
- 					margin-top: 30upx;
 
- 				}
 
- 			}
 
- 		}
 
- 		.btn-box{
 
- 			margin-top: 20upx;
 
- 			box-sizing: border-box;
 
- 			display: flex;
 
- 			align-items: center;
 
- 			.btn{
 
- 				width: 155upx;
 
- 				height: 64upx;
 
- 				line-height: 64upx;
 
- 				font-size: 26upx;
 
- 				font-family: PingFang SC;
 
- 				font-weight: 500;
 
- 				text-align: center;
 
- 				border-radius: 32upx;
 
- 				&.cancel{
 
- 					border: 1px solid #DDDDDD;
 
- 					color: #666666;
 
- 				}
 
- 				 
 
- 			}
 
- 		}
 
- 	}
 
- 	
 
- </style>
 
 
  |