You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.3 KiB
60 lines
2.3 KiB
<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 one-title" wx:key="id" wx:for="{{info}}" wx:for-index="id" wx:for-item="item"> |
|
{{item.name}} |
|
</view> |
|
</view> |
|
</view> |
|
</view> |