浏览代码

回到首页导航

twt 2 年之前
父节点
当前提交
15ab9ba151

+ 102 - 0
components/homenav/nav.vue

@@ -0,0 +1,102 @@
+<template>
+	<view class="" >
+		<!-- 自定义导航 -->
+		<view class="zdyNavBox">
+			<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
+			<view class="zdyNav">
+				<view class="zdyNavLeft">
+					<image src="../../static/img/nav_icon_back.png" mode="aspectFit" class="backImg" @click="goback"></image>
+					<image src="../../static/img/nav_icon_home.png" mode="" class="homeImg" @click="gohome"></image>
+				</view>
+				<view class="zdyNavTitle">{{title}}</view>
+				<view style="width: 100px;"></view>
+			</view>
+		</view>
+		<view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
+		<view style="height: 44px;"></view>
+		
+		
+	</view>
+</template>
+
+<script>
+export default {
+	props:['title','iStatusBarHeight','cj'],
+	data() {
+		return {
+		}
+	},
+	onLoad(opt) {
+	  
+      //this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
+	},
+	onShow() {
+		
+	},
+	methods: {
+		goback() {
+			uni.navigateBack({
+			 	delta: 1
+			})
+		},
+		gohome(){
+			//console.log(23+this.cj)
+			if(this.cj==3){
+				//console.log(123)
+				uni.switchTab({
+					url:'../../index/index'
+				})
+			}else{
+				uni.switchTab({
+					url:'../index/index'
+				})
+			}
+			
+		},
+	}
+}
+</script>
+
+<style scoped>
+	.zdyNavBox{
+		width: 100vw;
+		background: #FFFFFF;
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 9999999;
+	}
+	.zdyNav{
+		height: 44px;
+		display: flex;
+		justify-content: space-between;
+		
+		align-items: center;
+	}
+	
+	.backImg{
+		width: 44rpx;
+		height: 44rpx;
+		margin-left: 10rpx;
+		margin-right: 20rpx;
+	}
+	.homeImg{
+		width: 44rpx;
+		height: 44rpx;
+		
+	}
+	.zdyNavLeft{
+		display: flex;
+		align-items: center;
+	}
+	.zdyNavTitle{
+		width: 100vw;
+		height: 44px;
+		background: #FFFFFF;
+		text-align: center;
+		font-size: 34rpx;
+		line-height: 44px;
+	}
+	
+	
+</style>

+ 25 - 12
pages.json

@@ -11,14 +11,17 @@
 		{
 			"path": "pages/report/complete",
 			"style": {
-				"navigationBarTitleText": "完工报告",
+				//"navigationBarTitleText": "完工报告",
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 		},
 		{
 			"path": "pages/report/working",
 			"style": {
-				"navigationBarTitleText": "施工报告",
+				/* "navigationBarTitleText": "施工报告",
+				"enablePullDownRefresh": true */
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 		},
@@ -34,21 +37,24 @@
 		}, {
 			"path": "pages/user/historySpend",
 			"style": {
-				"navigationBarTitleText": "历史消费",
+				//"navigationBarTitleText": "历史消费",
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 		},
 		{
 			"path": "pages/user/historyDetail",
 			"style": {
-				"navigationBarTitleText": "消费明细",
+				//"navigationBarTitleText": "消费明细",
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 
 		}, {
 			"path": "pages/user/checkReport",
 			"style": {
-				"navigationBarTitleText": "车检报告",
+				//"navigationBarTitleText": "车检报告",
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 
@@ -70,7 +76,8 @@
 		{
 			"path": "pages/index/onlineBooking",
 			"style": {
-				"navigationBarTitleText": "在线预约",
+				//"navigationBarTitleText": "在线预约",
+				 "navigationStyle": "custom",
 				"enablePullDownRefresh": false
 			}
 
@@ -99,14 +106,16 @@
 		}, {
 			"path": "pages/user/myBespeak",
 			"style": {
-				"navigationBarTitleText": "我的预约",
+				//"navigationBarTitleText": "我的预约",
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 
 		}, {
 			"path": "pages/user/bespeakDetail",
 			"style": {
-				"navigationBarTitleText": "预约详情",
+				//"navigationBarTitleText": "预约详情",
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 
@@ -146,7 +155,8 @@
 		}, {
 			"path": "pages/user/myOrder/myOrder",
 			"style": {
-				"navigationBarTitleText": "我的订单",
+				//"navigationBarTitleText": "我的订单",
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 
@@ -186,7 +196,8 @@
 		{
 			"path": "pages/user/addCar/cailist",
 			"style": {
-				"navigationBarTitleText": "我的车库",
+				//"navigationBarTitleText": "我的车库",
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 		}
@@ -274,7 +285,8 @@
 		{
 			"path": "pages/activity/jkDetail",
 			"style": {
-				"navigationBarTitleText": "活动详情",
+				//"navigationBarTitleText": "活动详情",
+				"navigationStyle": "custom",
 				/* "app-plus": { "softinputMode": "adjustPan"}, */
 				"enablePullDownRefresh": true
 			}
@@ -443,7 +455,8 @@
 		{
 			"path": "pages/user/reportUni",
 			"style": {
-				"navigationBarTitleText": "检测报告",
+				//"navigationBarTitleText": "检测报告",
+				"navigationStyle": "custom",
 				"enablePullDownRefresh": true
 			}
 		},

+ 7 - 0
pages/activity/jkDetail.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="content">
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'活动详情'"></homenav>
 		<view class="top">
 			<img :src="mainImg" alt="" class="topimg" mode="widthFix">
 		</view>
@@ -239,7 +240,11 @@
 </template>
 
 <script>
+	import homenav from "../../components/homenav/nav.vue"
 	export default {
+		components: {
+			homenav
+		},
 		data() {
 			return {
 				info:'',
@@ -283,9 +288,11 @@
 				 authorizShow:false,
 				 wxOpenData:'',
 				 ext:'',
+				 iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 		   console.log(opt)
 		   if(opt.shareId){
 			   this.shareId=opt.shareId

+ 2 - 0
pages/index/index.vue

@@ -234,7 +234,9 @@
 </template>
 
 <script>
+	
 	export default {
+		
 		data() {
 			return {
 				shopId: '',

+ 7 - 0
pages/index/onlineBooking.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="box">
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'在线预约'" ></homenav>
 		<view class="top">
 			<view class="shopTop">
 				<swiper class="swiper" circular :autoplay="true" :interval="interval" :duration="duration"
@@ -149,7 +150,11 @@
 </template>
 
 <script>
+	import homenav from "../../components/homenav/nav.vue"
 	export default {
+		components: {
+			homenav
+		},
 		data() {
 			return {
 				interval: 3000,
@@ -171,9 +176,11 @@
 				naShopId: '',
 				themeColor: '',
 				data: {},
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.userInfo = uni.getStorageSync("userInfo");
 			this.themeColor = uni.getStorageSync("themeColor");
 			this.naShopId = opt.naShopId;

+ 7 - 1
pages/report/complete.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="box">
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'完工报告'" ></homenav>
  <view class="topbox">
       <view class="IncoBox">
         <img src="../../static/timg/icon_ddztty@2x.png" alt="" class="iconwg">
@@ -95,7 +96,11 @@
 </template>
 
 <script>
+	import homenav from "../../components/homenav/nav.vue"
 	export default {
+		components: {
+			homenav
+		},
 		data() {
 			return {
 				location: '',
@@ -111,10 +116,11 @@
 				Photos:[],
 				PhotosShow:false,
 				demo01_index:0,
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
-
+            this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id
 			console.log(this.id)
 			this.themeColor = uni.getStorageSync("themeColor");

+ 9 - 2
pages/report/working.vue

@@ -1,5 +1,6 @@
 <template>
-	<view class="box">
+<view class="box">
+	<homenav :iStatusBarHeight="iStatusBarHeight" :title="'施工报告'"></homenav>
  <view class="topbox">
       <view class="IncoBox">
         <img src="../../static/timg/icon_ddztty@2x.png" alt="" class="iconwg">
@@ -77,7 +78,12 @@
 </template>
 
 <script>
+	import homenav from "../../components/homenav/nav.vue"
+	import nodata from '../../components/nodata/nodata.vue'
 	export default {
+		components: {
+			homenav,nodata
+		},
 		data() {
 			return {
 				location: '',
@@ -93,10 +99,11 @@
 				Photos:[],
 				PhotosShow:false,
 				demo01_index:0,
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
-
+            this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id
 			this.themeColor = uni.getStorageSync("themeColor");
 			this.userInfo = this.$store.state.userInfo;

+ 15 - 6
pages/user/addCar/cailist.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="box">
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'我的车库'" :cj="3"></homenav>
 		<view class="carlistBox">
 			<view class="line" v-for="(item,index) in carList" @click="itemClick(item)">
 				<view class="lineCont">
@@ -46,7 +47,11 @@
 </template>
 
 <script>
+	import homenav from "@/components/homenav/nav.vue"
 	export default {
+		components: {
+			homenav
+		},
 		data() {
 			return {
 				carList: '',
@@ -54,11 +59,12 @@
 				type: '',
 				carId: '',
 				fromMe: false,
-				 themeColor:'',
-
+				themeColor:'',
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.$common.isUserId()
 			this.type = opt.type;
 			// console.log(this.type)
@@ -106,10 +112,13 @@
 				})
 			},
 			itemClick(item){
-				this.$store.commit('mutationscarInfo', item)
-				uni.navigateBack({
-				 	delta: 1
-				})
+				if(this.type!=3){
+					this.$store.commit('mutationscarInfo', item)
+					uni.navigateBack({
+					 	delta: 1
+					})
+				}
+				
 			},
 			
 			

+ 5 - 4
pages/user/bespeakDetail.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="box">
-
+         <homenav :iStatusBarHeight="iStatusBarHeight" :title="'预约详情'" ></homenav>
 		<view class="top" :style="{background:'#'+themeColor}">
 			<view class="orderState">
 				<image src="../../static/img/icon_order_def.png" mode="" style="width: 44rpx;height: 44rpx;"></image>
@@ -96,9 +96,10 @@
 
 <script>
 	import timeSelect from '@/components/timeSelect/timeSelect.vue'
+	import homenav from "../../components/homenav/nav.vue"
 	export default {
 		components: {
-			timeSelect
+			timeSelect,homenav
 		},
 	
 		data() {
@@ -109,11 +110,11 @@
 				timedata:'',
 				billDate:'',
 				 themeColor:'',
-
+                iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
-			
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id
 			 this.themeColor = uni.getStorageSync("themeColor");
 

+ 5 - 2
pages/user/checkReport.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="box">
-	
+	   <homenav :iStatusBarHeight="iStatusBarHeight" :title="'车检报告'" ></homenav>
 		<view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="goDetail(item.id)">
 			<view class="time">{{item.CreateTime}}</view>
 			<view class="carPlate">
@@ -21,10 +21,11 @@
 </template>
 
 <script>
+	import homenav from "../../components/homenav/nav.vue"
 	import nodata from '../../components/nodata/nodata.vue'
 	export default {
 		components: {
-			nodata,
+			nodata,homenav
 		},
 
 		data() {
@@ -33,9 +34,11 @@
 				itemData: [],
 				noMoreShow: false,
 				urlStr:'',
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad() {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.page = 1;
 			this.myOrderCoupon();
 			//this.urlStr = this.$request.webUrl+'#/carOwner/index'

+ 7 - 2
pages/user/historyDetail.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="box">
-
+        <homenav :iStatusBarHeight="iStatusBarHeight" :title="'消费明细'" ></homenav>
 		<view class="contentBox">
 			<view class="top" :style="{background:'#'+themeColor}">
 				<view class="orderState">
@@ -224,7 +224,11 @@
 </template>
 
 <script>
+	import homenav from "../../components/homenav/nav.vue"
 	export default {
+		components: {
+			homenav
+		},
 		data() {
 			return {
 				location: '',
@@ -252,10 +256,11 @@
 				CardMoneyT: false, //计次卡冲销
 				CardMoneyC: false, //储值卡冲销
 				ReceiptsMoney: false, //支付金额
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
-
+            this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id
 			this.themeColor = uni.getStorageSync("themeColor");
 			this.userInfo = this.$store.state.userInfo;

+ 5 - 1
pages/user/historySpend.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="box">
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'历史消费'" ></homenav>
 		<view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="goDetail(item)">
 			<view class="topBox">
 				<view class="dan">{{item.code}}</view>
@@ -75,9 +76,10 @@
 
 <script>
 	import nodata from '../../components/nodata/nodata.vue'
+	import homenav from "../../components/homenav/nav.vue"
 	export default {
 		components: {
-			nodata,
+			nodata,homenav
 		},
 
 		data() {
@@ -87,9 +89,11 @@
 				noMoreShow: false,
 				appraise:false,
 				ReceiptsMoney:false,//支付金额
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad() {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.page = 1
 			this.myOrderCoupon()
 			this.myPower()

+ 5 - 1
pages/user/myBespeak.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="box">
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'我的预约'" ></homenav>
 		<view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="goDetail(item.ID)">
 
 			<view class="carPlate">
@@ -31,9 +32,10 @@
 
 <script>
 	import nodata from '../../components/nodata/nodata.vue'
+	import homenav from "../../components/homenav/nav.vue"
 	export default {
 		components: {
-			nodata,
+			nodata,homenav
 		},
 
 		data() {
@@ -41,9 +43,11 @@
 				page: 1,
 				itemData: [],
 				noMoreShow: false,
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad() {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.page = 1
 			this.myOrderCoupon()
 		},

+ 6 - 3
pages/user/myOrder/myOrder.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="box">
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'我的订单'" :cj="3"></homenav>
 		<view class="tab">
 			<view class="tabLine" :class="{tabActive:tabIndex==0}" @click="tabClick(0)">全部</view>
 			<view class="tabLine" :class="{tabActive:tabIndex==1}" @click="tabClick(1)">待付款</view>
@@ -39,9 +40,10 @@
 
 <script>
 	import nodata from '@/components/nodata/nodata.vue'
+	import homenav from "@/components/homenav/nav.vue"
 	export default {
 		components: {
-			nodata
+			nodata,homenav
 		},
 		data() {
 			return {
@@ -49,11 +51,11 @@
 				tabIndex: '',
 				items: [],
 				isload: false,
-
+                iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
-
+            this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.tabIndex = opt.num;
 
 			this.getData()
@@ -69,6 +71,7 @@
 
 
 			tabClick(num) {
+				
 				this.tabIndex = num;
 
 

+ 7 - 0
pages/user/reportUni.vue

@@ -1,5 +1,6 @@
 <template>
 	<view class="content">
+		<homenav :iStatusBarHeight="iStatusBarHeight" :title="'检测报告'" ></homenav>
 		<view class="car-report-main newjcbgD">
 			<view class="car-report newcar-report">
 
@@ -213,7 +214,11 @@
 </template>
 
 <script>
+	import homenav from "../../components/homenav/nav.vue"
 	export default {
+		components: {
+			homenav
+		},
 		data() {
 			return {
 				detailData: {},
@@ -224,9 +229,11 @@
 				wxOpenData: '',
 				authorizShow: false,
 				code: '',
+				iStatusBarHeight:'',
 			}
 		},
 		onLoad(opt) {
+			this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
 			this.id = opt.id;
 			this.userInfo = this.$store.state.userInfo;
 			this.ext = this.$common.getExtStoreId();

+ 5 - 5
pages/user/user.vue

@@ -12,7 +12,7 @@
 						<view class="nickName" v-if="nickName">{{nickName}}</view>
 						<view class="grade" v-if="numList.levelName">{{numList.levelName}}</view>
 					</view>
-					<view class="phone">{{phone}}  <span @click="seeQr">{{numList.customerInfo.wxMiniV2OpenID?' / 已绑定微信':' / 未绑定微信'}}</span> </view>
+					<view class="phone">{{phone}}  <span @click="seeQr">{{numList.customerInfo.wxMiniV2OpenID?' / 已绑定微信>':' / 未绑定微信>'}}</span> </view>
 				</view>
 			</view>
 
@@ -142,7 +142,7 @@
 			</view>
 
 
-			<view class="rowBox" @click="gonavigateTo('./addCar/cailist')">
+			<view class="rowBox" @click="gonavigateTo('./addCar/cailist?type=3')">
 				<view class="leftView">
 					<image src="../../static/img/icon_me2.png" mode="" class="liftIcon"></image>
 					<view class="rowTitle">我的车库</view>
@@ -214,7 +214,7 @@
 				</view>
 				<image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
 			</view>
-			<view class="rowBox" @click="gonavigateTo('../report/complete?id=278569FB-6F21-47AD-8B66-D62D2EA6981D')">
+			<!-- <view class="rowBox" @click="gonavigateTo('../report/complete?id=278569FB-6F21-47AD-8B66-D62D2EA6981D')">
 				<view class="leftView">
 					<image src="../../static/img/icon_kehuzhuanjieshao.png" mode="" class="liftIcon"></image>
 					<view class="rowTitle">完工报告</view>
@@ -227,7 +227,7 @@
             		<view class="rowTitle">施工报告</view>
             	</view>
             	<image src="../../static/img/big_rightArrow.png" mode="" class="big_rightArrow"></image>
-            </view>
+            </view> -->
 			<!-- 先隐藏 -->
 			<!-- <view class="rowBox" @click="gonavigateTo('')">
 				<view class="leftView">
@@ -259,7 +259,7 @@
 				<view class="qrTitle">微信绑定
 				  <image src="../../static/timg/chahao.png" mode="" class="qrimgchahao" @click="qrclose"></image>
 				</view>
-				<view class="qrms">扫描下方二维码进行绑定</view>
+				<view class="qrms">扫描/长按下方二维码进行绑定</view>
 				<view class="qrms2">绑定后可接收微信消息通知</view>
 				<view style="text-align: center;padding-top: 30rpx;">
 					<image :src="qrimg" mode="" class="qrimg" :show-menu-by-longpress='true'></image>