|
|
|
<wxs module="tools">
|
|
|
|
var setTime = function(str,type) {
|
|
|
|
var timer = str.split('-');
|
|
|
|
if(type==='year'){
|
|
|
|
return timer[0];
|
|
|
|
}else{
|
|
|
|
return timer[1];
|
|
|
|
}
|
|
|
|
};
|
|
|
|
module.exports = {setTime:setTime};
|
|
|
|
</wxs>
|
|
|
|
<view class="pages">
|
|
|
|
<mp-navigation-bar ext-class="set-bar" title="日历" back="{{false}}"></mp-navigation-bar>
|
|
|
|
<view class="main">
|
|
|
|
<!-- 日历部分 -->
|
|
|
|
<view class="top">
|
|
|
|
<view class="address">
|
|
|
|
<picker mode="region" value="{{region}}" bindchange="bindAddressChange">
|
|
|
|
<view class="picker">
|
|
|
|
当前选择
|
|
|
|
</view>
|
|
|
|
</picker>
|
|
|
|
<text>{{cityName}}</text>
|
|
|
|
<image class="tag" src="../../assets/images/arrow-down.png"></image>
|
|
|
|
</view>
|
|
|
|
<view class="cal-box">
|
|
|
|
<image class="cal-back" src="../../assets/images/cal-back.png"></image>
|
|
|
|
<view class="calendar">
|
|
|
|
<view class="timer flex-center">
|
|
|
|
<text class="back-now" bindtap="backToday">回到今天</text>
|
|
|
|
<view class="t-box flex-center">
|
|
|
|
<picker mode="date" value="{{calendarDisplayTime}}" fields="month" start="1970-01"
|
|
|
|
bindchange="bindDateChange">
|
|
|
|
<view class="p-time">{{calendarDisplayTime}}</view>
|
|
|
|
</picker>
|
|
|
|
<view class="year">{{tools.setTime(calendarDisplayTime, 'year')}}年</view>
|
|
|
|
<view class="month">{{tools.setTime(calendarDisplayTime, 'month')}}月</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<ui-calendar ex-class="calendar-cm-month" bindonDayTap="onCalendarDayTap"
|
|
|
|
displayTime="{{calendarDisplayTime}}" selectedDate="{{calendarSelectedDate}}"
|
|
|
|
displayMonthNum="{{calendarDisplayMonthNum}}" is-show="{{isCalendarShow}}"></ui-calendar>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="tab">
|
|
|
|
<view class="tab-item {{item.id===active?'active':''}}" wx:for="{{tabList}}" wx:for-index="i" wx:for-item="item"
|
|
|
|
wx:key="id" bindtap="tabDowm" data-id="{{item.id}}">
|
|
|
|
<text class="tab-title">{{item.name}}</text>
|
|
|
|
<image class="tab-tag" src="../../assets/images/tab-tag.png"></image>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- 展示部分 -->
|
|
|
|
<view class="list">
|
|
|
|
<view class="item">
|
|
|
|
<text class="lable">{{timer}}</text>
|
|
|
|
<view class="info">
|
|
|
|
<text class="info-item" wx:key="id" wx:for="{{info}}" wx:for-index="id"
|
|
|
|
wx:for-item="item">{{item.name}}</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|