Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
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
marketing-web
marketing
Commits
4146342d
Commit
4146342d
authored
Apr 01, 2021
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 弹窗推广调整
parent
4f2f2a47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
43 deletions
+40
-43
form.vue
src/views/pop/form.vue
+40
-43
No files found.
src/views/pop/form.vue
View file @
4146342d
...
...
@@ -360,51 +360,48 @@ export default {
if
(
this
.
loading
)
{
return
;
}
if
(
!
this
.
group
.
dateTime
[
0
]
||
!
this
.
group
.
dateTime
[
1
])
{
return
this
.
$message
.
warning
(
'请先选择投放时间'
);
}
if
(
!
this
.
group
.
id
)
{
delete
this
.
group
.
id
;
}
this
.
group
.
operateType
=
this
.
group
.
id
?
2
:
1
;
if
(
Array
.
isArray
(
this
.
group
.
popupList
))
{
this
.
group
.
popupList
=
this
.
group
.
popupList
.
map
(
el
=>
{
if
(
el
.
putonType
==
1
)
{
el
.
popupCouponDetails
=
null
;
}
if
(
el
.
putonType
==
2
)
{
el
.
popupImageDetails
=
null
;
}
return
el
;
});
}
this
.
loading
=
true
;
console
.
log
(
this
.
group
);
const
params
=
Object
.
assign
({},
this
.
group
);
params
.
scene
=
params
.
scene
.
join
(
','
);
params
.
beginTime
=
new
Date
(
params
.
dateTime
[
0
]).
getTime
();
params
.
endTime
=
new
Date
(
params
.
dateTime
[
1
]).
getTime
();
delete
params
.
dateTime
;
params
.
popupList
.
map
(
pop
=>
{
delete
pop
.
linkToolsVisible
;
delete
pop
.
putonPageDialog
;
pop
.
beginTime
=
new
Date
(
pop
.
dateTime
[
0
]).
getTime
();
pop
.
endTime
=
new
Date
(
pop
.
dateTime
[
1
]).
getTime
();
});
console
.
log
(
params
);
// return;
this
.
$refs
.
form
.
validate
(
vali
=>
{
if
(
!
vali
)
return
;
saveOrUpdatePopupPlan
(
params
)
.
then
(
res
=>
{
console
.
log
(
res
);
this
.
$message
.
success
(
'保存成功'
);
this
.
loading
=
false
;
this
.
$router
.
go
(
-
1
);
})
.
catch
(
err
=>
{
console
.
log
(
err
);
this
.
loading
=
false
;
if
(
!
this
.
group
.
id
)
{
delete
this
.
group
.
id
;
}
this
.
group
.
operateType
=
this
.
group
.
id
?
2
:
1
;
if
(
Array
.
isArray
(
this
.
group
.
popupList
))
{
this
.
group
.
popupList
=
this
.
group
.
popupList
.
map
(
el
=>
{
if
(
el
.
putonType
==
1
)
{
el
.
popupCouponDetails
=
null
;
}
if
(
el
.
putonType
==
2
)
{
el
.
popupImageDetails
=
null
;
}
return
el
;
});
}
this
.
loading
=
true
;
const
params
=
Object
.
assign
({},
this
.
group
);
params
.
scene
=
params
.
scene
.
join
(
','
);
params
.
beginTime
=
new
Date
(
params
.
dateTime
[
0
]).
getTime
();
params
.
endTime
=
new
Date
(
params
.
dateTime
[
1
]).
getTime
();
delete
params
.
dateTime
;
params
.
popupList
.
map
(
pop
=>
{
delete
pop
.
linkToolsVisible
;
delete
pop
.
putonPageDialog
;
pop
.
beginTime
=
new
Date
(
pop
.
dateTime
[
0
]).
getTime
();
pop
.
endTime
=
new
Date
(
pop
.
dateTime
[
1
]).
getTime
();
});
saveOrUpdatePopupPlan
(
params
)
.
then
(
res
=>
{
console
.
log
(
res
);
this
.
$message
.
success
(
'保存成功'
);
this
.
loading
=
false
;
this
.
$router
.
go
(
-
1
);
})
.
catch
(
err
=>
{
console
.
log
(
err
);
this
.
loading
=
false
;
});
});
}),
addPop
()
{
const
index
=
this
.
group
.
popupList
.
length
||
1
;
...
...
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