ccjgmwz 3 年之前
父節點
當前提交
b41080be55
共有 5 個文件被更改,包括 50 次插入14 次删除
  1. 1 0
      App.vue
  2. 7 8
      pages.json
  3. 15 4
      pages/business/business.vue
  4. 13 1
      pages/sale/information.vue
  5. 14 1
      pages/tran/tran.vue

+ 1 - 0
App.vue

@@ -15,6 +15,7 @@
 		},
 		},
 		onLaunch: function() {
 		onLaunch: function() {
 			// #ifdef APP-PLUS
 			// #ifdef APP-PLUS
+		
 			let type = uni.getSystemInfoSync().platform
 			let type = uni.getSystemInfoSync().platform
 			console.log(type)
 			console.log(type)
 			if(type == "android"){
 			if(type == "android"){

+ 7 - 8
pages.json

@@ -48,10 +48,9 @@
 		{
 		{
 			"path": "pages/sale/information",
 			"path": "pages/sale/information",
 			"style": {
 			"style": {
-				// #ifdef MP 
 				"enablePullDownRefresh": true,
 				"enablePullDownRefresh": true,
-				"navigationBarTitleText": "易粮易运"
-				// #endif 
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom"
 			}
 			}
 		},
 		},
 		{
 		{
@@ -162,7 +161,6 @@
 			"path": "pages/user/user",
 			"path": "pages/user/user",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "我的",
 				"navigationBarTitleText": "我的",
-
 				"navigationStyle": "custom"
 				"navigationStyle": "custom"
 			}
 			}
 		},
 		},
@@ -197,7 +195,8 @@
 			"path": "pages/tran/tran",
 			"path": "pages/tran/tran",
 			"style": {
 			"style": {
 				"navigationBarTitleText": "物流信息",
 				"navigationBarTitleText": "物流信息",
-				"enablePullDownRefresh": true
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom"
 			}
 			}
 		},
 		},
 		{
 		{
@@ -350,8 +349,9 @@
 		}, {
 		}, {
 			"path": "pages/business/business",
 			"path": "pages/business/business",
 			"style": {
 			"style": {
-				"navigationBarTitleText": "交易",
-				"enablePullDownRefresh": true
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": true,
+				"navigationStyle": "custom"
 			}
 			}
 
 
 		}, {
 		}, {
@@ -1220,7 +1220,6 @@
 		"navigationBarTitleText": "易粮易运",
 		"navigationBarTitleText": "易粮易运",
 		"navigationBarBackgroundColor": "#FFFFFF"
 		"navigationBarBackgroundColor": "#FFFFFF"
 		// "backgroundColor": "#f8f8f8"
 		// "backgroundColor": "#f8f8f8"
-
 	},
 	},
 
 
 	"condition": { //模式配置,仅开发期间生效
 	"condition": { //模式配置,仅开发期间生效

+ 15 - 4
pages/business/business.vue

@@ -1,5 +1,7 @@
 <template>
 <template>
 	<view>
 	<view>
+		<view :style="statusBarHeight" class="status_bar">
+		</view>
 		<view class="top-style">
 		<view class="top-style">
 			<view style='background:#fff;border-bottom:1px solid #EEE;padding-bottom:10px;'>
 			<view style='background:#fff;border-bottom:1px solid #EEE;padding-bottom:10px;'>
 				<view class="cu-bar search">
 				<view class="cu-bar search">
@@ -120,7 +122,8 @@
 				locationType: ['全国', '黑龙江', '河南', '山东', '安徽', '吉林', '河北', '江苏', '内蒙古', '四川', '湖南', '湖北', '辽宁',
 				locationType: ['全国', '黑龙江', '河南', '山东', '安徽', '吉林', '河北', '江苏', '内蒙古', '四川', '湖南', '湖北', '辽宁',
 					'江西', '云南', '新疆', '山西', '广西', '陕西', '广东', '甘肃', '重庆', '贵州', '浙江', '福建',
 					'江西', '云南', '新疆', '山西', '广西', '陕西', '广东', '甘肃', '重庆', '贵州', '浙江', '福建',
 					'宁夏', '天津', '海南', '青海', '西藏', '上海', '北京'
 					'宁夏', '天津', '海南', '青海', '西藏', '上海', '北京'
-				]
+				],
+				statusBarHeight:"height:"
 			}
 			}
 		},
 		},
 		onShow() {
 		onShow() {
@@ -159,9 +162,13 @@
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
 			console.log("buy onload")
 			console.log("buy onload")
-			// #ifdef H5
-			this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
-			// #endif
+			var that = this
+			uni.getSystemInfo({
+				success: function(res) {
+					console.log("statusBarHeight",res.statusBarHeight)
+					that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
+				},
+			});
 			this.cateId = options.tid ? options.tid : 0;
 			this.cateId = options.tid ? options.tid : 0;
 			this.keywords = options.keywords ? options.keywords : ''
 			this.keywords = options.keywords ? options.keywords : ''
 			this.loadData();
 			this.loadData();
@@ -848,4 +855,8 @@
 		position: fixed;
 		position: fixed;
 		width: 100%;
 		width: 100%;
 	}
 	}
+	
+	.status_bar {
+		width: 100%;
+	}
 </style>
 </style>

+ 13 - 1
pages/sale/information.vue

@@ -1,5 +1,7 @@
 <template name="sale">
 <template name="sale">
 	<view class="container">
 	<view class="container">
+		 <view :style="statusBarHeight" class="status_bar">
+		 </view>
 		<!-- 小程序头部兼容 -->
 		<!-- 小程序头部兼容 -->
 		<!-- #ifdef MP -->
 		<!-- #ifdef MP -->
 		<!-- <view class="mp-search-box">
 		<!-- <view class="mp-search-box">
@@ -154,7 +156,8 @@
 				TabCur: 0,
 				TabCur: 0,
 				category:0,
 				category:0,
 				current: 0,
 				current: 0,
-				infoList1:[]
+				infoList1:[],
+				statusBarHeight:"height:"
 			};
 			};
 		},
 		},
 		onReady() {
 		onReady() {
@@ -198,6 +201,12 @@
 		},
 		},
 		onLoad(options) {
 		onLoad(options) {
 			var that = this
 			var that = this
+			uni.getSystemInfo({
+				success: function(res) {
+					console.log("statusBarHeight",res.statusBarHeight)
+					that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
+				},
+			});
 			var infoList = [];
 			var infoList = [];
 			uni.request({
 			uni.request({
 			    url: "https://hq.sinajs.cn/list=C0,C2109,C2111,C2201,C2203,C2205,C2207,A0,A2109,A2111,A2201,A2203,A2205,A2207",
 			    url: "https://hq.sinajs.cn/list=C0,C2109,C2111,C2201,C2203,C2205,C2207,A0,A2109,A2111,A2201,A2203,A2205,A2207",
@@ -962,5 +971,8 @@
 				flex: 1;
 				flex: 1;
 			}
 			}
 		}
 		}
+		.status_bar {
+			width: 100%;
+		}
 	}
 	}
 </style>
 </style>

+ 14 - 1
pages/tran/tran.vue

@@ -1,5 +1,7 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
+		<view :style="statusBarHeight" class="status_bar">
+		</view>
 		<scroll-view scroll-x class="nav">
 		<scroll-view scroll-x class="nav">
 			<view class="flex text-center">
 			<view class="flex text-center">
 				<view class="cu-item flex-sub" :class="0==TabCur?'text-white':''" @tap="tabSelect" data-id="0">
 				<view class="cu-item flex-sub" :class="0==TabCur?'text-white':''" @tap="tabSelect" data-id="0">
@@ -113,7 +115,8 @@
 					limit:10 ,//每次取条目数
 					limit:10 ,//每次取条目数
 					loadStatus:'loading',  //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 					loadStatus:'loading',  //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 					isLoadMore:false  ,//是否加载中
 					isLoadMore:false  ,//是否加载中
-					TabCur:0
+					TabCur:0,
+					statusBarHeight:"height:"
 				};
 				};
 			},
 			},
 			computed: {
 			computed: {
@@ -162,6 +165,13 @@
 				this.loadData()
 				this.loadData()
 			},
 			},
 			onLoad() {
 			onLoad() {
+				var that = this
+				uni.getSystemInfo({
+					success: function(res) {
+						console.log("statusBarHeight",res.statusBarHeight)
+						that.statusBarHeight += res.statusBarHeight + "px"; //这就是状态栏的高度
+					},
+				});
 			},
 			},
 			onReachBottom(){  //上拉触底函数
 			onReachBottom(){  //上拉触底函数
 			  if(!this.isLoadMore){  //此处判断,上锁,防止重复请求
 			  if(!this.isLoadMore){  //此处判断,上锁,防止重复请求
@@ -449,4 +459,7 @@
 	.uni-swiper-item {
 	.uni-swiper-item {
 		height: auto;
 		height: auto;
 	}
 	}
+	.status_bar {
+		width: 100%;
+	}
 </style>
 </style>