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
2e10f914
Commit
2e10f914
authored
Aug 05, 2021
by
your yuchenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:营销活动详情
parent
1d5bb5c5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
12 deletions
+81
-12
activity.js
server/controllers/activity.js
+24
-0
router.js
server/router.js
+2
-0
addProduc.vue
src/pages/Activity/releaseProduc/components/addProduc.vue
+0
-1
infoEditing.vue
src/pages/Activity/releaseProduc/components/infoEditing.vue
+4
-9
index.vue
src/pages/Activity/releaseProduc/index.vue
+39
-2
index.js
src/service/Activity/index.js
+12
-0
No files found.
server/controllers/activity.js
View file @
2e10f914
...
@@ -77,6 +77,30 @@ exports.editGoodsDetail = async ctx => {
...
@@ -77,6 +77,30 @@ exports.editGoodsDetail = async ctx => {
ctx
.
body
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
};
// 添加营销活动
exports
.
addMarketing
=
async
ctx
=>
{
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/add_marketing`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 营销活动详情
exports
.
marketingInfo
=
async
ctx
=>
{
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/marketing_info`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 关闭/开启 活动
// 关闭/开启 活动
exports
.
updateActivity
=
async
ctx
=>
{
exports
.
updateActivity
=
async
ctx
=>
{
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/update_marketing`
;
const
url
=
`
${
ACTIVITY_URI
}
/marketing/background/update_marketing`
;
...
...
server/router.js
View file @
2e10f914
...
@@ -78,6 +78,8 @@ router.post(`${API_VERSION}/goods/background/add_goods`, activity.addGoods);
...
@@ -78,6 +78,8 @@ router.post(`${API_VERSION}/goods/background/add_goods`, activity.addGoods);
router
.
get
(
`
${
API_VERSION
}
/goods/background/pindan_goods`
,
activity
.
pindanGoods
);
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_goods`
,
activity
.
editGoods
);
router
.
post
(
`
${
API_VERSION
}
/goods/background/edit_goods`
,
activity
.
editGoods
);
router
.
post
(
`
${
API_VERSION
}
/marketing/background/add_marketing`
,
activity
.
addMarketing
);
module
.
exports
=
router
;
module
.
exports
=
router
;
src/pages/Activity/releaseProduc/components/addProduc.vue
View file @
2e10f914
...
@@ -375,7 +375,6 @@ export default {
...
@@ -375,7 +375,6 @@ export default {
type
:
"success"
,
type
:
"success"
,
});
});
this
.
pindanGoodsMet
();
this
.
pindanGoodsMet
();
console
.
log
(
this
.
multipleSelection
);
this
.
addCommodityPopup
=
false
;
this
.
addCommodityPopup
=
false
;
}
else
{
}
else
{
ElMessage
.
error
(
res
.
reason
);
ElMessage
.
error
(
res
.
reason
);
...
...
src/pages/Activity/releaseProduc/components/infoEditing.vue
View file @
2e10f914
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
<
script
>
<
script
>
import
{
GOODS_URI
}
from
"../../../../../server/config"
;
import
{
GOODS_URI
}
from
"../../../../../server/config"
;
export
default
{
export
default
{
props
:
[
"editInfo"
],
data
()
{
data
()
{
return
{
return
{
infoEditForm
:
{
infoEditForm
:
{
...
@@ -61,15 +62,6 @@ export default {
...
@@ -61,15 +62,6 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
// 初始化上传图片列表
// formatUploadPictureList(fileStr) {
// if (!fileStr) {
// return [];
// } else {
// return fileStr.split(",");
// }
// },
// 展示商品大图
// 展示商品大图
previewImage
(
file
)
{
previewImage
(
file
)
{
this
.
popoverImage
=
file
.
url
;
this
.
popoverImage
=
file
.
url
;
...
@@ -91,6 +83,9 @@ export default {
...
@@ -91,6 +83,9 @@ export default {
}
}
},
},
},
},
created
(){
console
.
log
(
this
.
editInfo
);
}
};
};
</
script
>
</
script
>
...
...
src/pages/Activity/releaseProduc/index.vue
View file @
2e10f914
...
@@ -13,7 +13,11 @@
...
@@ -13,7 +13,11 @@
<el-step
title=
"拼单设置"
></el-step>
<el-step
title=
"拼单设置"
></el-step>
</el-steps>
</el-steps>
<div
class=
"content"
>
<div
class=
"content"
>
<<<<<<<
Updated
upstream
<infoEditing
ref=
"infoEdit"
v-if=
"active === 1"
/>
<infoEditing
ref=
"infoEdit"
v-if=
"active === 1"
/>
=======
<infoEditing
ref=
"infoEdit"
v-if=
"active === 1"
:editInfo=
"infoEditArr"
/>
>>>>>>> Stashed changes
<addProduc
<addProduc
ref=
"addProduc"
ref=
"addProduc"
v-else-if=
"active === 2"
v-else-if=
"active === 2"
...
@@ -41,6 +45,7 @@ import { ElMessage } from "element-plus";
...
@@ -41,6 +45,7 @@ import { ElMessage } from "element-plus";
import
infoEditing
from
"./components/infoEditing.vue"
;
import
infoEditing
from
"./components/infoEditing.vue"
;
import
addProduc
from
"./components/addProduc.vue"
;
import
addProduc
from
"./components/addProduc.vue"
;
import
spellOrderSet
from
"./components/spellOrderSet.vue"
;
import
spellOrderSet
from
"./components/spellOrderSet.vue"
;
import
{
addMarketing
,
marketingInfo
}
from
"../../../service/Activity/index"
;
export
default
{
export
default
{
components
:
{
components
:
{
infoEditing
,
infoEditing
,
...
@@ -75,19 +80,51 @@ export default {
...
@@ -75,19 +80,51 @@ export default {
return
;
return
;
}
}
}
}
// 信息编辑中的图片
this
.
active
++
;
this
.
active
++
;
},
},
// 获取营销活动详情
async
marketingInfoMet
()
{
let
marketingId
=
this
.
$route
.
query
.
marketing_id
;
if
(
marketingId
==
undefined
)
{
return
;
}
let
params
=
{
marketing_id
:
marketingId
,
marketing_type
:
"4"
,
};
const
res
=
await
marketingInfo
(
params
);
this
.
infoEditArr
=
res
.
result
.
marketing_info
;
},
// 取消
// 取消
cancel
()
{
cancel
()
{
this
.
$router
.
go
(
-
1
);
this
.
$router
.
go
(
-
1
);
},
},
// 确认发布
// 确认发布
confirmRelease
()
{
async
confirmRelease
()
{
// this.$refs.addProduc.comTableData
const
res
=
await
addMarketing
({
goods_sku_id
:
""
,
marketing_name
:
""
,
marketing_type
:
"4"
,
op_cur_user
:
""
,
start_time
:
""
,
end_time
:
""
,
pindan_pic
:
""
,
pindan_desc
:
""
,
});
console
.
log
(
res
);
this
.
$router
.
push
({
path
:
"/op/activity/manage"
});
this
.
$router
.
push
({
path
:
"/op/activity/manage"
});
}
}
},
},
<<<<<<<
Updated
upstream
created
()
{}
created
()
{}
=======
created
()
{
this
.
marketingInfoMet
();
},
>>>>>>>
Stashed
changes
};
};
</
script
>
</
script
>
...
...
src/service/Activity/index.js
View file @
2e10f914
...
@@ -36,6 +36,18 @@ export async function editGoods(params) {
...
@@ -36,6 +36,18 @@ export async function editGoods(params) {
return
res
;
return
res
;
}
}
// 添加营销活动
export
async
function
addMarketing
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/add_marketing"
,
params
);
return
res
;
}
// 营销活动详情
export
async
function
marketingInfo
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/marketing/background/marketing_info"
,
params
);
return
res
;
}
class
ActivityService
{
class
ActivityService
{
// 获取活动列表
// 获取活动列表
static
async
getActivityList
(
params
)
{
static
async
getActivityList
(
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