优化原生底部与picker的层级
							parent
							
								
									fc73801043
								
							
						
					
					
						commit
						288993254b
					
				
							
								
								
									
										2
									
								
								app.js
								
								
								
								
							
							
						
						
									
										2
									
								
								app.js
								
								
								
								
							| 
						 | 
					@ -19,7 +19,7 @@ App({
 | 
				
			||||||
        wx.setStorageSync('urlPath', urlPath);
 | 
					        wx.setStorageSync('urlPath', urlPath);
 | 
				
			||||||
		let hInfo = wx.getAccountInfoSync();
 | 
							let hInfo = wx.getAccountInfoSync();
 | 
				
			||||||
		// console.log(hInfo.envVersion);//develop:开发版	trial:体验版	release:正式版
 | 
							// console.log(hInfo.envVersion);//develop:开发版	trial:体验版	release:正式版
 | 
				
			||||||
		if(hInfo.miniProgram.envVersion != "develop"){
 | 
							if(hInfo.miniProgram.envVersion == "release"){
 | 
				
			||||||
			console.log = () =>{}
 | 
								console.log = () =>{}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
        // this.setOpenid()
 | 
					        // this.setOpenid()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,9 +27,20 @@ Component({
 | 
				
			||||||
			  "selectedIconPath": "/img/nav/menuIndex.png",
 | 
								  "selectedIconPath": "/img/nav/menuIndex.png",
 | 
				
			||||||
			  "text": "我要碳中和"
 | 
								  "text": "我要碳中和"
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		]
 | 
							],
 | 
				
			||||||
 | 
							opacityNum:1
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						onload() {
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						attached() {
 | 
				
			||||||
 | 
							wx.setStorageSync('opacity',1);
 | 
				
			||||||
 | 
							setInterval(()=>{
 | 
				
			||||||
 | 
								this.setData({
 | 
				
			||||||
 | 
									opacityNum:wx.getStorageSync('opacity')
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},100)
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	attached() {},
 | 
					 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		switchTab(e) {
 | 
							switchTab(e) {
 | 
				
			||||||
			// console.log(e)
 | 
								// console.log(e)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
<!--miniprogram/custom-tab-bar/index.wxml-->
 | 
					<!--miniprogram/custom-tab-bar/index.wxml-->
 | 
				
			||||||
<cover-view class="tab-bar-border">
 | 
					<cover-view class="tab-bar-border" style="opacity: {{opacityNum}};">
 | 
				
			||||||
	<cover-view class="border">
 | 
						<cover-view class="border">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	</cover-view>
 | 
						</cover-view>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,12 @@
 | 
				
			||||||
var urlPath = require('../../config.js');
 | 
					var urlPath = require('../../config.js');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Page({
 | 
					Page({
 | 
				
			||||||
 | 
						// 隐藏底部导航
 | 
				
			||||||
 | 
						hideEv(){
 | 
				
			||||||
 | 
							wx.setStorageSync('opacity',0);
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	bindDateChange: function(e) {
 | 
						bindDateChange: function(e) {
 | 
				
			||||||
 | 
							wx.setStorageSync('opacity',1);
 | 
				
			||||||
		this.setData({
 | 
							this.setData({
 | 
				
			||||||
			[e.mark.type + '_date']: e.detail.value
 | 
								[e.mark.type + '_date']: e.detail.value
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,13 +30,13 @@
 | 
				
			||||||
            </view>
 | 
					            </view>
 | 
				
			||||||
            <view class="picker-box">
 | 
					            <view class="picker-box">
 | 
				
			||||||
                <picker mode="date" value="{{start_date}}" class="time-picker" start="2015-09-01" end="2050-09-01" mark:type="start"  bindchange="bindDateChange">
 | 
					                <picker mode="date" value="{{start_date}}" class="time-picker" start="2015-09-01" end="2050-09-01" mark:type="start"  bindchange="bindDateChange">
 | 
				
			||||||
                    <view class="picker">
 | 
					                    <view class="picker" bindtap="hideEv">
 | 
				
			||||||
                        {{start_date?start_date:'请选择开始时间'}}
 | 
					                        {{start_date?start_date:'请选择开始时间'}}
 | 
				
			||||||
                    </view>
 | 
					                    </view>
 | 
				
			||||||
                </picker>
 | 
					                </picker>
 | 
				
			||||||
                    —
 | 
					                    —
 | 
				
			||||||
                <picker mode="date" value="{{end_date}}" class="time-picker" start="2015-09-01" end="2050-09-01" mark:type="end" bindchange="bindDateChange">
 | 
					                <picker mode="date" value="{{end_date}}" class="time-picker" start="2015-09-01" end="2050-09-01" mark:type="end" bindchange="bindDateChange">
 | 
				
			||||||
                    <view class="picker">
 | 
					                    <view class="picker" bindtap="hideEv">
 | 
				
			||||||
                        {{end_date?end_date:'请选择结束时间'}}
 | 
					                        {{end_date?end_date:'请选择结束时间'}}
 | 
				
			||||||
                    </view>
 | 
					                    </view>
 | 
				
			||||||
                </picker>
 | 
					                </picker>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue