<template>
	<view class="refuelDetail">
		<!-- <zs-header :background="background"></zs-header> -->
		<!-- <image class="banner" :src="info.logo" mode=""></image> -->
		<view class="tag-title">
			超值优惠券·加油更便宜
		</view>
		<view class="content">
			<view class="block shopInfo">
				<view class="title-box">
					<view class="title">
						{{info.storeName}}
					</view>
					<view class="diatance-box">
						<image class="icon" src="../static/refuel/nav-icon-black.png" mode=""></image>
						{{(distance/1000).toFixed(2)}}km
					</view>
				</view>
				<view class="address">
					{{info.address}}
				</view>
				<view class="time">
					营业时间 周一至周日  {{info.openTimeHourStart}}：00 - {{info.openTimeHourEnd}}：00
				</view>
				
				<view class="address-box">
					<view class="distance">
						距离您{{(distance/1000).toFixed(2)}}公里
					</view>
					
					<view class="btn-box">
						<view class="btn" @click="handleNavigation">
							<image class="icon" src="../static/refuel/nav-icon.png" mode=""></image>
							导航
						</view>
						<view class="btn" @click="handleCall">
							<image class="icon" src="../static/refuel/tel-icon.png" mode=""></image>
							电话
						</view>
					</view>
				</view>
			</view>
			
			<view class="price-box block">
				<view class="price">
					 ¥{{price.vipPrice?(price.vipPrice/100).toFixed(2):'--'}}/L <view class="label">优惠价</view> 
				</view>
				<view class="right-box">
					<view class="old-price">
						油站价¥{{price.cityPrice?(price.storePrice/100).toFixed(2):'--'}}/L
					</view>
					<view class="old-price">
						国标价¥{{price.cityPrice?(price.cityPrice/100).toFixed(2):'--'}}/L
					</view>
				</view>
			</view>
			
			<view class="block">
				<view class="block-title">
					选择油号/油枪
				</view>
				<view class="choose-box">
					<view class="item" :class="[num?'active':'']" @click="hanleChoose">
						 {{num||"请选择油号"}}
						<image class="icon" src="../static/shop-desc.png" mode=""></image>
					</view>
					<view class="item" :class="[gun?'active':'']" @click="hanleChoose">
						{{gun ? (gun + '号枪'):"请选择油枪"}}
						<image class="icon" src="../static/shop-desc.png" mode=""></image>
					</view>
				</view>
				<view class="input-box">
				<input class="price-input" type="digit" v-model="amount" placeholder-class="placeholder" placeholder-style="color:#AAAAAA;font-weight: 500;" placeholder="请输入加油金额，优惠价格计算" />
					<view class="unit">
						¥
					</view>
				</view>
				
			</view>
			
				<view class="order-box block">
					<view class="item">
						<view class="label">
							订单金额
						</view>
						<view class="value-box">
							<view class="num">
								约{{(payInfo.litre/1000).toFixed(2)}}升
							</view>
							<view class="value">
								{{'￥'+ (payInfo.totalPrice/100).toFixed(2) }}
							</view>
						</view>
					</view>
					<view class="item">
						<view class="label">
							服务费
						</view>
						<view class="value" :class="[!payInfo.totalPrice?'gray':'']">
							{{payInfo.totalPrice?'￥'+(payInfo.serviceFee/100).toFixed(2) : '输入金额后查看服务费'}}
						</view>
					</view>
					<view class="item">
						<view class="label">
							优惠券减免金额
						</view>
						<view class="value" :class="[!payInfo.totalPrice?'gray':'',payInfo.promotionAmount?'red':'']">
							{{payInfo.totalPrice?'-￥'+(payInfo.promotionAmount/100).toFixed(2) : '输入金额后查看优惠金额'}}
						</view>
					</view>
					<view class="item">
						<view class="label">
							优惠券
						</view>
						<view class="value gray" :class="[couponLabel.value?'red':'']" @click="chooseCoupon">
							{{payInfo.totalPrice? couponLabel.label : '输入金额后查看优惠券'}}
							
						</view>
					</view>
				</view>
			
		</view>

		<view class="buy-box">
			<view class="total-price">
				<view class="label">
					合计:
				</view>
				<view class="price">
					¥ {{(payInfo.realPrice/100).toFixed(2)}}
				</view>
			</view>
		
	<!-- 		<button class="btn" :class="[btnDisabled?'disabled':'']" type="default" :loading="loading" :disabled="btnDisabled" @click="handlePay">立即支付</button> -->
				<button class="btn" type="default" :loading="loading" :disabled="btnDisabled" @click="handlePay">立即支付</button>
		</view>
		
		<u-popup :show="show" round="16rpx" mode="bottom" @close="close">
			<view class="popup-title">
				选择油号/油枪
			</view>
			<view class="item-box">
				<view class="sub-title">
					选择油号
				</view>
				<view class="box">
					<view class="item"  :class="[numIndex === index ?'active':'']" v-for="(item,index) in info.itemInfoList" :key="item.itemId" @click="handleTab(item,'',index)">
						{{item.itemName}}
					</view>
				</view>
			</view>
			
			<view class="item-box">
				<view class="sub-title">
					选择油枪 
					<view class="notice">
						请与加油员确认油枪号
					</view>
				</view>
				<view class="box">
					<view class="item" :class="[gun == item ?'active':'',(index+1)%4 == 0?'m0':'']" v-for="(item,index) in gunList" :key="item" @click="handleTab(item,'gun')">
						{{item}}号
					</view>
					
				</view>
			</view>
			
		</u-popup>
		
		<map class="map" id="map"></map>
		
	</view>
</template>

<script>
	import { queryStoreDetail,queryCalPrice,queryNewOrder,queryOrderPromotionList } from '@/api/refuel.js';
	import {debounce} from '@/utils/tool.js'
	export default {
		data() {
			return {
				type:1,
				map:null,
				show:false,
				loading:false,
				info:null,
				distance:0,
				itemId:'',//油号id
				num:'',//油号
				numIndex:undefined,//选择油号的index
				gun:'',//油枪
				price:{//选择的油号价格
					cityPrice:0,
					vipPrice:0,
					storePrice:0
				},
				storeId:'',
				amount:'',//输入金额
				payInfo:{//计算出来的金额
					discountPrice: 0,
					itemName: "",
					litre: 0,
					priceDetailVo: {deductionDetail: null, gunCoupon: null},
					promotionAmount: 0,
					realPrice: 0,
					serviceFee: 0,
					storeId: "",
					totalPrice: 0,
				},
				epId:'',//店铺id
				couponList:[],//可以优惠券列表
				query:{
					allowanceinfo: [
						{
						  "allowanceId": "",
						  "allowanceType": 2
						}
					],
					amount:0,
					itemName :this.num,
					storeId:this.storeId,
				},
				couponName:0,//优惠券名称
				isChooseBack:false,//是否是选择优惠券返回
			}
		},
		watch: {
			amount:debounce(function(val){
				if(!val){
					this.payInfo = {//计算出来的金额
						discountPrice: 0,
						itemName: "",
						litre: 0,
						priceDetailVo: {deductionDetail: null, gunCoupon: null},
						promotionAmount: 0,
						realPrice: 0,
						serviceFee: 0,
						storeId: "",
						totalPrice: 0,
					}
				}
				this.queryOrderPromotionList().then(()=>{
					this.queryCalPrice()
				})
				// else if(!this.num||!this.gun){
				// 	uni.showToast({
				// 		title:'请选择油号/油枪',
				// 		icon:'none'
				// 	})
				// }else if(val<10){
				// 	uni.showToast({
				// 		title:'加油金额不能小于10',
				// 		icon:'none'
				// 	})
				// }
			})
		},
		computed: {
			btnDisabled(){
				if(!this.payInfo.realPrice || !this.num || !this.gun || this.loading || this.amount<10){
					return true
				}else{
					return false
				}
			},
			gunList() {
				if(this.numIndex == undefined){
					return []
				}else{
					return this.info.itemInfoList[this.numIndex].gunNoList
				}
			},
			// query(){
			// 	return {
			// 		allowanceinfo: [
			// 		    {
			// 		      "allowanceId": "",
			// 		      "allowanceType": 0
			// 		    }
			// 		],
			// 		amount:this.amount*100,
			// 		itemName :this.num,
			// 		storeId:this.storeId,
			// 	}
			// },
			notice(){
				if(this.amount&&this.amount<10){
					return uni.showToast({
							title:'加油金额不能小于10',
							icon:'none'
						})
				}else if(!this.num||!this.gun){
					return uni.showToast({
								title:'请选择油号/油枪',
								icon:'none'
							})
				}else if(!this.amount){
					return uni.showToast({
								title:'请输入加油金额',
								icon:'none'
							})
				}
				else if(this.amount>999){
					this.amount = 999
					return uni.showToast({
								title:'加油最大金额999',
								icon:'none'
							})
				}
			},
			couponLabel(){
				if(this.couponList.length){
					if(this.couponName){
						return {label: `${this.couponName}`,value:true}
					}else{
						return {label: `有${this.couponList.length}张可用`,value:true} 
					}
					
				}else{
					return {label: '暂无可用',value:false} 
				}
			}
		},
		methods: {
			chooseCoupon(){
				if(this.couponList.length){
					let that = this
					uni.navigateTo({
						url:`/refuel/coupon?storeId=${this.storeId}`,
						success: function(res) {
						  // 通过eventChannel向被打开页面传送数据
						  let info = {
							  allowanceId:that.query.allowanceinfo[0].allowanceId,
							  allowanceType:that.query.allowanceinfo[0].allowanceType,
							  gun:that.gun,
							  numIndex:that.numIndex,
							  itemId:that.itemId,
							  num:that.num,
							  cityPrice:that.price.cityPrice,
							  vipPrice:that.price.vipPrice,
							  storePrice:that.price.storePrice,
							  amount:that.amount,
							  epId:that.epId,
							  couponName:that.couponName
						  }
						  res.eventChannel.emit('coupon',info)
						}
						
					})
				}
			},
			handleTab(item,type,index){
				if(type == 'gun'){
					this.gun = item
					this.show = false
				}else{
					this.gun = ''
					this.numIndex = index
					this.itemId = item.itemId
					this.num = item.itemName
					this.price.cityPrice = item.cityPrice
					this.price.vipPrice = item.vipPrice
					this.price.storePrice = item.storePrice
				}
				this.queryCalPrice()
					
			},
			handleNavigation() {
				uni.openLocation({
							latitude: this.info.lat,
							longitude: this.info.lon,
							name:this.info.storeName,
							address:this.info.address,
							success: function () {
								console.log('success');
							}
						});
				// this.map.openMapApp({
				// 	longitude:this.info.lon,
				// 	latitude:this.info.lat,
				// 	destination:this.info.storeName,
				// 	success(res){
				// 		console.log(res);
				// 	}
				// }) 
			},
			handleCall() {
				if(this.info.tel){
					uni.makePhoneCall({
						phoneNumber: this.info.tel //仅为示例
					});
				}else{
					uni.showToast({
						title:'商家没有预留电话',
						icon:'none'
					})
				}
			},
			hanleChoose(){
				this.show = true
			},
			close(){
				this.show = false
			},
			// 加油站详情
			queryStoreDetail(storeId){
				uni.showLoading({
					title:'加载中'
				})
				queryStoreDetail(storeId).then(res=>{
					uni.hideLoading()
					this.info = res.content
					this.getDistance()
					if(!this.itemId&&!this.num){//没使用优惠券时
						this.info.itemInfoList.map((item,index)=>{
							if(item.itemName == '92#'){
								this.numIndex = index
								this.itemId = item.itemId
								this.num = item.itemName
								this.price.cityPrice = item.cityPrice
								this.price.vipPrice = item.vipPrice
								this.price.storePrice = item.storePrice
							}
						})
					}
				})
			},
			queryOrderPromotionList(){
				return new Promise((resolve,reject)=>{
					queryOrderPromotionList({
					  "orderAmount": this.amount*100,
					  "storeId": this.storeId
					}).then(res=>{
						console.log(res);
						if(Array.isArray(res.content)&&res.content.length&&!this.isChooseBack){
							this.couponList = res.content
							this.couponName = res.content[0].promotionDesc
							this.query.allowanceinfo[0].allowanceId = res.content[0].allowanceId
						}
						else if(Array.isArray(res.content)){
							this.couponList = res.content
						}
						resolve()
					})
				})
			},
			queryCalPrice(){
				if(this.num&&this.gun&&this.amount>=10){
					uni.showLoading({
						title:'计算中'
					})
					let query = JSON.parse(JSON.stringify(this.query))
					query.amount = this.amount*100
					query.itemName = this.num,
					query.storeId = this.storeId,
					queryCalPrice(query).then(res=>{
						uni.hideLoading()
						if(res.state == 'Success'){
							this.payInfo = res.content
						}
					})
				}
			},
			getDistance(){
				let location = JSON.parse(uni.getStorageSync('location'))
				this.distance =this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon)
				//驾车距离
				// qqmapsdk.calculateDistance({from:{latitude:location.latitude,longitude:location.longitude},to:[{latitude:this.info.location[1],longitude:this.info.location[0]}],success:(res)=>{
				// 	console.log(res);
				// 	this.distance = res.result.elements[0].distance
				// }})
			
			},
			getRad(d) {
			    return d * Math.PI / 180.0;
			},
			/*参数：两地的经纬度数值*/
			getFlatternDistance(lat1, lng1, lat2, lng2) {
			    var radLat1 = this.getRad(lat1);
			    var radLat2 = this.getRad(lat2);
			    var a = radLat1 - radLat2;
			    var b = this.getRad(lng1) - this.getRad(lng2);
			    var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
			    Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
			    s = s * 6378137.0;//地球半径 单位米;
			    s = Math.round(s * 10000) / 10000; //输出为米
			    s = s.toFixed(0)
			    return s
			},
			handlePay(){
				
				if(JSON.parse(uni.getStorageSync('userInfo')).setMealCode != 0){
					let that = this
					let location = JSON.parse(uni.getStorageSync('location'))
					
					// if(this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon)>100000000){
					if(this.getFlatternDistance(location.latitude,location.longitude,this.info.lat,this.info.lon)>1000){
						return uni.showModal({
							title:'提示',
							content:'您当前距离加油站较远，请到达加油站后与加油员确定信息',
							confirmText:'刷新位置',
							success: function (res) {
								if (res.confirm) {
									uni.showLoading({
										title:'刷新中'
									})
									uni.getLocation({
											type: 'gcj02',
											success: (res) => {
												// 存储经纬度
												uni.setStorageSync('location',JSON.stringify({latitude:res.latitude,longitude:res.longitude}))
												uni.hideLoading()
												that.getDistance()
											}
									})
								}
							}
						})
					}
					this.loading = true
					let query = {
						"channel":'ZhongShu',
						  "epId": this.epId,
						  "itemName":this.num,
						  "gunNo": this.gun,
						  "itemId": this.itemId,
						  "litre": this.payInfo.litre,
						  "openExtra": "",
						  "originalAmount": this.payInfo.totalPrice,
						  "outNewUserFlag": "",
						  "paymentAmount":  this.payInfo.realPrice,
						  "promotionInfo": this.query.allowanceinfo,
						  "serviceFee": this.payInfo.serviceFee,
						  "storeId":this.storeId,
						  "storePrice": this.price.storePrice,
						  "vipPrice": this.price.vipPrice
					}
					queryNewOrder(query).then(res=>{
						this.loading = false
						if(res.state == 'Success'){
							uni.navigateToMiniProgram({
								 appId:"wx0d252f6ed9755862", // 滴滴加油小程序appId
								   path: `packageA/pages/open-energy-pay/index?orderId=${res.content.xjOrderId}&tradeId=${res.content.tradeId}`, // 滴滴加油收银台页面地址，需要拼接orderId和tradeId
								   envVersion: 'release' // 固定release
							})
						}
					})
					
				}else{
					uni.showModal({
						title:'此商品需要开通会员才能购买',
						cancelText:'下次再说',
						confirmText:'立即开通',
						success(res) {
							if(res.confirm){
								uni.navigateTo({
									url:'/my/memberCenter/index'
								})
							}
						}
					})
				}
				
				
			}
		},
		onReady() {
			this.map = uni.createMapContext("map", this);
		},
		onShow() {
			// if(!this.btnDisabled){
			// 	uni.reLaunch({
			// 		url:'/my/order/index'
			// 	})
			// }
		},
		onLoad(options) {
			this.epId = options.epId
			console.log(111,options);
			// '5154031457384536897'
			this.storeId =  options.id
			this.queryStoreDetail(options.id)
			const eventChannel = this.getOpenerEventChannel();
			let that = this
			eventChannel.on('pay', function(data) {
				that.query.allowanceinfo[0].allowanceId = data.allowanceId
				that.query.allowanceinfo[0].allowanceType = data.allowanceType
				
				that.gun = data.gun
				that.numIndex =data.numIndex 
				that.itemId = data.itemId
				that.num = data.num
				that.price.cityPrice = data.cityPrice,
				that.price.vipPrice = data.vipPrice,
				that.price.storePrice = data.storePrice,
				that.amount = data.amount
				that.couponName = data.couponName
				that.isChooseBack = true
				console.log('data', data);
			})
			
		}
	}
</script>

<style lang="scss" >
.refuelDetail{
	background: #F5F5F6;
	height: 100vh;
	padding-bottom: 200rpx;
	.banner{
		width: 100%;
		height: 382rpx;
	}
	.tag-title{
		font-weight: 600;
		font-size: 32rpx;
		color: #EE4320;
		height: 220rpx;
		background: linear-gradient( 180deg, rgba(238,67,32,0.15) 0%, rgba(255,255,255,0) 100%);
		padding: 20rpx 24rpx;
		box-sizing: border-box;
	}
	.block{
		margin: 0 24rpx 20rpx;
		background: #fff;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		padding: 28rpx 24rpx ;
	}
	.content{
		margin-top: -142rpx;
		// min-height: 500rpx;
		// border-radius: 16rpx 16rpx 0 0;
		// position: relative;
		// z-index: 2;
		// background: #fff;
		// padding: 28rpx 24rpx;
		.shopInfo{
			background-image: url('@/static/white-map.png');
			background-repeat: no-repeat;
			background-size: 318rpx 295rpx;
			background-position: right top;
			.title-box{
				display: flex;
				align-items: flex-end;
				justify-content: space-between;
				.title{
					font-weight: 600;
					font-size: 32rpx;
					color: #222222;
					width: 500rpx;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
					margin-top: 10rpx;
				}
				.diatance-box{
					display: flex;
					align-items: center;
					font-weight: 400;
					font-size: 24rpx;
					color: #222222;
					.icon{
						width: 20rpx;
						height: 20rpx;
						margin-right: 8rpx;
					}
				}
			}
			
			.time{
				font-weight: 300;
				font-size: 24rpx;
				color: #AAAAAA;
				padding: 20rpx 0;
				border-bottom: 1rpx solid #F0F0F0;
			}
			
			.address{
				font-weight: 400;
				font-size: 24rpx;
				color: #222222;
				line-height: 40rpx;
				overflow: hidden;
				padding-right: 20rpx;
				text-overflow: ellipsis;
				/* 弹性伸缩盒子模型显示 */
				display: -webkit-box;
				/* 限制在一个块元素显示的文本的行数 */
				-webkit-line-clamp: 2;
				/* 设置或检索伸缩盒对象的子元素的排列方式 */
				-webkit-box-orient: vertical;
				margin-top: 10rpx;
			}
			.address-box{
				display: flex;
				align-items: center;
				justify-content: space-between;
				// width: 702rpx;
				// height: 140rpx;
				// background-image: url('@/static/white-map.png');
				// background-repeat: repeat;
				// background-size: 100% 140rpx;
				box-sizing: border-box;
				padding-top: 20rpx;
				
				.distance{
					font-weight: 300;
					font-size: 24rpx;
					color: #AAAAAA;
				}
				.btn-box{
					display: flex;
					.btn+.btn{
						margin-left: 16rpx;
					}
					.btn{
						width: 120rpx;
						height: 52rpx;
						line-height: 52rpx;
						text-align: center;
						font-weight: 400;
						font-size: 24rpx;
						color: #222222;
						display: flex;
						align-items: center;
						.icon{
							width: 30rpx;
							height: 30rpx;
							padding-right: 10rpx;
						}
					}
				}
			}
		}
		.price-box{
			display: flex;
			align-items: center;
			justify-content: space-between;
			.price{
				font-weight: 600;
				font-size: 36rpx;
				color: #EE4320;
				display: flex;
				align-items: center;
				.label{
					font-size: 22rpx;
				}
			}
			.right-box{
				display: flex;
				align-items: center;
				.old-price{
					font-weight: 300;
					font-size: 24rpx;
					color: #AAAAAA;
					margin-left: 20rpx;
				}
			}
		}
		.block-title{
			font-weight: 600;
			font-size: 28rpx;
			color: #222222;
			padding-bottom: 24rpx;
		}
		.choose-box{
			display: flex;
			justify-content: space-between;
			.item{
				width: 316rpx;
				height: 80rpx;
				line-height: 80rpx;
				text-align: center;
				background: #F0F0F0;
				border-radius: 8rpx;
				font-weight: 600;
				font-size: 28rpx;
				color: #222222;
				position: relative;
				.icon{
					width: 32rpx;
					height: 32rpx;
					position: absolute;
					top: 50%;
					right: 24rpx;
					transform: translateY(-50%);
				}
			}
			.item.active{
				background: #FFF6F5;
				color: #FF4D3A;
			}
		}
		.input-box{
			position: relative;
			overflow: hidden;
			margin-top: 20rpx;
			width: 100%;
			height: 120rpx;
			line-height: 120rpx;
			border-radius: 16rpx;
			background: #F0F0F0;
			.price-input{
				position: absolute;
				top: 50%;
				left: 72rpx;
				height: 70rpx;
				line-height: 70rpx;
				width: 450rpx;
				transform: translateY(-50%);
				font-weight: bold;
				font-size: 32rpx;
				color: #222;
				box-sizing: border-box;
			}
			.placeholder{
				font-size: 32rpx;
				color: #AAAAAA;
				height: 64rpx;
				line-height: 64rpx;
			}
			.unit{
				position: absolute;
				top: 50%;
				left: 28rpx;
				transform: translateY(-50%);
				font-size: 32rpx;
				color: #222222;
				font-weight: bold;
			}
		}
		
		.order-box{
			padding: 0 24rpx;
			.item{
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 24rpx 0;
				border-bottom: 1rpx solid #F0F0F0;
				.label{
					font-weight: 300;
					font-size: 28rpx;
					color: #222222;
				}
				.value-box{
					display: flex;
					align-items: center;
					.num{
						font-weight: 300;
						font-size: 28rpx;
						color: #AAAAAA;
					}
				}
				.value{
					font-weight: 300;
					font-size: 28rpx;
					color: #222222;
					margin-left: 20rpx;
					max-width: 400rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					/* 弹性伸缩盒子模型显示 */
					display: -webkit-box;
					/* 限制在一个块元素显示的文本的行数 */
					-webkit-line-clamp: 1;
					/* 设置或检索伸缩盒对象的子元素的排列方式 */
					-webkit-box-orient: vertical;
				}
				.gray{
					color: #AAAAAA!important;
				}
				.red{
					color: #EE4320!important;
					font-weight: 600!important;
					font-size: 28rpx!important;
				}
			}
		}
		
	}
	.buy-box {
		position: fixed;
		bottom: 0%;
		left: 0%;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		box-sizing: border-box;
		padding: 10rpx 30rpx env(safe-area-inset-bottom);
		border-top: 1rpx solid #EEEEEE;
		background: #fff;
		.total-price {
			display: flex;
			align-items: center;
	
			.label {
				color: #181818;
				font-size: 28rpx;
			}
	
			.price {
				font-size: 36rpx;
				font-weight: 800;
				color: #EE4320;
				margin-left: 10rpx;
			}
		}
	
		.btn {
			width: 280rpx;
			height: 80rpx;
			line-height: 80rpx;
			text-align: center;
			background: $uni-color-primary;
			box-shadow: inset 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
			border-radius: 46rpx 46rpx 46rpx 46rpx;
			font-weight: 800;
			color: #FFFFFF;
			font-size: 28rpx;
			margin: 0;
		}
		.btn.disabled{
			filter: grayscale(1);
		}
	}
	
	.map{
		position: absolute;
		top: -9999rpx;
		left: -9999rpx;
	}
	
	.u-popup__content{
		padding: 28rpx 24rpx;
		background: #F9F9F9 !important;
		.popup-title{
			font-weight: 600;
			font-size: 32rpx;
			color: #222222;
		}
		.item-box{
			width: 100%;
			background: #FFFFFF;
			border-radius: 16rpx 16rpx 16rpx 16rpx;
			margin-top: 20rpx;
			padding: 24rpx;
			box-sizing: border-box;
			
			.sub-title{
				font-weight: 600;
				font-size: 28rpx;
				color: #222222;
				margin-bottom: 20rpx;
				display: flex;
				align-items: flex-end;
				.notice{
					font-weight: 300;
					font-size: 24rpx;
					color: #AAAAAA;
					margin-left: 20rpx;
				}
			}
			.box{
				display: flex;
				flex-wrap: wrap;
				max-height: 600rpx;
				overflow: auto;
				.item{
					width: 148rpx;
					height: 52rpx;
					line-height: 52rpx;
					text-align: center;
					background: #F0F0F0;
					border-radius: 8rpx 8rpx 8rpx 8rpx;
					font-weight: 400;
					font-size: 28rpx;
					color: #222222;
					margin-bottom: 20rpx;
					margin-right: 20rpx;
				}
				.item.active{
					background: #FFF6F5;
					color: #EE4320;
					font-weight: bold;
				}
				.item.m0{
					margin-right: 0!important;
				}
			}
		}
	}
}
</style>