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
1d3e86e1
Commit
1d3e86e1
authored
Oct 21, 2021
by
lshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
safari时间选择
parent
3fbafc18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
28 deletions
+2
-28
transfer.ts
src/utils/time/transfer.ts
+0
-4
index.vue
src/views/Root/OutletManagement/index.vue
+2
-24
No files found.
src/utils/time/transfer.ts
View file @
1d3e86e1
...
@@ -20,8 +20,6 @@ export function transfterStrToDate(str: string) {
...
@@ -20,8 +20,6 @@ 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
]
return
[
startDate
,
endDate
]
}
else
{
}
else
{
return
undefined
return
undefined
...
@@ -39,8 +37,6 @@ export function transfterStrToDateSafari(str: string) {
...
@@ -39,8 +37,6 @@ export function transfterStrToDateSafari(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'
);
console
.
log
(
end
,
'end'
);
return
[
startDate
,
endDate
]
return
[
startDate
,
endDate
]
}
else
{
}
else
{
return
undefined
return
undefined
...
...
src/views/Root/OutletManagement/index.vue
View file @
1d3e86e1
...
@@ -784,32 +784,10 @@ export default Vue.extend({
...
@@ -784,32 +784,10 @@ export default Vue.extend({
// const arr2 = transfterStrToDate(record.opening_hours);
// const arr2 = transfterStrToDate(record.opening_hours);
const
arr2
=
transfterStrToDateSafari
(
record
.
opening_hours
);
const
arr2
=
transfterStrToDateSafari
(
record
.
opening_hours
);
console
.
log
(
transfterStrToDate
(
record
.
opening_hours
),
'transfterStrToDate'
);
console
.
log
(
arr2
,
'arr2'
);
if
(
arr2
?.
length
===
2
)
{
if
(
arr2
?.
length
===
2
)
{
const
[
startDate
,
endDate
]
=
arr2
;
const
[
startDate
,
endDate
]
=
arr2
;
// this.formData.startTime = moment("00:00", "HH:mm");
this
.
formData
.
startTime
=
moment
(
startDate
,
"HH:mm"
);
// this.formData.endTime = moment("22:00", "HH:mm");
this
.
formData
.
endTime
=
moment
(
endDate
,
"HH:mm"
);
const
starh
=
startDate
.
getHours
()
<
10
?
'0'
+
startDate
.
getHours
():
startDate
.
getHours
()
+
''
const
starm
=
startDate
.
getMinutes
()
<
10
?
'0'
+
startDate
.
getMinutes
():
startDate
.
getMinutes
()
+
''
const
endh
=
endDate
.
getHours
()
<
10
?
'0'
+
endDate
.
getHours
():
endDate
.
getHours
()
+
''
const
endm
=
endDate
.
getMinutes
()
<
10
?
'0'
+
endDate
.
getMinutes
():
endDate
.
getMinutes
()
+
''
const
start
=
starh
+
':'
+
starm
const
end
=
endh
+
':'
+
endm
this
.
formData
.
startTime
=
moment
(
start
,
"HH:mm"
)
this
.
formData
.
endTime
=
moment
(
end
,
"HH:mm"
)
console
.
log
(
typeof
start
,
'start'
);
console
.
log
(
end
,
'end'
);
const
riqi
=
moment
(
startDate
,
"HH:mm"
)
console
.
log
(
riqi
,
'riqi'
);
console
.
log
(
startDate
,
'startDate'
);
console
.
log
(
starh
,
'starh'
);
console
.
log
(
arr2
,
'arr2'
);
console
.
log
(
arr2
[
0
],
'0'
);
}
}
const
ret
=
await
AddressService
.
getInstance
().
note
(
record
.
id
);
const
ret
=
await
AddressService
.
getInstance
().
note
(
record
.
id
);
if
(
ret
.
code
===
200
)
{
if
(
ret
.
code
===
200
)
{
...
...
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