Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
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
bp
op-web-service
Commits
210b237c
Commit
210b237c
authored
Dec 15, 2021
by
顾文旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
复制活动
parent
9e737bfe
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
1 deletion
+52
-1
activity.js
server/controllers/activity.js
+12
-0
router.js
server/router.js
+1
-0
index.vue
src/pages/Activity/Manage/index.vue
+33
-1
index.js
src/service/Activity/index.js
+6
-0
No files found.
server/controllers/activity.js
View file @
210b237c
...
@@ -89,6 +89,18 @@ exports.addMarketing = async (ctx) => {
...
@@ -89,6 +89,18 @@ exports.addMarketing = async (ctx) => {
ctx
.
body
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
};
// 添加营销活动
exports
.
copyMarketing
=
async
(
ctx
)
=>
{
const
url
=
`http://blend.jwshq.yidian-inc.com/bp/copyMarketing`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
,
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 编辑营销活动
// 编辑营销活动
exports
.
updateMarketing
=
async
(
ctx
)
=>
{
exports
.
updateMarketing
=
async
(
ctx
)
=>
{
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/update_marketing`
;
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/update_marketing`
;
...
...
server/router.js
View file @
210b237c
...
@@ -107,6 +107,7 @@ router.get(`${API_VERSION}/goods/background/pindan_goods`, activity.pindanGoods)
...
@@ -107,6 +107,7 @@ router.get(`${API_VERSION}/goods/background/pindan_goods`, activity.pindanGoods)
router
.
get
(
`
${
API_VERSION
}
/goods/background/marketing_goods_info`
,
activity
.
markGoodsInfo
);
router
.
get
(
`
${
API_VERSION
}
/goods/background/marketing_goods_info`
,
activity
.
markGoodsInfo
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/edit_activity_goods`
,
activity
.
editGoods
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/edit_activity_goods`
,
activity
.
editGoods
);
router
.
post
(
`
${
API_VERSION
}
/marketing/background/add_marketing`
,
activity
.
addMarketing
);
router
.
post
(
`
${
API_VERSION
}
/marketing/background/add_marketing`
,
activity
.
addMarketing
);
router
.
post
(
`
${
API_VERSION
}
/bp/copyMarketing`
,
activity
.
copyMarketing
);
router
.
post
(
`
${
API_VERSION
}
/marketing/background/marketing_info`
,
activity
.
marketingInfo
);
router
.
post
(
`
${
API_VERSION
}
/marketing/background/marketing_info`
,
activity
.
marketingInfo
);
router
.
post
(
`
${
API_VERSION
}
/marketing/background/update_marketing`
,
activity
.
updateMarketing
);
router
.
post
(
`
${
API_VERSION
}
/marketing/background/update_marketing`
,
activity
.
updateMarketing
);
...
...
src/pages/Activity/Manage/index.vue
View file @
210b237c
...
@@ -76,6 +76,12 @@
...
@@ -76,6 +76,12 @@
<
/div
>
<
/div
>
<
el
-
button
class
=
"checkButton"
type
=
"primary"
size
=
"mini"
@
click
=
"handleLook(scope.row)"
>
查看订单
<
/el-button
>
<
el
-
button
class
=
"checkButton"
type
=
"primary"
size
=
"mini"
@
click
=
"handleLook(scope.row)"
>
查看订单
<
/el-button
>
<
el
-
popconfirm
title
=
"确定要复制活动?"
@
confirm
=
"copyMarketing(scope.row)"
>
<
template
#
reference
>
<
el
-
button
class
=
"checkButton"
type
=
"primary"
size
=
"mini"
>
复制活动
<
/el-button
>
<
/template
>
<
/el-popconfirm
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
/el-table
>
<
/el-table
>
...
@@ -99,8 +105,10 @@
...
@@ -99,8 +105,10 @@
<
script
>
<
script
>
import
layout
from
"../../Groupmeal/layout/index.vue"
;
import
layout
from
"../../Groupmeal/layout/index.vue"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
ElMessage
}
from
"element-plus"
;
import
ActivityService
from
"@/service/Activity/index"
;
import
ActivityService
,
{
addMarketing
,
copyMarketing
}
from
"@/service/Activity/index"
;
import
dayJs
from
"dayjs"
;
import
dayJs
from
"dayjs"
;
import
{
getCookie
}
from
"@/utils/util"
;
export
default
{
export
default
{
name
:
"Manage"
,
name
:
"Manage"
,
components
:
{
components
:
{
...
@@ -264,6 +272,21 @@
...
@@ -264,6 +272,21 @@
}
,
}
,
}
);
}
);
}
,
}
,
async
copyMarketing
(
row
)
{
let
params
=
{
marketing_id
:
0
,
}
;
const
res
=
await
copyMarketing
(
params
);
if
(
res
.
code
===
0
)
{
ElMessage
.
success
({
message
:
"复制成功"
,
type
:
"success"
,
}
);
}
else
{
ElMessage
.
error
(
res
.
reason
);
}
}
,
}
,
}
,
created
()
{
created
()
{
this
.
getActivityList
();
this
.
getActivityList
();
...
@@ -276,26 +299,32 @@
...
@@ -276,26 +299,32 @@
height
:
100
%
;
height
:
100
%
;
padding
:
30
px
;
padding
:
30
px
;
}
}
.
header
{
.
header
{
height
:
100
%
;
height
:
100
%
;
}
}
.
form
-
wrapper
{
.
form
-
wrapper
{
display
:
flex
;
display
:
flex
;
flex
-
direction
:
column
;
flex
-
direction
:
column
;
justify
-
content
:
space
-
between
;
justify
-
content
:
space
-
between
;
height
:
100
%
;
height
:
100
%
;
.
el
-
card__body
{
.
el
-
card__body
{
height
:
100
%
;
height
:
100
%
;
}
}
.
formitem
-
wrapper
{
.
formitem
-
wrapper
{
// height: 100px;
// height: 100px;
// display: flex;
// display: flex;
// align-items: flex-end;
// align-items: flex-end;
}
}
.
table
-
wrapper
{
.
table
-
wrapper
{
flex
:
1
;
flex
:
1
;
overflow
-
y
:
scroll
;
overflow
-
y
:
scroll
;
}
}
.
pagination
-
wrapper
{
.
pagination
-
wrapper
{
width
:
100
%
;
width
:
100
%
;
height
:
100
px
;
height
:
100
px
;
...
@@ -305,12 +334,15 @@
...
@@ -305,12 +334,15 @@
align
-
items
:
center
;
align
-
items
:
center
;
}
}
}
}
.
checkButton
{
.
checkButton
{
margin
-
top
:
5
px
;
margin
-
top
:
5
px
;
}
}
.
activityTitle
{
.
activityTitle
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.
activityPrice
{
.
activityPrice
{
color
:
red
;
color
:
red
;
}
}
...
...
src/service/Activity/index.js
View file @
210b237c
...
@@ -42,6 +42,12 @@ export async function addMarketing(params) {
...
@@ -42,6 +42,12 @@ export async function addMarketing(params) {
return
res
;
return
res
;
}
}
// 复制营销活动
export
async
function
copyMarketing
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/bp/copyMarketing"
,
params
);
return
res
;
}
// 编辑营销活动
// 编辑营销活动
export
async
function
updateMarketing
(
params
)
{
export
async
function
updateMarketing
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/update_marketing"
,
params
);
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/update_marketing"
,
params
);
...
...
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