瀏覽代碼

首页权限

liuwei 3 天之前
父節點
當前提交
9a97c49bd9

+ 1 - 1
pages/bluetoothUnlock/bluetoothPair.vue

@@ -21,7 +21,7 @@
 		</view>
 
 		<!-- 测试指令!!!别删除 -->
-		<view class="pair-btn" style="bottom: 240rpx;" @tap="nearCloseUnlockBtn">关闭靠近解锁</view>
+		<!-- <view class="pair-btn" style="bottom: 240rpx;" @tap="nearCloseUnlockBtn">关闭靠近解锁</view> -->
 		<!-- <view class="pair-btn" style="bottom: 240rpx;" @tap="nearTest">跳转解绑配对</view> -->
 		<!-- <view class="pair-btn" style="bottom: 240rpx;" @tap="nearUnlockBtn">靠近解锁</view> -->
 		<!-- <view class="pair-btn" style="bottom: 140rpx;" @tap="otaUpgrade">OTA升级</view> -->

+ 15 - 4
pages/index/components/control/control.vue

@@ -21,7 +21,7 @@
 				
 			<!-- <custom-switch :defaultPosition="'right'" :width="'400rpx'" 
 			    :height="'96rpx'"  v-model="switchValue" :fetchData="loadData"></custom-switch> -->
-			<view @tap="navToInputPages" class="car-change-battery flex-row">
+			<view v-if="authority_list.indexOf(5) == -1" @tap="navToInputPages" class="car-change-battery flex-row">
 				<view class="car-change-btn"><image style="width: 80rpx;height: 80rpx;" src="https://qiniu.bms16.com/FgvnT-msLbL5RHjl6fvNlM0kab5N" mode=""></image></view>
 				<view class="car-change-text">车辆换电</view>
 			</view>
@@ -112,6 +112,7 @@ export default {
 			switchValue: {state:false,time:0},
 			isShowMore:false,
 			car_line:false,
+			authority_list:[]
 			// startX: 0, // 滑块开始滑动的初始位置
 			// moveX: 0, // 滑块滑动的距离
 			// unlocked: false, // 是否解锁成功的标志
@@ -124,11 +125,12 @@ export default {
 	      return {
 	        transform: `translateX(${this.moveX}px)`
 	      };
-	    }
+	    },
 	},
 	mounted() {
 		// this.contrilList = getFunctionTag().activeTag
 		// setTimeout(()=>{
+			this.authority_list=uni.getStorageSync('car_info').authority_list
 			this.switchValue.state=uni.getStorageSync('car_info').acc_state==1
 		// },50)
 		
@@ -145,11 +147,20 @@ export default {
 		changEnd(e){
 			this.switchValue = JSON.parse(e)
 			if(this.switchValue.type==1){
-				const car_sn= uni.getStorageSync('car_info').car_sn
-				this.$emit('loadCarDetail',car_sn)
+				this.callApiThreeTimes()
 			}
 			console.log(this.switchValue)
 		},
+		callApiThreeTimes() {
+			const apiCall = (attempt) => {
+				const car_sn= uni.getStorageSync('car_info').car_sn
+				this.$emit('loadCarDetail',car_sn)
+			};
+
+			apiCall(1);
+			// setTimeout(() => apiCall(2), 200);
+			// setTimeout(() => apiCall(3), 200);
+		},
 		tapOpen(e){
 				const item = e.currentTarget.dataset.item;
 				this.changClick(item)

+ 9 - 6
pages/index/index.vue

@@ -47,7 +47,7 @@
 						<view class="flex-row flex-between" style="align-items: center;">
 							<text class="quantity flex-row">{{car_info.soc}} <text
 									style="font-size: 28rpx;font-weight: 500;">%</text></text>
-							<view @tap.stop="tapReturnCar" class="return-car-btn flex-row">
+							<view v-if="car_info.sold_time==0" @tap.stop="tapReturnCar" class="return-car-btn flex-row">
 								<image style="width: 46rpx;height: 46rpx;" src="https://qiniu.bms16.com/FtyG7Gq2QBaVVrZmTnmZFzXhE5nN" mode=""></image>
 								<view style="margin-left: 12rpx;">我要还车</view>
 							</view>
@@ -80,9 +80,11 @@
 					</view>
 					<Control :contrilList="contrilList" @toBluetooth="inductiveUnlockHandle" @loadCarDetail="loadCarDetail"/>
 					
-			
-					<view :class="['flex-row', 'flex-between', 'map-card-view',car_info.exchange_package_info && car_info.exchange_package_info.activity_time?'height_362':'height_260']">
-						<MapCard :car_info="car_info" :height="!!(car_info.exchange_package_info && car_info.exchange_package_info.activity_time)"/>
+					<!-- car_info.is_share==1 是别人共享的车 -->
+					<!-- car_info.authority_list.indexOf(4) == -1 共享地图权限 -->
+					<!-- car_info.authority_list.indexOf(5) == -1 共享套餐权限 -->
+					<view :class="['flex-row', 'flex-between', 'map-card-view',car_info.exchange_package_info && car_info.exchange_package_info.activity_time&&(car_info.is_share!=1&&car_info.authority_list.indexOf(5) != -1)?'height_362':'height_260']">
+						<MapCard v-if="car_info.is_share==1&&car_info.authority_list.indexOf(4) == -1" :car_info="car_info" :height="!!(car_info.exchange_package_info && car_info.exchange_package_info.activity_time)"/>
 			
 						<view class="card-right">
 							<view class="card-bg" @tap="navTravelingTrack">
@@ -100,7 +102,7 @@
 								</view>
 							</view>
 			
-							<view v-if="car_info.exchange_package_info && car_info.exchange_package_info.activity_time" class="card-bg">
+							<view v-if="car_info.exchange_package_info && car_info.exchange_package_info.activity_time&&(car_info.is_share==1&&car_info.authority_list.indexOf(5) == -1)" class="card-bg">
 								<view class="flex-row card-top-title">
 									<img style="width: 36rpx;height: 36rpx;"
 										src="https://qiniu.bms16.com/FtalApKa3STyruaBxxRB4O9hHXyE" alt="">
@@ -464,7 +466,8 @@
 			loadCarDetail(car_sn) {
 				const me = this
 				http.postApi(config.API_FLK_CAR_DETAIL, {
-					car_sn
+					car_sn,
+					time:Math.floor(Date.now() / 1000)
 				}, (resp) => {
 					uni.hideLoading();
 					console.log(resp.data)

+ 11 - 7
pages/orderStatus/orderStatus.css

@@ -457,10 +457,14 @@
 	color: #060809;
 	font-size: 28rpx;
 	background-color: #EBECEC;
-	height: 60rpx;
-	line-height: 60rpx;
+	height: 80rpx;
+	line-height: 80rpx;
 	border-radius: 40rpx;
 	padding: 0 20rpx;
+	display: flex;
+	flex-grow: 1;
+	justify-content: center;
+	align-items: center;
 	/* padding-top: 24rpx;
 	padding-bottom: 24rpx; */
 	text-align: center;
@@ -486,8 +490,8 @@
 .sesame-btn {
 	color: #ffffff;
 	font-size: 28rpx;
-	height: 60rpx;
-	line-height: 60rpx;
+	height: 80rpx;
+	line-height: 80rpx;
 	background-color: #060809;
 	padding: 0 20rpx;
 	border-radius: 40rpx;
@@ -587,7 +591,7 @@
 
 .payment-info {
 	background-color: #ffffff;
-	padding: 24rpx 32rpx 30rpx;
+	padding: 28rpx 32rpx 38rpx;
 	width: 100%;
 	position: fixed;
 	left: 0;
@@ -988,8 +992,8 @@
 .link-phone-btn {
 	color: #ffffff;
 	font-size: 28rpx;
-	height: 60rpx;
-	line-height: 60rpx;
+	height: 80rpx;
+	line-height: 80rpx;
 	background-color: #060809;
 	border-radius: 40rpx;
 	padding: 0 20rpx;

+ 7 - 5
pages/orderStatus/orderStatus.vue

@@ -40,13 +40,14 @@
 							<block v-else>{{Number(orderInfo.hire_cycle) * (orderInfo.hire_duration)}}</block>
 						</view>
 						
-						<view>{{((orderInfo.order_status == 2) || orderInfo.order_status == 3)?'租期剩余':(orderInfo.order_status == 4 ? '逾期时长':'租借周期')}}·<text style="opacity: 0.4;">{{leaseUnits(orderInfo.hire_duration_unit)}}</text></view>
+						<view>{{((orderInfo.order_status == 2) || orderInfo.order_status == 3)?'租期剩余':(orderInfo.order_status == 4 ? '逾期时长':'租借周期')}}·<text  style="opacity: 0.4;">{{leaseUnits(orderInfo.hire_duration_unit)}}</text></view>
 						
 						<!-- <view v-if="(orderInfo.order_status == 2&&orderInfo.hire_type==2) || orderInfo.order_status == 3">
 							租期剩余·天</view>
 						<view v-else-if="orderInfo.order_status == 4 " class="red-status">逾期时长·天</view>
 						<view v-else>租借周期·天</view> -->
 					</view>
+					
 					<view v-if="orderInfo.order_status != 4" class="money-item">
 						<view>
 							{{tools.toFix(orderInfo.hire_money / 100)}}
@@ -70,8 +71,8 @@
 				
 				<view v-if="orderInfo.order_type == 3" class="flex-row flex-between">
 					<view class="money-item">
-						<view></view>
-						<view>租借周期:购买</view>
+						<view>购买</view>
+						<view>租借周期</view>
 					</view>
 					<view class="money-item">
 						<view :class="orderInfo.order_status == 4?'red-status':''">
@@ -185,7 +186,7 @@
 			<!-- </view> -->
 		</view>
 
-		<view v-if="orderInfo.hire_begin_time!=0&&orderInfo.hire_end_time!=0" class="return-info">
+		<view v-if="(orderInfo.hire_begin_time!=0&&orderInfo.hire_end_time!=0)||orderInfo.order_type!=3" class="return-info">
 			<view class="return-top flex-row flex-between">
 				<view>取还时间</view>
 				<view>
@@ -234,11 +235,12 @@
 		</block>
 		<block v-if="orderInfo.pay_status == 2">
 			<view class="payment-info flex-row">
-					<!-- 待激活 -->
+					<!-- 待激活 待取车-->
 					<view class="grow_1" v-if="orderInfo.order_status == 0 ||orderInfo.order_status == 1">
 						<view
 							v-if="(orderInfo.order_status == 0 ||orderInfo.order_status == 1 || orderInfo.pay_status == 5 || orderInfo.pay_status == 0) && orderInfo.order_type != 3"
 							class="cancel" @tap="clickCancel">结束订单</view>
+							<view  @tap="callStorePhone" class="deposit-btn">联系门店</view>
 							<view v-if="orderInfo.order_status == 1" @tap="navToScan" class="sesame-btn ">扫码绑定</view>
 							<view v-if="orderInfo.order_status == 2" @tap="navToScan" class="sesame-btn ">去上传</view>
 					</view>