<template>
	<view>
		<view v-if="xcxSelect === '是'">
			<view class="content" style="position: relative;">
				<!-- #ifdef APP -->
				<cover-view class="headTop">
					<cover-view class="flex align-center padding-lr" @click="openMap()"
						v-if="isDw&&!ordershow&&!driverShow" style="margin-top: 70rpx;height: 80rpx;">
						<cover-view style="color: #333333;"> {{city?city:'暂无地址'}} </cover-view>
						<cover-image v-if="globalImages" :src="globalImages + 'images/static/image/right.png'"
							style="width: 14rpx;height: 22rpx;margin-left: 8rpx;">
						</cover-image>
					</cover-view>
					<cover-view class="padding-lr" v-else @click="openFest()"
						style="margin-top: 80rpx;height:65rpx;width: 80rpx;">
						<cover-image v-if="globalImages" :src="globalImages + 'images/static/image/icon_back.png'"
							style="width:18rpx;height: 28rpx;margin-left: 8rpx;">
						</cover-image>
					</cover-view>
				</cover-view>
				<!-- #endif -->
				<!-- #ifndef APP -->
				<view class="headTop">
					<view class="flex align-center" @click="openMap()" v-if="isDw&&!ordershow&&!driverShow">
						<view> {{city}} </view>
						<image v-if="globalImages" :src="globalImages + 'images/static/image/right.png'" style="width: 14rpx;height: 22rpx;margin-left: 8rpx;">
						</image>
					</view>
					<view v-else @click="openFest()">
						<image v-if="globalImages" :src="globalImages + 'images/static/image/icon_back.png'"
							style="width:18rpx;height: 28rpx;margin-left: 8rpx;">
						</image>
					</view>
				</view>
				<!-- #endif -->

				<!-- #ifndef MP-WEIXIN  -->
				<view class="page-body">
					<view class="page-section page-section-gap">
						<map id="map" style="width: 100%;" :style="!pcMoney?'height: 55vh':'height: 55vh'"
							:latitude="latitude" :longitude="longitude" :markers="covers" :show-location="true"
							:polyline="polyline" :polygons="polylist">
						</map>
					</view>
				</view>

				<!-- #endif -->

				<!-- #ifdef MP-WEIXIN -->
				<view class="page-body">
					<view class="page-section page-section-gap">
						<map id="map" style="width: 100%; " :style="!pcMoney?'height: 55vh':'height: 55vh'"
							:latitude="latitude" :longitude="longitude" :markers="covers" :show-location="true"
							:customCallout="customCallout" :polygons="polylist" :polyline="polyline">
						</map>
					</view>
				</view>
				<!-- #endif -->


				<view class="controls-title" style="position:absolute;top: 90%;">
					<!-- <view class="orderb" v-if="haveorder.length!=0&&!driverShow" @click="goOrerDer()">
					<view>您当前有一个正在进行的订单</view>
					<view class="flex align-center">
						<view class="text-sm">立即查看</view>
						<image src="../../static/image/go.png" style="width: 14rpx;height: 24rpx;margin-left: 5rpx;">
						</image>
					</view>
				</view> -->

					<view v-if="popupshow">
						<view style="position: relative;width: 100%;height: 730rpx; overflow: auto; -webkit-overflow-scrolling: touch;">
							
							<cover-image v-if="globalImages" :src="globalImages + 'images/sc_bg.png'" style="z-index: 99;width: 100%;height: 280rpx;position: absolute;top: -40rpx;"
								></cover-image>
							<view class="controls-box" style="position: absolute; top: 160rpx;width: 100%; padding: 30upx 30rpx 20rpx;">
								<!-- <view class="controls-tabs" v-if="xcxSelect=='是'">
								<view v-for="(item,index) in classifyLsit" :key="index" v-if="index<4"
									@tap="change(index,item)" class="atabs_ds">
									<view>{{item.name}}</view>
									<view :class="{btna:current == index}"></view>
								</view>
							</view> -->


								<!-- <view style="color: #999999;" class="flex align-center justify-center margin-bottom-sm"
								@click="openHour()" v-if="current==3">
								<view v-if="!daijiaTime">小时代驾</view>
								<view v-else>{{daijiaTime}}</view>

								<image src="../../static/image/go.png"
									style="width: 14rpx;height: 21rpx;margin-left: 10rpx;">
								</image>
							</view>
							<view style="color: #999999;" class="flex align-center justify-center margin-bottom-sm"
								v-if="current==1" @click="godaijia()">
								<view v-if="daijiao.length==0">替朋友叫代驾</view>
								<view v-else>{{daijiao.name}} {{daijiao.phone}}</view>

								<image src="../../static/image/go.png"
									style="width: 14rpx;height: 21rpx;margin-left: 10rpx;">
								</image>
							</view> -->

								<!-- <view style="color: #999999;" class="flex align-center justify-center margin-bottom"
								v-if="current==2" @click="openTime()">
								<view v-if="!yuyueTime">选择预约时间</view>
								<view v-else style="color: #333333;">{{yuyueTime}}</view>
								<image src="../../static/image/go.png"
									style="width: 14rpx;height: 21rpx;margin-left: 10rpx;">
								</image>
							</view> -->
								<view style="background: #fee8d9;padding: 40rpx 20rpx 20rpx 20rpx;border-radius: 15rpx;">
									
									<view style="margin: 0 10rpx 20rpx;">
										出发地
									</view>
									<view class="addbox bgc" @click="changeAdd(current,1)">
										<view class="add_cont">
											<view class="green"></view>
											<view class="" v-if="addlist.length==0">正在获取上车点...</view>
											<view class="add_tit" v-else>
												<view class="flex align-center">
													从<view class="text-cut" style="color: #346EF6;max-width: 420rpx;">
														{{addlist.address}}
													</view>出发
												</view>
												<!-- <view class="text-sm" style="color: #999999;font-weight: 500;margin-top: 5rpx;"
												v-if="riderNumber">
												附近有{{riderNumber}}个司机
											</view> -->
											</view>
										</view>
										<view>
											<image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'" style="width: 16rpx;height: 25rpx;">
											</image>
										</view>
									</view>
									
									<view style="margin: 0 10rpx 20rpx;">
										目的地
									</view>
									<view class="addbox bg" @click="changeAdd(current,2)">
										<view class="add_cont">
											<view class="orgin"></view>
											<view class="add_tit" v-if="addlists.length==0">输入目的地</view>
											<view class="add_tit" v-else>{{addlists.address}}</view>
										</view>
										<view>
											<image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'" style="width: 16rpx;height: 25rpx;">
											</image>
										</view>
									</view>
									
									<view style="margin: 0 10rpx 20rpx;">
										出发时间
									</view>
									<view class="addbox bg">
										<view class="add_cont">
											<image v-if="globalImages" :src="globalImages + 'images/rili.png'" style="width: 30rpx;height: 30rpx;"></image>
											<view style="width: 540rpx;display: flex;justify-content: center;">
												<view style="flex: 1;" @click="openTime(1)">
													<view class="add_tit" v-if="!yuyueTime">开始预约时间</view>
													<view class="add_tit" v-else>{{yuyueTime}}</view>
												</view>
												<view style="flex: 1;" @click="openTime(2)">
													<view class="add_tit" v-if="!yyEndTime">结束预约时间</view>
													<view class="add_tit" v-else>{{yyEndTime}}</view>
												</view>
											</view>
										</view>
										<view>
											<image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'" style="width: 16rpx;height: 25rpx;">
											</image>
										</view>
									</view>
									<!-- <view class="text-center text-lg margin-tb" v-if="current==2">预估<text class="text-bold"
										style="font-size: 48rpx;">18</text>元</view> -->
									<view class="pc_view" v-if="pcMoney">
										<view :class="pcIndex == 2 ? 'pc_items' : 'pc_item'" @tap="selPC(2)">
											<view class="pc_name">拼车</view>
											<image v-if="globalImages" :src="globalImages + 'images/static/upload/duoren.png'" style="width: 143rpx;height: 73rpx;"></image>
											<view v-if="pcMoney" class="pc_money">拼到人<text>{{pcMoney}}</text>元</view>
										</view>
										<view :class="pcIndex == 1 ? 'pc_items' : 'pc_item'" @tap="selPC(1)">
											<view class="pc_name">独享</view>
											<image v-if="globalImages" :src="globalImages + 'images/static/upload/danren.png'"></image>
											<view v-if="dxMoney" class="pc_money">一口价<text>{{dxMoney}}</text>元</view>
										</view>
									</view>
									<view class="flex justify-between margin-top">
									<!-- 	<view class="zx_view" @tap="payorder()">
											<image v-if="globalImages" :src="globalImages + 'images/shijian.png'" style="width: 35rpx;height: 37rpx;">
											</image>
											<view class="zx_name">预约</view>
										</view> -->
										<view class="zx_view" @tap="personShow = true">
											<image v-if="globalImages" :src="globalImages + 'images/yiren.png'" style="width: 34rpx;height: 32rpx;">
											</image>
											<view class="zx_name">{{personNum}}人乘坐</view>
										</view>
										<view class="zx_view" @click="openRemk">
											<image v-if="globalImages" :src="globalImages + 'images/beizhu.png'" style="width: 30rpx;height: 32rpx;">
											</image>
											<view class="zx_name">添加备注</view>
										</view>
									</view>
									<view class="flex align-center justify-center margin-lr margin-top-xs zx_name"
										v-if="dxMoney" @click="openYouhui">
										{{-couponName?-couponName:'使用优惠劵'}}
										<image v-if="globalImages" :src="globalImages + 'images/static/image/my/right_icon.png'"
											style="width: 12rpx;height: 20rpx;margin-left: 5rpx;margin-top: 4rpx;">
										</image>
									</view>
									<!-- @tap="payorder()" -->
								</view>
								<view class="btna" @click="goNav('/my/classes/list')">发布行程</view>
							</view>
						
						</view>
						<!-- <view class="margin-lr" v-if="bannerList.length > 0">
						<swiper class="swiper" autoplay="1500" :indicator-dots="true" :circular='true'
							indicator-active-color="#ffffff" indicator-color="#cccccc">
							<swiper-item class="swiper-wrap" v-for="(item,index) in bannerList" :key='index'>
								<image :src="item.imageUrl" style="width: 100%;border-radius: 8upx;height: 161upx;"
									@click="goWeb(item.url)" mode="aspectFill"></image>
							</swiper-item>
						</swiper>
					</view> -->
					</view>

					<view v-if="ordershow">
						<view class="controls-box" style="margin: 30upx 30rpx 20rpx;background: #FFFFFF;">
							<view class="padding ">
								<view class="text-lg text-bold text-center">您好，预估里程时长{{basicPrice.duration}}分钟</view>
								<view class="text-center text-lg margin-top">预估
									<text class="text-bold" style="font-size: 48rpx;">{{basicPrice.allMoney}}</text>元
								</view>

								<view class="flex align-center justify-between " style="width: 50%;margin: 0 auto;">
									<view class="flex align-center justify-center margin-top" @click="openmingxi">
										<view class="text-sm" style="color: #999999;">查看明细</view>
										<image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'"
											style="width: 10rpx;height: 15rpx;margin-left: 8rpx;">
										</image>
									</view>
									<view class="flex align-center justify-center margin-top" @click="openRemk">
										<view class="text-sm" style="color: #999999;">备注</view>
										<image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'"
											style="width: 14rpx;height: 21rpx;margin-left: 8rpx;">
										</image>
									</view>
								</view>
								<view class="bg flex align-center justify-between margin-top" v-if="current==1"
									style="border-radius: 16rpx;padding: 20rpx 45rpx;">
									<view class="flex align-center" @click="godaijia">
										<view style="color: #666666;">{{daijiao.phone}}</view>
										<image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'"
											style="width: 14rpx;height: 21rpx;margin-left: 8rpx;">
										</image>
									</view>
									<view class="line"></view>
									<view class="flex align-center" @click="selectShow = true">
										<view style="color: #666666;">{{payUsername}}</view>
										<image v-if="globalImages" :src="globalImages + 'images/static/image/go.png'"
											style="width: 14rpx;height: 21rpx;margin-left: 8rpx;">
										</image>
									</view>
								</view>
							</view>
						</view>

						<view class="flex align-center justify-end margin-lr margin-top-xs" @click="openYouhui">
							{{-couponName?-couponName:'使用优惠劵'}}
							<image v-if="globalImages" :src="globalImages + 'images/static/image/right.png'"
								style="width: 14rpx;height: 24rpx;margin-left: 5rpx;">
							</image>
						</view>

						<view class="flex align-center justify-center padding-top" v-if="xcxSelect=='是'">
							<view class="flex align-center " style="font-size: 26upx;">
								<image v-if="showAgree" @tap="isShowAgree"
									src="https://api.shengqianxiong.com.cn/img/20201112/669aa8946cfb4ebdb459d57193c0ebca.png"
									style="width: 32upx;height: 32upx;"></image>
								<image v-else @tap="isShowAgree"
									src="https://api.shengqianxiong.com.cn/img/20201112/1e9102fc891f4d86a13c7b2ba6921cba.png"
									style="width: 32upx;height: 32upx;"></image>
								<view class="margin-left-xs">我已阅读并同意<text style="color: #346EF6;"
										@click="goWeb('/my/setting/sijixieyi')">《代驾服务协议》</text></view>
							</view>
						</view>
						<view class="btn" @click="payorder()">呼叫代驾</view>
						<view class="text-center margin-top-sm" @click="openFest()">取消呼叫</view>
					</view>

				</view>

				<view class="margin-lr margin-top" style="background: #FFFFFF;border-radius: 24rpx;" v-if="driverShow">
					<view class=" flex align-start justify-between " style="padding: 40rpx 30rpx 40rpx;">
						<view>
							<view class="text-bold" style="font-size: 40rpx;">正在为您全力寻找司机</view>
							<view class="text-lg margin-top-xs flex align-center ">已等待
								<smh-timer ref="timer" @timing="timing" :auto="true"></smh-timer>
								<!-- <text style="color: #346EF6;">00:02</text> -->
							</view>
						</view>
						<view class="qxdj" @click="qxshow = true">取消代驾</view>
					</view>
				</view>


				<!-- 新人红包弹框 -->
				<!--  -->
				<cover-view class="hongbao xinhongbao" v-if="HBShow">
					<cover-view style="width: 100%;height: 100%;margin: 0 auto;position: relative;padding: 0rpx;">
						<cover-view @click.stop="HBShow=false"
							style="position: absolute;right: 120rpx;top: 460rpx;font-size: 200rpx;font-weight: bold;z-index: 999;">
							<cover-image v-if="globalImages" :src="globalImages + 'images/static/image/close.png'"
								style="width:40rpx;height: 40rpx;"></cover-image>
						</cover-view>
						<!-- @click.stop="takemoney()" -->
						<cover-image v-if="globalImages" :src="globalImages + 'images/hb_bg.png'" class="hb_img"
							></cover-image>
						<cover-view class="btna_view" @tap="takemoney()">立即领取</cover-view>
					</cover-view>
				</cover-view>
				<!-- 当前正在进行弹框 -->
				<cover-view class="hongbao" v-if="hoveorderShow">
					<cover-view style="width: 60%;margin: 400rpx auto;position: relative;padding: 40rpx;">
						<cover-view @click.stop="hoveorderShow=false"
							style="position: absolute;right: 0rpx;top: 0rpx;font-size: 32rpx;font-weight: bold;z-index: 999;">
							<cover-image v-if="globalImages" :src="globalImages + 'images/static/image/close.png'"
								style="width: 40rpx;height:40rpx;"></cover-image>
						</cover-view>
						<cover-image v-if="globalImages" :src="globalImages + 'images/static/image/hoveorderbg.png'" class="hoveorderimg"
							@click.stop="goOrerDer()"></cover-image>
					</cover-view>
				</cover-view>
				<view v-else></view>
			</view>
			
			<u-popup v-model="payshow" mode="center" border-radius="14" width="560rpx" :closeable="true">
				<view class="padding text-center">
					<image v-if="globalImages" :src="globalImages + 'images/static/image/yue.png'" style="width: 209rpx;height: 191rpx;"></image>
					<view class="margin-top" style="font-size: 38rpx;font-weight: bold;">
						<view>您的账户余额不足</view>
						<view>请先去充值</view>
					</view>
					<view class="czbtn">去充值</view>
				</view>
			</u-popup>

			<!-- #ifdef APP -->
			<cover-view v-if="qxshow" class="flex align-center justify-center" @click="closeHaveorder(2)"
				style="background: rgba(0, 0, 0, 0.2);width: 100%;height: 100vh;position: absolute;top: 0;left: 0;z-index: 9;">
				<cover-view class="" style="background: #FFFFFF;border-radius: 24rpx;width: 580rpx;">
					<cover-view class="padding text-center">
						<cover-image v-if="globalImages" :src="globalImages + 'images/static/image/qxdj.png'"
							style="width: 406rpx;height: 181rpx;"></cover-image>
						<cover-view class="margin-top-sm" style="font-size: 32rpx;font-weight: bold;">
							取消后重新呼叫可能会耽
						</cover-view>
						<cover-view class="margin-top-xs" style="font-size: 32rpx;font-weight: bold;">
							误您的出行时间，是否要取消？
						</cover-view>
						<cover-view class="flex justify-between margin-top-60">
							<cover-view class="btns" @click="qxshow=false">暂不取消</cover-view>
							<cover-view class="btnss" @click="bindorderOff">确认取消</cover-view>
						</cover-view>
					</cover-view>
				</cover-view>
			</cover-view>
			<cover-view v-else></cover-view>
			<!-- #endif -->

			<!-- #ifndef APP -->
			<u-popup v-model="qxshow" mode="center" border-radius="14" width="580rpx" :closeable="true">
				<view class="padding text-center">
					<image v-if="globalImages" :src="globalImages + 'images/static/image/qxdj.png'" style="width: 406rpx;height: 181rpx;"></image>
					<view class="margin-top-sm" style="font-size: 32rpx;font-weight: bold;">
						取消后重新呼叫可能会耽
						误您的出行时间，是否要取消？
					</view>
					<view class="flex justify-between margin-top-60">
						<view class="btns" @click="qxshow=false">暂不取消</view>
						<view class="btnss" @click="bindorderOff">确认取消</view>
					</view>
				</view>
			</u-popup>
			<!-- #endif -->

			<!-- #ifdef APP -->
			<cover-view v-if="moneyShow" class="flex align-center justify-center" @click="closeHaveorder(1)"
				style="background: rgba(0, 0, 0, 0.2);width: 100%;height: 100vh;position: absolute;top: 0;left: 0;z-index: 9;">
				<cover-view
					style="width: 520rpx;background: #FFFFFF;border-radius: 24rpx;position: relative;z-index: 99;">
					<cover-view class="text-lg text-bold text-center margin-top">价格明细</cover-view>
					<cover-view class="margin-tb" style="padding-left: 100rpx;">
						<cover-view class="margin-bottom-xs"
							v-if="basicPrice.allMoney">总费用：￥{{basicPrice.allMoney}}</cover-view>
						<cover-view class="margin-bottom-xs"
							v-if="basicPrice.distance">总公里数：{{basicPrice.distance}}km</cover-view>
						<cover-view class="margin-bottom-xs"
							v-if="basicPrice.kilometer">基础公里数：{{basicPrice.kilometer}}km</cover-view>
						<cover-view class="margin-bottom-xs"
							v-if="basicPrice.initMoney">基础起步价：￥{{basicPrice.initMoney}}</cover-view>
						<cover-view class="margin-bottom-xs"
							v-if="basicPrice.metre">超出部分公里数：{{basicPrice.metre}}km</cover-view>
						<cover-view class="margin-bottom-xs"
							v-if="basicPrice.unitOverMoney">超出部分每公里价格：￥{{basicPrice.unitOverMoney}}</cover-view>
						<cover-view class="margin-bottom-xs"
							v-if="basicPrice.otherMoney">超出部分收费总金额：￥{{basicPrice.otherMoney}}</cover-view>
						<cover-view class="margin-bottom-xs" v-if="basicPrice.isNight==1">当前是夜间时段 </cover-view>
						<cover-view class="margin-bottom-xs" v-if="basicPrice.isBeforeDawn==1">当前是凌晨时段 </cover-view>
						<cover-view class="margin-bottom-xs"
							v-if="basicPrice.durationAllMoney">预估总时长费：￥{{basicPrice.durationAllMoney}}</cover-view>
						<cover-view v-if="basicPrice.durationMoney">每分钟时长费：￥{{basicPrice.durationMoney}}</cover-view>
					</cover-view>
					<cover-view class="margin-bottom flex align-center justify-center">
						<cover-image @click.stop="closeHaveorder(1)"
							src="https://daijia.xianmaxiong.com/file/uploadPath/2023/07/24/5f4da4be9181f414b57ad4b57dd90ffa.png"
							style="width: 50rpx;height: 50rpx;"></cover-image>
					</cover-view>
				</cover-view>
			</cover-view>
			<cover-view v-else></cover-view>
			<!-- #endif -->


			<!-- #ifndef APP -->
			<u-popup v-model=" moneyShow" mode="center" width="520rpx" border-radius="24" :closeable="true">
				<view class="padding">
					<view class="text-lg text-bold text-center ">价格明细</view>
					<view class="margin-top" style="padding-left: 100rpx;">
						<view class="margin-bottom-xs" v-if="basicPrice.allMoney">总费用：￥{{basicPrice.allMoney}}</view>
						<view class="margin-bottom-xs" v-if="basicPrice.distance">总公里数：{{basicPrice.distance}}km</view>
						<view class="margin-bottom-xs" v-if="basicPrice.kilometer">基础公里数：{{basicPrice.kilometer}}km
						</view>
						<view class="margin-bottom-xs" v-if="basicPrice.initMoney">基础起步价：￥{{basicPrice.initMoney}}
						</view>
						<view class="margin-bottom-xs" v-if="basicPrice.metre">超出部分公里数：{{basicPrice.metre}}km</view>
						<view class="margin-bottom-xs" v-if="basicPrice.unitOverMoney">
							超出部分每公里价格：￥{{basicPrice.unitOverMoney}}</view>
						<view class="margin-bottom-xs" v-if="basicPrice.otherMoney">超出部分收费总金额：￥{{basicPrice.otherMoney}}
						</view>
						<view class="margin-bottom-xs" v-if="basicPrice.isNight==1">当前是夜间时段 </view>
						<view class="margin-bottom-xs" v-if="basicPrice.isBeforeDawn==1">当前是凌晨时段 </view>
						<view class="margin-bottom-xs" v-if="basicPrice.durationAllMoney">
							预估总时长费：￥{{basicPrice.durationAllMoney}}</view>
						<view v-if="basicPrice.durationMoney">每分钟时长费：￥{{basicPrice.durationMoney}}</view>
					</view>

				</view>
			</u-popup>
			<!-- #endif -->
			<u-popup v-model="youhuiShow" mode="bottom" border-radius="14" height="650rpx" :closeable="true">
				<view style="padding: 30rpx 30rpx 50rpx 30rpx;background: #F5F8FC;">
					<view class="text-lg text-bold text-center">优惠劵</view>
					<view class="flex align-center justify-end">
						<view class="deteJuan" @click="deteYouhuj">不使用优惠劵</view>
					</view>
					<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
						@scrolltolower="lower" @scroll="scroll">
						<view class="money_box" v-for="(item,index) in youhuiList" :key="index">
							<view class="box_tit">
								<view class="money_name">{{item.couponName}}</view>
								<view class="money_price"><text>￥</text>{{item.money}}</view>
							</view>
							<view class="money_data" v-if="item.expirationTime">有效期至{{item.expirationTime}}
							</view>
							<view class="money_data" v-else>永久有效</view>
							<view class="money_line">
								<u-line direction="row" color="#E6E6E6" border-style="dashed" />
							</view>
							<view class="box_bottom">
								<view class="money_use">满{{item.minMoney}}元可使用</view>
								<view class="money_btn">
									<view class="lj_use" @click="useryouhui(item)">
										立即使用
									</view>
								</view>
							</view>
						</view>
					</scroll-view>

				</view>
			</u-popup>
			<u-popup v-model="personShow" mode="bottom" border-radius="40" :closeable="true">
				<view style="padding: 50rpx 30rpx 50rpx 30rpx;">
					<view class="text-lg text-bold">选择乘车人数</view>

					<view class="text-df text-bold margin-top-lg">请如实填写人数，若人数不符，车主有权拒绝通行</view>
					<view class="flex margin-tb-lg">
						<view class="u-page__tag-item" v-for="(item, index) in radios" :key="index">
							<view :class="personNum == item.num ? 'rs_item_sel' : 'rs_item'"
								@tap="checkPerson(item.num)">
								{{item.num}}人
							</view>
						</view>
					</view>


					<!-- <view class="margin-top-xl" style="background: #F5F8FC;padding: 20rpx 25rpx;border-radius: 24rpx;">
					<u-input v-model="remarks" type="textarea" maxlength="100" placeholder="请输入备注(备注车型或者要求驾照,100字以内)"
						height="240" />
				</view> -->
					<view class="remkbtn" @click="savePerson">确定</view>
				</view>
			</u-popup>

			<u-popup v-model="remkShow" mode="bottom" border-radius="40" :closeable="true">
				<view style="padding: 50rpx 30rpx 50rpx 30rpx;">
					<view class="text-lg text-bold">添加行程备注</view>

					<view v-for="(item,index) in bzList">
						<view class="text-df text-bold margin-top-lg">{{item.title}}</view>
						<view class="flex">
							<view v-if="item.content && item.content.length > 0" v-for="(itee,indee) in item.content">
								<view :class="itee.state ? 'bz_item_sel' : 'bz_item'" @tap="checkBZ(index,indee)">
									{{itee.name}}
								</view>
							</view>
						</view>
					</view>

					<view class="remkbtn" @click="remkShow = false">确定</view>
				</view>
			</u-popup>

			<!-- 小时选择 -->
			<u-select v-model="selectTimeShow" mode="single-column" :list="Timelist" @confirm="confirmTime"></u-select>

			<u-popup v-model="showpay" mode="bottom">
				<view class="popup_pay">
					<view class="bgs margin-top padding-lr radius">
						<view style="padding: 0 20upx;margin-top: 36rpx;">
							<view
								style="display: flex;height: 100upx;align-items: center;padding: 20upx 0;justify-content: center;"
								v-for="(item,index) in openLists" :key='index'>
								<image :src="item.image" style="width: 55upx;height: 55upx;border-radius: 50upx;">
								</image>
								<view style="font-size: 30upx;margin-left: 20upx;width: 70%;">
									{{item.name}}
								</view>
								<radio-group name="openWay" style="margin-left: 45rpx;" @tap='selectWay(item)'>
									<label class="tui-radio">
										<radio color="#3699FF" :checked="openWay == item.id ? true : false" />
									</label>
								</radio-group>
							</view>
						</view>
					</view>
					<view class="pay_btns" @click="pay()">确认支付</view>
				</view>
			</u-popup>

			<!-- 支付选择 -->
			<u-select v-model="selectShow" mode="single-column" :list="list" @confirm="confirmPay"></u-select>

			<u-picker :start-year="dqYear" v-model="Timeshow" mode="time" :params="params"
				@confirm="confirm"></u-picker>
			<view class="sos" @click="goJinji()">
				<image v-if="globalImages" :src="globalImages + 'images/static/image/my/jjqz.png'" mode=""></image>
			</view>
		</view>

		<view class="" v-if="xcxSelect === '否'">
			<view class="index_banner">
				<swiper class="swiper-container" :autoplay="true" :interval="4000" :circular="true"
					:indicator-dots="true" indicator-active-color="#4B75FF" indicator-color="#cccccc"
					style="height: 218upx;">
					<swiper-item class="swiper-wrapper" style="" v-for="(item, index3) in bannerLists" :key="index3">
						<image lazy-load='true' fade-show='true' :src="item.imgUrl" v-if="item" class="banner_image"
							mode="scaleToFill"></image>
					</swiper-item>
				</swiper>
			</view>

			<view class="flex justify-center margin">
				<view style="flex:1;display: flex;align-items: center;">
					<image v-if="globalImages" :src="globalImages + 'images/static/upload/top1.png'" class="centeritem_image"></image>
					<view class="centeritem_text">独立部署</view>
				</view>
				<view style="flex:1;display: flex;align-items: center;">
					<image v-if="globalImages" :src="globalImages + 'images/static/upload/top2.png'" class="centeritem_image"></image>
					<view class="centeritem_text">商业开源</view>
				</view>
				<view style="flex:1;display: flex;align-items: center;">
					<image v-if="globalImages" :src="globalImages + 'images/static/upload/top3.png'" class="centeritem_image"></image>
					<view class="centeritem_text">使用文档</view>
				</view>
				<view style="flex:1;display: flex;align-items: center;">
					<image v-if="globalImages" :src="globalImages + 'images/static/upload/top4.png'" class="centeritem_image"></image>
					<view class="centeritem_text">优质售后</view>
				</view>
			</view>

			<!--首页公告开始-->
			<swiper v-if="messageList.length > 0" :autoplay="true" :vertical="true" :interval="4000" :circular="true"
				:indicator-dots="false" class="index_gonggao">
				<block v-for="(item1, index10) in messageList" :key="index10">
					<swiper-item style="height: 60upx;">
						<view style="display: flex;align-items: center;">
							<image v-if="globalImages" :src="globalImages + 'images/static/upload/laba.png'" style="width: 31upx;height: 31upx;margin-top: -5upx;">
							</image>
							<text style="margin-left: 10rpx;">{{ item1.title }}</text>
						</view>
					</swiper-item>
				</block>
			</swiper>

			<view class="index_bottom_list">
				<view class="index_bottom_list_view" @tap='goKeFu' v-for="(item,index) in homegoodsList"
					:key='index' v-if="homegoodsList.length > 0">
					<image style="border-radius: 16upx;" lazy-load="true" class="index_bottom_list_viewImage"
						:src="item.coverImg"></image>
					<view style="padding: 10upx 16upx 16upx 16upx;">
						<view style="width: 100%;">
							<text class="limapboxqing2"><text class="indexr"
									style=""><text>成品源码</text></text>{{ item.title }}</text>
						</view>
						<view style="display: flex;margin-top: 20rpx;justify-content: space-between;">
							<view style="font-size: 40upx;color: #FF2A47;font-weight: bold;"><text
									style="font-size: 20upx;margin-right: 10upx;">¥</text>{{item.price}}</view>
							<view class="save_btn">查看详情</view>
						</view>
					</view>
				</view>
			</view>

			<view class="cu-modal" :class="modalName == 'Image' ? 'show' : ''" @tap="hideModal">
				<image :src="erweimaImg" @tap="selectPhoto(erweimaImg)" mode="widthFix" style="margin-top: 50%;">
				</image>
			</view>
			<!-- 悬浮上拉 -->
			<view class="kefu_item" @tap="goKeFu">
				<image src="https://myshop.xianmxkj.com/kefu.gif"></image>
			</view>

		</view>
	</view>
</template>

<script>
	// 引入SDK核心类，地图组件 
	import QQMapWX from '@/components/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js'
	import { waitForGlobalImages } from '@/utils/globalImageLoader'
	export default {
		data() {
			return {
				modalName: '',
				erweimaImg: '',
				homegoodsList: [],
				messageList: [],
				bannerLists: [],

				ordersId: '',
				timeSel: 1,
				yyEndTime: '',
				personShow: false,
				radios: [{
						num: 1,
						checked: true
					},
					{
						num: 2,
						checked: false
					},
					{
						num: 3,
						checked: false
					},
					{
						num: 4,
						checked: false
					}
				],
				showpay: false,
				openWay: 1,
				openLists: [],
				bzList: [],
				userName: '',
				phone: '',
				personNum: 1,
				pcMoney: 0, //拼车价格
				dxMoney: 0, //独享价格
				pcIndex: 2,
				is_focus: false,
				remarks: '', //需求备注
				HBShow: false,

				id: 0, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: '',
				longitude: '',
				// iconPath: '../../static/image/qi.png',
				qqmapsdk: {}, // 腾讯地图小程序的SDK
				covers: [], // 地图上面的标记点
				to: { // 目的地坐标
					latitude: '',
					longitude: '',
				},
				polyline: [], //路线
				polylines: '',
				polylist: [],

				classifyLsit: [{
					id: 1,
					name: '即时代驾'
				}, {
					id: 2,
					name: '朋友代叫'
				}, {
					id: 3,
					name: '预约代驾'
				}, {
					id: 1,
					name: '包时代驾'
				}],
				current: 0,
				value0: '',
				value1: '',
				value2: '',
				value3: '',
				type: 'text',
				clearable: false,
				riderNumber: 0,


				// 用户红包
				newUserFlag: 2,

				token: '',
				bannerList: [],
				noticeList: [],


				tuiguang: '',
				tuiguangImg: '',
				arr: [],
				showModal1: true,
				invitationCode: '',

				city: '',
				showAgree: false, //协议是否选择
				payshow: false,
				qxshow: false,
				isDw: true,
				yuyueTime: '',
				Timeshow: false,
				params: {
					year: true,
					month: true,
					day: true,
					hour: true,
					minute: true,
					second: false
				},

				addlist: [], //出发地址
				addressId: '',
				addlists: [], //目的地
				addressIds: "",
				popupshow: true,
				ordershow: false,
				basicPrice: [], //基础价格
				driverShow: false,

				moneyShow: false, //价格明细
				haveorder: [], //正在进行订单
				youhuiShow: false, //优惠劵弹框
				daijiao: [], //代叫信息

				selectShow: false, //下单人切换
				list: [{
						value: '1',
						label: '我来支付'
					},
					{
						value: '2',
						label: '对方支付'
					}
				],
				payUser: 0,
				payUsername: '我来支付',
				youhuiList: [], //优惠劵
				couponName: '',
				couponId: '',
				scrollTop: 0,
				old: {
					scrollTop: 0
				},
				timer: '',
				hoveorderShow: false, //正在进行订单
				isFist: true,
				key: '',
				dqYear: '',
				remkShow: false, //备注弹框
				remarks: '',
				district: '',
				province: '',
				daijiaTime: '',
				timeId: '',
				selectTimeShow: false,
				Timelist: [],
				xcxSelect: '是',
				globalImages: ''
			}
		},
		onLoad(e) {
			waitForGlobalImages().then((path) => {
				console.log('✅ 全局图片路径:', path)
				this.globalImages = path
			})
			let that = this

			// #ifdef MP-WEIXIN
			if (e.scene) {
				const scene = decodeURIComponent(e.scene);
				if (scene.split('=')[0].indexOf('userId') != -1) {
					let riderUserId = scene.split('=')[1]
					console.log(riderUserId)
					that.$queue.setData('riderUserId', riderUserId);
				} else {
					that.$queue.setData('inviterCode', scene.split(',')[0]);
				}
			}
			// #endif

			// 获取邀请码保存到本地
			if (e.invitation) {
				that.$queue.setData('inviterCode', e.invitation);
			}

			that.$Request.getT('/app/common/type/128').then(res => {
				if (res.code == 0 && res.data && res.data.value) {
					that.key = res.data.value
					// 实例化API核心类
					that.qqmapsdk = new QQMapWX({
						key: that.key // 自己申请的key值
					})
				}
			});
			
			this.$Request.getT('/app/common/type/313').then(res => {
				if (res.code == 0) {
					if (res.data && res.data.value) {
						// #ifdef MP-WEIXIN
						// res.data.value
						this.$queue.setData('xcxSelect', '是')
						// #endif
						// #ifndef MP-WEIXIN
						this.$queue.setData('xcxSelect', '是')
						// #endif
						
						this.xcxSelect = uni.getStorageSync('xcxSelect')
						
						if (this.xcxSelect === '否') {
							this.getBannerListS();
							this.getGuangGao();
							this.getHomeGoods("");
						}
					}
				}
			});
			
			
			// yuyueTime
			// yyEndTime

			let timeNow = new Date();
			timeNow.setMinutes(timeNow.getMinutes() + 30);
			let timeEndNow = new Date();
			timeEndNow.setMinutes(timeEndNow.getMinutes() + 60);
			this.dqYear = timeNow.getFullYear()
			this.yuyueTime =
				`${this.padZero(timeNow.getMonth() + 1)}月${this.padZero(timeNow.getDate())}日${this.padZero(timeNow.getHours())}:${this.padZero(timeNow.getMinutes())}`;
			this.yyEndTime =
				`${this.padZero(timeEndNow.getMonth() + 1)}月${this.padZero(timeEndNow.getDate())}日${this.padZero(timeEndNow.getHours())}:${this.padZero(timeEndNow.getMinutes())}`;

			if (uni.getStorageSync('token')) {
				// that.timer = setInterval(() => {
				// 	console.log('111123666')
				// 	that.gethaveOrder() //获取正在进行订单k
				// }, 5000);

			} else {
				clearInterval(that.timer)
			}

			// #ifdef MP-WEIXIN
			this.openLists = [{
				id: 1,
				image: '../../static/image/icon_weixin.png',
				name: '微信'
			}, {
				id: 3,
				image: '../../static/image/jinbi.png',
				name: '零钱'
			}]
			// #endif
			// #ifdef H5

			let ua = navigator.userAgent.toLowerCase();
			if (ua.indexOf('micromessenger') !== -1) { //微信浏览器
				this.$Request.get('/app/common/type/443').then(res => {
					if (res.data && res.data.value && res.data.value == '是') {
						this.openLists = [{
							id: 1,
							image: '../../static/image/icon_weixin.png',
							name: '微信'
						}, {
							id: 3,
							image: '../../static/image/jinbi.png',
							name: '零钱'
						}]
						this.openWay = 1
					} else {
						this.openLists = [{
							id: 3,
							image: '../../static/image/jinbi.png',
							name: '零钱'
						}]
						this.openWay = 3
					}
				})
			} else { //非微信浏览器
				this.openLists = [{
					id: 2,
					image: '../../static/image/zhifubao.png',
					name: '支付宝'
				}, {
					id: 3,
					image: '../../static/image/jinbi.png',
					name: '零钱'
				}]
				this.openWay = 2
			}


			// #endif
			// #ifdef APP-PLUS
			this.openLists = [{
					id: 1,
					image: '../../static/image/icon_weixin.png',
					name: '微信'
				},
				{
					id: 2,
					image: '../../static/image/zhifubao.png',
					name: '支付宝'
				}, {
					id: 3,
					image: '../../static/image/jinbi.png',
					name: '零钱'
				}
			]
			// #endif


			uni.getLocation({
				type: 'gcj02',
				geocode: true, //设置该参数为true可直接获取经纬度及城市信息
				success: function(res) {
					console.log(res, '地理位置')
					that.latitude = res.latitude
					that.longitude = res.longitude
					// that.getsflist()
					uni.setStorageSync('latitude', res.latitude)
					uni.setStorageSync('longitude', res.longitude)
					that.selectCity(that.longitude, that.latitude);

				},
				fail: function() {
					console.log('获取地址失败')
					uni.startLocationUpdate({
						type: 'gcj02', //gcj02  wgs84
						isHighAccuracy: true, //开启高精度定位(！！！必需)
						geocode: true,
						success: res => {
							uni.onLocationChange(function(res2) {
								console.log('实时纬度：' + res2.latitude);
								console.log('实时经度：' + res2.longitude);
								that.latitude = res2.latitude
								that.longitude = res2.longitude
								uni.setStorageSync('latitude', that.latitude)
								uni.setStorageSync('longitude', that.longitude)
								that.selectCity(that.longitude, that.latitude);
								// that.getsflist()
								// that.getHourlist() //获取小时列表
							});
						},
						fail: err => {
							// clearInterval(this.ordertimer)
							console.error('开启小程序接收位置消息失败：', err)
						},
						complete: msg => {
							// clearInterval(this.ordertimer)
							console.log('调用开启小程序接收位置消息 API 完成')
						}
					});
				}
			})
		},
		onHide() {
			clearInterval(this.timer)
		},
		onUnload() {
			clearInterval(this.timer)
		},
		onShow() {
			this.invitationCode = this.$queue.getData('invitationCode');
			this.token = uni.getStorageSync('token')
			if (this.token) {
				// this.timer = setInterval(() => {
				// 	this.gethaveOrder() //获取正在进行订单k
				// }, 5000);
				this.getuserinfo()
				if (this.isFist) {
					this.isFist = false
					this.gethaveOrders()
				} else {
					this.gethaveOrders()
				}

				if (this.driverShow) {
					this.openFest()
				}
				this.getbzList();

				this.getZiZhi() //获取分享文案  图片
				if (uni.getStorageSync('addressId')) {
					this.addressId = uni.getStorageSync('addressId')
					this.getcfd()
				}
				if (uni.getStorageSync('addressIds')) {
					this.addressIds = uni.getStorageSync('addressIds')
					this.getzd()
				}

				if (uni.getStorageSync('daijiao')) {
					this.daijiao = uni.getStorageSync('daijiao')
				}

				this.$Request.getT('/app/common/type/427').then(res => { //用户端小程序订单状态通知 427
					if (res.code == 0) {
						if (res.data && res.data.value) {
							this.arr.push(res.data.value)
						}
					}
				})
				if (this.showModal1) {
					// #ifdef MP-WEIXIN
					this.openMsg()
					// #endif
				}
			} else {
				clearInterval(this.timer)
			}

		},
		onReady() {
			this.map = uni.createMapContext("map", this)
		},
		onShareAppMessage(res) { //发送给朋友
			return {
				title: this.tuiguang,
				path: '/pages/index/index?invitation=' + this.invitationCode,
				imageUrl: this.tuiguangImg,
			}
		},
		onShareTimeline(res) { //分享到朋友圈
			return {
				title: this.tuiguang,
				path: '/pages/index/index?invitation=' + this.invitationCode,
				imageUrl: this.tuiguangImg,
			}
		},
		methods: {
			goNav(url) {
				// #ifdef MP-WEIXIN
				if (uni.getStorageSync('sendorderMsg')) {
					uni.requestSubscribeMessage({
						tmplIds: this.arr,
						success(re) {
							// console.log(re,'**********')
							var datas = JSON.stringify(re);
							if (datas.indexOf("accept") != -1) {
								console.log(re)
							}
						},
						fail: (res) => {
							console.log(res)
						}
					})
				}
				// #endif
				let token = this.$queue.getData("token");
				if (token) {
					uni.navigateTo({
						url: url
					})
				} else {
					this.bindlogin();
				}
			},
			hideModal() {
				this.modalName = null;
			},
			goKeFu(){
				this.$Request.getTS('/common/type/1').then(res => {
					if (res.status == 0) {
						if (res.data && res.data.value) {
							this.erweimaImg = res.data.value
							this.modalName = 'Image';
						}
					}
				})
			},
			getBannerListS() {
				this.$Request.getTS('/advert/list').then(res => {
					if (res.status === 0) {
						this.bannerLists = [];
						res.data.forEach(d => {
							this.bannerLists.push(d)
						});
					}
				});
			},
			getGuangGao() {
				this.$Request.getTS('/selfBanner/list').then(res => {
					if (res.status === 0) {
						this.guanggao = res.data;
					}
				});
			},
			getHomeGoods(type) {
				this.loadingType = 1;
				this.$Request.getTS('/goods/userList?page=0&size=20&sort=createAt').then(
					res => {
						if (res.status === 0) {
							res.data.content.forEach(d => {
								this.homegoodsList.push(d);
							});
						}
						if (type === "Refresh") {
							uni.stopPullDownRefresh(); // 停止刷新
						}
					});
			},


			goJinji() {
				uni.navigateTo({
					url: '/my/setting/jinji'
				})
			},
			savePerson() {
				this.personShow = false
				this.orderPay();
			},
			checkPerson(num) {
				this.personNum = num;
			},
			checkBZ(index, indee) {
				this.bzList[index].content[indee].state = !this.bzList[index].content[indee].state;
			},
			getbzList() {
				this.$Request.getT('/app/message/selectMessageList?state=10').then(res => {
					if (res.code == 0) {
						this.bzList = [];
						res.data.forEach(d => {
							if (d.content) {
								let contentList = [];
								d.content = d.content.split(',');
								for (var i = 0; i < d.content.length; i++) {
									let data = {
										name: "" + d.content[i],
										state: false
									}
									contentList.push(data);
								}
								d.content = contentList;
							}

							this.bzList.push(d);
						});

					}
				});
			},
			selPC(index) {
				this.pcIndex = index;
				if (this.pcIndex == 1 && this.dxMoney) {
					this.getyouhui(this.dxMoney);
				} else if (this.pcIndex == 2 && this.pcMoney) {
					this.getyouhui(this.pcMoney);
				}
			},
			getsflist() {
				this.$Request.getT("/app/indent/findVicinityRider?lng=" + this.longitude + '&lat=' + this.latitude).then(
					res => {
						if (res.code == 0) {
							let arr = []
							res.data.kmRider.map((item, index) => {
								let data = {
									id: index,
									latitude: item.lat,
									longitude: item.lng,
									iconPath: '../../static/image/shifu.png',
									width: 34,
									height: 30,
									callout: { //自定义标记点上方的气泡窗口 点击有效
										content: item.nickName, //文本
										color: '#333333', //文字颜色
										fontSize: 10, //文本大小
										padding: 10, //附近留白
										borderRadius: 6, //边框圆角
										bgColor: '#FFFFFF', //背景颜色
										display: 'ALWAYS', //常显
									},
								}
								arr.push(data)
							});
							this.covers = arr
						}
					})

			},

			confirmTime(e) {
				console.log(e)
				this.daijiaTime = e[0].label
				this.timeId = e[0].value
			},
			openHour() {
				this.selectTimeShow = true
			},
			getHourlist() {
				this.$Request.get("/app/packageTime/getPackageTimeList?cityName=" + this.city).then(res => {
					if (res.code == 0) {
						let arr = []
						res.data.records.map((item, index) => {
							let dataHour = {
								value: '',
								label: '',
							}
							dataHour.value = item.timeId
							dataHour.label = item.timeNum + '小时'
							arr.push(dataHour)
						})
						this.Timelist = arr
					}
				});
			},
			//时间格式转换
			padZero(num) {
				return num < 10 ? `0${num}` : num;
			},
			// 获取区域范围
			getquyuList() {
				let data = {
					city: this.city,
					// district: this.district,
					province: this.province,
				}
				this.$Request.get("/app/banArea/getBanAreaList", data).then(res => {
					if (res.code == 0) {
						let arr = []
						if (res.data.records && res.data.records.length > 0) {
							res.data.records.forEach((item, index) => {
								let dataList = [];
								item.points.forEach((ite, ind) => {
									dataList.push({
										latitude: ite.lat,
										longitude: ite.lng
									})
								})
								let ps = {
									points: dataList,
									strokeColor: "#0186FF",
									strokeWidth: 3,
									fillOpacity: 0.4,
								};
								arr.push(ps)

							});

							this.polylist = arr

						}

					}
				});

			},
			getOpencity() {
				this.$Request.getT('/app/cityInfo/isOpenCity?cityName=' + this.district).then(res => {
					if (res.code === 0) {
						if (!res.data) {
							uni.showToast({
								title: '当前城市未开通服务',
								icon: 'none',
								duration: 2000
							})
						}
					}
				});
			},
			openRemk() {
				this.remkShow = true
			},
			closeHaveorder(index) {
				console.log('99999999999')
				if (index == 1) {
					this.moneyShow = false
				} else if (index == 2) {
					this.qxshow = false
				}

			},
			selectWay: function(item) {
				this.openWay = item.id;
			},
			openYouhui() {
				if (this.youhuiList.length == 0) {
					uni.showToast({
						title: '当前暂无可使用的优惠劵',
						icon: 'none'
					})
					return
				}
				this.youhuiShow = true
			},
			openMap() {
				console.log('--44444444444')
				let that = this
				uni.chooseLocation({
					success: function(res) {
						console.log('位置名称：' + res.name);
						console.log('详细地址：' + res.address);
						console.log('纬度：' + res.latitude);
						console.log('经度：' + res.longitude);
						that.latitude = res.latitude
						that.longitude = res.longitude
						that.selectCity(that.longitude, that.latitude);


					}
				});
			},
			confirmPay(e) {
				// console.log(e,'-------')
				if (e[0].value == 1) {
					this.payUser = 0
				} else if (e[0].value == 2) {
					this.payUser = 1
				}
				this.payUsername = e[0].label
			},
			goOrerDer() {
				uni.navigateTo({
					url: '/my/order/pay?indentNumber=' + this.haveorder.ordersId
				})
				this.hoveorderShow = false
			},
			openFest() { //返回首页下单

				console.log('.........222222')
				this.addlists = []
				this.covers = []
				this.polyline = []
				this.daijiaTime = ''
				this.timeId = ''
				this.ordershow = false
				this.popupshow = true
				this.driverShow = false

				this.selectCity(this.longitude, this.latitude);
				this.gethaveOrder()
			},
			openmingxi() { //查看价格明细
				this.moneyShow = true
			},
			confirm(e) {
				if (this.timeSel == 1) {
					this.yuyueTime = e.month + '月' + e.day + '日' + '' + e.hour + ':' + e.minute
					this.hopeTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':00'
				} else {
					this.yyEndTime = e.month + '月' + e.day + '日' + '' + e.hour + ':' + e.minute
				}
			},
			openTime(index) {
				if (index == 2 && this.yuyueTime === '') {
					this.$queue.showToast('请选择开始预约时间！')
					return;
				}
				this.timeSel = index;
				this.Timeshow = true
			},
			godaijia() {
				uni.navigateTo({
					url: '/my/daijia/index'
				})
			},
			changeAdd(current, index) {
				if (this.token) {
					uni.navigateTo({
						url: '/my/address/index?type=' + current + '&index=' + index
					})
					this.hoveorderShow = false
				} else {
					uni.navigateTo({
						url: '/pages/my/register'
					})
				}

			},
			isShowAgree() {
				//是否选择协议
				this.showAgree = !this.showAgree;
			},
			// 分享文案和图片
			getZiZhi() {
				this.$Request.getT('/app/common/type/276').then(res => {
					if (res.code === 0) {
						this.tuiguang = res.data.value;
					}
				});
				this.$Request.getT('/app/common/type/277').then(res => {
					if (res.code === 0) {
						this.tuiguangImg = res.data.value;
					}
				});
			},
			goWeb(url) {
				// #ifdef MP-WEIXIN
				if (uni.getStorageSync('sendMsg')) {
					uni.requestSubscribeMessage({
						tmplIds: this.arr,
						success(re) {
							// console.log(re,'**********')
							var datas = JSON.stringify(re);
							if (datas.indexOf("accept") != -1) {
								console.log(re)
							}
						},
						fail: (res) => {
							console.log(res)
						}
					})
				}
				// #endif
				// console.log(url.indexOf('/pages/') !== -1)
				// return
				if (url.indexOf('/pages/') !== -1 || url.indexOf('/pageA/') !== -1 || url.indexOf('/my/') !== -1) {
					uni.navigateTo({
						url
					});
				} else {
					//#ifndef H5
					uni.navigateTo({
						url: '/pages/index/webView?url=' + url
					});
					//#endif
					//#ifdef H5
					window.location.href = url;
					//#endif
				}
			},

			// 获取轮播图
			getBannerList() {
				this.$Request.get("/app/banner/selectBannerList?classify=1&state=1&cityName=" + this.city).then(
					res => {
						if (res.code == 0) {
							this.bannerList = res.data
						}
					});
			},

			//右下角定位按钮的点击事件
			onToGetLocation() {
				let mapContext = uni.createMapContext('map');
				mapContext.moveToLocation(); //moveToLocation将地图中心移动到当前定位点，需要配合map组件的show-location使用
			},
			selectCity(longitude, latitude) {
				let data
				this.$Request.getT('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
					if (res.code === 0) {
						this.city = res.data.city ? res.data.city : res.data.province
						this.district = res.data.district
						this.province = res.data.province
						// this.getOpencity()
						// this.getquyuList()
						// this.getBannerList()
						// this.getHourlist() //获取小时列表
						uni.setStorageSync('city', res.data.city)

						// this.covers = [{
						// 	id: 1,
						// 	latitude: latitude,
						// 	longitude: longitude,
						// 	iconPath: '../../static/image/qi.png',
						// 	width: 32,
						// 	height: 44,
						// 	callout: { //自定义标记点上方的气泡窗口 点击有效
						// 		content: res.data.address, //文本
						// 		color: '#333333', //文字颜色
						// 		fontSize: 10, //文本大小
						// 		padding: 10, //附近留白
						// 		borderRadius: 6, //边框圆角
						// 		bgColor: '#FFFFFF', //背景颜色
						// 		display: 'ALWAYS', //常显
						// 	},
						// }]
						data = {
							address: res.data.address,
							lng: longitude, //地址经度
							lat: latitude, //地址维度
							addressId: '',
							addressDefault: '',
							county: res.data.district,
							province: res.data.province,
							city: res.data.city

						}
						this.addlist = data
						console.log('----')
					}
				});
			},
			// 查询附近司机
			getAdd(lng, lat) {
				this.$Request.getT('/app/indent/findVicinityRider?lng=' + lng + '&lat=' + lat).then(res => {
					if (res.code == 0) {
						this.riderNumber = res.data.count
					}
				});
			},
			//获取出发地
			getcfd() {
				this.$Request.getT('/app/address/getAddressInfo?addressId=' + this.addressId).then(res => {
					if (res.code == 0 && res.data) {
						this.addlist = res.data

						// this.covers = [{
						// 	id: 1,
						// 	latitude: this.addlist.lat,
						// 	longitude: this.addlist.lng,
						// 	iconPath: '../../static/image/qi.png',
						// 	width: 32,
						// 	height: 44,
						// 	callout: { //自定义标记点上方的气泡窗口 点击有效
						// 		content: this.addlist.address, //文本
						// 		color: '#333333', //文字颜色
						// 		fontSize: 10, //文本大小
						// 		padding: 10, //附近留白
						// 		borderRadius: 6, //边框圆角
						// 		bgColor: '#FFFFFF', //背景颜色
						// 		display: 'ALWAYS', //常显
						// 	},
						// }]
						this.getAdd(res.data.lng, res.data.lat)
						uni.removeStorageSync('addressId')
						// console.log(this.addlists || this.addlist, this.addlists && this.addlis)
						// return
						if (this.addlists && this.addlists.lng && this.addlist && this.addlist.lng) {
							this.orderPay()
						}
						// uni.getStorageSync('addressId')
					} else {
						this.addlist = []
					}
				});
			},
			//获取目的地
			getzd() {
				this.$Request.getT('/app/address/getAddressInfo?addressId=' + this.addressIds).then(res => {
					if (res.code == 0 && res.data) {
						this.addlists = res.data

						this.to.latitude = res.data.addressLatitude
						this.to.longitude = res.data.addressLongitude
						uni.removeStorageSync('addressIds')
						if (this.addlists && this.addlists.lng && this.addlist && this.addlist.lng) {
							this.orderPay()
						}

					} else {
						this.addlists = []
					}
				});
			},
			// 步行路线规划
			routePlanning() {
				let that = this
				that.qqmapsdk.direction({
					mode: 'driving', // 驾车
					from: { // 起始位置(当前位置)坐标
						latitude: that.latitude,
						longitude: that.longitude
					},
					to: that.to, // 目的地位置坐标
					success(res) {
						// console.log(res, '=======')
						var coors = JSON.parse(that.polylines)
						// console.log(coors,'11111111111111')
						// var coors = res.result.routes[0].polyline
						// console.log(coors2,'11111111111111')
						var pl = [] // 点串数组
						// 坐标解压(返回的点串坐标，通过前向差分进行压缩)
						var kr = 1000000
						for (var i = 2; i < coors.length; i++) {
							coors[i] = Number(coors[i - 2]) + Number(coors[i]) / kr
						}
						// 将解压后的坐标放入点串数组pl中
						for (var i = 0; i < coors.length; i += 2) {
							pl.push({
								latitude: coors[i],
								longitude: coors[i + 1]
							})
						}
						// 设置polyline属性，将路线显示出来，将解压坐标第一个数据作为起点
						that.polyline = [{
							points: pl,
							color: '#346EF6',
							width: 4
						}]
					}
				})
			},
			// 计算基础价格
			orderPay() {
				this.couponId = '';
				this.couponName = '';
				let data = {
					shipUserName: this.userName,
					shipUserPhone: this.phone,
					shipAddressId: this.addlist.addressId,
					shipProvince: this.addlist.province,
					shipCity: this.addlist.city,
					shipDistrict: this.addlist.county,
					shipAddressLongitude: this.addlist.lng,
					shipAddressLatitude: this.addlist.lat,
					deliveryAddressId: this.addlists.addressId,
					deliveryProvince: this.addlists.province,
					deliveryCity: this.addlists.city,
					deliveryDistrict: this.addlists.county,
					deliveryAddressLongitude: this.addlists.lng,
					deliveryAddressLatitude: this.addlists.lat,
					appointmentStartTime: this.yuyueTime,
					appointmentEndTime: this.yyEndTime,
					appointmentType: 2, //预约类型 1独享 2拼单
					appointmentNum: this.personNum,
				}
				let datas = {
					shipUserName: this.userName,
					shipUserPhone: this.phone,
					shipAddressId: this.addlist.addressId,
					shipProvince: this.addlist.province,
					shipCity: this.addlist.city,
					shipDistrict: this.addlist.county,
					shipAddressLongitude: this.addlist.lng,
					shipAddressLatitude: this.addlist.lat,
					deliveryAddressId: this.addlists.addressId,
					deliveryProvince: this.addlists.province,
					deliveryCity: this.addlists.city,
					deliveryDistrict: this.addlists.county,
					deliveryAddressLongitude: this.addlists.lng,
					deliveryAddressLatitude: this.addlists.lat,
					appointmentStartTime: this.yuyueTime,
					appointmentEndTime: this.yyEndTime,
					appointmentType: 1, //预约类型 1独享 2拼单
					appointmentNum: this.personNum,
				}
				this.$Request.postJson('/app/priceRule/getOrdersPrice', data).then(res => {
					if (res.code == 0) {
						this.pcMoney = res.data.payMoney;
						// this.basicPrice = res.data
						// this.polylines = res.data.polyline
						// this.gethaveOrder()
						// this.popupshow = false
						// this.ordershow = true
						// this.routePlanning()
						if (this.pcIndex == 1 && this.dxMoney) {
							this.getyouhui(this.dxMoney);
						} else if (this.pcIndex == 2 && this.pcMoney) {
							this.getyouhui(this.pcMoney);
						}
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				});

				this.$Request.postJson('/app/priceRule/getOrdersPrice', datas).then(res => {
					if (res.code == 0) {
						this.dxMoney = res.data.payMoney;
						// this.basicPrice = res.data
						// this.polylines = res.data.polyline
						// this.gethaveOrder()
						// this.popupshow = false
						// this.ordershow = true
						// this.routePlanning()
						if (this.pcIndex == 1 && this.dxMoney) {
							this.getyouhui(this.dxMoney);
						} else if (this.pcIndex == 2 && this.pcMoney) {
							this.getyouhui(this.pcMoney);
						}
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none'
						})
					}
				});
			},
			//下单
			payorder() {
				this.$queue.showLoading('提交中...')
				if (this.addlists.length == 0) {
					uni.hideLoading();
					this.$queue.showToast('请选择目的地！')
					return;
				}

				if (this.yuyueTime === '') {
					uni.hideLoading();
					this.$queue.showToast('请选择开始预约时间！')
					return;
				}

				if (this.yyEndTime === '') {
					uni.hideLoading();
					this.$queue.showToast('请选择结束预约时间！')
					return;
				}

				if (this.pcMoney === '' || this.dxMoney === '') {
					uni.hideLoading();
					this.$queue.showToast('请检查信息内容！')
					return;
				}

				let remarks = '';

				// this.bzList[index].content[indee].state = !this.bzList[index].content[indee].state;

				for (var i = 0; i < this.bzList.length; i++) {
					if (this.bzList[i].content) {
						for (var d = 0; d < this.bzList[i].content.length; d++) {
							if (this.bzList[i].content[d].state) {
								if (remarks === '') {
									remarks = this.bzList[i].content[d].name;
								} else {
									remarks = remarks + ',' + this.bzList[i].content[d].name;
								}
							}
						}
					}
				}

				let userId = this.$queue.getData('userId');
				let data = {
					shipUserName: this.userName,
					shipUserPhone: this.phone,
					shipAddressId: this.addlist.addressId,
					shipProvince: this.addlist.province,
					shipCity: this.addlist.city,
					shipDistrict: this.addlist.county,
					shipAddressLongitude: this.addlist.lng,
					shipAddressLatitude: this.addlist.lat,
					shipAddress: this.addlist.address,
					deliveryAddressId: this.addlists.addressId,
					deliveryProvince: this.addlists.province,
					deliveryCity: this.addlists.city,
					deliveryDistrict: this.addlists.county,
					deliveryAddressLongitude: this.addlists.lng,
					deliveryAddressLatitude: this.addlists.lat,
					deliveryAddress: this.addlists.address,
					appointmentStartTime: this.yuyueTime,
					appointmentEndTime: this.yyEndTime,
					appointmentType: this.pcIndex, //预约类型 1独享 2拼单
					couponId: this.couponId,
					couponName: this.couponName,
					remark: remarks,
					userId: userId,
					appointmentNum: this.personNum,
				}

				this.$Request.postJson('/app/orders/insertOrders', data).then(res => {
					if (res.code == 0) {
						uni.hideLoading();
						this.ordersId = res.data.ordersId;
						//生产订单后清除选中值
						this.pcIndex = 2;
						this.addlists = [];
						// this.yuyueTime = '';
						this.pcMoney = 0;
						this.dxMoney = 0;
						this.personNum = 1;
						this.couponId = ''
						// this.yyEndTime = ''
						this.couponName = ''
						if (uni.getStorageSync('isOnline') == '是') { //线上收费
							this.showpay = true;
						} else { //线下收费
							uni.switchTab({
								url: '/pages/order/order'
							})
						}
					} else {
						this.$queue.showToast(res.msg);
					}
				});
			},
			// 查询是否有正在进行的订单
			gethaveOrders() {
				this.$Request.getT('/app/orders/getMyHaveOrder').then(res => {
					if (res.code == 0 && res.data) {
						this.haveorder = res.data
						// this.hoveorderShow = true
					} else {
						this.haveorder = []
						this.hoveorderShow = false
					}
				});
			},
			gethaveOrder() {
				this.$Request.getT('/app/orders/getMyHaveOrder').then(res => {
					if (res.code == 0 && res.data) {
						this.haveorder = res.data
						console.log('查询订单', this.haveorder, this.haveorder && this.haveorder.riderUserId && this
							.driverShow)
						if (this.$queue.getData('riderUserId')) {
							if (this.haveorder) {
								uni.navigateTo({
									url: '/my/order/pay?indentNumber=' + this.haveorder.ordersId
								})
								clearInterval(this.timer)
								uni.removeStorageSync('riderUserId')
								this.openFest()
							}
						} else {
							if (this.haveorder && this.driverShow) {
								uni.navigateTo({
									url: '/my/order/pay?indentNumber=' + this.haveorder.ordersId
								})
								clearInterval(this.timer)
								this.openFest()
							}
						}

					} else {
						this.haveorder = []
						clearInterval(this.timer)
					}
				});
			},
			// 取消订单
			bindorderOff() {
				let data = {
					indentNumber: this.haveorder.indentNumber
				}
				this.$Request.postT('/app/indent/userCancleIndent', data).then(res => {
					if (res.code == 0) {
						uni.showToast({
							title: '订单取消成功'
						});
						this.qxshow = false
						this.driverShow = false
						this.haveorder = []
						this.openFest()
					} else {
						uni.hideLoading();
						uni.showModal({
							showCancel: false,
							title: '订单失败',
							content: res.msg
						});
					}
				});
			},
			timing(second) {
				//实时返回计时时间
				// console.log(second)
			},
			reset() {
				//重置计时器
				this.$refs.timer.reset()
			},
			start() {
				//手动开启计时器
				this.$refs.timer.start()
			},
			clear() {
				//停止计时器
				this.$refs.timer.clear()
			},
			change(index, item) {
				this.current = index;
				this.daijiaTime = ''
				this.timeId = ''
				this.yuyueTime = ''
				this.hopeTime = ''
			},
			//清空优惠劵
			deteYouhuj() {
				this.couponId = ''
				this.couponName = ''
				this.youhuiShow = false
			},
			//使用优惠劵
			useryouhui(item) {
				this.couponId = item.id
				this.couponName = item.money
				this.youhuiShow = false
			},
			// 获取用户信息
			getuserinfo() {
				this.$Request.getT('/app/user/selectUserById').then(res => {
					if (res.code == 0 && res.data) {
						this.userName = res.data.nickName;
						this.phone = res.data.phone;

						if (res.data.newUserFlag) {
							this.newUserFlag = res.data.newUserFlag
							// console.log(this.newUserFlag)
							if (this.newUserFlag == 1) {
								//是否开启新人优惠劵
								this.$Request.getT('/app/common/type/354').then(res => {
									if (res.code == 0) {
										if (res.data && res.data.value && res.data.value == '是') {
											this.HBShow = true
										}
									}
								});
							} else {
								this.HBShow = false
							}
						}
					}
				});
			},

			getyouhui(money) { //获取优惠劵
				let data = {
					money: money
				}
				this.$Request.getT('/app/couponUser/selectMyCouponListByMoney', data).then(res => {
					if (res.code === 0 && res.data) {
						this.youhuiList = res.data
					} else {
						uni.showToast({
							title: res.msg,
							icon: "none"
						})
					}
				});
			},
			// 红包
			takemoney() {
				this.$Request.getT('/app/couponUser/newUserCoupon').then(res => {
					if (res.code === 0) {
						this.HBShow = false
						uni.showToast({
							title: '领取成功',
							icon: 'none',
							duration: 3000
						})
						this.getuserinfo()
						// setTimeout(function() {
						// 	uni.navigateTo({
						// 		url: '/pages/my/hongbao/hongbao'
						// 	})
						// }, 100)
					} else {
						uni.showToast({
							title: res.msg,
							icon: "none"
						})
						this.newUserFlag = ''
					}
				});
			},
			upper: function(e) {
				// console.log(e)
			},
			lower: function(e) {
				// console.log(e)
			},
			scroll: function(e) {
				// console.log(e)
				this.old.scrollTop = e.detail.scrollTop
			},
			pay() {
				if (this.openWay == 0) {
					this.$queue.showToast('请选择支付方式!')
					return;
				}
				this.showpay = false;
				if (this.openWay == 1) {
					// #ifdef APP-PLUS
					let data = {
						ordersId: this.ordersId,
						type: 1
					}
					// 微信APP支付 根据订单id获取支付信息
					this.$Request.postT("/app/wxPay/payOrders", data).then(res => {
						console.log(JSON.stringify(res), '微信支付信息')
						this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data));
					});
					// #endif
					// #ifdef MP-WEIXIN
					let data = {
						ordersId: this.ordersId,
						type: 3
					}
					let that = this
					that.$Request.postT("/app/wxPay/payOrders", data).then(res => {
						if (res.code == 0) {
							uni.requestPayment({
								provider: 'wxpay',
								timeStamp: res.data.timestamp,
								nonceStr: res.data.noncestr,
								package: res.data.package,
								signType: res.data.signType,
								paySign: res.data.sign,
								success: function(res) {
									console.log(res)
									uni.hideLoading();
									uni.showToast({
										title: '支付成功',
										icon: 'none'
									});
									setTimeout(function() {
										uni.switchTab({
											url: '/pages/order/order'
										})
									}, 1000)
								},
								fail: function(err) {
									console.log('fail:' + JSON.stringify(err));
									uni.hideLoading();
									that.$queue.showToast('支付失败');
								}
							});
						} else {
							uni.showToast({
								title: res.msg,
								icon: 'none'
							})
						}
					});
					// #endif
					//微信公众号支付
					// #ifdef H5 
					let ua = navigator.userAgent.toLowerCase();
					if (ua.indexOf('micromessenger') !== -1) {
						let data = {
							ordersId: this.ordersId,
							type: 2
						}
						let that = this
						that.$Request.postT("/app/wxPay/payOrders", data).then(res => {
							if (res.code == 0) {
								this.callPay(res.data);
							} else {
								uni.showToast({
									title: res.msg,
									icon: 'none'
								})
							}
						});
					}
					// #endif
				} else if (this.openWay == 2) {
					// APP支付宝支付
					// #ifdef H5
					let data = {
						ordersId: this.ordersId,
						type: 1
					}
					this.$Request.postT("/app/aliPay/payOrders", data).then(res => {
						if (res.code == 0) {
							const div = document.createElement('div')
							div.innerHTML = res.data //此处form就是后台返回接收到的数据
							document.body.appendChild(div)
							document.forms[0].submit()
						} else {
							uni.showToast({
								icon: 'none',
								title: '支付失败!'
							});
						}
					});
					// #endif

					// #ifdef APP
					let data = {
						ordersId: this.ordersId,
						type: 2
					}
					this.$Request.postT("/app/aliPay/payOrders", data).then(res => {
						console.log(JSON.stringify(res), '支付宝支付信息')
						this.isCheckPay(res.code, 'alipay', res.data)
					});
					// #endif
				} else if (this.openWay == 3) {
					let data = {
						ordersId: this.ordersId
					}
					let that = this
					that.$Request.postT("/app/orders/payOrders", data).then(res => {
						if (res.code == 0) {
							uni.hideLoading();
							uni.showToast({
								title: '支付成功',
								icon: 'none'
							});
							setTimeout(function() {
								uni.switchTab({
									url: '/pages/order/order'
								})
							}, 1000)
						} else {
							uni.showToast({
								title: res.msg,
								icon: 'none'
							})
						}
					});
				}
			},
			callPay: function(response) {
				if (typeof WeixinJSBridge === "undefined") {
					if (document.addEventListener) {
						document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false);
					} else if (document.attachEvent) {
						document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response));
						document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response));
					}
				} else {
					this.onBridgeReady(response);
				}
			},
			onBridgeReady: function(response) {
				let that = this;
				// if (!response.package) {
				// 	return;
				// }
				console.log(response, 111111)
				WeixinJSBridge.invoke(
					'getBrandWCPayRequest', {
						"appId": response.appid, //公众号名称，由商户传入
						"timeStamp": response.timestamp, //时间戳，自1970年以来的秒数
						"nonceStr": response.noncestr, //随机串
						"package": response.package,
						"signType": response.signType, //微信签名方式：
						"paySign": response.sign //微信签名
					},
					function(res) {
						console.log(res, '/*-/*-/*-')
						if (res.err_msg === "get_brand_wcpay_request:ok") {
							// 使用以上方式判断前端返回,微信团队郑重提示：
							//res.err_msg将在用户支付成功后返回ok，但并不保证它绝对可靠。
							uni.showLoading({
								title: '支付成功'
							});
							setTimeout(function() {
								uni.hideLoading();
								uni.switchTab({
									url: '/pages/order/order'
								})
							}, 1000);
						} else {
							uni.hideLoading();
						}
						WeixinJSBridge.log(response.err_msg);
					}
				);
			},
			isCheckPay(status, name, order) {
				if (status == 0) {
					this.setPayment(name, order);
				} else {
					uni.hideLoading();
					uni.showToast({
						title: '支付信息有误',
						icon: 'none'
					});
				}
			},
			setPayment(name, order) {
				console.log(name, '*-*-*', order)
				uni.requestPayment({
					provider: name,
					orderInfo: order, //微信、支付宝订单数据
					success: function(res) {
						console.log(res)
						uni.hideLoading();
						uni.showLoading({
							title: '支付成功'
						});
						setTimeout(function() {
							uni.switchTab({
								url: '/pages/order/order'
							})
						}, 1000);
					},
					fail: function(err) {
						console.log(err)
						uni.hideLoading();
					},
					complete() {
						uni.hideLoading();
					}
				});
			},
			// 开启订阅消息
			openMsg() {
				console.log('订阅消息')
				var that = this
				uni.getSetting({
					withSubscriptions: true, //是否获取用户订阅消息的订阅状态，默认false不返回
					success(ret) {
						console.log(ret.subscriptionsSetting, '------------------')
						// if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
						if (ret.subscriptionsSetting.itemSettings) {
							uni.setStorageSync('sendMsg', true)
							uni.openSetting({ // 打开设置页 
								success(rea) {
									console.log(rea.authSetting)
								}
							});
						} else { // 用户没有点击“总是保持以上，不再询问”则每次都会调起订阅消息
							console.log(99999)
							uni.setStorageSync('sendMsg', false)
							uni.showModal({
								title: '提示',
								content: '为了更好的体验,请绑定消息推送',
								confirmText: '确定',
								cancelText: '取消',
								success: function(res) {
									if (res.confirm) {
										console.log(that.arr)
										wx.requestSubscribeMessage({
											tmplIds: that.arr,
											success(re) {
												console.log(JSON.stringify(re),
													'++++++++++++++')
												var datas = JSON.stringify(re);
												if (datas.indexOf("accept") != -1) {
													console.log(re)
													// uni.setStorageSync('sendMsg', true)
												}
											},
											fail: (res) => {
												console.log(res)
											}
										})
										// uni.setStorageSync('sendMsg', true)
										console.log('确认')
										that.showModal1 = false
									} else if (res.cancel) {
										console.log('取消')
										// uni.setStorageSync('sendMsg', false)
										that.showModal1 = true
									}
								}
							})
						}
					}
				})
			},
		}
	}
</script>

<style lang="less">
	/deep/.swiper {
		height: 160rpx !important;
	}

	page {
		background: #FFFFFF;
	}

	.sos {
		width: 70rpx;
		height: 70rpx;
		position: fixed;
		bottom: 290rpx;
		left: 32rpx;
		z-index: 99;

		image {
			width: 70rpx;
			height: 70rpx;
		}
	}

	.content {
		width: 100%;
		// position: fixed;
		// top: 0upx;
		// left: 0upx;
		// right: 0upx;
		// bottom: 0upx;

	}

	.controls-title {
		width: 100%;
		// height: 55vh;
		// background: #FFFFFF;
		// box-shadow: 0px -12px 40px 0px rgba(192, 220, 245, 0.6);
		border-radius: 55upx 55upx 0 0;
		/* #ifdef MP-WEIXIN */
		// padding-bottom: 20rpx;
		/* #endif */
		padding-top: 10rpx;
	}

	.orderb {
		display: flex;
		align-items: center;
		justify-content: space-between;
		background: #FFFFFF;
		margin: 30rpx 30rpx 0 30rpx;
		border-radius: 24rpx;
		padding: 30rpx;
	}

	.controls-box {
		// background: #FFFFFF;
		// margin: 30upx 30rpx 20rpx;
		border-radius: 32upx;
		padding-bottom: 1rpx;
	}

	/* tab选项卡 */
	.controls-tabs {
		/* width: 100%; */
		height: 90rpx;
		display: flex;
		font-size: 28rpx;
		overflow-x: auto;
		justify-content: space-between;
		align-items: center;
		margin-top: 10rpx;
		padding: 0 30rpx;
	}

	.atabs_ds {
		text-align: center;
		height: 55rpx;
	}

	.btna {
		width: 686rpx;
		height: 98rpx;
		background: #FE6B01;
		border-radius: 16rpx;
		/* margin: 9rpx 10rpx 10rpx 29rpx; */
		margin: 0rpx auto;
		text-align: center;
		line-height: 98rpx;
		margin-top: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #FFFFFF;
	}
	
	.btna_view {
		width: 252rpx;
		height: 68rpx;
		border-radius: 166rpx;
		opacity: 1;
		background: linear-gradient(105deg, #FF5900 -1%, #FD1818 100%);
		position: absolute;
		left: 246rpx;
		top: 882rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		padding: 10rpx;
		gap: 10rpx;
		color: #FFFFFF;
		font-weight: normal;
		font-size: 36rpx;
	}

	.zx_view {
		display: flex;
		align-items: center;
		width: 328rpx;
		justify-content: center;
	}

	.zx_name {
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 26rpx;
		// color: #999999;
		margin-left: 20rpx;
	}

	.pc_view {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 0 10rpx 30rpx;
	}

	.rs_item {
		width: fit-content;
		padding: 20rpx 40rpx;
		// height: 71rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		border: 2px solid #CCCCCC;
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #030303;
		margin-top: 20rpx;
		margin-right: 20rpx;
	}

	.rs_item_sel {
		width: fit-content;
		padding: 20rpx 40rpx;
		// height: 71rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		border: 2px solid #346EF6;
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #346EF6;
		margin-top: 20rpx;
		margin-right: 20rpx;
	}

	.bz_item {
		width: fit-content;
		padding: 20rpx 22rpx;
		// height: 71rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		border: 2px solid #CCCCCC;
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #030303;
		margin-top: 20rpx;
		margin-right: 20rpx;
	}

	.bz_item_sel {
		width: fit-content;
		padding: 20rpx 22rpx;
		// height: 71rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		border: 2px solid #346EF6;
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #346EF6;
		margin-top: 20rpx;
		margin-right: 20rpx;
	}

	.pc_item {
		width: 328rpx;
		height: 250rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		border: 1rpx solid #DCDCDC;
		text-align: center;
		padding: 20rpx 0;

		image {
			width: 97rpx;
			height: 85rpx;
			margin-top: 20rpx;
		}
	}

	.pc_items {
		width: 328rpx;
		height: 250rpx;
		background: #EDF2FF;
		border-radius: 24rpx;
		border: 1px solid #346EF6;
		text-align: center;
		padding: 20rpx 0;

		image {
			width: 97rpx;
			height: 85rpx;
			margin-top: 20rpx;
		}
	}

	.pc_name {
		font-family: PingFang SC;
		font-weight: bold;
		font-size: 28rpx;
		color: #030303;
	}

	.pc_money {
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #030303;
		margin-top: 15rpx;

		text {
			font-size: 40rpx;
			font-weight: bold;
		}
	}

	.addbox {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 0 10rpx 30rpx;
		padding: 0 30rpx;
		height: 100rpx;
		border-radius: 16rpx;
	}

	.add_cont {
		display: flex;
		align-items: center;
	}

	.add_tit {
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #333333;
		margin-left: 10rpx;

	}

	.bg {
		background: #F5F5F5;
	}

	.bgc {
		background: #F5F8FF;

	}

	.bgs {
		background: #FFFFFF;

	}

	.green {
		width: 16rpx;
		height: 16rpx;
		background: #1FC657;
		border-radius: 50%;
		margin-right: 20rpx;
	}

	.orgin {
		width: 16rpx;
		height: 16rpx;
		background: #FBAC04;
		border-radius: 50%;
		margin-right: 20rpx;
	}

	/* 支付弹框 */
	.popup_pay {
		width: 100%;
	}

	.pay_btns {
		width: 90%;
		margin: 0 auto 40rpx;
		text-align: center;
		background: #3699FF;
		height: 80rpx;
		border-radius: 16rpx;
		color: #ffffff;
		line-height: 80rpx;
		margin-top: 20rpx;
	}

	/* 红包样式 */
	.hongbao {
		width: 100%;
		/* height: 100px; */
		/* background: #007AFF; */
		position: fixed;
		top: 0rpx;
		/* bottom: 50%; */
		left: 0rpx;
		right: 0rpx;
		/* display: none; */
	}
	
	.xinhongbao {
		height: 100%;
		z-index: 999;
		background: rgba(0, 0, 0, 0.4);
	}

	.hb_img {
		width: 100%;
		height: 100%;
	}

	.hb_btn {
		width: 60%;
		height: 72rpx;
		position: absolute;
		top: 315rpx;
		left: 80rpx;
	}

	.hoveorderimg {
		width: 100%;
		height: 535rpx;
	}

	.img-map1 {
		width: 80rpx;
		height: 80rpx;
	}

	.headTop {
		width: 100%;
		background: #FFFFFF;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 999;
		/* #ifdef MP-WEIXIN */
		padding: 120rpx 30rpx 25rpx;
		/* #endif */
		/* #ifdef H5 */
		padding: 40rpx 30rpx 25rpx;
		/* #endif */
		/* #ifdef APP */

		padding: 0rpx 0rpx;
		/* #endif */
		display: flex;
		align-items: center;

	}

	.line {
		width: 1rpx;
		height: 63rpx;
		background: #E6E6E6;
	}

	.btn {
		width: 686rpx;
		height: 98rpx;
		margin: 0 auto;
		background: #346EF6;
		border-radius: 16rpx;
		font-size: 32rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 40rpx auto;
	}

	.czbtn {
		width: 480rpx;
		height: 80rpx;
		background: #346EF6;
		border-radius: 40rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-top: 50rpx;
	}

	.qxdj {
		width: 180rpx;
		height: 70rpx;
		border: 2rpx solid #CCCCCC;
		border-radius: 16rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #666666;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.btns {
		width: 250rpx;
		height: 80rpx;
		border: 2rpx solid #999999;
		border-radius: 40rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #999999;
		display: flex;
		align-items: center;
		justify-content: center;
		line-height: 80rpx;
	}

	.btnss {
		width: 250rpx;
		height: 80rpx;
		background: #346EF6;
		border-radius: 40rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		line-height: 80rpx;
	}

	//优惠劵
	.scroll-Y {
		height: 580rpx;
	}

	.money_box {
		// height: 300rpx;
		// line-height: 300rpx;
		// text-align: center;
		// font-size: 36rpx;
		width: 100%;
		margin: 0 auto;
		background: #ffffff;
		border-radius: 14upx;
		height: 220rpx;
		margin-bottom: 20upx;
		margin-top: 20rpx;
	}

	.box_tit {
		width: 90%;
		margin: 0 auto;
		height: 80upx;
		display: flex;
	}

	.money_name {
		flex: 1;
		display: flex;
		justify-content: left;
		align-items: center;
		font-size: 27rpx;
		font-weight: bold;
		letter-spacing: 2upx;
	}

	.money_price {
		flex: 1;
		display: flex;
		justify-content: flex-end;
		align-items: center;
		font-size: 48upx;
		font-weight: bold;
		color: red;

		text {
			font-size: 30rpx;
		}
	}

	.money_data {
		color: #999999;
		font-size: 24rpx;
		width: 90%;
		margin: 0 auto;
		margin-top: -8upx;
	}

	.u-line {
		width: 90% !important;
		border-bottom-width: 6upx !important;
		margin: 0 auto !important;
		margin-top: 22upx !important;
		margin-bottom: 22upx !important;
	}

	.box_bottom {
		width: 90%;
		margin: 0 auto;
		display: flex;
		height: 40upx;
	}

	.money_use {
		flex: 1;
		color: #999999;
		font-size: 24rpx;
		display: flex;
		justify-content: left;
		align-items: center;
	}

	.lj_use {
		width: 150rpx;
		border: 2rpx solid #FF130A;
		color: #FF130A;
		text-align: center;
		line-height: 48rpx;
		border-radius: 40rpx;
		font-size: 23rpx;
	}

	.deteJuan {
		width: 190rpx;
		border: 2rpx solid #FF130A;
		color: #FF130A;
		text-align: center;
		line-height: 48rpx;
		border-radius: 40rpx;
		font-size: 23rpx;
		margin: 20rpx 0;
	}

	.remkbtn {
		width: 100%;
		height: 98rpx;
		background: #fe6b01;
		border-radius: 16rpx;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		line-height: 98rpx;
		margin-top: 40rpx;
	}

	.kefu_item {
		position: fixed;
		bottom: 200upx;
		right: 20rpx;
		z-index: 999;

		image {
			width: 150rpx;
			height: 150rpx;
		}
	}

	.index_bottom_list {
		/* #ifdef H5 */
		display: flex;
		flex-wrap: wrap;
		padding-bottom: 30upx;
		margin-left: 13upx;
		/* #endif */

		/* #ifndef H5 */
		display: flex;
		flex-wrap: wrap;
		padding-bottom: 0upx;
		margin-left: 15rpx;
		/* #endif */
	}

	.centeritem_image {
		width: 32upx;
		height: 32upx
	}

	.centeritem_text {
		font-family: PingFang SC;
		font-weight: 500;
		font-size: 24rpx;
		color: #666666;
		margin-left: 10rpx;
	}

	.index_bottom_list_view {
		width: 350rpx;
		// height: 240upx;
		background-color: #FFFFFF;
		border-radius: 20upx;
		margin-left: 10upx;
		margin-top: 15upx;
		box-shadow: rgba(183, 183, 183, 0.3) 1px 1px 10px 1px;
	}

	.index_bottom_list_viewImage {
		width: 350rpx;
		height: 340upx;
		border-top-left-radius: 20rpx;
		border-top-right-radius: 20rpx;
		// padding: 16upx;
	}

	.index_banner {
		/* #ifdef APP-PLUS */
		padding: 20upx 16upx 0;
		margin: 0upx 6upx;
		/* #endif */

		/* #ifndef APP-PLUS */
		padding: 20upx 16upx 0;
		margin: 0upx 6upx;
		/* #endif */
	}

	.swiper-container image {
		width: 100%;
	}

	.banner_image {
		width: 100%;
		height: 218upx;
		overflow: hidden;
		border-radius: 20rpx;
	}

	.index_gonggao {
		height: 60upx;
		line-height: 50upx;
		background: #EEF2FF;
		border-radius: 16rpx;
		width: 95%;
		padding: 5upx 0 0 20upx;
		margin: 20upx 0rpx;
		margin-left: 20upx;
		margin-right: 32upx;
		color: #4B75FF;
	}
</style>