Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cf908663
authored
Mar 30, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
9f4e6d35
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
src/views/Store/list.vue
src/views/Store/list.vue
View file @
cf908663
...
...
@@ -540,21 +540,22 @@ export default {
* @param type 是否加30天
* @returns {string}
*/
getTime
(
date
,
type
)
{
getTimes
(
date
,
type
)
{
if
(
type
)
{
var
date
=
new
Date
(
new
Date
(
date
).
getTime
()
+
31
*
24
*
60
*
60
*
1000
);
}
else
{
var
date
=
new
Date
(
date
);
}
var
year
=
date
.
getFullYear
();
var
month
=
date
.
getMonth
()
+
1
;
if
(
type
)
{
var
day
=
date
.
getDate
()
+
30
;
}
else
{
var
day
=
date
.
getDate
();
}
var
hour
=
date
.
getHours
()
<
10
?
'0'
+
date
.
getHours
()
:
date
.
getHours
();
var
minute
=
date
.
getMinutes
()
<
10
?
'0'
+
date
.
getMinutes
()
:
date
.
getMinutes
();
var
second
=
date
.
getSeconds
()
<
10
?
'0'
+
date
.
getSeconds
()
:
date
.
getSeconds
();
month
>=
1
&&
month
<=
9
?
(
month
=
'0'
+
month
)
:
''
;
day
>=
0
&&
day
<=
9
?
(
day
=
'0'
+
day
)
:
''
;
var
timer
=
year
+
'-'
+
month
+
'-'
+
day
+
' '
+
hour
+
':'
+
minute
+
':'
+
second
;
var
timer
=
year
+
'-'
+
month
+
'-'
+
day
+
' '
+
0
+
':'
+
0
+
':'
+
0
;
return
timer
;
},
/**
...
...
@@ -601,17 +602,17 @@ export default {
//修改上架有效期
this
.
dialogVisible3
=
true
;
let
currentTime
=
new
Date
().
getTime
();
//当前日期毫秒
let
currentTimeFormate
=
this
.
getTime
(
new
Date
());
//当前日期格式化
let
currentTimeFormate
=
this
.
getTime
s
(
new
Date
());
//当前日期格式化
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectData
[
i
].
cp_time_temp
=
this
.
selectData
[
i
].
cp_time
;
var
time
=
Date
.
parse
(
this
.
selectData
[
i
].
cp_time
);
//上架有效期
if
(
time
>
currentTime
)
{
//上架有效期大于当前日期
this
.
selectData
[
i
].
cp_time
=
this
.
getTime
(
this
.
selectData
[
i
].
cp_time
,
true
);
this
.
selectData
[
i
].
cp_time
=
this
.
getTime
s
(
this
.
selectData
[
i
].
cp_time
,
true
);
}
else
{
//上架有效期小于等于当前日期
this
.
selectData
[
i
].
cp_time
=
this
.
getTime
(
new
Date
(),
true
);
this
.
selectData
[
i
].
cp_time
=
this
.
getTime
s
(
new
Date
(),
true
);
}
}
this
.
cpdata
=
this
.
selectData
;
...
...
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