Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
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
wangxuelai
wechatapp.shangjiadao.com
Commits
df84a8ba
Commit
df84a8ba
authored
May 14, 2019
by
sujie@126.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddd
parent
e1896355
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
44 deletions
+65
-44
index.wxss
business/pages/calendarclock/index.wxss
+1
-1
index.js
business/pages/calendarthemeeditor/index.js
+31
-2
index.js
src/pages/mycalendart/index.js
+18
-41
index.wxss
src/pages/mycalendart/index.wxss
+15
-0
No files found.
business/pages/calendarclock/index.wxss
View file @
df84a8ba
...
...
@@ -151,7 +151,7 @@
background:rgba(101,184,244,1);
border-radius:50%;
color: #fff;
li
st-style
: 1;
li
ne-height
: 1;
display: flex;
align-items: center;
justify-content: center;
...
...
business/pages/calendarthemeeditor/index.js
View file @
df84a8ba
...
...
@@ -1076,6 +1076,9 @@ Page({
//选中的休息日
selectDays
()
{
const
weekArray
=
new
Array
(
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
);
const
_selectRestDays
=
this
.
data
.
selectRestDays
;
const
_weeks
=
this
.
data
.
weeks
;
const
arr
=
[]
// 当前休息日和选中休息日的差
const
days
=
getSelectedDay
().
map
(
function
(
item
,
index
)
{
return
{
show
:
(((
""
+
item
.
month
).
length
)
<
2
?
(
'0'
+
item
.
month
)
:
item
.
month
)
+
'-'
+
item
.
day
,
...
...
@@ -1085,12 +1088,38 @@ Page({
day
:
item
.
day
},
date
:
item
.
year
+
'-'
+
item
.
month
+
'-'
+
item
.
day
,
week
:
weekArray
[
item
.
week
]
week
:
weekArray
[
new
Date
(
item
.
year
+
'-'
+
item
.
month
+
'-'
+
item
.
day
).
getDay
()],
}
})
for
(
let
i
=
0
,
len
=
_selectRestDays
.
length
;
i
<
len
;
i
++
){
let
flag
=
true
;
for
(
let
j
=
0
,
len
=
days
.
length
;
j
<
len
;
j
++
){
if
(
JSON
.
stringify
(
_selectRestDays
[
i
].
data
)
==
JSON
.
stringify
(
days
[
j
].
data
)){
flag
=
false
;
break
;
}
}
if
(
flag
){
arr
.
push
(
_selectRestDays
[
i
])
}
}
for
(
let
i
=
0
,
len
=
_weeks
.
length
;
i
<
len
;
i
++
){
let
flag
=
false
;
for
(
let
j
=
0
,
len
=
arr
.
length
;
j
<
len
;
j
++
){
if
(
_weeks
[
i
].
name
.
slice
(
1
,
2
)
==
arr
[
j
].
week
){
flag
=
true
;
break
;
}
}
if
(
flag
){
_weeks
[
i
].
isSlect
=
false
;
}
}
this
.
setData
({
calenderShow
:
false
,
selectRestDays
:
days
selectRestDays
:
days
,
weeks
:
_weeks
})
},
getBetweenDateStr
(
start
,
end
)
{
...
...
src/pages/mycalendart/index.js
View file @
df84a8ba
...
...
@@ -251,61 +251,37 @@ Page({
// this.selfClockGet('up');
},
onShareAppMessage
:
function
(
option
)
{
// return custom share data when user share.
const
{
from
,
target
}
=
option
;
const
visitor
=
LocalStorage
.
getItem
(
'visitor'
);
const
nickName
=
visitor
.
userInfo
&&
visitor
.
userInfo
.
nickName
||
''
;
let
shareObj
=
{
}
const
{
from
,
target
}
=
option
;
let
initShareObj
=
{
title
:
`我正在参加【
${
this
.
data
.
circleInfo
.
title
}
】的打卡`
,
path
:
`/src/pages/themeindex/index?id=
${
this
.
data
.
id
}
&tid=
${
this
.
data
.
tid
}
`
title
:
`打卡日历`
,
path
:
`/src/pages/mycalendart/index?tid=
${
this
.
data
.
tid
}
&id=
${
this
.
data
.
id
}
&clockdate=
${
this
.
data
.
clockdate
}
`
}
let
shareObj
=
{
}
if
(
from
==
'menu'
)
{
shareObj
=
initShareObj
;
posterLog
({
poster_type
:
4
,
type
:
3
,
clock_circle_id
:
this
.
data
.
id
,
clock_subject_id
:
this
.
data
.
tid
})
}
else
if
(
from
==
'button'
)
{
if
(
!
target
.
dataset
.
info
)
{
shareObj
=
initShareObj
;
posterLog
({
poster_type
:
4
,
type
:
3
,
clock_circle_id
:
this
.
data
.
id
,
clock_subject_id
:
this
.
data
.
tid
})
}
else
{
const
{
target
:
{
dataset
:
{
info
}
}
}
=
option
;
posterLog
({
poster_type
:
6
,
type
:
3
,
clock_circle_id
:
this
.
data
.
id
,
clock_subject_id
:
this
.
data
.
themeSelect
.
id
,
clock_record_id
:
info
.
id
})
const
{
target
:
{
dataset
:
{
info
}}}
=
option
;
shareObj
=
{
title
:
`
${
info
.
school_student
.
nickname
}
的打卡详情`
,
path
:
`/src/pages/clockdetail/index?
id=
${
this
.
data
.
id
}
&tid=
${
this
.
data
.
themeSelect
.
id
}
&cid=
${
info
.
id
}
`
path
:
`/src/pages/clockdetail/index?
tid=
${
info
.
subject_
id
}
&cid=
${
info
.
id
}
`
}
}
}
return
{
title
:
shareObj
.
title
,
path
:
shareObj
.
path
,
success
:
(
res
)
=>
{
// 转发成功之后的回调
if
(
res
.
errMsg
==
'shareAppMessage:ok'
){
this
.
setData
({
shareObj
:
initShareObj
})
}
},
}
},
userShow
()
{
...
...
@@ -498,7 +474,6 @@ Page({
const
endD
=
data
.
calendar_set
.
end_time
.
split
(
" "
)[
0
]
const
nowD
=
res
.
datetime
.
split
(
" "
)[
0
]
let
fixdate
=
res
.
datetime
.
split
(
" "
)[
0
]
// 定位到日期
if
(
nowTime
>=
startTime
&&
nowTime
<=
endTime
)
{
data
.
themeStatus
=
1
;
// 进行中
// data.operationDate=[startD,nowD]
...
...
@@ -517,7 +492,8 @@ Page({
}
else
{
enableArea
([
this
.
numberDate
(
startD
),
this
.
numberDate
(
endD
)])
}
this
.
getWeeksDay
(
new
Date
(
res
.
datetime
),
rest_dates
,
clockDates
);
this
.
getWeeksDay
(
new
Date
(
res
.
datetime
.
replace
(
/-/g
,
'/'
)),
rest_dates
,
clockDates
);
const
clockendtime
=
data
.
calendar_set
.
clock_end_time
.
split
(
":"
);
const
clockstarttime
=
data
.
calendar_set
.
clock_start_time
.
split
(
":"
);
const
thisTime
=
res
.
datetime
.
split
(
" "
)[
1
].
split
(
":"
);
...
...
@@ -526,6 +502,7 @@ Page({
}
else
{
data
.
isClockTime
=
false
}
this
.
setData
({
mycalendar
:
data
,
joinedDate
:
data
.
joined_at
?
data
.
joined_at
.
split
(
' '
)[
0
].
replace
(
/-/g
,
'. '
)
:
''
,
...
...
src/pages/mycalendart/index.wxss
View file @
df84a8ba
...
...
@@ -148,4 +148,19 @@
position: absolute;
left: 0;
top: 0;
}
.riseDate-box {
text-align: center;
}
.riseDate-box .icon .btn{
width: 263rpx;
height: 145rpx;
}
.riseDate-box .text{
text-align: center;
font-size:26rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(0,0,0,.5);
padding-bottom: 35rpx;
}
\ No newline at end of file
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