<template>
	<view class="content">
		<view class="content-bgcolor">
			<view class="content-bgcolor-table">
				<view class="">
					<text></text>灯泡灯芯坏了
				</view>
				<view class="">
					维修时间:2023-02-23
				</view>
			</view>
			<view class="content-bgcolor-matter">
				说明:有一个字不是特别亮,希望换一盏灯希望换一盏灯希望换一盏灯,
				有一个字不是特别亮,有一个字不是特别亮,希望换一盏灯希望换一盏灯有一个字不是特别亮,
				希望换一盏灯,有一个字不是特别亮,希望换一盏灯有一个字不是特别亮,
				希望换一盏灯希望换一盏灯
			</view>
			<view class="content-bgcolor-photo">
				<image class="content-bgcolor-photo-graph" src="@/static/logo.png" mode="" v-for="(v ,index) in 5"
					:key="index"></image>
			</view>
			<view class="content-bgcolor-payment">
				<view class="">
					已沟通审核通过,待支付
				</view>
				<view class="">
					300元
				</view>
			</view>
		</view>
		<view class="content-discounts" @click="jump(1)">
			<view class="">
				选择优惠券
			</view>
			<view class="">
				{{times}}元
				<image src="@/static/icon/jt.png" mode=""></image>
			</view>
		</view>
		<view class="content-discounts">
			<view class="">
				您当前可享1单9折优惠,是否使用
			</view>
			<view class="">
				<u-switch v-model="isUse" activeColor="#D6E1FF" inactiveColor="#F1F1F1" @change="changeUse"></u-switch>
			</view>
		</view>
		<view class="content-accomplish">
			<view class="">
				截止1小时内支付完成 <text>00:59:42</text>
			</view>
			<button @click="jump(2)">立即支付 300.00元</button>
		</view>
	</view>
</template>

<script>
	import apiBaseConfig from '@/config/index.js';
	export default {
		data() {
			return {
				imgBgUrl: apiBaseConfig.imgBgUrl,
				globalData: getApp().globalData,
				scrollTopHeader: 0,
				times:'0',
				isUse:true
			};
		},
		onLoad() {},
		methods: {
			jump(val) {
				if(val == 1){
					this.$uniGo.navigateTo({
						url: `/my/coupon/index?type=pay`
					});
				}else{
					this.$uniGo.navigateTo({
						url: `/demand/confirm/index`
					});
				}
			},
			changeUse(e){
				let that = this
				that.isUse = e
			}
		}
	}
</script>
<style>
	page {
		background: #F7F8F9;
	}
	.u-switch__node{
		background: #888888 !important;
	}
	.u-switch__node--on{
		background: #2C66FF !important;
	}
</style>
<style lang="scss" scoped>
	.content {
		padding: 20rpx;

		&-bgcolor {
			background: #ffffff;
			padding: 20rpx;
			border-radius: 8rpx;

			&-table {
				display: flex;
				justify-content: space-between;

				>view:nth-child(1) {
					display: flex;
					font-size: 28rpx;
					font-weight: 500;
					color: #333333;

					>text {
						width: 6rpx;
						height: 36rpx;
						background: #2C66FF;
						border-radius: 3rpx;
						margin-right: 10rpx;
					}
				}

				>view:nth-child(2) {
					font-size: 20rpx;
					font-weight: 400;
					color: #333333;
				}
			}

			&-matter {
				margin-top: 24rpx;
				font-size: 24rpx;
				font-weight: 400;
				color: #444444;
				line-height: 36rpx;
			}

			&-photo {
				display: flex;
				flex-wrap: wrap;
				justify-content: flex-start;

				&-graph {
					margin-top: 20rpx;
					margin-right: 20rpx;
					width: 210rpx;
					height: 210rpx;
				}

				&-graph:nth-child(3n) {
					margin-right: 0rpx;
				}
			}

			&-payment {
				margin-top: 20rpx;
				display: flex;
				justify-content: space-between;

				>view:nth-child(1) {
					font-size: 24rpx;
					font-weight: 400;
					color: #444444;
				}

				>view:nth-child(2) {
					font-size: 26rpx;
					font-weight: 600;
					color: #F55726;
				}
			}
		}

		&-discounts {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 23rpx;
			padding: 20rpx 23rpx;
			background: #FFFFFF;
			border-radius: 10rpx;

			>view:nth-child(1) {
				font-size: 24rpx;
				font-weight: 400;
				color: #333333;
			}

			>view:nth-child(2) {
				font-size: 26rpx;
				font-weight: 500;
				color: #F55726;
				display: flex;
				align-items: center;

				>image {
					width: 34rpx;
					height: 34rpx;
				}
			}

		}

		&-accomplish {
			// margin-top: 286rpx;
			// width: ca 100%;
			width: calc(100% - 20rpx * 2);
			text-align: center;
			position: absolute;
			bottom: 98rpx;

			>view:nth-child(1) {
				font-size: 18rpx;
				font-weight: 400;
				color: #333333;

				>text {
					margin-left: 8rpx;
					font-size: 18rpx;
					font-weight: 400;
					color: #FD0100;
				}
			}

			>button {
				margin-top: 20rpx;
				height: 80rpx;
				line-height: 80rpx;
				background: #2C66FF;
				border-radius: 10rpx;
				width: 100%;
				font-size: 26rpx;
				font-weight: 500;
				color: #FFFFFF;
			}
		}

	}
</style>