Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shareConfig
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
gic-web
shareConfig
Commits
26fcbda6
Commit
26fcbda6
authored
Sep 28, 2021
by
chenyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
29873252
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
43 deletions
+33
-43
base-config.vue
src/components/active-config/base-config.vue
+32
-8
index.vue
src/view/activeConfig/index.vue
+0
-31
index.vue
src/view/shareIndex/index.vue
+1
-4
No files found.
src/components/active-config/base-config.vue
View file @
26fcbda6
...
...
@@ -133,12 +133,6 @@ import timeFormat from '@/common/js/timeFormat';
import
moment
from
'moment'
export
default
{
name
:
'base-config'
,
props
:
{
dueDate
:
{
type
:
Number
,
default
:
new
Date
().
getTime
()
}
},
components
:
{
limitInput
},
...
...
@@ -160,8 +154,8 @@ export default {
callback
(
new
Error
(
'请选择开始日期'
));
}
else
if
(
!
value
[
1
])
{
callback
(
new
Error
(
'请选择结束日期'
));
}
else
if
(
value
[
1
]
&&
new
Date
(
this
.
activeInfoData
.
endDate
).
getTime
()
>
this
.
due
Date
){
callback
(
new
Error
(
`您的分享有礼功能
${
moment
(
this
.
dueDate
).
format
(
'YYYY年MM月DD日'
)}
到期,活动结束时间无法超过该日期。`
));
}
else
if
(
value
[
1
]
&&
this
.
dueData
.
endDate
&&
new
Date
(
this
.
activeInfoData
.
endDate
).
getTime
()
>
this
.
dueData
.
end
Date
){
callback
(
new
Error
(
`您的分享有礼功能
${
moment
(
this
.
dueDat
a
.
endDat
e
).
format
(
'YYYY年MM月DD日'
)}
到期,活动结束时间无法超过该日期。`
));
}
else
{
callback
();
}
...
...
@@ -194,6 +188,12 @@ export default {
dateRange
:
[{
validator
:
checkDate
,
trigger
:
'change'
}]
},
choiceDateCopy
:
[],
dueData
:
{
dueDay
:
0
,
// 即将到期天数
endDate
:
null
,
// 到期时间
isOverdue
:
0
,
// 是否过期,0:未过期,1:已过期
overdueDay
:
0
// 过期天数
},
pickerOptions
:
{
onPick
:
({
maxDate
,
minDate
})
=>
{
this
.
choiceDateCopy
=
[
minDate
.
getTime
()];
...
...
@@ -233,6 +233,29 @@ export default {
},
methods
:
{
/**
* 是否过期
*/
judgeDue
()
{
console
.
log
(
1
);
const
that
=
this
;
let
para
=
{};
getRequest
(
'/sharing-core-web/isOverdue'
,
para
)
.
then
(
res
=>
{
let
resData
=
res
.
data
;
if
(
resData
.
errorCode
==
1
)
{
that
.
dueData
=
Object
.
assign
({},
that
.
dueData
,
resData
.
result
)
return
false
;
}
errMsg
.
errorMsg
(
resData
);
})
.
catch
(
function
(
error
)
{
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
});
});
},
/**
* 日期
*/
changeDate
(
e
,
isStartDate
)
{
...
...
@@ -351,6 +374,7 @@ export default {
},
mounted
()
{
const
that
=
this
;
that
.
judgeDue
();
if
(
that
.
$route
.
query
.
hasOwnProperty
(
'activityId'
))
{
that
.
getBaseData
();
}
...
...
src/view/activeConfig/index.vue
View file @
26fcbda6
...
...
@@ -21,7 +21,6 @@
<div
class=
"step-body"
>
<base-config
v-if=
"activeStep == '1'"
:dueDate=
"dueData.endDate"
@
submitNext=
"submitNext"
></base-config>
<center-config
...
...
@@ -58,8 +57,6 @@ import centerConfig from '@/components/active-config/center-config.vue';
import
cardConfig
from
'@/components/active-config/card-config.vue'
;
import
posterConfig
from
'@/components/active-config/poster-config.vue'
;
import
rewardConfig
from
'@/components/active-config/reward-config.vue'
;
import
{
getRequest
}
from
'@/api/api'
;
import
errMsg
from
'@/common/js/error'
;
export
default
{
name
:
'createCompletion'
,
components
:
{
...
...
@@ -108,12 +105,6 @@ export default {
hasSet
:
false
}
],
dueData
:
{
dueDay
:
0
,
// 即将到期天数
endDate
:
new
Date
().
getTime
(),
// 到期时间
isOverdue
:
0
,
// 是否过期,0:未过期,1:已过期
overdueDay
:
0
// 过期天数
}
}
},
watch
:
{
...
...
@@ -125,28 +116,6 @@ export default {
},
methods
:
{
/**
* 是否过期
*/
judgeDue
()
{
const
that
=
this
;
let
para
=
{};
getRequest
(
'/sharing-core-web/isOverdue'
,
para
)
.
then
(
res
=>
{
let
resData
=
res
.
data
;
if
(
resData
.
errorCode
==
1
)
{
that
.
dueData
=
Object
.
assign
({},
that
.
dueData
,
resData
.
result
)
return
false
;
}
errMsg
.
errorMsg
(
resData
);
})
.
catch
(
function
(
error
)
{
that
.
$message
.
error
({
duration
:
1000
,
message
:
error
.
message
});
});
},
/**
* 下一步
*/
submitNext
()
{
...
...
src/view/shareIndex/index.vue
View file @
26fcbda6
...
...
@@ -107,12 +107,9 @@ export default {
});
}
},
beforeMount
()
{
const
that
=
this
;
that
.
judgeDue
();
},
mounted
()
{
const
that
=
this
;
that
.
judgeDue
();
that
.
judgeCreate
();
},
filters
:
{
...
...
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