Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
schedule
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
schedule
Commits
2b0826ba
Commit
2b0826ba
authored
Apr 21, 2020
by
xiexiaoqin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0点不算跨天会议,跨天会议排序
parent
23c8a1a4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
21 deletions
+17
-21
app.js
app.js
+4
-4
index.axml
pages/index/index.axml
+1
-1
index.js
pages/index/index.js
+2
-2
schedule.js
pages/index/schedule.js
+10
-14
No files found.
app.js
View file @
2b0826ba
...
@@ -23,9 +23,9 @@ App({
...
@@ -23,9 +23,9 @@ App({
userid
:
""
,
userid
:
""
,
name
:
""
,
name
:
""
,
userInfo
:
""
,
userInfo
:
""
,
//
globalUrl: "https://gateway-beta.mingwork.com", //beta地址
globalUrl
:
"https://gateway-beta.mingwork.com"
,
//beta地址
//
globalUrl2: "https://third-authentication-beta.mingwork.com"
globalUrl2
:
"https://third-authentication-beta.mingwork.com"
globalUrl
:
"https://gateway2.mingwork.com"
,
// 线上地址
//
globalUrl: "https://gateway2.mingwork.com", // 线上地址
globalUrl2
:
"https://third-authentication.mingwork.com"
//线上地址
//
globalUrl2: "https://third-authentication.mingwork.com" //线上地址
}
}
});
});
pages/index/index.axml
View file @
2b0826ba
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
<view class="scheduleTime">
<view class="scheduleTime">
<text a:if="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '0'}}">{{item.value.thisDayStartTime}}</text>
<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 === '1'}}">全天</text>
<text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '2'}}">
直到{{item.value.thisDayEndTime
}}</text>
<text a:elif="{{item.value.isDaySpan && item.value.isfirstDayOrEndDay === '2'}}">
{{ item.value.thisDayEndTime == '00:00' ? '全天' : '直到'+item.value.thisDayEndTime
}}</text>
<text a:else>{{item.value.thisDayStartTime}} - {{item.value.thisDayEndTime}}</text>
<text a:else>{{item.value.thisDayStartTime}} - {{item.value.thisDayEndTime}}</text>
</view>
</view>
</view>
</view>
...
...
pages/index/index.js
View file @
2b0826ba
...
@@ -89,7 +89,7 @@ create.Page({
...
@@ -89,7 +89,7 @@ create.Page({
this
.
setData
({
this
.
setData
({
listLoading
:
false
listLoading
:
false
});
});
le
t
scheduleItem
=
JSON
.
parse
(
Object
.
keys
(
event
)[
0
].
split
(
"="
)[
1
]);
cons
t
scheduleItem
=
JSON
.
parse
(
Object
.
keys
(
event
)[
0
].
split
(
"="
)[
1
]);
dd
.
navigateTo
({
dd
.
navigateTo
({
url
:
`./../meetingDetail/meetingDetail?scheduleItem=
${
encodeURIComponent
(
url
:
`./../meetingDetail/meetingDetail?scheduleItem=
${
encodeURIComponent
(
JSON
.
stringify
(
scheduleItem
)
JSON
.
stringify
(
scheduleItem
)
...
@@ -322,7 +322,7 @@ create.Page({
...
@@ -322,7 +322,7 @@ create.Page({
pushItem
.
duration
=
nextDateList
.
length
;
pushItem
.
duration
=
nextDateList
.
length
;
for
(
let
i
=
1
;
i
<
nextDateList
.
length
;
i
++
)
{
for
(
let
i
=
1
;
i
<
nextDateList
.
length
;
i
++
)
{
if
(
DateMap
.
has
(
nextDateList
[
i
]))
{
if
(
DateMap
.
has
(
nextDateList
[
i
]))
{
DateMap
.
get
(
nextDateList
[
i
]).
unshift
({
DateMap
.
get
(
nextDateList
[
i
]).
push
({
...
pushItem
,
...
pushItem
,
isFewDays
:
i
+
1
,
isFewDays
:
i
+
1
,
isfirstDayOrEndDay
:
nextDateList
.
length
-
1
===
i
?
"2"
:
"1"
// 0 第一天,1中间的天,2结束的天
isfirstDayOrEndDay
:
nextDateList
.
length
-
1
===
i
?
"2"
:
"1"
// 0 第一天,1中间的天,2结束的天
...
...
pages/index/schedule.js
View file @
2b0826ba
...
@@ -36,24 +36,20 @@ export function getExcludeDate(data = []) {
...
@@ -36,24 +36,20 @@ export function getExcludeDate(data = []) {
};
};
}
}
// 返回跨天数
// 返回跨天数
组
export
function
getNextDateList
(
startTime
,
endTime
)
{
export
function
getNextDateList
(
startTime
,
endTime
)
{
let
days
=
0
;
let
days
=
0
;
const
nextDateList
=
[];
const
nextDateList
=
[];
if
(
startTime
.
getDate
()
!==
endTime
.
getDate
())
{
//同一个月
//去掉时分
if
(
startTime
.
getMonth
()
==
endTime
.
getMonth
())
{
const
firstDate
=
new
Date
(
startTime
.
toLocaleDateString
());
days
=
endTime
.
getDate
()
-
startTime
.
getDate
();
const
secondDate
=
new
Date
(
endTime
.
toLocaleDateString
());
}
days
=
parseInt
(
Math
.
abs
(
firstDate
.
getTime
()
-
secondDate
.
getTime
())
/
(
1000
*
60
*
60
*
24
));
//跨月
else
{
if
(
endTime
.
getHours
()
==
0
&&
endTime
.
getMinutes
()
==
0
)
{
// 一个月份有多少天new Date(year, month, 0).getDate()
days
-=
1
;
const
startMonth
=
new
Date
(
startTime
.
getFullYear
(),
startTime
.
getMonth
(),
0
).
getDate
();
days
=
startMonth
-
startTime
.
getDate
()
+
endTime
.
getDate
()
}
}
else
{
//跨一个月 不考虑
}
}
//返回跨天的日期数组
//返回跨天的日期数组
for
(
let
i
=
0
;
i
<=
days
;
i
++
)
{
for
(
let
i
=
0
;
i
<=
days
;
i
++
)
{
const
newDate
=
new
Date
(
startTime
);
const
newDate
=
new
Date
(
startTime
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment