From 4fabfe4dbd2eb28d07a4350597d314958cc1c281 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 09 十月 2025 11:16:43 +0800
Subject: [PATCH] 优化
---
bicycle/pages/index/index.vue | 1316 +++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 1,087 insertions(+), 229 deletions(-)
diff --git a/bicycle/pages/index/index.vue b/bicycle/pages/index/index.vue
index cef1f8d..031da43 100644
--- a/bicycle/pages/index/index.vue
+++ b/bicycle/pages/index/index.vue
@@ -3,15 +3,33 @@
<view class="index_nav"
:style="{ height: 'calc(' + (statusbarHeight + navHeight) + 'px' + ' + ' + '224rpx' + ')' }">
<view class="index_nav_a" :style="{ height: statusbarHeight + 'px' }"></view>
- <view class="index_nav_b" :style="{ height: navHeight + 'px', lineHeight: navHeight + 'px' }">
- <text>鍗拌薄婊ㄦ箹鑷杞�</text>
+ <view :style="{ height: navHeight + 'px' }"></view>
+ <view class="index_nav_box" :style="{ background: top > 0 ? '#9AE2DF' : 'rgba(0,0,0,0)' }">
+ <view class="index_nav_a" :style="{ height: statusbarHeight + 'px' }"></view>
+ <view :style="{ height: navHeight + 'px' }"></view>
+ <view class="index_nav_b" :style="{ height: navHeight + 'px', lineHeight: navHeight + 'px', top: statusbarHeight + 'px' }">
+ <text>鍗拌薄婊ㄦ箹瓒e懗鑷杞�</text>
+ </view>
</view>
<view class="index_box">
<view class="index_box_map">
- <map class="map" :markers="markers" :latitude="latitude" :longitude="longitude" />
- <image src="@/static/icon/ic_fullscreen@2x.png" mode="widthFix"></image>
+ <map
+ id="mapId"
+ class="map"
+ scale="15"
+ :show-location="true"
+ :polygons="eleBusinessArea"
+ :markers="markers"
+ :latitude="latitude"
+ :longitude="longitude" />
+ <view class="index_box_map_type">
+ <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>
+ </view>
</view>
- <view class="index_box_title" :style="{ backgroundImage: 'url(' + bgImg + ')' }">
+ <view class="index_box_title">
<view class="index_box_title_left">
<text>{{info.parkName}}</text>
<text>鏈嶅姟鐢佃瘽锛歿{info.serverPhone}}</text>
@@ -20,18 +38,57 @@
</image>
</view>
<view class="index_box_function">
- <view class="fx1 cXYC" v-for="(item, index) in functionList" :key="index" @click="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 b c3 mt10">{{item.name}}</text>
+ <text class="f26 c3 mt10">{{item.name}}</text>
</view>
</view>
- <view class="index_box_poster">
+ <view class="index_box_vip">
+ <view class="index_box_vip_head">
+ <text>鐑攢濂楅</text>
+ <text @click="jumpTC">鏇村浼樻儬 ></text>
+ </view>
+ <scroll-view scroll-x class="scrollView">
+ <view class="index_box_vip_row" v-for="(item, index) in tcList" :key="index">
+ <view class="vip1">
+ <view class="vip1_left">
+ {{item.name || ''}}
+ </view>
+ <view class="vip1_right">
+ {{item.price || ''}}
+ </view>
+ </view>
+ <view class="vip2">
+ <text>{{item.descs || ''}}</text>
+ <u>楼{{item.linePrice || ''}}</u>
+ </view>
+ <view class="vip3">
+ <view class="vip3_info">浣庤嚦{{item.dayPrice}}鍏�/澶�</view>
+ <view class="vip3_button" @click="purchase(item.id)">璐拱</view>
+ </view>
+ </view>
+ </scroll-view>
+ </view>
+ <view class="index_box_poster" @click="jumpX">
<image class="imgfull" :src="info.leaseNoticeUrl" mode="widthFix"></image>
</view>
<view class="index_box_video" v-if="info.leaseVideoUrl">
<video class="img100b" :src="info.leaseVideoUrl" enable-danmu danmu-btn controls></video>
</view>
- <view class="index_zw"></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>
<view class="index_scancode">
@@ -42,23 +99,12 @@
</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>
+ <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_zw"></view>
</view>
- <!-- 骞垮憡 -->
- <u-popup :show="show" mode="center" bgColor="transparent" :round="10" @close="show = false">
- <view class="popupbox">
- <view class="advertisement">
- <image :src="info.adList[0].imgurl" mode="widthFix"></image>
- </view>
- <image class="close" @click="show = false" src="@/static/images/ic_close@2x.png" mode="widthFix">
- </image>
- </view>
- </u-popup>
- <!-- 缂寸撼鎶奸噾 -->
- <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">
@@ -70,7 +116,7 @@
<image src="@/static/icon/ic_select@2x.png" mode="widthFix" v-if="!active"></image>
<image src="@/static/icon/ic_selected@2x.png" mode="widthFix" v-else></image>
<view class="deposit_read_z">
- 鎴戝凡闃呰<text>銆婄璧侀』鐭ャ��</text>鍜�<text @click.stop="jumpgz">銆婅浠疯鍒欍��</text>
+ 鎴戝凡闃呰<text @click.stop="jumpX">銆婄璧侀』鐭ャ��</text>鍜�<text @click.stop="jumpgz">銆婅浠疯鍒欍��</text>
</view>
</view>
<view class="deposit_footer">
@@ -79,9 +125,9 @@
</view>
</view>
</u-popup>
- <!-- 寮�閿� -->
- <u-popup :show="show5" :closeOnClickOverlay="false" mode="bottom" bgColor="#fff" :round="10"
- @close="show1 = false">
+ <!-- 鑷杞�-寮�閿� -->
+ <u-popup :show="show5" :overlay="false" :closeOnClickOverlay="true" mode="bottom" bgColor="#fff" :round="10"
+ @close="show5 = false">
<view class="loading">
<view class="loading_box">
<view class="loading_box_top">
@@ -90,14 +136,14 @@
</view>
<view class="loading_box_info">璇锋寜鐓т氦瑙勮椹�</view>
</view>
- <view class="loading_box_err" @click="toFaultReporting">
+ <!-- <view class="loading_box_err" @click="toFaultReporting">
<image src="@/static/icon/ic_guzhang@2x.png" mode="widthFix"></image>
<text>杞﹁締鏁呴殰涓婃姤</text>
- </view>
+ </view> -->
</view>
</u-popup>
- <!-- 楠戣涓� -->
- <u-popup :show="show2" :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">
@@ -114,18 +160,24 @@
<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">
- <text>寮�濮嬫椂闂达細{{info.memberRidesResponse.rideStartTime.substring(10, 16)}}</text>
- <text>鏈宸查獞琛岋細{{(info.memberRidesResponse.rideTime / 60).toFixed(1)}}鍒嗛挓</text>
+ <text>寮�濮嬫椂闂达細{{info.memberRidesResponse.rideStartTimeStr}}</text>
+ <text>鏈宸查獞琛岋細{{info.memberRidesResponse.rideTime}}鍒嗛挓</text>
</view>
<view class="ride_content_b">
<text>杞﹀瀷锛歿{info.memberRidesResponse.bikeType}}锛堢紪鍙凤細{{info.memberRidesResponse.bikeCode}}锛�</text>
- <text>璁¤垂瑙勫垯锛氳捣绉焮{(info.memberRidesResponse.baseTime / 60 ).toFixed(1)}}灏忔椂{{(info.memberRidesResponse.basePrice / 100).toFixed(2)}}鍏冿紝瓒呰繃鍚巤{(info.memberRidesResponse.unitPrice / 100).toFixed(2)}}鍏�/{{info.memberRidesResponse.unitTime}}鍒嗛挓</text>
+ <text>{{info.memberRidesResponse.priceRole}}</text>
</view>
<view class="ride_content_info">
<image src="@/static/icon/ic_tip@2x.png" mode="widthFix"></image>
- <text>鏀寔涓�旇繕杞︼紝楠戣鏃堕棿鑷姩绱锛屽鏇存崲杞﹀瀷锛屾寜鎵�鍙栬溅杈嗕腑鏈�楂樿溅鍨嬭璐�</text>
+ <text v-if="info.tips">{{info.tips}}</text>
</view>
</view>
<view class="ride_btn" @click="navigationReturn">瀵艰埅鑷冲洯鍖虹珯杩樿溅鐐�</view>
@@ -135,8 +187,8 @@
</view>
</view>
</u-popup>
- <!-- 宸茶繕杞� -->
- <u-popup :show="show6" :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">
@@ -153,17 +205,23 @@
<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">
- <text>鏈�鍚庨獞琛岋細{{info.memberRidesResponse.rideStartTime.substring(5, 16)}}~{{info.memberRidesResponse.rideEndTime.substring(11, 16)}}锛坽{info.memberRidesResponse.rideTime}}鍒嗛挓)</text>
+ <text>鏈�鍚庨獞琛岋細{{info.memberRidesResponse.rideStartTimeStr}}~{{info.memberRidesResponse.rideEndTimeStr}}锛坽{info.memberRidesResponse.rideTime}}鍒嗛挓)</text>
</view>
<view class="ride_content_b">
<text>杞﹀瀷锛歿{info.memberRidesResponse.bikeType}}锛堢紪鍙凤細{{info.memberRidesResponse.bikeCode}}锛�</text>
- <text>璁¤垂瑙勫垯锛氳捣绉焮{(info.memberRidesResponse.baseTime / 60).toFixed(1)}}灏忔椂{{(info.memberRidesResponse.basePrice / 100).toFixed(2)}}鍏冿紝瓒呰繃鍚巤{(info.memberRidesResponse.unitPrice / 100).toFixed(2)}}鍏�/{{info.memberRidesResponse.unitTime}}鍒嗛挓</text>
+ <text>{{info.memberRidesResponse.priceRole}}</text>
</view>
<view class="ride_content_info">
<image src="@/static/icon/ic_tip@2x.png" mode="widthFix"></image>
- <text>鏀寔涓�旇繕杞︼紝楠戣鏃堕棿鑷姩绱锛屽鏇存崲杞﹀瀷锛屾寜鎵�鍙栬溅杈嗕腑鏈�楂樿溅鍨嬭璐�</text>
+ <text v-if="info.tips">{{info.tips}}</text>
</view>
</view>
<view class="ride_btn" @click="carRental">鎵爜缁х画楠戣</view>
@@ -172,8 +230,8 @@
</view>
</view>
</u-popup>
- <!-- 纭缁撶畻 -->
- <u-popup :show="show3" :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">
@@ -189,7 +247,21 @@
</template>
</u-popup>
<!-- 鎻愮ず -->
- <u-modal :show="show4" :content='content' confirmColor="#01B6AD" @confirm="show4 = false"></u-modal>
+ <u-modal :show="show4" :title="title" :content='content' confirmColor="#01B6AD" @confirm="show4 = false"></u-modal>
+ <!-- 鑷杞�-纭缁撶畻寮规 -->
+ <u-modal :show="show7" title="鎻愮ず" content='纭缁撶畻鍚楋紵' :showCancelButton="true" cancelText="鍙栨秷" @confirm="settlement1" @cancel="show7 = false"></u-modal>
+ <!-- 骞垮憡 -->
+ <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>
+ </view>
+ <image class="close" @click="show = false" src="@/static/images/ic_close@2x.png" mode="widthFix">
+ </image>
+ </view>
+ </u-popup>
+ <!-- 鐢佃溅 -->
+ <tram ref="d_tram" @unlockDoor="refresh('tram')" />
</view>
</template>
@@ -197,21 +269,27 @@
import {
mapState
} from 'vuex'
-
+ import tram from '@/components/tram/tram.vue'
export default {
data() {
return {
+ disable: false,
+
+ top: 0,
+
+ title: '',
latitude: null,
longitude: null,
bgImg: require('@/static/images/bg_service@2x.png'),
- show: false,
- show1: false,
- show2: false,
- show3: false,
- show4: false,
- show5: false,
- show6: false,
+ show: false, // 骞垮憡
+ show1: false, // 缂寸撼鎶奸噾
+ show2: false, // 楠戣涓�
+ show3: false, // 纭缁撶畻
+ show4: false, // 鎻愮ず
+ show5: false, // 寮�閿�
+ show6: false, // 宸茶繕杞�
+ show7: false, // 纭缁撶畻寮规
active: false,
@@ -237,24 +315,338 @@
name: '娑堣垂鏄庣粏',
icon: require('@/static/images/home_ic_mingxi@2x.png')
},
+ {
+ id: 5,
+ name: '杩愯惀涓績',
+ icon: require('@/static/icon/home_ic_mingxi.png')
+ },
],
info: {},
- content: ''
+ content: '',
+
+ timer: null,
+ 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
}
},
+ components: { tram },
computed: {
...mapState(['navHeight', 'statusbarHeight', 'userInfo'])
},
- async onLoad() {
+ async onLoad(options) {
+ var that = this;
+
if (JSON.stringify(this.userInfo) == '{}') {
await this.$onLaunched;
}
- this.getAddress()
- this.getHomeInfo()
- this.getSite()
+ await this.getAddress()
+ // await this.getHomeInfo()
+ await this.getSite()
+
+ 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
+ }
+ })
+ }
+ })
+ uni.$on('update', data => {
+ this.carRental()
+ })
+ },
+ onPullDownRefresh() {
+ this.onPullDownRefresh = true
+ this.refresh()
+ },
+ onShow() {
+ this.refresh()
+ },
+ onPageScroll(e) {
+ this.top = e.scrollTop
},
methods: {
+ // 鍒嗛挓杞崲
+ 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, type) {
+ var that = this;
+ 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 {
+ 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
+ }
+ }
+ }
+ },
+ jumpX() {
+ uni.navigateTo({
+ url: '/pages/leaseNotice/leaseNotice'
+ });
+ },
+ jumpMap() {
+ uni.navigateTo({
+ url: `/pages/maps/maps?type=${this.type}`
+ });
+ },
// 璁′环瑙勫垯
jumpgz() {
uni.navigateTo({
@@ -269,38 +661,49 @@
res.data.forEach((item, index) => {
this.markers.push({
id: index,
- width: 30,
+ width: 40,
height: 40,
latitude: item.latitude,
longitude: item.longitude,
title: item.name,
iconPath: '/static/icon/ic_bike@2x.png',
- addr: item.addr,
- clusterId: 1,
- joinCluster: true
+ addr: item.addr
})
})
+ this.clickcontrol()
}
})
},
// 缁撶畻
settlement1() {
- this.$u.api.goodsOrderSettlement({
- orderId: this.info.goodsOrderId
- }).then(res => {
- if (res.code === 200) {
- uni.showToast({ title: '缁撶畻鎴愬姛锛�', icon: 'success', duration: 2000 });
- this.info.rideStatus = -1
- this.info.depositStatus = 0
+ if (this.isDisabled) {
+ this.isDisabled = false
+ this.$u.api.goodsOrderSettlement({}).then(res => {
+ if (res.code === 200) {
+ this.show3 = false
+ this.show6 = false
+ this.show7 = false
+ uni.showToast({ title: '缁撶畻鐢宠鎻愪氦鎴愬姛锛岃鑰愬績绛夊緟閫�娆撅紒', icon: 'none', duration: 2000 });
+ // this.refresh()
+ }
+ }).finally(() => {
+ this.refresh()
this.show3 = false
- }
- })
+ this.isDisabled = true
+ })
+ }
},
minute() {
this.show3 = false
- this.show6 = true
+ if (this.info.rideStatus != -1) {
+ this.show6 = true
+ }
},
settlement() {
+ if (this.info.depositStatus === 2) {
+ uni.showToast({ title: '缁撶畻鐢宠鎻愪氦鎴愬姛锛岃鑰愬績绛夊緟閫�娆撅紒', icon: 'none', duration: 2000 });
+ return
+ }
this.show6 = false
this.show3 = true
},
@@ -311,7 +714,8 @@
});
},
// 璺宠浆
- jump(item) {
+ async jump(item) {
+ await this.refresh()
if (item.id === 3) {
uni.navigateTo({
url: '/pages/pricingRules/pricingRules'
@@ -319,25 +723,46 @@
} else if (item.id === 4) {
uni.navigateTo({
url: '/pages/consumptionDetails/consumptionDetails'
- });
- } else if (item.id === 2) {
- if (this.info.depositStatus === 1) {
- this.settlement1()
+ });
+ } else if (item.id === 5) {
+ if (!this.userInfo.sysuser) {
+ uni.navigateTo({
+ url: '/pages/operationLogin/operationLogin'
+ });
} else {
- uni.showToast({
- title: '鎮ㄦ殏鏃犳娂閲戯紝鏃犻渶缁撶畻锛�',
- icon: 'none',
- duration: 2000
- });
+ uni.navigateTo({
+ url: '/pages/operationsCenter/operationsCenter'
+ });
+ }
+ } else if (item.id === 2) {
+ if (!this.userInfo.mobile) return
+ if (this.info.rideStatus === 1) {
+ uni.showToast({ title: '楠戣涓笉鑳界粨绠楁娂閲�', icon: 'none', duration: 2000 })
+ return
+ }
+ if (this.info.depositStatus === 1) {
+ this.show3 = true
+ } else if (this.info.depositStatus === 2) {
+ uni.showToast({ title: '缁撶畻鐢宠鎻愪氦鎴愬姛锛岃鑰愬績绛夊緟閫�娆撅紒', icon: 'none', duration: 2000 });
+ } else {
+ uni.showToast({ title: '鎮ㄦ殏鏃犳娂閲戯紝鏃犻渶缁撶畻锛�', icon: 'none', duration: 2000 });
}
} else if (item.id === 1) {
+ if (!this.userInfo.mobile) return
+ if (this.info.depositStatus === 1) {
+ uni.showToast({ title: '鎶奸噾宸插厖鍊�', icon: 'none', duration: 2000 });
+ return
+ } else if (this.info.depositStatus === 2) {
+ uni.showToast({ title: '缁撶畻鐢宠鎻愪氦鎴愬姛锛岃鑰愬績绛夊緟閫�娆撅紒', icon: 'none', duration: 2000 });
+ return
+ }
this.show1 = true
}
},
// 楠戣鏄庣粏
toRidingDetails() {
uni.navigateTo({
- url: `/pages/ridingDetails/ridingDetails?id=${this.info.goodsOrderId}`
+ url: `/pages/ridingDetails/ridingDetails?id=${this.info.goodsOrderId}&price=${this.info.deposit / 100}`
});
},
// 璺宠浆鏁呴殰涓婃姤
@@ -348,34 +773,37 @@
},
// 鎶奸噾鏀粯
depositPayment() {
+ var that = this;
if (this.active) {
- var that = this;
- this.$u.api.createGoodsOrderPay()
- .then(res => {
- if (res.code === 200) {
- wx.requestPayment({
- timeStamp: res.data.timeStamp,
- nonceStr: res.data.nonceStr,
- package: res.data.packageValue,
- signType: 'MD5',
- paySign: res.data.paySign,
- success(res) {
- if (res.errMsg = 'requestPayment:ok') {
- that.show1 = false
- uni.showToast({
- title: '鍏呭�兼垚鍔�',
- icon: 'success',
- duration: 2000
- });
- that.info.depositStatus = 1
+ if (!this.disable) {
+ that.disable = true
+ that.$u.api.createGoodsOrderPay()
+ .then(res => {
+ if (res.code === 200) {
+ wx.requestPayment({
+ timeStamp: res.data.timeStamp,
+ nonceStr: res.data.nonceStr,
+ package: res.data.packageVal,
+ signType: 'MD5',
+ paySign: res.data.paySign,
+ success (res) {
+ that.disable = false
+ if (res.errMsg = 'requestPayment:ok') {
+ that.show1 = false
+ that.info.depositStatus = 1
+ that.carRental()
+ uni.showToast({ title: '鍏呭�兼垚鍔�', icon: 'success', duration: 2000 });
+ }
+ },
+ fail(err) {
+ that.disable = false
}
- },
- fail(err) {
- console.log(err)
- }
- })
- }
- })
+ })
+ }
+ }).catch((err) => {
+ that.disable = false
+ })
+ }
} else {
uni.showToast({
title: '璇峰厛鍕鹃�夊崗璁�',
@@ -395,78 +823,101 @@
code
} = loginRes;
that.$u.api.wxLogin({
- code
+ code
+ })
+ .then(res => {
+ 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)
+ }
})
- .then(res => {
- 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)
- }
- })
- })
+ })
}
});
}
},
// 鎵爜绉熻溅
- carRental() {
- // 鍒ゆ柇鏈夋病鏈変氦鎶奸噾
- if (this.info.depositStatus === 0) {
- this.show1 = true
- return;
- }
+ async carRental() {
var that = this;
- // 鎵爜瑙i攣楠戣
- uni.scanCode({
- success: async function(result) {
- // 鎵撳紑寮�閿佸脊妗�
- that.show5 = true
- // 璋冪敤寮�閿佹帴鍙�
- let res = await that.$u.api.openLock({
- code: result.result
- })
- if (res.code === 200) {
- 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) {
- clearInterval(timer)
- that.show5 = false
- setTimeout(() => {
- that.show2 = true
- }, 500)
- }
- // 寮�閿佸け璐�
- if (res1.data.status === 3) {
- clearInterval(timer)
- that.show5 = false
- uni.showToast({ title: '寮�閿佸け璐�', icon: 'error', duration: 2000 });
- }
- // 寮�閿佽秴鏃�
- if (num === 10) {
- clearInterval(timer)
- that.show5 = false
- uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
- }
- }, 1000)
- } else {
- that.show5 = false
- }
+
+ 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 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
+ // 璋冪敤寮�閿佹帴鍙�
+ 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
+ }
+ })
+ }
},
// 鑾峰彇缁忕含搴�
getAddress() {
@@ -571,68 +1022,247 @@
},
});
},
+ // 鍒锋柊楠戣鐘舵��
+ refreshStatus() {
+ this.timer = setInterval(async () => {
+ let res = await this.$u.api.home()
+ if (res.code === 200) {
+ this.info = res.data
+ // 楠戣涓�
+ if (res.data.rideStatus === 1) {
+ return
+ }
+ this.show2 = false
+ // 宸叉崲杞�
+ if (res.data.rideStatus === 2) {
+ this.show6 = true
+ return
+ }
+ if (res.data.rideStatus === -1) {
+ this.show6 = false
+ }
+ clearInterval(this.timer)
+ }
+ }, 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 === 10) {
- clearInterval(timer)
- this.show5 = false
- uni.showToast({ title: '寮�閿佽秴鏃�', icon: 'error', duration: 2000 });
- }
- }, 1000)
- }
- if (res.data.rideStatus === 1) {
- this.show2 = true
- }
- if (res.data.rideStatus === 5) {
- this.show5 = true
- }
- if (res.data.rideStatus === 2) {
- this.show6 = true
+ // 鑷杞�
+ 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) {
+ 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
+ }
+ })
+ }
+ })
+ },
+ // 鍒锋柊棣栭〉淇℃伅
+ refresh(type) {
+ this.$u.api.home()
+ .then(res => {
+ uni.stopPullDownRefresh()
+ if (res.code === 200) {
+ this.info = res.data
+ if (type === 'tram') {
+ this.refreshTram()
+ }
+ // 鏈煡鍒伴獞琛岃鍗�
+ 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.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
+ }
}
}
})
@@ -643,6 +1273,9 @@
phoneNumber: mobile
});
}
+ },
+ destroyed() {
+ clearInterval(this.timer)
}
}
</script>
@@ -654,22 +1287,36 @@
<style lang="scss" scoped>
.index {
width: 100%;
+ height: auto;
.index_nav {
width: 100%;
+ height: auto;
background: repeating-linear-gradient(to bottom, #9AE2DF, #ffffff);
-
- .index_nav_b {
+
+ .index_nav_box {
width: 100%;
- padding: 0 30rpx;
- box-sizing: border-box;
-
- text {
- font-size: 38rpx;
- font-family: PingFangSC-Semibold, PingFang SC;
- font-weight: 600;
- color: #222222;
+ height: auto;
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 999;
+
+ .index_nav_b {
+ width: 100%;
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ position: fixed;
+ z-index: 9;
+
+ text {
+ font-size: 38rpx;
+ font-family: PingFangSC-Semibold, PingFang SC;
+ font-weight: 600;
+ color: #222222;
+ }
}
+
}
.index_box {
@@ -686,21 +1333,54 @@
padding: 6rpx;
box-sizing: border-box;
position: relative;
-
+ .index_box_map_type {
+ position: absolute;
+ bottom: 20rpx;
+ left: 50%;
+ width: 244rpx;
+ height: 56rpx;
+ transform: translate(-50%, 0);
+ background: #FFFFFF;
+ box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(0,0,0,0.08);
+ border-radius: 16rpx;
+ padding: 6rpx;
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .index_box_map_type_row {
+ width: 116rpx;
+ height: 44rpx;
+ line-height: 44rpx;
+ text-align: center;
+ border-radius: 12rpx;
+ font-weight: 400;
+ font-size: 28rpx;
+ color: #666666;
+ }
+ .active {
+ background: rgba(1,182,173,0.08) !important;
+ color: #01B6AD;
+ }
+ }
.map {
width: 100%;
height: 100%;
border-radius: 20rpx;
}
-
- image {
+
+ .index_box_icon {
position: absolute;
width: 80rpx;
height: 80rpx;
right: 10rpx;
bottom: 20rpx;
- z-index: 999;
+ image {
+ width: 100%;
+ height: 100%;
+ }
}
+
}
.index_box_title {
@@ -713,6 +1393,12 @@
align-items: center;
position: relative;
top: -16rpx;
+ // filter: blur(3px);
+ // -webkit-filter: blur(3px);
+ background: linear-gradient(270deg, #C5FAF7 0%, rgba(10,201,192,0.63) 65%, rgba(214,251,249,0.81) 100%);
+ box-shadow: inset 0rpx 1rpx 0rpx 0rpx #E3FFFE;
+ border-radius: 20rpx 20rpx 0rpx 0rpx;
+ backdrop-filter: blur(3px);
.index_box_title_left {
flex: 1;
@@ -752,8 +1438,154 @@
border-radius: 20rpx;
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%;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ left: 0;
+ background-color: rgba(0,0,0,0);
+ border: none;
+ opacity: 0;
+ }
+ }
+ }
+
+ .index_box_vip {
+ width: 100%;
+ padding: 24rpx 30rpx;
+ box-sizing: border-box;
+ 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;
+ text {
+ &:nth-child(1) {
+ font-weight: 600;
+ font-size: 34rpx;
+ color: #303030;
+ }
+ &:nth-child(2) {
+ font-weight: 400;
+ font-size: 26rpx;
+ color: #666666;
+ }
+ }
+ }
+ .scrollView {
+ width: 100%;
+ margin-top: 20rpx;
+ white-space: nowrap;
+ .index_box_vip_row {
+ display: inline-block;
+ width: 580rpx;
+ height: 216rpx;
+ background: #FFFFFF;
+ box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(0,0,0,0.06);
+ border-radius: 12rpx;
+ margin-right: 16rpx;
+ padding: 24rpx;
+ box-sizing: border-box;
+ &:last-child {
+ margin: 0 !important;
+ }
+ .vip1 {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .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: 26rpx;
+ color: #FF5A31;
+ }
+ }
+ }
+ .vip2 {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ 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 {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .vip3_info {
+ padding: 6rpx 12rpx;
+ box-sizing: border-box;
+ background: rgba(255,90,49,0.1);
+ border-radius: 8rpx;
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #FF5A31;
+ }
+ .vip3_button {
+ width: 120rpx;
+ height: 60rpx;
+ line-height: 60rpx;
+ text-align: center;
+ background: #01B6AD;
+ box-shadow: 0rpx 6rpx 16rpx 0rpx rgba(1,182,173,0.24);
+ border-radius: 30rpx;
+ font-weight: 500;
+ font-size: 28rpx;
+ color: #FFFFFF;
+ }
+ }
+ }
+ }
}
.index_box_poster {
@@ -769,10 +1601,16 @@
overflow: hidden;
margin-top: 20rpx;
}
+
+ .index_zw1 {
+ width: 100%;
+ height: calc(env(safe-area-inset-bottom) + 310rpx);
+ }
.index_zw {
width: 100%;
- height: 336rpx;
+ // height: 336rpx;
+ height: 680rpx;
}
}
}
@@ -885,6 +1723,7 @@
.red {
color: #FC2525 !important;
+ font-size: 30rpx !important;
}
text {
@@ -1185,6 +2024,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%;
--
Gitblit v1.9.3