Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
c28b039a
Commit
c28b039a
authored
Oct 21, 2021
by
lshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
f24a082e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
transfer.ts
src/utils/time/transfer.ts
+21
-0
index.vue
src/views/Root/OutletManagement/index.vue
+3
-1
No files found.
src/utils/time/transfer.ts
View file @
c28b039a
...
@@ -20,6 +20,27 @@ export function transfterStrToDate(str: string) {
...
@@ -20,6 +20,27 @@ export function transfterStrToDate(str: string) {
end
=
`
${
d
.
getFullYear
()}
${
d
.
getMonth
()
+
1
}
${
d
.
getDate
()}
${
end
}
`
end
=
`
${
d
.
getFullYear
()}
${
d
.
getMonth
()
+
1
}
${
d
.
getDate
()}
${
end
}
`
const
startDate
=
new
Date
(
start
)
const
startDate
=
new
Date
(
start
)
const
endDate
=
new
Date
(
end
)
const
endDate
=
new
Date
(
end
)
console
.
log
(
start
,
'start'
);
return
[
startDate
,
endDate
]
}
else
{
return
undefined
}
}
// 早上9:00 下午17:00
export
function
transfterStrToDateSafari
(
str
:
string
)
{
const
arr
=
str
.
split
(
' '
)
if
(
arr
.
length
===
2
)
{
let
[
start
,
end
]
=
arr
start
=
start
.
replace
(
':'
,
':'
).
replace
(
'早上'
,
''
).
replace
(
'下午'
,
''
)
end
=
end
.
replace
(
':'
,
':'
).
replace
(
'早上'
,
''
).
replace
(
'下午'
,
''
)
const
d
=
new
Date
()
start
=
`
${
d
.
getFullYear
()}
/
${
d
.
getMonth
()
+
1
}
/
${
d
.
getDate
()}
${
start
}
`
end
=
`
${
d
.
getFullYear
()}
/
${
d
.
getMonth
()
+
1
}
/
${
d
.
getDate
()}
${
end
}
`
const
startDate
=
new
Date
(
start
)
const
endDate
=
new
Date
(
end
)
console
.
log
(
start
,
'start'
);
console
.
log
(
end
,
'end'
);
return
[
startDate
,
endDate
]
return
[
startDate
,
endDate
]
}
else
{
}
else
{
return
undefined
return
undefined
...
...
src/views/Root/OutletManagement/index.vue
View file @
c28b039a
...
@@ -470,6 +470,7 @@ import transferTimeStampToMoment, {
...
@@ -470,6 +470,7 @@ import transferTimeStampToMoment, {
getOpeningHoursFromMoment
,
getOpeningHoursFromMoment
,
getWeekendStatusFromArr
,
getWeekendStatusFromArr
,
transfterStrToDate
,
transfterStrToDate
,
transfterStrToDateSafari
}
from
"@/utils/time/transfer"
;
}
from
"@/utils/time/transfer"
;
import
{
getSelfOutLet
}
from
"@/utils/outlet/index"
;
import
{
getSelfOutLet
}
from
"@/utils/outlet/index"
;
import
{
getUserMsg
}
from
"@/utils/userMsg/userMsg"
;
import
{
getUserMsg
}
from
"@/utils/userMsg/userMsg"
;
...
@@ -780,7 +781,8 @@ export default Vue.extend({
...
@@ -780,7 +781,8 @@ export default Vue.extend({
this
.
formData
.
openDays
.
push
(
"6"
);
this
.
formData
.
openDays
.
push
(
"6"
);
this
.
formData
.
openDays
.
push
(
"7"
);
this
.
formData
.
openDays
.
push
(
"7"
);
}
}
const
arr2
=
transfterStrToDate
(
record
.
opening_hours
);
// const arr2 = transfterStrToDate(record.opening_hours);
const
arr2
=
transfterStrToDateSafari
(
record
.
opening_hours
);
console
.
log
(
transfterStrToDate
(
record
.
opening_hours
),
'transfterStrToDate'
);
console
.
log
(
transfterStrToDate
(
record
.
opening_hours
),
'transfterStrToDate'
);
console
.
log
(
arr2
,
'arr2'
);
console
.
log
(
arr2
,
'arr2'
);
...
...
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