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
150d249a
Commit
150d249a
authored
Apr 03, 2020
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态更新时间处理,动态文案处理,首页定位,
parent
38672136
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
86 deletions
+84
-86
myDynamic.axml
PageComponents/myDynamic/myDynamic.axml
+2
-2
myDynamic.js
PageComponents/myDynamic/myDynamic.js
+7
-44
scheduleList.js
PageComponents/scheduleList/scheduleList.js
+46
-30
index.acss
pages/index/index.acss
+13
-4
index.axml
pages/index/index.axml
+3
-3
index.js
pages/index/index.js
+10
-2
exampleStore.js
stores/exampleStore.js
+3
-1
No files found.
PageComponents/myDynamic/myDynamic.axml
View file @
150d249a
...
...
@@ -13,8 +13,8 @@
<block a:for="{{item.meetingLogDataList.slice(0,2)}}" a:for-item="dynamicItem">
<view class="userDynamic">
<view class="dynamicTime">
<text>{{dynamicItem.c
reatorInfo.username}}更新了{{dynamicItem.category == 2 ? '文件' : '任务'
}}</text>
<text>{{createTime}}</text>
<text>{{dynamicItem.c
ontent
}}</text>
<text>{{
dynamicItem.
createTime}}</text>
</view>
<file-list a:if="{{dynamicItem.category === '2'}}" fileView="{{dynamicItem.meetingLogResource}}" isCanEdit="{{false}}"/>
<view class="dynamicFile" a:if="{{dynamicItem.category === '3'}}">
...
...
PageComponents/myDynamic/myDynamic.js
View file @
150d249a
...
...
@@ -21,8 +21,8 @@ Component({
didMount
()
{
this
.
getPages
(
1
);
},
didUpdate
()
{
},
didUnmount
()
{
},
didUpdate
()
{},
didUnmount
()
{},
methods
:
{
getPages
(
current
)
{
let
that
=
this
;
...
...
@@ -47,6 +47,11 @@ Component({
item
.
meetingLogDataList
[
i
].
creatorInfo
);
}
if
(
item
.
meetingLogDataList
[
i
].
createTime
)
{
item
.
meetingLogDataList
[
i
].
createTime
=
dealFileTime
(
item
.
meetingLogDataList
[
i
].
createTime
);
}
let
itemData
=
item
.
meetingLogDataList
[
i
].
meetingLogResource
;
if
(
itemData
)
{
if
(
itemData
.
taskInfos
||
itemData
.
fileInfos
)
{
...
...
@@ -95,48 +100,6 @@ Component({
}
});
},
// touchstart(e) {
// this.setData({
// startX: e.changedTouches[0].clientX,
// startY: e.changedTouches[0].clientY,
// isTouchMove: this.data.isTouchMove
// ? !this.data.isTouchMove
// : this.data.isTouchMove
// });
// },
// touchmove(e) {
// var that = this,
// startX = that.data.startX, //开始X坐标
// startY = that.data.startY, //开始Y坐标
// touchMoveX = e.changedTouches[0].clientX, //滑动变化坐标
// touchMoveY = e.changedTouches[0].clientY, //滑动变化坐标
// //获取滑动角度
// angle = that.angle(
// { X: startX, Y: startY },
// { X: touchMoveX, Y: touchMoveY }
// );
// var isTouchMove;
// //滑动超过30度角 return
// if (Math.abs(angle) > 30) return;
// if (touchMoveX > startX) {
// //右滑
// isTouchMove = false;
// } else {
// //左滑
// isTouchMove = true;
// }
// //更新数据
// that.setData({
// isTouchMove: isTouchMove,
// touchMoveId: e.currentTarget.dataset.id
// });
// },
// angle(start, end) {
// var _X = end.X - start.X,
// _Y = end.Y - start.Y;
// //返回角度 /Math.atan()返回数字的反正切值
// return (360 * Math.atan(_Y / _X)) / (2 * Math.PI);
// },
changeCollection
(
e
)
{
let
that
=
this
;
let
index
=
e
.
target
.
dataset
.
index
;
...
...
PageComponents/scheduleList/scheduleList.js
View file @
150d249a
...
...
@@ -41,6 +41,9 @@ create.Component({
this
.
update
();
this
.
getDate
();
}
if
(
!
this
.
props
.
update
&&
this
.
$store
.
data
.
isLocation
)
{
this
.
changeLocation
();
}
},
didUnmount
()
{},
methods
:
{
...
...
@@ -370,8 +373,9 @@ create.Component({
});
let
thisDay
=
new
Date
().
toLocaleDateString
();
DateMap
.
forEach
(
function
(
value
,
key
,
map
)
{
const
keyDate
=
new
Date
(
key
);
if
(
new
Date
(
key
)
.
getDay
()
===
0
&&
keyDate
.
getDay
()
===
0
&&
that
.
count
(
key
,
new
Date
(
year
,
0
,
isLeapYear
?
366
:
365
).
toLocaleDateString
()
...
...
@@ -379,15 +383,15 @@ create.Component({
)
{
listWeek
=
listWeek
+
1
;
// 有此月份
if
(
new
Date
(
key
)
.
getMonth
()
!==
listMonth
)
{
listMonth
=
new
Date
(
key
)
.
getMonth
();
if
(
keyDate
.
getMonth
()
!==
listMonth
)
{
listMonth
=
keyDate
.
getMonth
();
DateList
.
push
({
type
:
"month"
,
value
:
new
Date
(
key
)
.
getMonth
()
+
1
value
:
keyDate
.
getMonth
()
+
1
});
let
rangeYear1
=
new
Date
(
key
)
.
getFullYear
();
let
rangeMonth1
=
new
Date
(
key
)
.
getMonth
();
let
rangeDay1
=
new
Date
(
key
)
.
getDate
();
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
();
...
...
@@ -401,9 +405,9 @@ create.Component({
}
// 没有此月份
else
{
let
rangeYear1
=
new
Date
(
key
)
.
getFullYear
();
let
rangeMonth1
=
new
Date
(
key
)
.
getMonth
();
let
rangeDay1
=
new
Date
(
key
)
.
getDate
();
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
();
...
...
@@ -416,15 +420,12 @@ create.Component({
});
}
}
else
if
(
new
Date
(
key
).
getDay
()
===
0
&&
that
.
count
(
new
Date
(
key
),
new
Date
(
year
,
0
,
isLeapYear
?
366
:
365
)
<
7
)
keyDate
.
getDay
()
===
0
&&
that
.
count
(
keyDate
,
new
Date
(
year
,
0
,
isLeapYear
?
366
:
365
)
<
7
)
)
{
let
rangeYear1
=
new
Date
(
key
)
.
getFullYear
();
let
rangeMonth1
=
new
Date
(
key
)
.
getMonth
();
let
rangeDay1
=
new
Date
(
key
)
.
getDate
();
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
();
...
...
@@ -445,10 +446,10 @@ create.Component({
value
:
{
value
:
value
.
scheduleList
,
day
:
new
Date
(
key
)
.
getDate
()
<
10
?
"0"
+
new
Date
(
key
)
.
getDate
()
:
new
Date
(
key
)
.
getDate
(),
week
:
weekList
[
new
Date
(
key
)
.
getDay
()]
keyDate
.
getDate
()
<
10
?
"0"
+
keyDate
.
getDate
()
:
keyDate
.
getDate
(),
week
:
weekList
[
keyDate
.
getDay
()]
}
});
}
...
...
@@ -459,10 +460,10 @@ create.Component({
value
:
{
value
:
value
.
scheduleList
,
day
:
new
Date
(
key
)
.
getDate
()
<
10
?
"0"
+
new
Date
(
key
)
.
getDate
()
:
new
Date
(
key
)
.
getDate
(),
week
:
weekList
[
new
Date
(
key
)
.
getDay
()],
keyDate
.
getDate
()
<
10
?
"0"
+
keyDate
.
getDate
()
:
keyDate
.
getDate
(),
week
:
weekList
[
keyDate
.
getDay
()],
dateStr
:
key
}
});
...
...
@@ -473,10 +474,10 @@ create.Component({
value
:
{
value
:
value
.
scheduleList
,
day
:
new
Date
(
key
)
.
getDate
()
<
10
?
"0"
+
new
Date
(
key
)
.
getDate
()
:
new
Date
(
key
)
.
getDate
(),
week
:
weekList
[
new
Date
(
key
)
.
getDay
()],
keyDate
.
getDate
()
<
10
?
"0"
+
keyDate
.
getDate
()
:
keyDate
.
getDate
(),
week
:
weekList
[
keyDate
.
getDay
()],
dateStr
:
key
}
});
...
...
@@ -505,6 +506,21 @@ create.Component({
},
nextPage
()
{
dd
.
navigateTo
({
url
:
"./../createMeeting/createMeeting"
});
},
changeLocation
()
{
this
.
setData
(
{
todayStr
:
""
},
()
=>
{
this
.
setData
({
todayStr
:
new
Date
().
toLocaleDateString
()
});
this
.
$store
.
data
.
isLocation
=
false
;
this
.
update
();
console
.
log
(
"更新完毕"
);
}
);
}
}
});
pages/index/index.acss
View file @
150d249a
...
...
@@ -28,7 +28,7 @@
.createMeeting {
position: absolute;
left: 50%;
top:
4
rpx;
top:
8
rpx;
font-size: 32rpx;
border-radius: 50%;
height: 84rpx;
...
...
@@ -50,10 +50,19 @@
.tabBarView {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 116rpx;
justify-content: center;
}
.tabBarView1 {
padding-left: 140rpx;
align-items: flex-start;
}
.tabBarView2 {
padding-right: 140rpx;
align-items: flex-end;
}
.tabBarView>view {
...
...
@@ -84,7 +93,7 @@
.iconicon_days {
position: absolute;
left: 5rpx;
top:
6
rpx;
top:
8
rpx;
font-size: 30rpx;
}
...
...
pages/index/index.axml
View file @
150d249a
...
...
@@ -5,18 +5,18 @@
</my-dynamic>
</view>
<view a:if="{{tabBarIndex === '1'}}">
<my-schedule update="{{$data.indexNeedUpdate}}">
<my-schedule
isLocation="{{isLocation}}"
update="{{$data.indexNeedUpdate}}">
</my-schedule>
</view>
<view class="tabBar">
<view onTap="changeTabBar" data-tabbar='0'>
<view class="tabBarView {{tabBarIndex === '0' ? 'ischooseTabBar' : ''}}">
<view class="tabBarView
tabBarView1
{{tabBarIndex === '0' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_dynamic"></view>
<view>动态</view>
</view>
</view>
<view onTap="changeTabBar" data-tabbar='1'>
<view class="tabBarView {{tabBarIndex === '1' ? 'ischooseTabBar' : ''}}">
<view class="tabBarView
tabBarView2
{{tabBarIndex === '1' ? 'ischooseTabBar' : ''}}">
<view class="iconfont iconicon_Calendarbox1">
<text class="iconfont iconicon_days iconicon_days{{iconDay}}">
</text>
...
...
pages/index/index.js
View file @
150d249a
...
...
@@ -4,7 +4,8 @@ create.Page({
data
:
{
tabBarIndex
:
"0"
,
$data
:
null
,
iconDay
:
""
iconDay
:
""
,
isLocation
:
false
},
onLoad
()
{
let
iconDay
=
new
Date
().
getDate
();
...
...
@@ -19,12 +20,19 @@ create.Page({
},
// 修改tabBar
changeTabBar
(
e
)
{
let
nowtabBarIndex
=
this
.
data
.
tabBarIndex
;
this
.
setData
({
tabBarIndex
:
e
.
currentTarget
.
dataset
.
tabbar
});
if
(
nowtabBarIndex
===
e
.
currentTarget
.
dataset
.
tabbar
&&
e
.
currentTarget
.
dataset
.
tabbar
===
"1"
)
{
this
.
$store
.
data
.
isLocation
=
true
;
this
.
update
();
}
},
createMeeting
()
{
// isClicked(this)
dd
.
navigateTo
({
url
:
"./../createMeeting/createMeeting"
});
}
});
stores/exampleStore.js
View file @
150d249a
...
...
@@ -8,7 +8,8 @@ class Store {
originUsers
:
[],
originUsersId
:
[],
originalData
:
null
,
indexNeedUpdate
:
false
indexNeedUpdate
:
false
,
isLocation
:
false
}
}
export
default
new
Store
()
\ 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