Эх сурвалжийг харах

Merge branch 'gyq_test' of http://git.bms16.com/liuwei/zx_flk_app into gyq_test

郭宇琦 2 өдөр өмнө
parent
commit
4ccb4f0e37

+ 1 - 0
App.vue

@@ -75,6 +75,7 @@
 			nearLockInfo:{},//蓝牙配对信息
 			nearLockCheck:false,//是否已经蓝牙配对成功
 			sensitivityType:0,//车辆灵敏度存储
+			isOverdueShow:false,//是否逾期
 		}
 	};
 </script>

+ 4 - 2
common/storage.js

@@ -105,12 +105,14 @@ const activeTabsNo = [
 		disableUrl:'https://qiniu.bms16.com/FsEZK73sizxfudIUbEW-gGpqzfAZ'
 	},
 ]
-const toBeSelectTabsNo = [{
+const toBeSelectTabsNo = [
+	{
 		name:i18n.t('胎压'),
 		type:'tirePressure',
 		iconUrl: `${QINIU_URL}FmbcjmvoB4J3CT1hrbjNX4kxv9Zq`,
 		disableUrl:'https://qiniu.bms16.com/Fn9W4gHx3IEGKliBB-y0Kpydcrxj'
-	},{
+	},
+	{
 		name: i18n.t('电池信息'),
 		type:'batteryInfo',
 		url:'/pages/batteryDetail/batteryDetail',

+ 7 - 2
components/basic-drag/index.vue

@@ -11,7 +11,7 @@
 					<image v-if="item.isLock" :src="icons.lock" class="right-icon" />
 					<image v-if="!item.isLock && isActiveEdit" @click="deleteTab(item)" :src="icons.edit"
 						class="right-icon" />
-					<image @click="clickTap(item)" :src="item.iconUrl" class="icon" />
+					<image @click="clickTap(item)" :src="isOverdueShow?item.disableUrl:item.iconUrl" class="icon" />
 					<view class="name">{{ item.name }}</view>
 				</view>
 			</view>
@@ -74,7 +74,11 @@
 			longpress: {
 				type: Boolean,
 				default: true
-			}
+			},
+			isOverdueShow: {
+				type: Boolean,
+				default: false
+			},
 		},
 		data() {
 			const MAX_TAB_LEN = 4
@@ -132,6 +136,7 @@
 		methods: {
 			
 			clickTap(item){
+				if(this.isOverdueShow) return
 				this.$emit('changClick',item)
 			},
 			getMovableItem(tab) {

+ 19 - 5
components/navBar/navigation.vue

@@ -1,9 +1,11 @@
 <template>
-		<view class="top-view flex-row"
+		<view>
+			<view class="top-view flex-row"
 			:style="{'padding-top':`${statusBarHeight1}px`,background:`rgba(255,255,255,${opacity})`}">
 			<view class="navHei" :style="{'height':`calc(${navabarHeight}rpx)`,'width':'100%',}">
 				<view v-if="isback" class="left" @tap="bindReturnView">
-					<view class="pos">
+					<img v-if="type" class="return-view" :src="'https://qiniu.bms16.com/'+ (whiteColor?'Fjpnr3cH9ZqTQrGlw3Ywp3qbJGIG':'FnHXbzly7aXi8zLghrTU5BZdwH5_')" />
+					<view v-else class="pos">
 						<view   class="car-detail-style">
 							<image  class="return-view"
 								src="https://qiniu.bms16.com/FnHXbzly7aXi8zLghrTU5BZdwH5_" mode="aspectFit"></image>
@@ -14,9 +16,11 @@
 						</view>
 					</view>
 				</view>
-				<text class="top-text">{{name}}</text>
+				<text class="top-text" :class="whiteColor?'whiteClass':''">{{name}}</text>
 			</view>
 		</view>
+		<view v-if="type" :style="{'height':`calc(${navabarHeight}rpx + ${statusBarHeight1}px)`}"></view>
+		</view>
 </template>
 
 <script>
@@ -33,7 +37,15 @@
 			scroll: {
 				default: 0,
 				type: Number
-			}
+			},
+			type:{
+				type: Boolean,
+				default: false
+			},
+			whiteColor:{
+				type: Boolean,
+				default: false
+			},
 		},
 		watch: {
 			scroll(n) {
@@ -135,7 +147,9 @@
 		/* transform: translate(-90%,50%); */
 		left: 10%;
 	}
-
+	.top-text.whiteClass {
+		color: #FFFFFF;
+	}
 	.view-height {
 		/* border-bottom:2rpx solid #060809 ; */
 		/* margin-bottom: 32rpx; */

+ 1 - 1
mixin/index.js

@@ -34,7 +34,7 @@ export default {
 		   }
 	  },
 		tapOpenControl(e){
-			const _carOnline= uni.getStorageSync('car_info').online == 0 //在线
+			const _carOnline= uni.getStorageSync('car_info').online == 1 //在线
 			console.log('_carOnline',this._carOnline);
 			const {name,type}=e
 			this.setData({

+ 5 - 1
pages/addUser/addUser.vue

@@ -3,7 +3,7 @@
 		<navBar :name="$t('添加成员')" left="0"/>
 		<view class="flex-row email-input-view">
 			<input class="email-input-style" type="email" v-model="email" :placeholder="$t('请输入被邀人邮箱号')"  placeholder-style="font-size: 32rpx; font-weight: 400; color: #BAC1D0;">
-			<img @click="clearInput" class="clear-btn" src="https://qiniu.bms16.com/Fjpf2YnHUK1_CFf20kKRvjX9YdC3" alt="">
+			<img @tap="closeEmail" class="clear-btn" src="https://qiniu.bms16.com/Fjpf2YnHUK1_CFf20kKRvjX9YdC3" alt="">
 		</view>
 		<view @click="nextFn" class="next-btn" :class="{'next-btn-i':!isEmailFn(email)}">{{ $t('下一步') }}</view>
 	</view>
@@ -27,6 +27,9 @@
 		onLoad: function(options) {
 		},
 		methods: {
+			closeEmail(){
+				this.email = ""
+			},
 			isEmailFn(str){
 				return isEmail(str)
 			},
@@ -94,5 +97,6 @@
 	height: 40rpx;
 	right: 36rpx;
 	top: 28rpx;
+	z-index: 9;
 }
 </style>

+ 5 - 0
pages/batteryPackage/batteryPackage.css

@@ -1,5 +1,10 @@
 .battery-package-main{
 	padding: 32rpx;
+	width: 100%;
+    min-height: 100vh;
+    background: linear-gradient(180deg, #CFD1DE 0%, #F1F3F4 100%), #F1F3F4;
+    background-size: 100% 528rpx;
+    background-repeat: no-repeat;
 }
 .package-icon-view{
 	margin-bottom: 40rpx;

+ 2 - 2
pages/batteryPackage/batteryPackage.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="battery-package-main">
-		<navBar bgColor="#fff" :name="$t('换电套餐')" />
+		<navigation :type="true" :name="$t('换电套餐')" />
 		
 		<view class="package-icon-view flex-row">
 			<img src="https://qiniu.bms16.com/FqF7erLOB8OutmFnre7-mbTkwpZr" alt="">
@@ -47,7 +47,7 @@
 		<view style="height: 200rpx;">
 			
 		</view>
-		<view v-if="form.package_code" @click="isShowToBuy = true"  class="pay-btn">{{ $t('立即购买') }}</view>
+		<view v-if="form.package_code" @click="isShowToBuy = true"  class="pay-btn">{{ $t('需到店支付') }}</view>
 		<payTypeModel @closeShow='isShowToBuy = false' :free_price='form.price' :isShowToBuy='isShowToBuy' @payToOrder='submit'></payTypeModel>
 	</view>
 </template>

+ 6 - 2
pages/carFunctionSet/more.vue

@@ -15,7 +15,7 @@
           <view :class="['name', getMovableItem(tab) && 'shake']">{{ tab.name }}</view>
         </view>
       </draggable> -->
-			<basic-drag @changClick='changClick' @end='endFn'   @toggleEdit='toggleEdit' v-model="activeTabs" :width="700" :column="4"
+			<basic-drag @changClick='changClick' @end='endFn'   @toggleEdit='toggleEdit' :isOverdueShow='isOverdueShow' v-model="activeTabs" :width="700" :column="4"
 				itemKey="name"></basic-drag>
 
 		</view>
@@ -78,7 +78,8 @@
 				activeTabs: [],
 				toBeSelectTabs: [],
 				car_info :{},
-				showUnBind:true
+				showUnBind:true,
+				isOverdueShow:false
 			}
 		},
 		computed: {
@@ -92,6 +93,9 @@
 		onLoad(){
 			this.car_info =  uni.getStorageSync('car_info') || {};
 			this.showUnBind = !!this.car_info.sold_time
+			const app=getApp()
+			this.isOverdueShow=app.globalData.isOverdueShow
+			console.log(this.isOverdueShow,'this.isOverdueShow');
 		},
 		created() {
 			this.initializeTabs()

+ 8 - 3
pages/index/components/control/control.vue

@@ -2,7 +2,7 @@
     <view class="container-view-contril">
 		<scroll-view class="scroll-view flex-row" scroll-x="true">
 			<view @tap="tapOpen" v-for="(item,index) of contrilList" :key="index" :data-item="item" class="contril-item flex-row">
-				<img class="contril-item-img"  :src="item.isTurnOn==0?item.offUrl:item.iconUrl" alt="">
+				<img class="contril-item-img"  :src="isOverdueShow?item.disableUrl:(item.isTurnOn==0?item.offUrl:item.iconUrl)" alt="">
 				<text >{{item.name}}</text>
 			</view>
 			<view class="contril-item flex-row" @tap="toMoreFunctionSet">
@@ -101,6 +101,10 @@ export default {
 			type: Boolean,
 			default: false
 		},
+		isOverdueShow: {
+			type: Boolean,
+			default: false
+		}
 	},
 
     data() {
@@ -161,8 +165,9 @@ export default {
 			// setTimeout(() => apiCall(3), 200);
 		},
 		tapOpen(e){
-				const item = e.currentTarget.dataset.item;
-				this.changClick(item)
+			if(this.isOverdueShow) return
+			const item = e.currentTarget.dataset.item;
+			this.changClick(item)
 		},
 		toMoreFunctionSet() {
 			uni.navigateTo({

+ 1 - 1
pages/index/index.css

@@ -163,7 +163,7 @@
 	border-image: linear-gradient(90deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.1)) 3 3;
 	height: 100rpx;
 	align-items: center;
-	margin: 40rpx 20rpx;
+	margin: 40rpx 24rpx;
 	padding: 0 24rpx;
 }
 .overdue-view-text{

+ 7 - 4
pages/index/index.vue

@@ -77,7 +77,7 @@
 								:style="{width: '24rpx',height: '32rpx'}" alt="">
 						</view>
 					</view>
-					<Control :contrilList="contrilList" @toBluetooth="inductiveUnlockHandle" @loadCarDetail="loadCarDetail"/>
+					<Control :contrilList="contrilList" @toBluetooth="inductiveUnlockHandle" @loadCarDetail="loadCarDetail" :isOverdueShow="isOverdueShow"/>
 					
 			
 					<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']">
@@ -213,7 +213,7 @@
 				newsList: {},
 				img_list: [],
 				isLogin: false,
-				isOverdueShow: true,
+				isOverdueShow: false,
 				contrilList: [],
 				isTrackOrAll: true,
 				model_list: [],
@@ -509,13 +509,16 @@
 						}
 						// this.isConnectBlueth=app.globalData.connectionState[this.car_info.car_sn]
 						//判断逾期
-						if (!resp.data.data.sold_time) return
+						if (resp.data.data.sold_time) return
 						let time = Math.ceil(resp.data.data.hire_end_time - Math.floor(new Date()) / 1000) / 60
-						if (time > 0) {
+						console.log(time,resp.data.data.hire_end_time,Math.floor(new Date()) / 1000);
+						if (time <= 0) {
 							this.isOverdueShow = true
+							app.globalData.isOverdueShow=true
 							this.car_info.hire_end_time = common.getTimeToDay(time)
 						} else {
 							this.isOverdueShow = false
+							app.globalData.isOverdueShow=false
 						}
 						console.log('this.time',this.time);
 						

+ 7 - 7
pages/powerSetting/powerSetting.vue

@@ -2,8 +2,8 @@
 		<view class="power-setting-main">
 			<navBar :name="$t('权限设置')" bgColor="transparent"></navBar>
 			<view class="flex-row power-setting-head">
-				<image class="head-img" :src="headimg" mode="aspectFit"></image>
-				<view class="head-name">{{nickname}}</view>
+				<image class="head-img" :src="form.headimg"></image>
+				<view class="head-name">{{form.nickname}}</view>
 				<text class="head-email">{{form.email}}</text>
 			</view>
 			<view class="setting-card" style="margin-bottom: 20rpx;">
@@ -60,10 +60,10 @@
 		data() {
 			return {
 				isSet:"",
-				headimg: "",
-				nickname: "",
 				target_user_id:0,
 				form: {
+					headimg: "",
+					nickname: "",
 					car_sn: "",
 					email: "",
 					authority_list: [5]
@@ -83,7 +83,7 @@
 				return
 			}
 			this.form.email = options.email;
-			this.headimg = options.headimg;
+			this.form.headimg = options.headimg;
 			this.form.nickname = options.nickname;
 		},
 		methods: {
@@ -100,8 +100,8 @@
 					})
 					this.form.authority_list = data.data.authority
 					this.form.email = data.data.email
-					this.nickname = data.data.nickname
-					this.headimg = data.data.headimg
+					this.form.nickname = data.data.nickname
+					this.form.headimg = data.data.headimg
 				}
 			},
 			async delSubmit() {

+ 8 - 3
pages/userManagement/userManagement.vue

@@ -1,6 +1,6 @@
 <template>
-	<view class="">
-		<navBar :name="$t('共享用户')" />
+	<view class="bgClass">
+		<navigation :whiteColor="true" :type="true" :name="$t('用车人管理')" />
 		<view class="user-card">
 			<view class="flex-row align-center user-card-heard">
 				<img style="width: 48rpx;height: 48rpx;" src="https://qiniu.bms16.com/FieeNq75ybyjIzQO6fmNcdTlRsp5" alt="">
@@ -73,7 +73,12 @@
 		}
 	};
 </script>
-<style>
+<style scoped>
+.bgClass {
+	height: 396rpx;
+	background: url('https://qiniu.bms16.com/Fvu5ulYgrXiB_0cXs715TcvYYnsb') no-repeat;
+	background-size: cover;
+}
 .user-card{
 	background: #FFFFFF;
 	border-radius: 40rpx;