Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 264f202f
authored
Mar 18, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 话术质检默认前一天
1 parent
3c05ae04
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
11 deletions
components/Calendar/Calendar_Function.js
packageEquity/pages/aiInspection/aiInspection.js
packageEquity/pages/aiInspection/components/dateBox/dateBox.js
packageEquity/pages/aiInspection/components/dateBox/dateBox.wxml
components/Calendar/Calendar_Function.js
View file @
264f202
...
...
@@ -114,11 +114,13 @@ class Calendar {
let
[
next_year
,
next_month
,
next_day
]
=
allowSameDay
?
today
.
split
(
separator
)
:
nextDay
.
split
(
separator
)
for
(
let
i
=
1
;
i
<=
days
;
i
++
)
{
let
todayStr
=
`
${
year
}${
separator
}${
month
}${
separator
}${
now_day
}
`
let
dayStr
=
`
${
year
}${
separator
}${
month
}${
separator
}${
i
<
10
?
`0
${
i
}
`
:
i
}
`
let
dayStr
=
`
${
year
}${
separator
}${
month
}${
separator
}${
i
<
10
?
`0
${
i
}
`
:
i
}
`
,
time
=
new
Date
(
`
${
year
}
/
${
month
}
/
${
i
}
`
).
getTime
()
let
obj
=
{
day
:
i
,
data
:
dayStr
,
active
:
now_year
==
year
&&
now_month
==
month
&&
i
==
Number
(
now_day
)
active
:
now_year
==
year
&&
now_month
==
month
&&
i
==
Number
(
now_day
),
time
}
if
((
minDate
&&
Date
.
parse
(
minDate
)
>
Date
.
parse
(
dayStr
))
||
(
maxDate
&&
Date
.
parse
(
maxDate
)
<
Date
.
parse
(
dayStr
)))
obj
.
disable
=
true
if
(
dateType
===
'multiple'
)
multipleDate
.
push
(
todayStr
)
...
...
packageEquity/pages/aiInspection/aiInspection.js
View file @
264f202
...
...
@@ -20,10 +20,11 @@ Page({
if
(
options
.
badgeId
)
this
.
loadData
(
options
)
},
loadData
(
params
)
{
const
day
=
new
Date
().
setDate
(
new
Date
().
getDate
()
-
1
)
this
.
setData
({
badgeId
:
params
.
badgeId
})
this
.
searchDate
=
new
Date
().
format
(
'yyyy-MM-dd'
)
this
.
searchDate
=
new
Date
(
day
).
format
(
'yyyy-MM-dd'
)
this
.
onLoadData
()
},
onLoadData
()
{
...
...
packageEquity/pages/aiInspection/components/dateBox/dateBox.js
View file @
264f202
// packageEquity/pages/aiInspection/components/dateBox/dateBox.js
const
defaultDay
=
new
Date
().
setDate
(
new
Date
().
getDate
()
-
1
)
Component
({
/**
...
...
@@ -16,7 +17,7 @@ Component({
* 组件的初始数据
*/
data
:
{
today
:
new
Date
().
format
(
'yyyy-MM-dd'
),
maxDate
:
new
Date
().
format
(
'yyyy-MM-dd'
),
},
...
...
@@ -25,13 +26,15 @@ Component({
*/
methods
:
{
init
()
{
const
now
=
new
Date
().
format
(
'yyyy/MM/dd'
)
const
now
=
new
Date
().
format
(
'yyyy/MM/dd'
),
calendar
=
this
.
selectComponent
(
'#calendar'
)
this
.
setData
({
currentDay
:
new
Date
().
format
(
'yyyy年MM月dd日'
),
today
Time
:
new
Date
(
now
).
getTime
(),
minTime
:
new
Date
(
'2024/1/1'
).
getTime
()
,
currentDayTime
:
new
Date
(
now
).
getTime
()
currentDay
:
new
Date
(
defaultDay
).
format
(
'yyyy年MM月dd日'
),
maxDate
Time
:
new
Date
(
now
).
getTime
(),
minTime
:
calendar
.
data
.
monthList
[
0
].
data
[
0
].
time
,
currentDayTime
:
new
Date
(
defaultDay
).
getTime
()
})
calendar
.
resetData
(
new
Date
(
defaultDay
).
format
(
'yyyy-MM-dd'
))
},
selectDay
(
e
)
{
let
{
...
...
packageEquity/pages/aiInspection/components/dateBox/dateBox.wxml
View file @
264f202
...
...
@@ -9,7 +9,7 @@
{{currentDay}}
<gl-image class="icon" src="/equity/date-arrow.png" />
</view>
<block wx:if="{{
today
Time != currentDayTime}}">
<block wx:if="{{
maxDate
Time != currentDayTime}}">
<view class="date-btn next" bindtap="choose" data-index="1">
下一天
<gl-image class="icon" src="/equity/arrow-right.png" />
...
...
@@ -17,5 +17,5 @@
</block>
</view>
<calendar shortcut bindselect='selectDay' calenderColor='#347BFF' vertical
minDate="2024-1-1" isComponents id="calendar" maxDate="{{today
}}" >
<calendar shortcut bindselect='selectDay' calenderColor='#347BFF' vertical
isComponents id="calendar" maxDate="{{maxDate
}}" >
</calendar>
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment