Commit 0496a620 by fengzhaoyu

zancun

parent 9eb924b3
import create from 'dd-store' import create from 'dd-store'
import exampleStore from '/stores/exampleStore' import exampleStore from '/stores/exampleStore'
import { deleteSchedule, modifySchedule, addSchedule, getUserScheduleInTime, getHomeUserSchedule, getScheduleDetail } from '../../api/request.js' import { deleteSchedule, modifySchedule, addSchedule, getUserScheduleInTime, getHomeUserSchedule, getScheduleDetail } from '../../api/request.js'
import { isClicked } from './../../utils/utils.js' import { throttle } from './../../utils/utils.js'
create.Page({ create.Page({
store: exampleStore, store: exampleStore,
useAll: true, useAll: true,
...@@ -128,11 +128,11 @@ create.Page({ ...@@ -128,11 +128,11 @@ create.Page({
}, },
// 选择时间组件回调 // 选择时间组件回调
changeSelectTime(e) { changeSelectTime(e) {
console.log(e.time.substr(0,16)) console.log(e.time.substr(0, 16))
let that = this let that = this
let timeStr = e.time.substr(0,16) let timeStr = e.time.substr(0, 16)
if (e.status === 1) { if (e.status === 1) {
var date1 = new Date(timeStr.substr(0,16)); var date1 = new Date(timeStr.substr(0, 16));
var weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'] var weekList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
var w1 = weekList[date1.getDay()]; var w1 = weekList[date1.getDay()];
if (this.data.timeStaus == 0) { if (this.data.timeStaus == 0) {
...@@ -664,8 +664,7 @@ create.Page({ ...@@ -664,8 +664,7 @@ create.Page({
}) })
}, },
// 展示弹窗 // 展示弹窗
showModel() { showModel: throttle(function (e) {
isClicked(this)
if (!!this.data.scheduleItem) { if (!!this.data.scheduleItem) {
this.setData({ this.setData({
isShowPopupWindowList: true isShowPopupWindowList: true
...@@ -674,6 +673,5 @@ create.Page({ ...@@ -674,6 +673,5 @@ create.Page({
else { else {
this.saveCreate() this.saveCreate()
} }
}, 1000)
}
}); });
...@@ -164,4 +164,19 @@ page { ...@@ -164,4 +164,19 @@ page {
line-height: 98rpx; line-height: 98rpx;
background: #3296FA; background: #3296FA;
box-shadow: 0 8px 14px 0 rgba(50, 150, 250, 0.30); box-shadow: 0 8px 14px 0 rgba(50, 150, 250, 0.30);
}
.startPage {
position: fixed;
height: 100%;
top: 0;
width: 100%;
background: #fff;
}
.startPage>image {
width: 603rpx;
height: 444rpx;
vertical-align: top;
margin-top: 365rpx;
margin-left: 82rpx;
z-index: 999;
} }
\ No newline at end of file
...@@ -311,7 +311,7 @@ page { ...@@ -311,7 +311,7 @@ page {
} }
.participatorStaus { .participatorStaus {
border: 1rpx solid red; border: 1rpx solid #fff;
width: 20rpx; width: 20rpx;
height: 20rpx; height: 20rpx;
color: #fff; color: #fff;
......
import create from 'dd-store' import create from 'dd-store'
import exampleStore from '/stores/exampleStore' import exampleStore from '/stores/exampleStore'
import { isParticipate, getDynamicTip, addSchedule, delFile, getDynamic, deleteSchedule, getScheduleDetail, uploadPermissions, previewPermissions } from '../../api/request.js' import { isParticipate, getDynamicTip, addSchedule, delFile, getDynamic, deleteSchedule, getScheduleDetail, uploadPermissions, previewPermissions } from '../../api/request.js'
import { throttle } from './../../utils/utils.js'
create.Page({ create.Page({
store: exampleStore, store: exampleStore,
useAll: true, useAll: true,
......
...@@ -3,12 +3,11 @@ export function throttle(fn, gapTime) { ...@@ -3,12 +3,11 @@ export function throttle(fn, gapTime) {
if (gapTime == null || gapTime == undefined) { if (gapTime == null || gapTime == undefined) {
gapTime = 1500 gapTime = 1500
} }
let _lastTime = null let _lastTime = null
return function () { return function (e) {
let _nowTime = + new Date() let _nowTime = + new Date()
if (_nowTime - _lastTime > gapTime || !_lastTime) { if (_nowTime - _lastTime > gapTime || !_lastTime) {
fn() fn(e)
_lastTime = _nowTime _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