<!-- 订单详情 -->
<template>
	<view>
		<view class="banner-img">
			<swiper :indicator-dots="true" :autoplay="false" :interval="3000" :duration="500" style="height: 30vh;" indicator-active-color="#fff">
				<swiper-item v-for="(item, index) in dataList.images" :key="index">
					<view style="width: 100%;height: 100%;" @click="openimg2(index)">
						<u-image :showLoading="true" :src="imgurl+item.imgPath" width="100%" height="100%"></u-image>
					</view>
				</swiper-item>
			</swiper>
		</view>
		<view class="banner">
			<view class="banner-item info">
				<view class="info-title">
					{{dataList.productName}}
		
				</view>
				<view  style="font-size: 24upx;color: #6b6b6b;margin-top: 14rpx;">
					{{dataList.productBrief}}
						
				</view>
			</view>
			<view class="banner-item field">
				<view class="banner-item-title">商品信息</view>
				<view class="banner-item-form">
					<u-row gutter="10">
						<u-col span="6">
							<view class="form-item">
								<view class="label">售价区间：</view>
								<text>{{dataList.section || '0'}}</text>
							</view>
						</u-col>
						<u-col span="6">
							<view class="form-item">
								<view class="label">会员价：</view>
								<text>{{dataList.memberSection || '0'}}</text>
							</view>
						</u-col>
						<u-col span="6">
							<view class="form-item">
								<view class="label">积分兑换：</view>
								<text>{{dataList.ifCredit=='1'?'允许':dataList.ifCredit=='0'?'不允许':'无'}}</text>
							</view>
						</u-col>
						<u-col span="6">
							<view class="form-item">
								<view class="label">库存：</view>
								<text>{{dataList.stockNumber || '0'}}</text>
							</view>
						</u-col>
						<u-col span="6">
							<view class="form-item">
								<view class="label">销量：</view>
								<text>{{dataList.volume || '0'}}</text>
							</view>
						</u-col>
						<u-col span="6">
							<view class="form-item">
								<view class="label">上架状态：</view>
								<text>{{dataList.shelveState=='0'?'未上架':dataList.shelveState=='1'?'已上架':dataList.shelveState=='2'?'待审核':dataList.shelveState=='3'?'审核失败':'无'}}</text>
							</view>
						</u-col>
						<u-col span="6">
							<view class="form-item">
								<view class="label">登记状态：</view>
								<text>{{dataList.registrationStatus=='1'?'已入库':'未入库'}}</text>
							</view>
						</u-col>
						<u-col span="6">
							<view class="form-item">
								<view class="label">驳回原因：</view>
								<text>{{dataList.reject || '无'}}</text>
							</view>
						</u-col>
						<u-col span="12">
							<view class="form-item">
								<view class="label">简介：</view>
								
								<text v-if="!dataList.productText">无</text>
							</view>
							<u-parse v-if="dataList.productText" :html="dataList.productText"></u-parse>
							<!-- <view v-if="dataList.productText" v-html="dataList.productText"></view> -->
						</u-col>
					</u-row>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {

		data() {
			return {
				dataList: {
					orderFormid: null,
					createTime: null,
					orderPrice: 0,
					logisticsPrice: 0,
					discountPrice: 0
				},
				imgurl: '',




			}
		},

		onShow() {

		},
		onLoad(options) {
			this.imgurl = this.$img
			console.log(options)
			this.$http.sendRequest('/product/getById', 'POST', {
				productId: options.id
			}, 2).then(res => {
				this.dataList = res.data.data
				console.log(this.dataList)
			})
			return

		},

		methods: {
			copy() {
				// #ifdef H5
				let clipboard = new ClipboardJS('.copy-color');
				clipboard.on('success', function(e) {
					uni.showToast({
						title: '复制成功',
						icon: 'success'
					})
					clipboard.destroy();
				})
				clipboard.on('error', function(e) {
					uni.showToast({
						title: '复制失败',
						icon: 'success'
					})
					clipboard.destroy();
				})
				// #endif
				// #ifndef H5
				uni.setClipboardData({
					data: this.dataList.orderFormid,
					success: function() {
						uni.showToast({
							title: '复制成功',
							icon: 'success'
						})
					}
				});
				// #endif
			},


		},

	}
</script>

<style lang="scss" scoped>
	// 商铺信息
	.banner {
		position: absolute;
		top: calc(30vh - 30rpx);
		width: 100%;
		// margin-top: -20rpx;
		border-radius: 30rpx;
		background-color: #fff;
		padding: 26rpx 34rpx 100rpx;
		.banner-item {
			border-bottom: 2rpx solid #EBEBEB;
			padding-bottom: 32rpx;
			.banner-item-title {
				font-size: 28rpx;
				font-weight: 700;
				line-height: 48rpx;
				margin-top: 30rpx;
			}
			.banner-item-form {
				.form-item {
					line-height: 30rpx;
					font-size: 24rpx;
					display: flex;
					justify-content: flex-start;
					align-items: top;
					padding: 14rpx 0;
				}
			}
			&:last-child {
				border-bottom: unset;
			}
		}
		// 基础信息
		.info {
			.info-title {
				font-weight: bold;
				font-size: 32rpx;
				// margin-bottom: 24rpx;
				span {
					display: inline-block;
					padding: 0 8rpx;
				}
			}
			.info-text {
				margin-bottom: 30rpx;
			}
			.info-racord {
				display: flex;
				justify-content: space-between;
				align-items: center;
				.info-price {
					color: #31AA6A;
					span {
						font-size: 40rpx;
						font-weight: 700;
						margin-right: 4rpx;
					}
				}
			}
		}
		// 场地信息
		// 位置信息
		.position {
			.position-info {
				display: flex;
				align-items: center;
				flex-direction: row;
				margin: 53rpx 22rpx;
				background-color: #fff;
				font-size: 24rpx;
				padding: 20rpx 16rpx;
				line-height: 30rpx;
				border-radius: 14rpx;
				text {
					margin-left: 10rpx;
				}
			}
		}
		// 周边商铺
		.other-business {
			.scroll-view_H {
				white-space: nowrap;
				width: 100%;
			}
			.scroll-view-item_H {
				display: inline-block;
				width: 210rpx;
				margin-right: 22rpx;
				&:last-child {
					margin-right: 0;
				}
				.business-card {
					width: 100%;
					.u-image {
						overflow: hidden !important;
						border-radius: 20rpx !important;
					}
					.business-card-title {
						width: 100%;
						overflow : hidden;/*必须结合的属性,当内容溢出元素框时发生的事情*/
						text-overflow: ellipsis;/*可以用来多行文本的情况下，用省略号“…”隐藏超出范围的文本 。*/
						// display: -webkit-box;/*必须结合的属性 ，将对象作为弹性伸缩盒子模型显示 。*/
						// -webkit-line-clamp: 2;/*用来限制在一个块元素显示的文本的行数。*/
						// -webkit-box-orient: vertical;/*必须结合的属性 ，设置或检索伸缩盒对象的子元素的排*/
						line-height: 30rpx;
						margin: 10rpx 0;
						padding: 0 10rpx;
					}
					.business-card-item {
						padding: 0 10rpx;
						font-weight: 400;
						font-size: 20rpx;
						color: #676767;
						line-height: 1.5;
						span {
							font-weight: 700;
							font-size: 30rpx;
							color: #000000;
						}
					}
				}
			}
		}
	}
	// 图片
	.banner-img {
		width: 100%;
		height: 30vh;
		line-height: 80rpx;
	}
	page {
		background: #f7f7f7;
	}

	.logistics {
		padding: 20upx 20upx;
	}

	.content {
		padding: 0 0 160upx 0;
	}

	.order-details-status {
		width: 750upx;
		height: 250upx;
		background: #333333;
	}

	.status-title-box {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding: 40upx 30upx 0;
		box-sizing: border-box;
		text-align: center;
	}

	.status-title-box2 {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 40upx 30upx 0;
		box-sizing: border-box;
	}

	.status-title-box .l {
		display: flex;
		flex-direction: column;
	}

	.status-title-box .l .status,
	.status-title-box2 .status {
		font-size: 30upx;
		color: #fff;
	}

	.status-title-box .l .label,
	.status-title-box2 .label {
		font-size: 24upx;
		color: #fff;
		margin-top: 14upx;
	}

	.status-title-box .r {
		width: 80upx;
		height: 80upx;
	}

	.order-details-info-box {
		padding: 0 30upx;
		box-sizing: border-box;
		// margin-top: -80upx;
	}

	.address-box {
		margin-top: 20upx;
		background: #fff;
		width: 100%;
		padding: 30upx;
		box-sizing: border-box;
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.address-box .address-img {
		width: 70upx;
		height: 70upx;
		margin-right: 20upx;
	}

	.address-box .address-r {
		flex: 1;
		display: flex;
		flex-direction: column;
		font-size: 28upx;
		color: #333;
	}

	.arrow-right-img {
		width: 24upx;
		height: 24upx;
		margin-left: 20upx;
	}

	.address-name-box {
		font-size: 30upx;
		color: #333;
	}

	.phone {
		font-size: 24upx;
		color: #999;
		margin-left: 20upx;
	}

	.address-info {
		font-size: 28upx;
		color: #333;
		margin-top: 15upx;
	}

	.order-list-box {
		margin-top: 20upx;

		.toService {
			line-height: 40rpx;
			padding: 0 8rpx;
			border: 1rpx solid #FAF6ED;
			cursor: pointer;
			display: flex;
			align-items: center;

			.service-img {
				width: 60upx;
				height: 60upx;
				margin-right: 12rpx;
			}

			text {
				line-height: 40rpx;
			}
		}
	}

	.order-list-box .item {
		margin-bottom: 20upx;
		background: #fff;
	}

	.order-list-top {
		height: 96upx;
		padding: 0 30upx;
		box-sizing: border-box;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		border-bottom: 1px solid #eee;
	}

	.top-l {
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.shop-img {
		width: 34upx;
		height: 34upx;
		margin-right: 10upx;
	}

	.shop-name {
		font-size: 30upx;
		color: #333;
		font-weight: bold;
	}

	.arrow-img {
		margin-left: 15upx;
		width: 24upx;
		height: 24upx;
	}

	.order-info-box {
		padding: 0 30upx;
		box-sizing: border-box;
	}

	.order-info {
		border-bottom: 1px solid #eee;
	}

	.order-info-item {
		display: flex;
		flex-direction: row;
		padding: 20upx 0;
	}

	.product-img {
		width: 180upx;
		height: 180upx;
		border-radius: 10upx;
		margin-right: 30upx;
	}

	.info-box {
		flex: 1;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.product-name {
		font-size: 26upx;
		color: #333;
		height: 68upx;
		line-height: 34upx;
		display: -webkit-box;
		overflow: hidden;
		text-overflow: ellipsis;
		word-break: break-all;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}

	.price-sku-box {
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.product-sku {
		font-size: 24upx;
		color: #999;
		display: inline-block;
		margin-left: -20upx;
		display: flex;
		flex-direction: row;
	}

	.price-box {
		display: flex;
		flex-direction: column;
	}

	.product-price1 {
		font-size: 24upx;
		color: #333;
		font-weight: 400;
	}

	.product-price2 {
		font-size: 24upx;
		color: #999;
		text-decoration: line-through;
		font-weight: 400;
	}

	.product-price .fuhao {
		font-size: 28upx;
	}

	.item-applay-btn {
		height: 50upx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		padding: 0 30upx;
		background: rgba(255, 255, 255, 1);
		border: 1px solid rgba(187, 187, 187, 1);
		border-radius: 25upx;
		font-size: 24upx;
		font-weight: 400;
		color: rgba(51, 51, 51, 1);
	}

	.product-num {
		font-size: 28upx;
		color: #999;
		display: inline-block;
	}

	.delivery-way-box {
		display: flex;
		flex-direction: column;
		margin: 30upx 0 10upx;
	}

	.delivery-way-box .item {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		font-size: 26upx;
		color: #333;
	}

	.delivery-way-box .item .way {
		color: #999;
	}

	.order-total-box {
		padding: 30upx 0;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		font-size: 26upx;
		color: #333;
	}

	.order-total-box .way-color {
		color: #333333;
		font-size: 32rpx;
	}

	.order-details-information {
		background: #fff;
	}

	.order-details-information.padd {
		padding: 30upx;
		margin: 0 30upx;
		box-sizing: border-box;
	}

	.order-details-information .order-title {
		font-size: 30upx;
		color: #333;
		font-weight: 500;
		display: flex;
		flex-direction: row;
		align-items: center;
	}

	.order-details-information .info-box {
		margin-top: 30upx;
	}

	.order-details-information .info-box .item {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		font-size: 24upx;
		color: #666;
		margin-bottom: 20upx;
	}

	.order-details-information .info-box .item .copy-color {
		font-size: 24upx;
		color: #C5AA7B;
	}

	.order-details-btn {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		min-height: 160upx;
		background: #fff;
		box-shadow: 0px 0px 10px 0px rgba(51, 51, 51, 0.1);
		box-sizing: border-box;
		display: flex;
		padding: 0 30upx;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		z-index: 10;
	}

	.order-details-btn .btn {
		width: 100%;
		height: 100upx;
		background: #333333;
		font-size: 28upx;
		color: #FFEBC4;
		text-align: center;
		line-height: 100upx;
		font-weight: 500upx;
	}

	.order-details-btn .btn-l {
		width: 50%;
		height: 100upx;
		border: 2rpx solid #333333;
		font-size: 28upx;
		color: #333;
		text-align: center;
		line-height: 100upx;
		box-sizing: border-box;
		margin-right: 10rpx;
	}

	.order-details-btn .btn-r {
		width: 50%;
		margin-left: 10rpx;
	}

	.mt20 {
		margin-top: 20upx;
	}

	.order-title-box {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.order-details-information .order-title-box .order-title.padd-l {
		padding-left: 30upx;
	}

	.arrow-down-img {
		width: 40upx;
		height: 40upx;
		margin: 30upx;
		box-sizing: border-box;
	}

	.evaluate {
		height: 56upx;
		border-radius: 28upx;
		text-align: center;
		line-height: 56upx;
		font-size: 26upx;
		padding: 0 30upx;
		border: 1px solid #C5AA7B;
		color: #C5AA7B;
	}

	.evaluate2 {
		height: 56upx;
		border-radius: 28upx;
		text-align: center;
		line-height: 56upx;
		font-size: 26upx;
		padding: 0 30upx;
		border: 1px solid #BBBBBB;
		color: #333;
	}

	.emptyOrder-box {
		padding: 70upx 0;

		.emptyOrder-img {
			width: 200upx;
			height: 200upx;
		}
	}

	.pay-type-item {
		.pay-type-radio {
			background-color: white;
			border-bottom: 1upx solid #EDEDED;
			margin-bottom: 20upx;
			padding: 24upx 20upx 24upx 20upx;

			.pay-type-img {
				display: inline-block;

				.pay-type-img-inner {
					width: 50upx;
					height: 50upx;
					vertical-align: middle;
				}
			}

			.pay-type-label {
				vertical-align: middle;
				margin-left: 30upx;
			}

			.pay-type-radio-item {
				float: right;
				margin-right: 20upx;
				width: 50upx;
				height: 50upx;
			}
		}

		.huabei-detail {
			margin-top: 20upx;

			.fenqi-wenzi {
				display: inline-block;
				margin-left: 64upx;
			}

			.fenqi-amount {
				display: block;
				margin-left: 64upx;
				margin-top: 14upx;
				color: #BABBBC;
			}

			.fenqi-charge-fee {
				float: right;
				margin-right: 68upx;
				color: #BABBBC;
			}

			.fenqi-modal {
				width: 40upx;
				height: 40upx;
				margin-left: 20upx;
				float: right;
				position: relative;
				top: -80upx;
			}
		}
	}

	.paytype-confirm {
		height: 120upx;
		padding: 0upx 108upx 0upx 32upx;

		.fenqi-all {
			display: inline-block;
			width: 100%;
		}

		.fenqi-total-amount {
			width: 65%;
			float: left;
		}

		.fenqi-confirm {
			float: right;
			width: 160upx;
			padding: 0upx 20upx;

			.btn {
				width: 216upx;
				height: 80upx;
				line-height: 80upx;
				border-radius: 40upx;
				font-size: 28upx;
				text-align: center;
				background: linear-gradient(90deg, rgba(255, 162, 0, 1), rgba(255, 121, 17, 1));
				color: #fff;
				display: inline-block;
				margin-right: 66upx;
			}
		}
	}

	.period-radio {
		margin: 30upx;
		padding-right: 100upx;
		width: 95%;
		border-bottom: 1px solid #EFEFEF;

		.period-amount {
			display: inline-block;

			.period-each-charge {
				display: inline-block;
				margin-top: 12upx;
				margin-left: 6upx;
				font-size: 26upx;
				color: #b7b7b7;
				margin-bottom: 13upx;
			}
		}

		.period-each {
			display: block;
		}

		.period-type-radio-item {
			float: right;
		}
	}
</style>