Commit f48e7316 by liang ce

修改首页

parent 51ff38cd
import { login } from './login'
import { login } from "./login";
export default function http(data) {
if (getApp().globalData.token !== '') {
if (getApp().globalData.token !== "") {
return new Promise((resolve, rejects) => {
dd.httpRequest({
headers: {
// "Content-Type": `${ data.method === 'POST' ? 'application/x-www-form-urlencoded' : 'application/json' }`,
"Content-Type": 'application/json;charset=UTF-8',
"Authorization": `Bearer ${getApp().globalData.token}`
"Content-Type": "application/json;charset=UTF-8",
Authorization: `Bearer ${getApp().globalData.token}`
},
url: `${getApp().globalData.globalUrl}${data.url}`,
method: data.method,
dataType: 'json',
dataType: "json",
data: data.data,
success: function (res) {
success: function(res) {
if (res.data.code == 0) {
resolve(res);
} else {
dd.alert({
content: '网络异常',
buttonText: '确定'
})
content: "网络异常",
buttonText: "确定"
});
}
},
fail: function (res) {
fail: function(res) {
dd.alert({
content: '网络异常',
buttonText: '确定'
})
rejects(res)
content: "网络异常",
buttonText: "确定"
});
rejects(res);
}
})
})
});
});
} else {
return new Promise((resolve, rejects) => {
login().then(res => {
const { oapiUser } = res.data.data;
getApp().globalData.token = res.data.data.accessToken.access_token
getApp().globalData.name = res.data.data.oapiUser.name
getApp().globalData.userid = res.data.data.oapiUser.userid
getApp().globalData.avatar = res.data.data.oapiUser.avatar
getApp().globalData.userInfo = JSON.stringify({ username: oapiUser.name, userId: oapiUser.userid, headUrl: oapiUser.avatar, "platform": "dingtalk" })
getApp().globalData.token = res.data.data.accessToken.access_token;
getApp().globalData.name = res.data.data.oapiUser.name;
getApp().globalData.userid = res.data.data.oapiUser.userid;
getApp().globalData.avatar = res.data.data.oapiUser.avatar;
getApp().globalData.userInfo = JSON.stringify({
username: oapiUser.name,
userId: oapiUser.userid,
headUrl: oapiUser.avatar,
platform: "dingtalk"
});
dd.httpRequest({
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${getApp().globalData.token}`
Authorization: `Bearer ${getApp().globalData.token}`
},
url: `${getApp().globalData.globalUrl}${data.url}`,
method: data.method,
data: data.data,
dataType: 'json',
success: function (res) {
resolve(res)
dataType: "json",
success: function(res) {
resolve(res);
},
fail: function (res) {
rejects(res)
fail: function(res) {
rejects(res);
}
})
})
})
});
});
});
}
}
\ No newline at end of file
}
{
"pages": [
"pages/scheduleList/scheduleList",
"pages/index/index",
"pages/meetingDetail/meetingDetail",
"pages/excutorList/excutorList",
......
@import "../../template/loading/loading.acss";
.index {
background: #FFFFFF;
}
.scheduleHeader {
/* position: fixed;
top: 0;
left: 0; */
width: 100%;
height: 88rpx;
background: #FFFFFF;
line-height: 88rpx;
padding: 0 32rpx;
display: flex;
justify-content: space-between;
box-shadow: 0 1rpx 8rpx 0 rgba(0, 0, 0, 0.04);
z-index: 9;
}
.scheduleHeader view:nth-of-type(1) {
flex: 1;
}
.scheduleHeader view:nth-of-type(2) {
width: 40rpx;
height: 40rpx;
}
.sidebar {
position: fixed;
left: -750rpx;
top: 0;
width: 750rpx;
height: 100%;
/* background: rgba(0, 0, 0, 0.19); */
z-index: 99;
}
.headerIcon {
position: relative;
}
.headerIcon>view {
position: absolute;
left: 28rpx;
top: 52rpx;
width: 12rpx;
height: 12rpx;
border: 2rpx solid #FFFFFF;
border-radius: 50%;
background: #EA0C28;
}
.headerIcon .iconicon_app1 {
font-size: 44rpx;
color: rgba(27, 38, 61, 0.4);
}
.sidebarContent {
background: #FFFFFF;
width: 640rpx;
height: 100%;
padding: 32rpx 0 32rpx 32rpx;
}
.sidebarLogo {
margin-bottom: 18rpx;
line-height: 64rpx;
font-size: 26rpx;
color: rgba(27, 38, 61, .56);
display: flex;
}
.sidebarLogo view:nth-of-type(1) {
margin-right: 34rpx;
width: 64rpx;
height: 64rpx;
border-radius: 50%;
background: #3070F2;
color: white;
overflow: hidden;
}
.sidebarLogo view:nth-of-type(1) image {
width: 64rpx;
height: 64rpx;
}
.hasAssociated, .unAssociated {
margin-top: 48rpx;
}
.associated {
font-size: 24rpx;
color: rgba(25, 31, 37, .56);
line-height: 34px;
margin-bottom: 16rpx;
}
.applicationList {
height: 104rpx;
display: flex;
align-items: center;
}
.applicationLogo {
width: 72rpx;
height: 72rpx;
margin-right: 24rpx;
}
.applicationMsg {
flex: 1;
display: flex;
border-bottom: 1px solid rgba(241, 243, 249, 1);
height: 104rpx;
align-items: center;
padding-right: 32rpx;
}
.applicationMsg>view:nth-of-type(1) {
flex: 1;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(1) {
font-size: 28rpx;
color: #191F25;
margin-bottom: 8rpx;
}
.applicationMsg>view:nth-of-type(1)>view:nth-of-type(2) {
opacity: 0.56;
font-size: 20rpx;
color: #191F25;
}
.operateIcon {
width: 32rpx;
height: 32rpx;
}
.operateIcon .iconright {
font-size: 22rpx;
color: rgba(27, 38, 61, .5)
}
.year, .month, .week, .date {
height: 96rpx;
font-size: 48rpx;
}
.year, .month, .week {
line-height: 96rpx;
padding-left: 32rpx;
}
.year, .month {
font-weight: bold;
font-family: 'DINAlternate-Bold';
}
.week {
font-size: 26rpx;
color: rgba(25, 31, 37, 0.39);
padding-left: 120rpx;
}
.date {
display: flex;
padding: 0 32rpx 0 0;
margin-bottom: 32rpx;
}
.today {
border-left: 8rpx solid rgba(234, 12, 40, 1);
}
.todayNoData {
height: 96rpx;
line-height: 96rpx;
padding-left: 16rpx;
font-size: 28rpx;
color: rgba(25, 31, 37, 0.39);
}
.todayNoData text:nth-of-type(2) {
color: rgba(25, 31, 37, 0.39);
}
.todayNoData text:nth-of-type(2) {
color: #191F25;
}
.overdue {
background: rgba(10, 10, 10, .034) !important;
color: rgba(10, 10, 10, .353) !important;
}
.overdue text {
color: rgba(10, 10, 10, .353) !important;
}
.overdueLabel {
color: rgba(10, 10, 10, .353) !important;
}
.cancel {
background: url(../../assests/cancel.png) center /100% 100% !important;
border: 1rpx solid rgba(97, 155, 212, 0.28) !important;
color: rgba(25, 31, 37, 0.56) !important;
}
.cancel text {
text-decoration: line-through;
}
.hasDateTitle {
display: flex;
align-items: center;
justify-content: center;
height: 96rpx;
width: 112rpx;
flex-direction: column;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
padding-top: 6rpx;
}
.hasDateTitle view:nth-of-type(1) {
font-size: 24rpx;
}
.hasDateTitle view:nth-of-type(2) {
font-size: 48rpx;
}
.scheduleBox {
flex: 1;
height: 96rpx;
padding: 16rpx;
background: rgba(10, 10, 10, 0.05);
border-radius: 4px;
}
.scheduleTitle {
font-weight: 500;
color: rgba(10, 10, 10, .72);
font-size: 28rpx;
margin-bottom: 10rpx;
line-height: 28rpx;
}
.scheduleTime {
font-size: 26rpx;
font-weight: 400;
color: rgba(10, 10, 10, .72);
line-height: 26rpx;
}
.cancel {
width: 602rpx;
overflow: hidden;
background: url(../../assests/cancel.png) center /100% 100%;
border: 1rpx solid rgba(25, 31, 37, 0.28);
color: rgba(25, 31, 37, 0.56);
}
.indexScrollView {
height: calc( 100vh - 88rpx);
}
\ No newline at end of file
<import src="../../template/loading/loading.axml"/>
<view a:if="{{!loading}}">
<view class="scheduleHeader">
<view>2020年3月</view>
<view onTap="changesidebar" class="headerIcon">
<text class="iconfont iconicon_app1">
</text>
<view>
</view>
</view>
</view>
<scroll-view class="indexScrollView" scroll-y="{{true}}" style="background: #FFFFFF" lower-threshold="1000" onScrollToLower="lower" scroll-into-view="{{todayStr}}">
<block a:for="{{scheduleList}}">
<!-- 年 -->
<block a:if="{{item.type == 'year'}}">
<view class="year">
{{item.value}}年
</view>
</block>
<!-- 月 -->
<block a:elif="{{item.type == 'month'}}">
<view class="month">
{{item.value}}月
</view>
</block>
<!-- 周 -->
<block a:elif="{{item.type == 'week'}}">
<view class="week" id="{{item.dayStr}}">
{{item.value}}
</view>
</block>
<!-- 天 -->
<block a:elif="{{item.type == 'day' || item.type == 'today'}}">
<view class="date">
<view class="hasDateTitle {{item.type == 'today' ? 'today' : ''}} {{item.value.isBeOverdue ? 'overdueLabel':''}}">
<view>
{{item.week}}
</view>
<view>{{item.hasDateLabel}}</view>
</view>
<view class="scheduleBox {{item.value.isBeOverdue ? 'overdue' : item.value.confirmAttendance === 0 ? 'cancel' : ''}}" data-item="{{item.value}}" onTap="nextDetail">
<view class="scheduleTitle">
<text>{{item.value.title}}{{item.value.isDaySpan ? `(第${item.value.isFewDays}天,共${item.value.duration}天)` : '' }}</text>
</view>
<view class="scheduleTime">
<text a:if="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '0'}}">{{item.value.thisDayStartTime}}</text>
<text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '1'}}">全天</text>
<text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '2'}}">直到{{item.value.thisDayEndTime}}</text>
<text a:else>{{item.value.thisDayStartTime}} - {{item.value.thisDayEndTime}}</text>
</view>
</view>
</view>
</block>
<!-- 今天有无会议 -->
<block a:elif="{{item.type == 'thisDay'}}">
<view class="date" id="{{item.value.dateStr}}">
<view class="hasDateTitle today">
<view>
{{item.week}}
</view>
<view>{{item.hasDateLabel}}</view>
</view>
<view class="todayNoData">
<text>暂无日程安排,</text>
<text onTap="nextPage">创建日程</text>
</view>
</view>
</block>
</block>
</scroll-view>
<popup show="{{show}}" onClose="closePop" position="left">
<view class="sidebarContent" catchTap="preventSort">
<view class="sidebarLogo">
<view>
<image a:if="{{userMsg.headUrl}}" mode="scaleToFill" src="{{userMsg.headUrl}}" />
<text a:else>{{ userMsg.userName.slice(-1) }}</text>
</view>
<view>
{{ userMsg.userName }}
</view>
</view>
<view class="hasAssociated">
<view class="associated">
已关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
</view>
<view class="unAssociated">
<view class="associated">
可关联应用
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
<view class="applicationList">
<view class="applicationLogo">
</view>
<view class="applicationMsg">
<view>
<view>
Outlook日历
</view>
<view>
支持会议日程双向同步,实时同步日程信息等
</view>
</view>
<view class="operateIcon">
<text class="iconfont iconright"></text>
</view>
</view>
</view>
</view>
</view>
</popup>
</view>
<template is="loading" a:else>
</template>
\ No newline at end of file
import { RRule, RRuleSet, rrulestr } from "rrule";
import { getHomeUserSchedule1 } from "../../api/request";
import {
getFormatDate,
getCurrentMonthFirst,
getCurrentMonthLast,
throttle
} from "../../utils/utils";
import create from "dd-store";
create.Page({
data: {
userMsg: "",
$data: null,
response: "",
scheduleList: [],
todayStr: "",
thisYear: "",
maxYear: "",
minYear: "",
pageStartTime: "",
pageEndTime: "",
show: false,
scrollHeight: "",
timeStamp: "",
userMsg: {},
loading: true
},
onLoad() {
this.getDate();
this.setData({
userMsg: {
headUrl: getApp().globalData.avatar || "",
userName: getApp().globalData.name
}
});
this.$store.locationSchedule = () => {
this.locationScheduleList();
};
},
getDate: throttle(function(e) {
let data = {
startTime: "2020-01-01 00:00:00",
endTime: "2025-12-30 23:59:59"
};
let that = this;
getHomeUserSchedule1(data).then(res => {
that.setData(
{
response: res.data.data
},
() => {
let now = new Date();
let year = now.getFullYear();
let scheduleList = [];
for (let i = 0; i <= year - 2020; i++) {
scheduleList.push.apply(
scheduleList,
that.returnScheduleList(2020 + i)
);
}
// 第一次加载
const finalDate = new Date();
that.setData({
scheduleList: scheduleList,
todayStr: finalDate.toLocaleDateString(),
thisYear: year,
maxYear: year
});
}
);
that.setData({
loading: false
});
});
}, 1000),
nextDetail: throttle(function(e) {
let item = e.target.dataset.item;
dd.navigateTo({
url: `./../meetingDetail/meetingDetail?scheduleItem=${JSON.stringify(
item
)}`
});
}, 1000),
closePop() {
this.setData({
show: false
});
},
changesidebar() {
this.setData({
show: true
});
},
preventSort() {
return false;
},
// 返回删除的日期
returnExcludeDate(data) {
let returnData = {
scheduleList: [],
templateList: []
};
data.map(item => {
if (item.length > 10) {
returnData.templateList.push(
new Date(item.slice(6, 16).replace(/-/g, "/")).getTime()
);
} else {
returnData.scheduleList.push(item);
}
});
return {
scheduleList: returnData.scheduleList,
templateList: Math.min(...returnData.templateList)
};
},
// 生成用户时间段内的会议日程并返回会议日程List
getCalendarList() {
let that = this;
// 定义map数据结构
let scheduleMap = new Map();
// 对规则内的
if (this.data.response) {
this.data.response.templateList.map(item => {
// TO DO 判断所获取的时间区间
// 将会议的年,月,日拆分,时分拆分,生成rrules规则
let initialTime = item.initialTime.split("-");
let initialTimeDate = new Date(
parseInt(initialTime[0]),
parseInt(initialTime[1]) - 1,
parseInt(initialTime[2])
);
let initialTimeDateyear = initialTimeDate.getFullYear();
let initialTimeDatemonth =
initialTimeDate.getMonth() + 1 < 10
? "0" + (initialTimeDate.getMonth() + 1)
: initialTimeDate.getMonth() + 1;
let initialTimeDateday =
initialTimeDate.getDate() < 10
? "0" + initialTimeDate.getDate()
: initialTimeDate.getDate();
let startTimeList = item.startTime.split(":");
let DTSTART = `${initialTimeDateyear}${initialTimeDatemonth}${initialTimeDateday}T${startTimeList[0]}${startTimeList[1]}00Z`;
let rule = RRule.fromString(
`${item.recurrenceModel.recurrenceRule};DTSTART=${DTSTART}`
);
// rule.options.tzid = "";
// 判断是否需要剔除某一天
if (item.excludePlanDates) {
// 拿到剔除日期的list
let excludeDateList = that.returnExcludeDate(
item.excludePlanDates.split(",")
);
rule.all().map(item2 => {
let time = new Date(item2);
time.setHours(time.getHours() - 8);
let hasExclude =
excludeDateList.scheduleList.indexOf(excludeDate) === -1;
let excludeDate = getFormatDate(time, "yyyyMMdd", "-");
if (
new Date(time).getTime() < excludeDateList.templateList &&
hasExclude
) {
let startTime =
getFormatDate(time, "yyyyMMdd") +
" " +
item.recurrenceModel.startTime;
let endTime = new Date(
getFormatDate(time, "yyyyMMdd") +
" " +
item.recurrenceModel.startTime
);
endTime.setMinutes(
endTime.getMinutes() + item.recurrenceModel.duration
);
scheduleMap.set(
`${new Date(time).toLocaleDateString()}/${item.id}`,
{
confirmAttendance: item.confirmAttendance,
endTime: getFormatDate(endTime, "yyyyMMdd HH:mm:ss"),
scheduleTemplateId: item.id,
startTime: startTime,
title: item.title,
planDate: getFormatDate(time, "yyyyMMdd", "-")
}
);
}
});
} else {
rule.all().map(item2 => {
let time = new Date(item2);
time.setHours(time.getHours() - 8);
let startTime =
getFormatDate(time, "yyyyMMdd") +
" " +
item.recurrenceModel.startTime;
let endTime = new Date(
getFormatDate(time, "yyyyMMdd") +
" " +
item.recurrenceModel.startTime
);
endTime.setMinutes(
endTime.getMinutes() + item.recurrenceModel.duration
);
scheduleMap.set(
`${new Date(time).toLocaleDateString()}/${item.id}`,
{
confirmAttendance: item.confirmAttendance,
endTime: getFormatDate(endTime, "yyyyMMdd HH:mm:ss"),
scheduleTemplateId: item.id,
startTime: startTime,
title: item.title,
planDate: getFormatDate(time, "yyyyMMdd", "-")
}
);
});
}
});
let scheduleList = [];
this.data.response.scheduleList.map(item => {
if (!item.scheduleTemplateId) {
scheduleList.push(item);
} else if (
item.scheduleTemplateId &&
scheduleMap.get(
`${new Date(
item.planDate.replace(/-/g, "/")
).toLocaleDateString()}/${item.scheduleTemplateId}`
)
) {
scheduleMap.set(
`${new Date(
item.planDate.replace(/-/g, "/")
).toLocaleDateString()}/${item.scheduleTemplateId}`,
item
);
}
});
scheduleMap.forEach(function(value, key, map) {
scheduleList.push(value);
});
return scheduleList;
} else {
return [];
}
},
returnScheduleList(year) {
let that = this;
let weekList = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
let DateMap = new Map();
// 平年或闰年
let isLeapYear =
(year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 366 : 365;
let isFirstWeek = false;
for (let i = 1; i <= isLeapYear; i++) {
// 判断一月第一周的第一个周日
if (i <= 7 && new Date(year, 0, i).getDay() === 0) {
isFirstWeek = true;
}
` `;
// 是第一个月第一个周一
if (isFirstWeek) {
DateMap.set(`${new Date(year, 0, i).toLocaleDateString()}`, {
scheduleList: []
});
}
}
// 跨年的那几天不是周日
let num =
new Date(year, 0, isLeapYear).getDay() === 6
? 0
: 6 - new Date(year, 0, isLeapYear).getDay();
for (let i = 0; i <= num; i++) {
DateMap.set(`${new Date(year, 0, isLeapYear + i).toLocaleDateString()}`, {
scheduleList: []
});
}
let AllScheduleList = this.getCalendarList();
// 遍历所有日程
for (let y = 0; y < AllScheduleList.length; y++) {
let date1 = AllScheduleList[y].startTime.slice(0, 10).replace(/-/g, "/");
let date2 = AllScheduleList[y].endTime.slice(0, 10).replace(/-/g, "/");
let count = this.count(date1, date2);
for (let j = 0; j <= count; j++) {
let time = new Date(date1);
time.setDate(time.getDate() + j);
let keyDate = time.toLocaleDateString();
if (DateMap.get(keyDate)) {
DateMap.get(keyDate).scheduleList.push({
...AllScheduleList[y],
isDaySpan: count == 0 ? false : true,
isfirstDayOrEndDay: j === 0 ? "0" : j === count ? "2" : "1", // 0 第一天,1中间的天,2结束的天
thisDayStartTime: AllScheduleList[y].startTime.slice(11, 16),
thisDayEndTime: AllScheduleList[y].endTime.slice(11, 16),
isFewDays: j + 1,
duration: count + 1,
isBeOverdue:
new Date().getTime() >
new Date(AllScheduleList[y].endTime.replace(/-/g, "/")).getTime()
? true
: false
});
}
}
}
let DateList = [];
let listMonth = "";
// 第一个月的第一天
let listWeek = new Date(year, 0, 1).getDay() === 0 ? 1 : 2;
let thisDay = new Date().toLocaleDateString();
DateMap.forEach(function(value, key, map) {
const keyDate = new Date(key);
if (keyDate.getMonth() === 0 && keyDate.getDate() === 1) {
DateList.push({
type: "year",
value: keyDate.getFullYear(),
dateStr: keyDate.getFullYear()
});
}
if (keyDate.getDate() === 1) {
DateList.push({
type: "month",
value: keyDate.getMonth() + 1,
dateStr: `${keyDate.getFullYear()}/${keyDate.getMonth() +
1}/${keyDate.getDate()}`
});
}
if (keyDate.getDay() === 0) {
let rangeYear1 = keyDate.getFullYear();
let rangeMonth1 = keyDate.getMonth();
let rangeDay1 = keyDate.getDate();
let rangeDate = new Date(rangeYear1, rangeMonth1, rangeDay1 + 6);
let rangeMonth2 = new Date(rangeDate).getMonth();
let rangeDay2 = new Date(rangeDate).getDate();
DateList.push({
type: "week",
value: `第${listWeek}周,${rangeMonth1 + 1}${rangeDay1}日 - ${
rangeMonth2 == rangeMonth1 ? "" : rangeMonth2 + 1 + "月"
}${rangeDay2}日`,
dayStr: `${keyDate.getFullYear()}${listWeek}周`
});
listWeek += 1;
}
// 有日程长度 并且不是今天
if (value.scheduleList.length !== 0 && key !== thisDay) {
value.scheduleList.map((item, index) => {
if (index === 0) {
DateList.push({
type: "day",
week: weekList[keyDate.getDay()],
hasDateLabel:
keyDate.getDate() < 10
? "0" + keyDate.getDate()
: keyDate.getDate(),
value: item,
dateStr: `${key}/${item.id}`
});
} else {
DateList.push({
type: "day",
value: item,
dateStr: `${key}/${item.id}`
});
}
});
}
// 有日程长度,并且是今天
else if (value.scheduleList.length !== 0 && key === thisDay) {
value.scheduleList.map((item, index) => {
if (index === 0) {
DateList.push({
type: "today",
week: weekList[keyDate.getDay()],
hasDateLabel:
keyDate.getDate() < 10
? "0" + keyDate.getDate()
: keyDate.getDate(),
value: item,
dateStr: `${key}/${item.id}`
});
} else {
DateList.push({
type: "today",
value: item,
dateStr: `${key}/${item.id}`
});
}
});
}
if (value.scheduleList.length === 0 && key === thisDay) {
DateList.push({
type: "thisDay",
value: "",
hasDateLabel:
keyDate.getDate() < 10
? "0" + keyDate.getDate()
: keyDate.getDate(),
week: weekList[keyDate.getDay()],
dateStr: key
});
}
});
return DateList;
},
// 是否跨天 返回跨天数
count(date1, date2) {
var date1 = new Date(date1);
var date2 = new Date(date2);
var date =
(date2.getTime() - date1.getTime()) /
(1000 * 60 * 60 * 24); /*不用考虑闰年否*/
return date;
},
lower() {
let year = this.data.maxYear + 1;
let DateList = this.returnScheduleList(year);
let scheduleList = this.data.scheduleList;
scheduleList.push.apply(DateList);
this.setData({
scheduleList,
maxYear: year
});
},
nextPage() {
dd.navigateTo({ url: "./../createMeeting/createMeeting" });
},
locationScheduleList() {
this.setData(
{
todayStr: ""
},
() => {
this.setData({
todayStr: new Date().toLocaleDateString()
});
this.$store.data.isLocation = false;
this.update();
}
);
}
});
{
"usingComponents": {
"popup": "../../components/popup/index"
}
}
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