Commit 733888e0 by fengzhaoyu

点按钮击

parents 0496a620 c183fe36
......@@ -487,7 +487,7 @@ create.Page({
})
},
// 编辑日程
editSchedule(event) {
editSchedule: throttle(function (event) {
switch (event.target.dataset.icon) {
case 'iconchongfu':
dd.navigateTo({ url: `./../repeatMechanism/repeatMechanism` })
......@@ -535,7 +535,7 @@ create.Page({
})
break;
}
},
}, 1000),
// 选择终止时间
selectTerminal() {
dd.navigateTo(({ url: `./../repetitionTime/repetitionTime` }))
......
......@@ -40,6 +40,7 @@ Page({
const today = new Date()
const finalDate = new Date(today)
finalDate.setDate(today.getDate() - today.getDay())
console.log(finalDate.toLocaleDateString())
that.setData({
scheduleList: scheduleList,
todayStr: finalDate.toLocaleDateString(),
......
......@@ -44,10 +44,10 @@
</view>
<view class="reserveRoomNumAndLocation">
<view class="reserveRoomNum">
<text class="locationIcon iconfont icondingwei1"></text>{{item.capacityNum}}
<text class="locationIcon iconfont iconcanhuiren"></text>{{item.capacityNum}}
</view>
<view class="reserveRoomLocation">
<text class="locationIcon iconfont iconcanhuiren"></text>{{item.locationName}}
<text class="locationIcon iconfont icondingwei1"></text>{{item.locationName}}
</view>
</view>
</view>
......
......@@ -21,10 +21,11 @@
</view>
<view class="mettingRoomDetail">
<view class="num">
<text class="numIcon iconfont iconbeifangren"></text>
<text class="numIcon iconfont iconcanhuiren"></text>
<text>{{item.capacityNum}}</text>
</view>
<view class="equipment">
<view class="equipment" a:if="{{item.equipFacilityLabelList}}">
<text class="numIcon iconfont icondingwei1"></text>
<text a:for="{{item.equipFacilityLabelList}}" a:for-item="equipmentList">{{equipmentList.name}}</text>
</view>
</view>
......
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import {queryAvailableMeetingRoomByTime} from './../../api/request'
import { queryAvailableMeetingRoomByTime } from './../../api/request'
import { throttle } from './../../utils/utils.js'
create.Page({
store: exampleStore,
useAll: true,
......@@ -44,7 +46,7 @@ create.Page({
place: event.detail.value
})
},
toRoomList() {
toRoomList: throttle(function () {
dd.navigateTo({ url: `./../meetingRoomList/meetingRoomList` })
}
}, 1000)
});
import create from 'dd-store'
import exampleStore from '/stores/exampleStore'
import { throttle } from './../../utils/utils.js'
create.Page({
store: exampleStore,
useAll: true,
......@@ -40,11 +42,11 @@ create.Page({
saveTime: this.data.saveTime
})
},
save() {
save: throttle(function () {
this.store.data.aheadTimes = this.data.saveTime
this.update()
dd.navigateBack({
delta: 1
})
}
}, 1000)
});
......@@ -222,7 +222,7 @@ create.Page({
})
},
// 跳转下一页
nextPage(event) {
nextPage: throttle(function (event) {
switch (event.target.dataset.nextPage) {
case 'participants':
dd.navigateTo({ url: `./../attendingSituation/attendingSituation?userList=${JSON.stringify(this.store.data.userList)}&organizer=${this.data.organizer}` })
......@@ -238,7 +238,8 @@ create.Page({
dd.navigateTo({ url: `./../editFile/editFile?file=${JSON.stringify(event.target.dataset.file)}` })
break;
}
},
}, 1000),
// 判断是刚刚 五分钟以内 十分钟以内 正常时间年月日
dealFileTime(creatTime) {
console.log(creatTime, 111111)
......
......@@ -4,10 +4,10 @@ export function throttle(fn, gapTime) {
gapTime = 1500
}
let _lastTime = null
return function (e) {
let _nowTime = + new Date()
return function () {
let _nowTime = new Date()
if (_nowTime - _lastTime > gapTime || !_lastTime) {
fn(e)
fn.apply(this, arguments) //将this和参数传给原函数
_lastTime = _nowTime
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment