From 658107c8a09e2ef74bab1ad7114eeaf367848a25 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期一, 06 七月 2026 18:14:16 +0800
Subject: [PATCH] Merge branch '3.0.1' of http://139.186.142.91:10010/r/productDev/parkBike into 3.0.1

---
 bicycle/pages/index/index.vue | 1198 ++++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 857 insertions(+), 341 deletions(-)

diff --git a/bicycle/pages/index/index.vue b/bicycle/pages/index/index.vue
index 87faa72..0b8f052 100644
--- a/bicycle/pages/index/index.vue
+++ b/bicycle/pages/index/index.vue
@@ -13,10 +13,17 @@
 			</view>
 			<view class="index_box">
 				<view class="index_box_map">
-					<map class="map" scale="15" :show-location="true" :markers="markers" :latitude="latitude" :longitude="longitude" />
+					<map
+						id="mapId"
+						class="map"
+						scale="15"
+						:show-location="mapShowLocation"
+						:polygons="eleBusinessArea"
+						:markers="markers"
+						:latitude="latitude"
+						:longitude="longitude" />
 					<view class="index_box_map_type">
-						<view class="index_box_map_type_row active">鑷杞�</view>
-						<view class="index_box_map_type_row">鐢靛姩杞�</view>
+						<view :class="type === item.id ? 'index_box_map_type_row active' : 'index_box_map_type_row'" v-for="(item, index) in types" :key="index" @click="clickType(item.id)">{{item.name}}</view>
 					</view>
 					<view class="index_box_icon" @click="jumpMap">
 						<image src="@/static/icon/ic_fullscreen@2x.png" mode="widthFix"></image>
@@ -31,45 +38,58 @@
 					</image>
 				</view>
 				<view class="index_box_function">
-					<view class="cXYC" v-for="(item, index) in functionList" :key="index" @click.stop="jump(item)">
+					<view class="cXYC" :style="{ marginTop: item.id === 5 ? '30rpx' : '' }" v-for="(item, index) in functionList" :key="index" @click.stop="jump(item)">
 						<button open-type="getPhoneNumber" @getphonenumber="getPhone" v-if="!userInfo.mobile"></button>
 						<image class="img80" :src="item.icon" mode="widthFix"></image>
 						<text class="f26 c3 mt10">{{item.name}}</text>
 					</view>
 				</view>
-				<view class="index_box_vip">
+				<view class="index_box_vip" v-if="tcList.length > 0">
 					<view class="index_box_vip_head">
 						<text>鐑攢濂楅</text>
+						<button open-type="getPhoneNumber" @getphonenumber="getPhone" v-if="!userInfo.mobile">鑾峰彇鎵嬫満鍙�</button>
 						<text @click="jumpTC">鏇村浼樻儬 ></text>
 					</view>
 					<scroll-view scroll-x class="scrollView">
-						<view class="index_box_vip_row" v-for="(item, index) in 3" :key="index">
+						<view class="index_box_vip_row" v-for="(item, index) in tcList" :key="index">
 							<view class="vip1">
-								<text>鐢靛崟杞﹀勾鍗�</text>
-								<text>365</text>
+								<view class="vip1_left">
+									{{item.name || ''}}
+								</view>
+								<view class="vip1_right">
+									{{item.price || ''}}
+								</view>
 							</view>
 							<view class="vip2">
-								<text>365澶╃晠楠戯紝浜彈楠戣溅涔愯叮</text>
-								<u>楼699</u>
+								<text>{{item.descs || ''}}</text>
+								<u>楼{{item.linePrice || ''}}</u>
 							</view>
 							<view class="vip3">
-								<view class="vip3_info">浣庤嚦1鍏�/澶�</view>
-								<view class="vip3_button">璐拱</view>
+								<view class="vip3_info">浣庤嚦{{item.dayPrice}}鍏�/澶�</view>
+								<button class="vip3_button" open-type="getPhoneNumber" @getphonenumber="getPhone" v-if="!userInfo.mobile">璐拱</button>
+								<view class="vip3_button" @click="purchase(item.id)" v-else>璐拱</view>
 							</view>
 						</view>
 					</scroll-view>
 				</view>
-				<view class="index_box_poster" @click="jumpX">
+				<!-- <view class="index_box_poster" @click="jumpX">
 					<image class="imgfull" :src="info.leaseNoticeUrl" mode="widthFix"></image>
-				</view>
+				</view> -->
 				<view class="index_box_video" v-if="info.leaseVideoUrl">
 					<video class="img100b" :src="info.leaseVideoUrl" enable-danmu danmu-btn controls></video>
 				</view>
-				<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 600rpx);" v-if="show5"></view>
-				<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 660rpx);" v-if="show6"></view>
-				<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 660rpx);" v-else-if="show2"></view>
-				<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 580rpx);" v-else-if="show1"></view>
-				<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 500rpx);" v-else-if="show3"></view>
+				<template v-if="info.memberRidesResponse && info.memberRidesResponse.ridesType === 0">
+					<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 600rpx);" v-if="show5"></view>
+					<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 660rpx);" v-else-if="show6"></view>
+					<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 660rpx);" v-else-if="show2"></view>
+					<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 580rpx);" v-else-if="show1"></view>
+					<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 500rpx);" v-else-if="show3"></view>
+					<view class="index_zw1" v-else></view>
+				</template>
+				<template v-else-if="info.memberRidesResponse && info.memberRidesResponse.ridesType === 1">
+					<view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 660rpx);" v-if="$refs.d_tram.d_show3 || $refs.d_tram.d_show4"></view>
+					<view class="index_zw1" v-else></view>
+				</template>
 				<view class="index_zw1" v-else></view>
 			</view>
 		</view>
@@ -81,19 +101,43 @@
 				</view>
 				<image src="@/static/images/ic_safe@2x.png" mode="widthFix"></image>
 			</view>
-			<button class="index_scancode_bottom" open-type="getPhoneNumber" @getphonenumber="getPhone"
-				v-if="!userInfo.mobile">鎵爜绉熻溅</button>
+			<view class="index_scancode_fl" v-if="taocan.length > 0">
+				<view class="index_scancode_fl_tips">绂忓埄</view>
+				<swiper v-if="taocan.length > 1" class="index_scancode_fl_swiper" vertical autoplay circular interval="3000" duration="500" :indicator-dots="false">
+					<swiper-item v-for="(item, index) in taocan" :key="index">
+						<view class="index_scancode_fl_text">浠呴渶{{ item.price || 0 }}鍏� 鍙緱鈥渰{ item.name || '' }}鈥濋獞琛屽崱</view>
+					</swiper-item>
+				</swiper>
+				<view v-else class="index_scancode_fl_text">浠呴渶{{ taocan[0] ? taocan[0].price || 0 : 0 }}鍏� 鍙緱鈥渰{ taocan[0] ? taocan[0].name || '' : '' }}鈥濋獞琛屽崱</view>
+				<view class="index_scancode_fl_btn" @click="jumpTC">鍘荤湅鐪�</view>
+			</view>
+			<button class="index_scancode_bottom" open-type="getPhoneNumber" @getphonenumber="getPhone" v-if="!userInfo.mobile">鎵爜绉熻溅</button>
 			<view class="index_scancode_bottom" @click="carRental" v-else>鎵爜绉熻溅</view>
+			<view class="index_scancode_xieyi">
+				<text @click.stop="jumpgz">璁¤垂瑙勫垯</text>
+				<text>锝�</text>
+				<text @click.stop="jumpX">绉熻祦椤荤煡</text>
+			</view>
 			<view class="index_scancode_zw"></view>
 		</view>
 		<!-- 鑷杞�-缂寸撼鎶奸噾 --> 
-		<u-popup :show="show1" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10"
+		<u-popup :show="show1" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10"
 			@close="show1 = false">
 			<view class="deposit">
 				<view class="deposit_text">
 					<text>娓╅Θ鎻愮ず</text>
 					<text>楠戣闇�瑕佺即绾硔{(info.deposit / 100).toFixed(2)}}鍏冭嚜琛岃溅鎶奸噾</text>
 					<text>锛堟娂閲戦殢鏃跺彲閫�锛�</text>
+				</view>
+				<view class="index_scancode_fl" v-if="taocan.length > 0">
+					<view class="index_scancode_fl_tips">绂忓埄</view>
+					<swiper v-if="taocan.length > 1" class="index_scancode_fl_swiper" vertical autoplay circular interval="3000" duration="500" :indicator-dots="false">
+						<swiper-item v-for="(item, index) in taocan" :key="index">
+							<view class="index_scancode_fl_text">浠呴渶{{ item.price || 0 }}鍏� 鍙緱鈥渰{ item.name || '' }}鈥濋獞琛屽崱</view>
+						</swiper-item>
+					</swiper>
+					<view v-else class="index_scancode_fl_text">浠呴渶{{ taocan[0] ? taocan[0].price || 0 : 0 }}鍏� 鍙緱鈥渰{ taocan[0] ? taocan[0].name || '' : '' }}鈥濋獞琛屽崱</view>
+					<view class="index_scancode_fl_btn" @click="jumpTC">鍘荤湅鐪�</view>
 				</view>
 				<view class="deposit_read" @click="active = !active">
 					<image src="@/static/icon/ic_select@2x.png" mode="widthFix" v-if="!active"></image>
@@ -109,7 +153,7 @@
 			</view>
 		</u-popup>
 		<!-- 鑷杞�-寮�閿� -->
-		<u-popup :show="show5" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10"
+		<u-popup :show="show5" :overlay="false" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10"
 			@close="show5 = false">
 			<view class="loading">
 				<view class="loading_box">
@@ -126,7 +170,7 @@
 			</view>
 		</u-popup>
 		<!-- 鑷杞�-楠戣涓� -->
-		<u-popup :show="show2" :overlay="false" overlayOpacity="0" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10"
+		<u-popup :show="show2" overlayOpacity="0" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10"
 			@close="show2 = false">
 			<view class="ride">
 				<view class="ride_head">
@@ -142,6 +186,12 @@
 						<text>楠戣鏄庣粏</text>
 						<image src="@/static/icon/ar_detail@2x.png" mode="widthFix"></image>
 					</view>
+				</view>
+				<!-- 鏈夊椁愭樉绀� -->
+				<view class="info_des_tc" v-if="info && info.memberRidesResponse && info.memberRidesResponse.discountMember">
+					<u-icon name="info-circle" color="#FF5A31" size="18"></u-icon>
+					<text v-if="info.memberRidesResponse.discountMember.limitType === 0">鎮ㄦ湁楠戣濂楅锛屾湰娆¤绋嬪厤璐归獞琛�</text>
+					<text v-if="info.memberRidesResponse.discountMember.limitType === 1">鎮ㄥ凡璐拱楠戣濂楅锛屾湰娆¤绋嬪厤璐归獞琛寋{convertMinutesToHours(info.memberRidesResponse.discountMember.surplusTime)}}~</text>
 				</view>
 				<view class="ride_content" v-if="info.memberRidesResponse">
 					<view class="ride_content_a">
@@ -165,7 +215,7 @@
 			</view>
 		</u-popup>
 		<!-- 鑷杞�-宸茶繕杞� -->
-		<u-popup :show="show6" :overlay="false" overlayOpacity="0" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10"
+		<u-popup :show="show6" overlayOpacity="0" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10"
 			@close="show6 = false">
 			<view class="ride">
 				<view class="ride_head">
@@ -181,6 +231,12 @@
 						<text>楠戣鏄庣粏</text>
 						<image src="@/static/icon/ar_detail@2x.png" mode="widthFix"></image>
 					</view>
+				</view>
+				<!-- 鏈夊椁愭樉绀� -->
+				<view class="info_des_tc" v-if="info && info.memberRidesResponse && info.memberRidesResponse.discountMember">
+					<u-icon name="info-circle" color="#FF5A31" size="18"></u-icon>
+					<text v-if="info.memberRidesResponse.discountMember.limitType === 0">鎮ㄦ湁楠戣濂楅锛屾湰娆¤绋嬪厤璐归獞琛�</text>
+					<text v-if="info.memberRidesResponse.discountMember.limitType === 1">鎮ㄥ凡璐拱楠戣濂楅锛屾湰娆¤绋嬪厤璐归獞琛寋{convertMinutesToHours(info.memberRidesResponse.discountMember.surplusTime)}}~</text>
 				</view>
 				<view class="ride_content" v-if="info.memberRidesResponse">
 					<view class="ride_content_a">
@@ -202,7 +258,7 @@
 			</view>
 		</u-popup>
 		<!-- 鑷杞�-纭缁撶畻 -->
-		<u-popup :show="show3" :overlay="false" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10" @close="show3 = false">
+		<u-popup :show="show3" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10" @close="show3 = false">
 			<template>
 				<view class="deposit1">
 					<view class="deposit_text">
@@ -222,7 +278,7 @@
 		<!-- 鑷杞�-纭缁撶畻寮规 -->
 		<u-modal :show="show7" title="鎻愮ず" content='纭缁撶畻鍚楋紵' :showCancelButton="true" cancelText="鍙栨秷" @confirm="settlement1" @cancel="show7 = false"></u-modal>
 		<!-- 骞垮憡 -->
-		<u-popup :show="show" mode="center" :closeOnClickOverlay="false" overlayStyle="z-index: 10075;" bgColor="transparent" :round="10" @close="show = false">
+		<u-popup :show="show" mode="center" :overlayStyle="{ zIndex: '99999' }" :closeOnClickOverlay="true" zIndex="99999" bgColor="transparent" :round="10" @close="show = false">
 			<view class="popupbox">
 				<view class="advertisement">
 					<image :src="info.adList[0].imgfullurl" mode="widthFix"></image>
@@ -231,6 +287,8 @@
 				</image>
 			</view>
 		</u-popup>
+		<!-- 鐢佃溅 -->
+		<tram ref="d_tram" @unlockDoor="refresh('tram')" />
 	</view>
 </template>
 
@@ -238,7 +296,7 @@
 	import {
 		mapState
 	} from 'vuex'
-
+	import tram from '@/components/tram/tram.vue'
 	export default {
 		data() {
 			return {
@@ -276,106 +334,345 @@
 					},
 					{
 						id: 3,
-						name: '璁′环瑙勫垯',
-						icon: require('@/static/images/home_ic_guize@2x.png')
+						name: '鍥㈣喘楠屽埜',
+						icon: require('@/static/images/home_ic_yajing@x.png')
 					},
 					{
 						id: 4,
-						name: '娑堣垂鏄庣粏',
-						icon: require('@/static/images/home_ic_mingxi@2x.png')
-					},
+						name: '涓汉涓績',
+						icon: require('@/static/images/home_ic_jiesuan@x.png')
+					}
 				],
 
 				info: {},
 				content: '',
 				
 				timer: null,
-				isDisabled: true
+				isDisabled: true,
+				
+				tcList: [],
+				type: 1,
+				types: [
+					{ name: '鑷杞�', id: 1 },
+					{ name: '鐢靛姩杞�', id: 2 }
+				],
+				eleBusinessArea: [
+					{
+						points: [],
+						fillColor: "#0077FF12",
+						strokeColor: "#0077FF",
+						strokeWidth: 3,
+						zIndex: 7
+					}
+				],
+				onPullDownRefresh: false,
+				timerdian: null,
+				taocan: [],
+				mapShowLocation: false
 			}
 		},
+		components: { tram },
 		computed: {
 			...mapState(['navHeight', 'statusbarHeight', 'userInfo'])
 		},
 		async onLoad(options) {
-			if (JSON.stringify(this.userInfo) == '{}') {
-				await this.$onLaunched;
-			}
+			var that = this;
+			await this.$onLaunched;
+			
 			await this.getAddress()
-			await this.getHomeInfo()
+			// await this.getHomeInfo()
 			await this.getSite()
-			// if (decodeURIComponent(options.scene) !== 'undefined') {
-			// 	console.log(decodeURIComponent(options.scene))
-			// 	this.carRentalCopy(decodeURIComponent(options.scene))
-			// }
+			
+			this.$u.api.home()
+				.then(async res => {
+					if (res.code === 200) {
+						let code = decodeURIComponent(options.scene)
+						// 鏄惁寮瑰嚭骞垮憡鍥�
+						if (res.data.adList.length > 0 && !res.data.memberRidesResponse) {
+							this.show = true
+						}
+						if (res.data.memberRidesResponse && res.data.memberRidesResponse.ridesType === 0 && code !== 'undefined' && res.data.rideStatus !== 2) {
+							let typeName = ''
+							if (code.substring(0, code.indexOf('-')) === 'ebike') {
+								typeName = '鐢靛姩杞�'
+							} else {
+								typeName = '鑷杞�'
+							}
+							uni.showToast({
+								title: `褰撳墠瀛樺湪鏈粨绠楄嚜琛岃溅璁㈠崟锛岃鍏堢粨绠楄鍗曞悗鍐嶆壂鐮佺${typeName}`,
+								icon: 'none'
+							})
+						} else if (res.data.memberRidesResponse && res.data.memberRidesResponse.ridesType === 1 && code !== 'undefined') {
+							let typeName = ''
+							if (code.substring(0, code.indexOf('-')) === 'ebike') {
+								typeName = '鐢靛姩杞�'
+							} else {
+								typeName = '鑷杞�'
+							}
+							uni.showToast({
+								title: `褰撳墠瀛樺湪鏈粨绠楃數鍔ㄨ溅璁㈠崟锛岃鍏堢粨绠楄鍗曞悗鍐嶆壂鐮佺${typeName}`,
+								icon: 'none'
+							})
+						}
+						// 鑷杞�
+						if (res.data.memberRidesResponse && res.data.memberRidesResponse.ridesType === 0) {
+							// 瑙i攣涓�
+							if (res.data.rideStatus === 0) {
+								this.show5 = true
+								// 寰幆娆℃暟
+								var num = 1
+								// 寰幆鏌ョ湅瑙i攣缁撴灉
+								let timer = setInterval(async () => {
+									num += 1
+									let res1 = await this.$u.api.refreshLock({
+										id: res.data.memberRidesResponse.rideId
+									})
+									// 寮�閿佹垚鍔�
+									if (res1.data.status === 1) {
+										clearInterval(timer)
+										this.show5 = false
+										setTimeout(() => {
+											this.show2 = true
+										}, 500)
+									}
+									// 寮�閿佸け璐�
+									if (res1.data.status === 3) {
+										clearInterval(timer)
+										this.show5 = false
+										uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
+									}
+									// 寮�閿佽秴鏃�
+									if (num === 180) {
+										clearInterval(timer)
+										this.show5 = false
+										uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
+									}
+								}, 1000)
+							}
+							// 楠戣涓�
+							if (res.data.rideStatus === 1) {
+								this.show2 = true
+								this.refreshStatus()
+							}
+							if (res.data.rideStatus === 5) {
+								this.show5 = true
+							}
+							if (res.data.rideStatus === 2) {
+								this.show6 = true
+								this.refreshStatus()
+							}
+						} else if (res.data.memberRidesResponse && res.data.memberRidesResponse.ridesType === 1) {
+							that.$refs.d_tram.info = {
+								...res.data.memberRidesResponse.discountMember,
+								...res.data.memberRidesResponse,
+								deposit: res.data.deposit,
+								goodsOrderId: res.data.goodsOrderId
+							}
+							// 楠戣涓�
+							if (res.data.rideStatus === 1) {
+								that.$refs.d_tram.d_show3 = true
+							}
+							// 涓存椂閿佽溅
+							if (res.data.rideStatus === 4) {
+								that.$refs.d_tram.d_show4 = true
+							}
+							// 杞鍒锋柊鐢佃溅楠戣鐘舵��
+							that.refreshTram()
+						// 娌℃湁楠戣璁㈠崟
+						} else if (!res.data.memberRidesResponse) {
+							if (decodeURIComponent(options.scene) !== 'undefined') {
+								let code = decodeURIComponent(options.scene)
+								if (code.substring(0, code.indexOf('-')) === 'ebike') {
+									console.log('鐢靛姩杞�')
+									this.carRentalCopy(decodeURIComponent(options.scene), 2)
+								} else {
+									console.log('鑷杞�')
+									this.carRentalCopy(decodeURIComponent(options.scene), 1)
+								}
+							}
+						}
+						// 鏄惁钀ヤ笟
+						if (res.data.isBusiness === 0) {
+							this.title = '鏆傚仠钀ヤ笟鎻愰啋'
+							this.content = res.data.unBusinessTips
+							this.show4 = true
+							return
+						}
+						// 鏄惁鍋滄鏈嶅姟
+						if (res.data.isStopServe === 1) {
+							this.title = '鏆傚仠鏈嶅姟鎻愰啋'
+							this.content = res.data.stopServeTips
+							this.show4 = true
+						}
+						this.tcList = res.data.discountList
+						let arr = JSON.parse(res.data.eleBusinessArea)
+						this.eleBusinessArea[0].points = arr.map(item => {
+							return {
+								latitude: item.lat,
+								longitude: item.lng
+							}
+						})
+					}
+				})
+			this.getTC()
+			uni.$on('update', data => {
+				this.carRental()
+			})
+			uni.$on('sweep', () => {
+				this.carRental()
+			})
+		},
+		onPullDownRefresh() {
+			this.onPullDownRefresh = true
+			this.refresh()
+		},
+		async onShow() {
+			await this.$onLaunched;
+			this.refresh()
 		},
 		onPageScroll(e) {
 			this.top = e.scrollTop
 		},
 		methods: {
+			// 鐑攢濂楅
+			getTC() {
+				this.$u.api.discountPage({
+					capacity: 10,
+					page: 1,
+					model: {}
+				}).then(res => {
+					if (res.code === 200) {
+						this.taocan = res.data.records
+					}
+				})
+			},
+			// 鍒嗛挓杞崲
+			convertMinutesToHours(minutes) {
+			    const hours = Math.floor(minutes / 60);  // 璁$畻灏忔椂鏁�
+			    const remainingMinutes = minutes % 60;  // 璁$畻鍓╀綑鐨勫垎閽熸暟
+				if (hours > 0 && remainingMinutes > 0) {
+					return `${hours}灏忔椂${remainingMinutes}鍒嗛挓`;
+				} else if (hours == 0) {
+					return `${remainingMinutes}鍒嗛挓`;
+				} else if (remainingMinutes == 0) {
+					return `${hours}灏忔椂`;
+				}
+			},
+			clickcontrol() {
+				let mapObjs = uni.createMapContext('mapId', this)
+				mapObjs.moveToLocation({
+					complete: res => {
+						console.log('绉诲姩瀹屾垚:', res)
+					}
+				})
+			},
+			async getEleBikeList() {
+				let res = await this.$u.api.eleBikeList({})
+				if (res.code === 200) {
+					this.markers = []
+					res.data.forEach((item, index) => {
+						this.markers.push({
+							id: index,
+							width: 40,
+							height: 40,
+							latitude: item.latitude,
+							longitude: item.longitude,
+							title: item.name,
+							iconPath: '/static/icon/ic_bike@2x.png'
+						})
+					})
+					this.clickcontrol()
+				}
+			},
+			clickType(id) {
+				this.type = id
+				if (id === 1) {
+					this.getSite()
+				} else {
+					this.getEleBikeList()
+				}
+			},
+			purchase(id) {
+				uni.navigateTo({
+					url: `/pages/packageDetails/packageDetails?id=${id}`
+				});
+			},
 			jumpTC() {
 				uni.navigateTo({
 					url: '/pages/setMenu/setMenu'
 				});
 			},
 			// 寰俊鎵撳紑灏忕▼搴忓紑閿佹柟娉�
-			async carRentalCopy(code) {
-				await this.refresh()
-				// 鍒ゆ柇鏈夋病鏈変氦鎶奸噾
-				if (this.info.depositStatus === 0) {
-					this.show1 = true
-					return;
-				} else if (this.info.depositStatus === 2) {
-					uni.showToast({ title: '缁撶畻鐢宠鎻愪氦鎴愬姛锛岃鑰愬績绛夊緟閫�娆撅紒', icon: 'none', duration: 2000 });
-					return;
-				}
+			async carRentalCopy(code, type) {
 				var that = this;
-				if (!that.disable) {
-					that.disable = true
-					// 鎵撳紑寮�閿佸脊妗�
-					that.show5 = true
-					// 璋冪敤寮�閿佹帴鍙�
-					let res = await that.$u.api.openLock({
-						code: code
-					})
-					if (res.code === 200) {
-						that.disable = false
-						that.show6 = false
-						that.show5 = true
-						// 寰幆娆℃暟
-						var num = 1
-						// 寰幆鏌ョ湅瑙i攣缁撴灉
-						let timer = setInterval(async () => {
-							num += 1
-							let res1 = await that.$u.api.refreshLock({
-								id: res.data.id
-							})
-							// 寮�閿佹垚鍔�
-							if (res1.data.status === 1) {
-								that.refresh()
-								clearInterval(timer)
-								that.show5 = false
-								setTimeout(() => {
-									that.show2 = true
-								}, 500)
-							}
-							// 寮�閿佸け璐�
-							if (res1.data.status === 3) {
-								that.refresh()
-								clearInterval(timer)
-								that.show5 = false
-								uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
-							}
-							// 寮�閿佽秴鏃�
-							if (num === 180) {
-								that.refresh()
-								clearInterval(timer)
-								that.show5 = false
-								uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
-							}
-						}, 1000)
+				let ddd = await this.$u.api.home()
+				if (ddd.code === 200) {
+					this.info = ddd.data
+					// 鍒ゆ柇鏈夋病鏈変氦鎶奸噾
+					if (this.info.depositStatus === 0) {
+						this.show1 = true
+						return;
+					} else if (this.info.depositStatus === 2) {
+						uni.showToast({ title: '缁撶畻鐢宠鎻愪氦鎴愬姛锛岃鑰愬績绛夊緟閫�娆撅紒', icon: 'none', duration: 2000 });
+						return;
+					}
+					// 鑷杞�
+					if (type === 1) {
+						 if (!that.disable) {
+						 	that.disable = true
+						 	// 鎵撳紑寮�閿佸脊妗�
+						 	that.show5 = true
+						 	// 璋冪敤寮�閿佹帴鍙�
+						 	let res = await that.$u.api.openLock({
+						 		code: code
+						 	})
+						 	if (res.code === 200) {
+						 		that.disable = false
+						 		that.show6 = false
+						 		that.show5 = true
+						 		// 寰幆娆℃暟
+						 		var num = 1
+						 		// 寰幆鏌ョ湅瑙i攣缁撴灉
+						 		let timer = setInterval(async () => {
+						 			num += 1
+						 			let res1 = await that.$u.api.refreshLock({
+						 				id: res.data.id
+						 			})
+						 			// 寮�閿佹垚鍔�
+						 			if (res1.data.status === 1) {
+						 				that.refresh()
+						 				clearInterval(timer)
+						 				that.show5 = false
+						 				setTimeout(() => {
+						 					that.show2 = true
+						 				}, 500)
+						 			}
+						 			// 寮�閿佸け璐�
+						 			if (res1.data.status === 3) {
+						 				that.refresh()
+						 				clearInterval(timer)
+						 				that.show5 = false
+						 				uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
+						 			}
+						 			// 寮�閿佽秴鏃�
+						 			if (num === 180) {
+						 				that.refresh()
+						 				clearInterval(timer)
+						 				that.show5 = false
+						 				uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
+						 			}
+						 		}, 1000)
+						 	} else {
+						 		that.show5 = false
+						 		that.disable = false
+						 	}
+						 }
 					} else {
-						that.show5 = false
-						that.disable = false
+						let res = await that.$u.api.getBikeChargingRule({ code: code })
+						if (res.code === 200) {
+							that.$refs.d_tram.info = res.data
+							that.$refs.d_tram.d_show1 = true
+						}
 					}
 				}
 			},
@@ -386,7 +683,7 @@
 			},
 			jumpMap() {
 				uni.navigateTo({
-					url: '/pages/maps/maps'
+					url: `/pages/maps/maps?type=${this.type}`
 				});
 			},
 			// 璁′环瑙勫垯
@@ -412,6 +709,7 @@
 									addr: item.addr
 								})
 							})
+							this.clickcontrol()
 						}
 					})
 			},
@@ -456,15 +754,29 @@
 			},
 			// 璺宠浆
 			async jump(item) {
+				if (!this.userInfo || !this.userInfo.mobile) return
 				await this.refresh()
 				if (item.id === 3) {
+					// uni.navigateTo({
+					// 	url: '/pages/pricingRules/pricingRules'
+					// });
 					uni.navigateTo({
-						url: '/pages/pricingRules/pricingRules'
+						url: '/pages/couponRedemption/couponRedemption'
 					});
 				} else if (item.id === 4) {
 					uni.navigateTo({
-						url: '/pages/consumptionDetails/consumptionDetails'
-					});
+						url: '/pages/personalCenter/personalCenter'
+					}); 
+				} else if (item.id === 5) {
+					if (!this.userInfo.sysuser) {
+						uni.navigateTo({
+							url: '/pages/operationLogin/operationLogin'
+						}); 
+					} else {
+						uni.navigateTo({
+							url: '/pages/operationsCenter/operationsCenter'
+						}); 
+					}
 				} else if (item.id === 2) {
 					if (!this.userInfo.mobile) return
 					if (this.info.rideStatus === 1) {
@@ -523,19 +835,16 @@
 												that.show1 = false
 												that.info.depositStatus = 1
 												that.carRental()
-												that.refresh()
 												uni.showToast({ title: '鍏呭�兼垚鍔�', icon: 'success', duration: 2000 });
 											}
 										},
 										fail(err) {
 											that.disable = false
-											console.log(err)
 										}
 									})
 								}
 							}).catch((err) => {
 								that.disable = false
-								console.log(err)
 							})
 					}
 				} else {
@@ -558,16 +867,18 @@
 							} = loginRes;
 							that.$u.api.wxLogin({
 								code
-							})
-							.then(res => {
+							}).then(res => {
+								that.$store.commit('setToken', res.data.token)
 								that.$u.api.wxPhone({
 									encryptedData: e.detail.encryptedData,
 									iv: e.detail.iv,
 									sessionKey: res.data.sessionKey
 								}).then(result => {
 									if (result.code === 200) {
-										that.$store.commit('setUserInfo', result.data
-											.userResponse)
+										that.$store.commit('setUserInfo', result.data.userResponse)
+										uni.redirectTo({
+										  url: '/pages/index/index'
+										});
 									}
 								})
 							})
@@ -577,74 +888,80 @@
 			},
 			// 鎵爜绉熻溅
 			async carRental() {
-				await this.refresh()
-				// 鍒ゆ柇鏈夋病鏈変氦鎶奸噾
-				if (this.info.depositStatus === 0) {
-					this.show1 = true
-					return;
-				} else if (this.info.depositStatus === 2) {
-					uni.showToast({ title: '缁撶畻鐢宠鎻愪氦鎴愬姛锛岃鑰愬績绛夊緟閫�娆撅紒', icon: 'none', duration: 2000 });
-					return;
-				}
 				var that = this;
-				if (!that.disable) {
-					that.disable = true
-					// 鎵爜瑙i攣楠戣
+				
+				let res = await this.$u.api.home()
+				if (res.code === 200) {
+					this.info = res.data
+					
+					// 鍒ゆ柇鏈夋病鏈変氦鎶奸噾
+					if (this.info.depositStatus === 0) {
+						this.show1 = true
+						return;
+					} else if (this.info.depositStatus === 2) {
+						uni.showToast({ title: '缁撶畻鐢宠鎻愪氦鎴愬姛锛岃鑰愬績绛夊緟閫�娆撅紒', icon: 'none', duration: 2000 });
+						return;
+					}
+					
+					// 鎵爜鑾峰彇杞﹁締淇℃伅
 					uni.scanCode({
 						success: async function(result) {
-							let text = decodeURIComponent(result.path)
-							text = text.substring(text.lastIndexOf('?') + 7, text.length)
-							// 鎵撳紑寮�閿佸脊妗�
-							that.show5 = true
-							// 璋冪敤寮�閿佹帴鍙�
-							let res = await that.$u.api.openLock({
-								code: text
-							})
-							if (res.code === 200) {
-								that.disable = false
-								that.show6 = false
+							let code = decodeURIComponent(result.path).split('=')[1]
+							let res = await that.$u.api.getBikeChargingRule({ code })
+							// 鑷杞�
+							if (res.code === 200 && res.data.ridesType === 0) {
+								that.disable = true
 								that.show5 = true
-								// 寰幆娆℃暟
-								var num = 1
-								// 寰幆鏌ョ湅瑙i攣缁撴灉
-								let timer = setInterval(async () => {
-									num += 1
-									let res1 = await that.$u.api.refreshLock({
-										id: res.data.id
-									})
-									// 寮�閿佹垚鍔�
-									if (res1.data.status === 1) {
-										that.refresh()
-										clearInterval(timer)
-										that.show5 = false
-										setTimeout(() => {
-											that.show2 = true
-										}, 500)
-									}
-									// 寮�閿佸け璐�
-									if (res1.data.status === 3) {
-										that.refresh()
-										clearInterval(timer)
-										that.show5 = false
-										uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
-									}
-									// 寮�閿佽秴鏃�
-									if (num === 180) {
-										that.refresh()
-										clearInterval(timer)
-										that.show5 = false
-										uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
-									}
-								}, 1000)
-							} else {
-								that.show5 = false
-								that.disable = false
+								// 璋冪敤寮�閿佹帴鍙�
+								let bicycle = await that.$u.api.openLock({ code })
+								if (bicycle.code === 200) {
+									that.disable = false
+									that.show6 = false
+									that.show5 = true
+									
+									// 寰幆娆℃暟
+									var num = 1
+									// 寰幆鏌ョ湅瑙i攣缁撴灉
+									let timer = setInterval(async () => {
+										num += 1
+										let res1 = await that.$u.api.refreshLock({ id: bicycle.data.id })
+										// 寮�閿佹垚鍔�
+										if (res1.data.status === 1) {
+											that.refresh()
+											clearInterval(timer)
+											that.show5 = false
+											setTimeout(() => {
+												that.show2 = true
+											}, 500)
+										}
+										// 寮�閿佸け璐�
+										if (res1.data.status === 3) {
+											that.refresh()
+											clearInterval(timer)
+											that.show5 = false
+											uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
+										}
+										// 寮�閿佽秴鏃�
+										if (num === 180) {
+											that.refresh()
+											clearInterval(timer)
+											that.show5 = false
+											uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
+										}
+									}, 1000)
+								} else {
+									that.show5 = false
+									that.disable = false
+								}
+							} else if (res.code === 200 && res.data.ridesType === 1) {
+								that.$refs.d_tram.info = res.data
+								that.$refs.d_tram.d_show1 = true
 							}
 						},
 						fail() {
 							that.disable = false
 						}
-					});
+					})
 				}
 			},
 			// 鑾峰彇缁忕含搴�
@@ -659,68 +976,7 @@
 							//鎵嬫満瀹氫綅鏈嶅姟锛圙PS锛夋湭鎺堟潈
 							uni.showToast({ title: "璇锋墦寮�鎵嬫満GPS", icon: "none" });
 						} else {
-							// 2銆佸垽鏂井淇″皬绋嬪簭鏄惁鎺堟潈浣嶇疆淇℃伅
-							uni.authorize({
-								//鎺堟潈璇锋眰绐楀彛
-								scope: "scope.userLocation",
-								success: (res) => {
-									that.fnGetlocation();
-								},
-								fail: (err) => {
-									err = err["errMsg"];
-									uni.showModal({ content: "闇�瑕佹巿鏉冧綅缃俊鎭�", confirmText: "纭鎺堟潈" })
-									.then((res) => {
-										if (res.confirm) {
-											uni.openSetting({
-												success: (res) => {
-													if (res.authSetting["scope.userLocation"]) {
-														// 鎺堟潈鎴愬姛
-														uni.showToast({ title: "鎺堟潈鎴愬姛", icon: "none" });
-														that.fnGetlocation();
-													} else {
-														// 鏈巿鏉�
-														uni.showToast({ title: "鎺堟潈澶辫触,璇烽噸鏂版巿鏉�", icon: "none" });
-														uni.showModal({
-															title: "鎺堟潈",
-															content: "鑾峰彇鎺堟潈" + authouName + "澶辫触,鏄惁鍓嶅線鎺堟潈璁剧疆锛�",
-															success: function(result) {
-																if (result.confirm) {
-																	uni.openSetting();
-																}
-															},
-															fail: function() {
-																uni.showToast({ title: "绯荤粺閿欒锛�", icon: "none" });
-															}
-														});
-													}
-												}
-											});
-										}
-										if (res.cancel) {
-											// 鍙栨秷鎺堟潈
-											uni.showToast({ title: "浣犳嫆缁濅簡鎺堟潈锛屾棤娉曡幏寰楀懆杈逛俊鎭�", icon: "none" });
-										}
-									});
-								},
-								complete(res) {
-									if (res.errMsg == "authorize:ok") {
-										that.fnGetlocation();
-									} else {
-										uni.showModal({
-											title: "鎺堟潈",
-											content: "鑾峰彇鎺堟潈" + authouName + "澶辫触,鏄惁鍓嶅線鎺堟潈璁剧疆锛�",
-											success: function(result) {
-												if (result.confirm) {
-													uni.openSetting();
-												}
-											},
-											fail: function() {
-												uni.showToast({ title: "绯荤粺閿欒锛�", icon: "none" });
-											},
-										});
-									}
-								},
-							});
+							that.fnGetlocation();
 						}
 					},
 				});
@@ -733,16 +989,27 @@
 					altitude: true,
 					isHighAccuracy: true,
 					success: function(res) {
+						that.mapShowLocation = true
 						that.latitude = res.latitude
 						that.longitude = res.longitude
 					},
 					fail(err) {
+						if (err.errMsg === "getLocation:fail auth deny" || err.errMsg === "getLocation:fail authorize no response") {
+							uni.showModal({ content: "闇�瑕佹巿鏉冧綅缃俊鎭�", confirmText: "纭鎺堟潈" }).then((res) => {
+								if (res.confirm) {
+									uni.openSetting({
+										success: (settingRes) => {
+											if (settingRes.authSetting["scope.userLocation"]) {
+												that.fnGetlocation();
+											}
+										}
+									})
+								}
+							})
+							return
+						}
 						if (err.errMsg === "getLocation:fail 棰戠箒璋冪敤浼氬鍔犵數閲忔崯鑰楋紝鍙�冭檻浣跨敤 wx.onLocationChange 鐩戝惉鍦扮悊浣嶇疆鍙樺寲") {
 							uni.showToast({ title: "璇峰嬁棰戠箒瀹氫綅", icon: "none" });
-						}
-						if (err.errMsg === "getLocation:fail auth deny") {
-							// 鏈巿鏉�
-							uni.showToast({ title: "鏃犳硶瀹氫綅锛岃閲嶆柊鑾峰彇浣嶇疆淇℃伅", icon: "none" });
 						}
 						if (err.errMsg === "getLocation:fail:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF") {
 							uni.showModal({ content: "璇峰紑鍚墜鏈哄畾浣嶆湇鍔�", showCancel: false });
@@ -773,60 +1040,106 @@
 					}
 				}, 10000)
 			},
+			// 鍒锋柊鐢佃溅淇℃伅
+			refreshTram() {
+				this.timerdian = setInterval(() => {
+					this.$u.api.home()
+						.then(res => {
+							if (res.code === 200) {
+								this.info = res.data
+								// 鏈煡鍒伴獞琛岃鍗�
+								if (!res.data.memberRidesResponse) {
+									this.$refs.d_tram.d_show = false
+									this.$refs.d_tram.d_show1 = false
+									this.$refs.d_tram.d_show2 = false
+									this.$refs.d_tram.d_show3 = false
+									this.$refs.d_tram.d_show4 = false
+									this.$refs.d_tram.d_show5 = false
+									this.$refs.d_tram.d_show6 = false
+									this.$refs.d_tram.d_show7 = false
+									this.$refs.d_tram.d_show8 = false
+									this.$refs.d_tram.d_show9 = false
+									clearInterval(this.timerdian)
+									this.timerdian = null
+								}
+							}
+						})
+				}, 30000)
+			},
 			// 鑾峰彇棣栭〉淇℃伅
 			getHomeInfo() {
+				var that = this
 				this.$u.api.home()
-					.then(res => {
+					.then(async res => {
 						if (res.code === 200) {
 							this.info = res.data
+							console.log('鏄惁寮瑰嚭骞垮憡鍥�', res.data.adList.length > 0 && !res.data.memberRidesResponse)
 							// 鏄惁寮瑰嚭骞垮憡鍥�
-							if (res.data.adList.length > 0) {
+							if (res.data.adList.length > 0 && !res.data.memberRidesResponse) {
 								this.show = true
 							}
-							// 瑙i攣涓�
-							if (res.data.rideStatus === 0) {
-								this.show5 = true
-								// 寰幆娆℃暟
-								var num = 1
-								// 寰幆鏌ョ湅瑙i攣缁撴灉
-								let timer = setInterval(async () => {
-									num += 1
-									let res1 = await this.$u.api.refreshLock({
-										id: res.data.memberRidesResponse.rideId
-									})
-									// 寮�閿佹垚鍔�
-									if (res1.data.status === 1) {
-										clearInterval(timer)
-										this.show5 = false
-										setTimeout(() => {
-											this.show2 = true
-										}, 500)
-									}
-									// 寮�閿佸け璐�
-									if (res1.data.status === 3) {
-										clearInterval(timer)
-										this.show5 = false
-										uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
-									}
-									// 寮�閿佽秴鏃�
-									if (num === 180) {
-										clearInterval(timer)
-										this.show5 = false
-										uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
-									}
-								}, 1000)
-							}
-							// 楠戣涓�
-							if (res.data.rideStatus === 1) {
-								this.show2 = true
-								this.refreshStatus()
-							}
-							if (res.data.rideStatus === 5) {
-								this.show5 = true
-							}
-							if (res.data.rideStatus === 2) {
-								this.show6 = true
-								this.refreshStatus()
+							// 鑷杞�
+							if (res.data.memberRidesResponse && res.data.memberRidesResponse.ridesType === 0) {
+								// 瑙i攣涓�
+								if (res.data.rideStatus === 0) {
+									this.show5 = true
+									// 寰幆娆℃暟
+									var num = 1
+									// 寰幆鏌ョ湅瑙i攣缁撴灉
+									let timer = setInterval(async () => {
+										num += 1
+										let res1 = await this.$u.api.refreshLock({
+											id: res.data.memberRidesResponse.rideId
+										})
+										// 寮�閿佹垚鍔�
+										if (res1.data.status === 1) {
+											clearInterval(timer)
+											this.show5 = false
+											setTimeout(() => {
+												this.show2 = true
+											}, 500)
+										}
+										// 寮�閿佸け璐�
+										if (res1.data.status === 3) {
+											clearInterval(timer)
+											this.show5 = false
+											uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
+										}
+										// 寮�閿佽秴鏃�
+										if (num === 180) {
+											clearInterval(timer)
+											this.show5 = false
+											uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
+										}
+									}, 1000)
+								}
+								// 楠戣涓�
+								if (res.data.rideStatus === 1) {
+									this.show2 = true
+									this.refreshStatus()
+								}
+								if (res.data.rideStatus === 5) {
+									this.show5 = true
+								}
+								if (res.data.rideStatus === 2) {
+									this.show6 = true
+									this.refreshStatus()
+								}
+							} else if (res.data.memberRidesResponse && res.data.memberRidesResponse.ridesType === 1) {
+								that.$refs.d_tram.info = {
+									...res.data.memberRidesResponse.discountMember,
+									...res.data.memberRidesResponse,
+									deposit: res.data.deposit,
+									goodsOrderId: res.data.goodsOrderId
+								}
+								// 楠戣涓�
+								if (res.data.rideStatus === 1) {
+									that.$refs.d_tram.d_show3 = true
+								}
+								// 涓存椂閿佽溅
+								if (res.data.rideStatus === 4) {
+									that.$refs.d_tram.d_show4 = true
+								}
 							}
 							// 鏄惁钀ヤ笟
 							if (res.data.isBusiness === 0) {
@@ -841,57 +1154,110 @@
 								this.content = res.data.stopServeTips
 								this.show4 = true
 							}
+							this.tcList = res.data.discountList
+							let arr = JSON.parse(res.data.eleBusinessArea)
+							this.eleBusinessArea[0].points = arr.map(item => {
+								return {
+									latitude: item.lat,
+									longitude: item.lng
+								}
+							})
 						}
 					})
 			},
 			// 鍒锋柊棣栭〉淇℃伅
-			refresh() {
+			refresh(type) {
 				this.$u.api.home()
 					.then(res => {
+						uni.stopPullDownRefresh()
 						if (res.code === 200) {
 							this.info = res.data
-							// 瑙i攣涓�
-							if (res.data.rideStatus === 0) {
-								this.show5 = true
-								// 寰幆娆℃暟
-								var num = 1
-								// 寰幆鏌ョ湅瑙i攣缁撴灉
-								let timer = setInterval(async () => {
-									num += 1
-									let res1 = await this.$u.api.refreshLock({
-										id: res.data.memberRidesResponse.rideId
-									})
-									// 寮�閿佹垚鍔�
-									if (res1.data.status === 1) {
-										clearInterval(timer)
-										this.show5 = false
-										setTimeout(() => {
-											this.show2 = true
-										}, 500)
-									}
-									// 寮�閿佸け璐�
-									if (res1.data.status === 3) {
-										clearInterval(timer)
-										this.show5 = false
-										uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
-									}
-									// 寮�閿佽秴鏃�
-									if (num === 180) {
-										clearInterval(timer)
-										this.show5 = false
-										uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
-									}
-								}, 1000)
+							if (type === 'tram') {
+								this.refreshTram()
 							}
-							if (res.data.rideStatus === 1) {
-								this.show2 = true
-								this.refreshStatus()
+							// 鏈煡鍒伴獞琛岃鍗�
+							if (!res.data.memberRidesResponse && this.onPullDownRefresh) {
+								this.show1 = false
+								this.show2 = false
+								this.show3 = false
+								this.show4 = false
+								this.show5 = false
+								this.show6 = false
+								this.show7 = false
+								
+								this.$refs.d_tram.d_show = false
+								this.$refs.d_tram.d_show1 = false
+								this.$refs.d_tram.d_show2 = false
+								this.$refs.d_tram.d_show3 = false
+								this.$refs.d_tram.d_show4 = false
+								this.$refs.d_tram.d_show5 = false
+								this.$refs.d_tram.d_show6 = false
+								this.$refs.d_tram.d_show7 = false
+								this.$refs.d_tram.d_show8 = false
+								this.$refs.d_tram.d_show9 = false
+								this.onPullDownRefresh = false
+								return
 							}
-							if (res.data.rideStatus === 5) {
-								this.show5 = true
-							}
-							if (res.data.rideStatus === 2) {
-								this.show6 = true
+							// 鑷杞�
+							if (res.data.memberRidesResponse.ridesType === 0) {
+								// 瑙i攣涓�
+								if (res.data.rideStatus === 0) {
+									this.show5 = true
+									// 寰幆娆℃暟
+									var num = 1
+									// 寰幆鏌ョ湅瑙i攣缁撴灉
+									let timer = setInterval(async () => {
+										num += 1
+										let res1 = await this.$u.api.refreshLock({
+											id: res.data.memberRidesResponse.rideId
+										})
+										// 寮�閿佹垚鍔�
+										if (res1.data.status === 1) {
+											clearInterval(timer)
+											this.show5 = false
+											setTimeout(() => {
+												this.show2 = true
+											}, 500)
+										}
+										// 寮�閿佸け璐�
+										if (res1.data.status === 3) {
+											clearInterval(timer)
+											this.show5 = false
+											uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
+										}
+										// 寮�閿佽秴鏃�
+										if (num === 180) {
+											clearInterval(timer)
+											this.show5 = false
+											uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
+										}
+									}, 1000)
+								}
+								if (res.data.rideStatus === 1) {
+									this.show2 = true
+									this.refreshStatus()
+								}
+								if (res.data.rideStatus === 5) {
+									this.show5 = true
+								}
+								if (res.data.rideStatus === 2) {
+									this.show6 = true
+								}
+							} else if (res.data.memberRidesResponse.ridesType === 1) {
+								this.$refs.d_tram.info = {
+									...res.data.memberRidesResponse.discountMember,
+									...res.data.memberRidesResponse,
+									deposit: res.data.deposit,
+									goodsOrderId: res.data.goodsOrderId
+								}
+								// 楠戣涓�
+								if (res.data.rideStatus === 1) {
+									this.$refs.d_tram.d_show3 = true
+								}
+								// 涓存椂閿佽溅
+								if (res.data.rideStatus === 4) {
+									this.$refs.d_tram.d_show4 = true
+								}
 							}
 						}
 					})
@@ -1068,12 +1434,14 @@
 					display: flex;
 					align-items: center;
 					justify-content: space-between;
+					flex-wrap: wrap;
 					position: relative;
 					top: -24rpx;
 					text {
 						font-weight: 400;
 					}
 					.cXYC {
+						width: 23%;
 						position: relative;
 						button {
 							width: 100%;
@@ -1092,13 +1460,22 @@
 					width: 100%;
 					padding: 24rpx 30rpx;
 					box-sizing: border-box;
-					background: linear-gradient(#FFFFFF 0%, #FCEADC 100%);
+					background: linear-gradient(#FCEADC 0%, #FFFFFF 100%);
 					border-radius: 20rpx;
 					.index_box_vip_head {
 						width: 100%;
 						display: flex;
 						align-items: center;
 						justify-content: space-between;
+						position: relative;
+						button {
+							position: absolute;
+							right: 0;
+							top: 0;
+							width: 200rpx;
+							height: 40rpx;
+							opacity: 0;
+						}
 						text {
 							&:nth-child(1) {
 								font-weight: 600;
@@ -1134,22 +1511,29 @@
 								display: flex;
 								align-items: center;
 								justify-content: space-between;
-								text {
-									&:nth-child(1) {
-										font-weight: 500;
-										font-size: 32rpx;
-										color: #303030;
-									}
-									&:nth-child(2) {
+								.vip1_left {
+									flex: 1;
+									font-weight: 500;
+									font-size: 32rpx;
+									color: #303030;
+									white-space: nowrap;
+									overflow: hidden;
+									text-overflow: ellipsis;
+								}
+								.vip1_right {
+									flex-shrink: 0;
+									margin-left: 30rpx;
+									font-weight: 400;
+									font-size: 40rpx;
+									color: #FF5A31;
+									white-space: nowrap;
+									overflow: hidden;
+									text-overflow: ellipsis;
+									&:before {
+										content: '锟�';
 										font-weight: 400;
-										font-size: 40rpx;
+										font-size: 26rpx;
 										color: #FF5A31;
-										&:before {
-											content: '锟�';
-											font-weight: 400;
-											font-size: 26rpx;
-											color: #FF5A31;
-										}
 									}
 								}
 							}
@@ -1161,14 +1545,20 @@
 								margin-top: 10rpx;
 								margin-bottom: 16rpx;
 								text {
+									flex: 1;
+									white-space: nowrap;
+									overflow: hidden;
+									text-overflow: ellipsis;
 									font-weight: 400;
 									font-size: 26rpx;
 									color: #777777;
 								}
 								u {
+									flex-shrink: 0;
 									font-weight: 400;
 									font-size: 24rpx;
 									color: #999999;
+									text-decoration: line-through;
 								}
 							}
 							.vip3 {
@@ -1218,7 +1608,7 @@
 				
 				.index_zw1 {
 					width: 100%;
-					height: calc(env(safe-area-inset-bottom) + 310rpx);
+					height: calc(env(safe-area-inset-bottom) + 390rpx);
 				}
 
 				.index_zw {
@@ -1231,14 +1621,14 @@
 
 		.index_scancode {
 			width: 100%;
-			height: 306rpx;
+			// height: 306rpx;
 			background: linear-gradient(360deg, #FFFFFF 0%, #FFFFFF 58%, #D0FFFD 100%);
 			box-shadow: 0rpx -6rpx 16rpx 0rpx rgba(0, 0, 0, 0.1);
 			border-radius: 32rpx 32rpx 0rpx 0rpx;
 			position: fixed;
 			bottom: 0;
 			left: 0;
-			padding: 30rpx 20rpx;
+			padding: 30rpx 20rpx 30rpx 20rpx;
 			box-sizing: border-box;
 
 			.index_scancode_top {
@@ -1275,6 +1665,53 @@
 					flex-shrink: 0;
 				}
 			}
+			
+			.index_scancode_fl {
+				width: 100%;
+				display: flex;
+				align-items: center;
+				margin-top: 18rpx;
+				.index_scancode_fl_tips {
+					flex-shrink: 0;
+					width: 64rpx;
+					height: 36rpx;
+					line-height: 36rpx;
+					text-align: center;
+					background: #FF5A31;
+					border-radius: 2rpx 12rpx 2rpx 12rpx;
+					margin-right: 16rpx;
+					font-weight: 400;
+					font-size: 24rpx;
+					color: #FFFFFF;
+				}
+				.index_scancode_fl_text {
+					flex: 1;
+					height: 36rpx;
+					line-height: 36rpx;
+					font-weight: 400;
+					font-size: 26rpx;
+					color: #FF5A31;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+				.index_scancode_fl_swiper {
+					flex: 1;
+					height: 36rpx;
+				}
+				.index_scancode_fl_btn {
+					flex-shrink: 0;
+					height: 36rpx;
+					line-height: 36rpx;
+					text-align: center;
+					background: #EAF9F8;
+					border-radius: 4rpx;
+					font-weight: 400;
+					font-size: 24rpx;
+					color: #01B6AD;
+					margin-left: 8rpx;
+				}
+			}
 
 			.index_scancode_bottom {
 				width: 100%;
@@ -1289,6 +1726,19 @@
 				font-weight: 500;
 				color: #FFFFFF;
 				margin-top: 30rpx;
+			}
+			
+			.index_scancode_xieyi {
+				width: 100%;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				margin-top: 30rpx;
+				text {
+					font-weight: 400;
+					font-size: 26rpx;
+					color: #999999;
+				}
 			}
 		}
 
@@ -1408,6 +1858,53 @@
 			background: linear-gradient(360deg, #FFFFFF 0%, #FFFFFF 58%, #D0FFFD 100%);
 			box-shadow: 0rpx -6rpx 16rpx 0rpx rgba(0, 0, 0, 0.1);
 			border-radius: 32rpx 32rpx 0rpx 0rpx;
+			
+			.index_scancode_fl {
+				width: 100%;
+				display: flex;
+				align-items: center;
+				margin-top: 30rpx;
+				.index_scancode_fl_tips {
+					flex-shrink: 0;
+					width: 64rpx;
+					height: 36rpx;
+					line-height: 36rpx;
+					text-align: center;
+					background: #FF5A31;
+					border-radius: 2rpx 12rpx 2rpx 12rpx;
+					margin-right: 16rpx;
+					font-weight: 400;
+					font-size: 24rpx;
+					color: #FFFFFF;
+				}
+				.index_scancode_fl_text {
+					flex: 1;
+					height: 36rpx;
+					line-height: 36rpx;
+					font-weight: 400;
+					font-size: 26rpx;
+					color: #FF5A31;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+				.index_scancode_fl_swiper {
+					flex: 1;
+					height: 36rpx;
+				}
+				.index_scancode_fl_btn {
+					flex-shrink: 0;
+					height: 36rpx;
+					line-height: 36rpx;
+					text-align: center;
+					background: #EAF9F8;
+					border-radius: 4rpx;
+					font-weight: 400;
+					font-size: 24rpx;
+					color: #01B6AD;
+					margin-left: 8rpx;
+				}
+			}
 
 			.deposit_text {
 				width: 100%;
@@ -1449,7 +1946,7 @@
 				width: 100%;
 				display: flex;
 				align-items: center;
-				margin-top: 100rpx;
+				margin-top: 40rpx;
 
 				image {
 					width: 32rpx;
@@ -1638,6 +2135,25 @@
 					}
 				}
 			}
+			
+			.info_des_tc {
+				width: 100%;
+				height: 60rpx;
+				line-height: 60rpx;
+				background: #F4EFEA;
+				border-radius: 16rpx;
+				margin: 20rpx 0;
+				display: flex;
+				align-items: center;
+				padding: 0 20rpx;
+				box-sizing: border-box;
+				text {
+					font-weight: 400;
+					font-size: 26rpx;
+					color: #FF5A31;
+					margin-left: 10rpx;
+				}
+			}
 
 			.ride_content {
 				width: 100%;
@@ -1744,4 +2260,4 @@
 			}
 		}
 	}
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3