| | |
| | | </view> |
| | | <view class="content"> |
| | | <view class="header_bg"> |
| | | <div class="header-info"> |
| | | <!--<div class="header-info"> |
| | | <div class="left"> |
| | | <div class="weather-info"> |
| | | <image :src="`../../static/weather-icon/${curWeather.cond_code}.png`" mode="widthFix"></image> |
| | |
| | | <div class="cube" v-for="(i,index) in limitNum" :key="index">{{i}}</div> |
| | | </div> |
| | | </div> |
| | | --> |
| | | </view> |
| | | <view class="body"> |
| | | <div class="card remain"> |
| | |
| | | }); |
| | | return true |
| | | }, |
| | | onReady(){ |
| | | |
| | | }, |
| | | onLoad() { |
| | | let { |
| | | statusBarHeight, |
| | |
| | | } = uni.getSystemInfoSync() |
| | | this.statusBarHeight = statusBarHeight |
| | | this.navHeight = statusBarHeight + (system.indexOf('iOS') > -1 ? 40 : 44) |
| | | console.log(this.navHeight, "导航栏高度"); |
| | | }, |
| | | onPullDownRefresh(){ |
| | | console.log("refresh"); |
| | |
| | | |
| | | methods: { |
| | | init(){ |
| | | this.getWeatherInfo(); |
| | | // this.getWeatherInfo(); |
| | | this.getRemainNum(); |
| | | this.getLimitedNum(); |
| | | uni.stopPullDownRefresh(); |
| | | |
| | | }, |
| | | async getWeatherInfo(){ |
| | | /*async getWeatherInfo(){ |
| | | let res = await this.$api.syncRequest({ |
| | | url:'https://free-api.heweather.net/s6/weather/now?location=beijing&key=618660daa2144e1094ce8d2ef90516d4', |
| | | url:'https://free-api.heweather.net', |
| | | loading: true |
| | | }); |
| | | this.curWeather = res.data.HeWeather6[0].now; |
| | | }, |
| | | },*/ |
| | | async getRemainNum(){ |
| | | let res = await this.$api.syncRequest({ |
| | | url: '/basic/api/car/statistic', |