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
e6f89bb2
Commit
e6f89bb2
authored
Aug 25, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
324dc4f6
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
355 additions
and
42 deletions
+355
-42
goods.js
server/controllers/goods.js
+26
-0
router.js
server/router.js
+4
-0
index.vue
src/pages/Groupmeal/Marketing/index.vue
+1
-42
config.js
src/pages/Groupmeal/components/PageHeader/config.js
+8
-0
index.vue
src/pages/Groupmeal/couponManagement/index.vue
+128
-0
index.vue
src/pages/Groupmeal/headManagement/index.vue
+165
-0
index.js
src/router/Groupmeal/index.js
+10
-0
goods.js
src/service/Goods/goods.js
+13
-0
No files found.
server/controllers/goods.js
View file @
e6f89bb2
...
...
@@ -182,3 +182,29 @@ exports.updateMarketingList = async ctx => {
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
//团长列表
exports
.
coloneList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/colonel_list`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
//团长申请列表
exports
.
coloneApplyList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/colonel_apply_list`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
server/router.js
View file @
e6f89bb2
...
...
@@ -62,6 +62,10 @@ router.post(`${API_VERSION}/get_addmarketing_list`, goods.getAddMarketingList)
router
.
post
(
`
${
API_VERSION
}
/get_find_goods_list`
,
goods
.
getFindGoodsList
)
router
.
post
(
`
${
API_VERSION
}
/get_marketing_info`
,
goods
.
getMarketingInfo
)
router
.
post
(
`
${
API_VERSION
}
/update_marketing_list`
,
goods
.
updateMarketingList
)
router
.
post
(
`
${
API_VERSION
}
/coloneList`
,
goods
.
coloneList
)
router
.
post
(
`
${
API_VERSION
}
/coloneApplyList`
,
goods
.
coloneApplyList
)
//生活号
router
.
post
(
`
${
API_VERSION
}
/merchant/lifeinner/life_info`
,
life
.
get_life_info
)
router
.
get
(
`
${
API_VERSION
}
/merchant/lifeinner/life_list`
,
life
.
get_life_list
)
...
...
src/pages/Groupmeal/Marketing/index.vue
View file @
e6f89bb2
...
...
@@ -6,8 +6,6 @@
<div
class=
"header"
>
<h2>
账户信息
</h2>
<el-button
type=
"text"
@
click=
"goInvest(`EDIT`, scope.row.goods_spu_id)"
>
充值
</el-button
>
</div>
...
...
@@ -59,57 +57,18 @@
></el-table-column>
<!-- 操作快捷键 -->
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"200"
>
<template
#
default=
"scope"
>
<template>
<el-button
type=
"text"
@
click=
"goDetail(`EDIT`, scope.row.goods_spu_id)"
>
预算分配
</el-button
>
<el-button
type=
"text"
@
click=
"goDetail(`AUDIT`, scope.row.goods_spu_id)"
>
活动下线
</el-button
>
<el-button
type=
"text"
@
click=
"goDetail(`AUDIT`, scope.row.goods_spu_id)"
>
活动配置
</el-button
>
<el-popconfirm
title=
"您确定要上线/下线[我是活动]吗?"
cancelButtonType=
"default"
@
confirm=
"changeGoodsState('GROUNDING', scope.row.goods_spu_id)"
>
</el-popconfirm>
<el-popconfirm
title=
"您确定要上架该商品吗?"
cancelButtonType=
"default"
@
confirm=
"changeGoodsState('GROUNDING', scope.row.goods_spu_id)"
>
<template
#
reference
>
<el-button
type=
"text"
>
上架
</el-button>
</
template
>
</el-popconfirm>
<el-popconfirm
v-if=
"
scope.row.online_status != 2 &&
(scope.row.audit_status == 1 || scope.row.online_status == 1)
"
title=
"您确定要下架该商品吗?"
cancelButtonType=
"default"
@
confirm=
"
changeGoodsState('UNDERCARRIAGE', scope.row.goods_spu_id)
"
>
<
template
#
reference
>
<el-button
type=
"text"
>
下架
</el-button>
</
template
>
</el-popconfirm>
</
template
>
</el-table-column>
</el-table>
...
...
src/pages/Groupmeal/components/PageHeader/config.js
View file @
e6f89bb2
...
...
@@ -18,6 +18,14 @@ const headerConfig = [
{
path
:
"/op/groupmeal/marketing"
,
name
:
"营销中心"
},
{
path
:
"/op/groupmeal/headManagement"
,
name
:
"团长管理"
},
{
path
:
"/op/groupmeal/couponManagement"
,
name
:
"优惠券配置"
}
];
...
...
src/pages/Groupmeal/couponManagement/index.vue
0 → 100644
View file @
e6f89bb2
<
template
>
<layout>
<div
class=
"marketing"
>
<!-- 表头 -->
<div
class=
"header"
>
<h2>
账户信息
</h2>
<el-button
>
充值
</el-button
>
</div>
<!-- 列表区 -->
<el-table
class=
"goods_list"
:data=
"goodsList"
border
stripe
>
<el-table-column
label=
"商品id"
prop=
"goods_spu_id"
align=
"center"
></el-table-column>
<el-table-column
label=
"商品名称"
prop=
"goods_name"
align=
"center"
></el-table-column>
<el-table-column
label=
"一级分类"
prop=
"category_1_name"
align=
"center"
></el-table-column>
</el-table>
</div>
<div
class=
"marketing"
>
<!-- 表头 -->
<div
class=
"header"
>
<h2>
活动列表
</h2>
</div>
<!-- 列表区 -->
<el-table
class=
"goods_list"
:data=
"goodsList"
border
stripe
>
<el-table-column
label=
"活动名称"
prop=
"goods_spu_id"
align=
"center"
></el-table-column>
<el-table-column
label=
"已消耗"
prop=
"goods_name"
align=
"center"
></el-table-column>
<el-table-column
label=
"已占用"
prop=
"category_1_name"
align=
"center"
></el-table-column>
<el-table-column
label=
"状态"
prop=
"category_2_name"
align=
"center"
></el-table-column>
<!-- 操作快捷键 -->
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"200"
>
<template>
<el-button
>
预算分配
</el-button
>
<el-button
>
活动下线
</el-button
>
<el-button
>
活动配置
</el-button
>
</
template
>
</el-table-column>
</el-table>
</div>
</layout>
</template>
<
script
>
import
Layout
from
"../../Groupmeal/layout/index.vue"
;
import
page
from
"@/components/Pagination"
import
{
getList
,
}
from
"@/service/Goods/goods"
;
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
export
default
{
name
:
"MarketingCenter"
,
components
:
{
Layout
,
page
},
data
()
{
return
{
goodsList
:
[],
params
:
{
page
:
1
,
page_size
:
20
},
}
},
created
()
{
this
.
getCommodityList
()
},
methods
:
{
async
getCommodityList
()
{
try
{
const
res
=
await
getList
();
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
goodsList
=
res
.
result
.
list
;
}
catch
(
error
)
{
console
.
error
(
error
);
}
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.marketing {
padding: 30px;
.header {
display: flex;
justify-content: space-between;
padding: 10px;
}
}
</
style
>
src/pages/Groupmeal/headManagement/index.vue
0 → 100644
View file @
e6f89bb2
<
template
>
<layout>
<div
class=
"marketing"
>
<!-- 表头 -->
<div
class=
"header"
>
<h2>
审核列表
</h2>
</div>
<!-- 列表区 -->
<el-table
class=
"goods_list"
:data=
"coloneApplyList"
border
stripe
>
<el-table-column
label=
"ID"
prop=
"user_id"
align=
"center"
></el-table-column>
<el-table-column
label=
"头像"
prop=
"user_avatar"
align=
"center"
></el-table-column>
<el-table-column
label=
"昵称"
prop=
"contact_name"
align=
"center"
></el-table-column>
<el-table-column
label=
"手机号"
prop=
"phone"
align=
"center"
></el-table-column>
<el-table-column
label=
"自提点名称"
prop=
"take_place_name"
align=
"center"
></el-table-column>
<el-table-column>
<template
#
default=
"scope"
>
{{
scope
.
row
.
province
}}
-
{{
scope
.
row
.
city
}}
-
{{
scope
.
row
.
area
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
fixed=
"right"
width=
"200"
>
<!-- <el-button type="primary" size="small">审核</el-button> -->
<el-popconfirm
title=
'您确认通过(${contact_name})的团长申请吗'
@
confirm=
"handleApply"
>
<
template
#
reference
>
<el-button
type=
"primary"
size=
"mini"
>
审核
</el-button
>
</
template
>
</el-popconfirm>
<el-button
type=
"success"
size=
"small"
>
通过
</el-button>
<el-button
type=
"primary"
size=
"small"
>
添加自提点
</el-button>
<el-button
type=
"danger"
size=
"small"
>
拒绝
</el-button>
</el-table-column>
</el-table>
</div>
<div
class=
"marketing"
>
<!-- 表头 -->
<div
class=
"header"
>
<h2>
团长列表
</h2>
</div>
<!-- 列表区 -->
<el-table
class=
"goods_list"
:data=
"coloneList"
border
stripe
>
<el-table-column
label=
"ID"
prop=
"user_id"
align=
"center"
></el-table-column>
<el-table-column
label=
"头像"
prop=
"user_avatar"
align=
"center"
></el-table-column>
<el-table-column
label=
"昵称"
prop=
"contact_name"
align=
"center"
></el-table-column>
<el-table-column
label=
"手机号"
prop=
"phone"
align=
"center"
></el-table-column>
<el-table-column
label=
"昨日收益"
prop=
"yesterday_income"
align=
"center"
></el-table-column>
<el-table-column
label=
"总收益"
prop=
"total_income"
align=
"center"
></el-table-column>
</el-table>
</div>
</layout>
</template>
<
script
>
import
Layout
from
"../../Groupmeal/layout/index.vue"
;
import
page
from
"@/components/Pagination"
import
{
ColoneList
,
ColoneApplyList
,
}
from
"@/service/Goods/goods"
;
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
export
default
{
name
:
"MarketingCenter"
,
components
:
{
Layout
,
page
},
data
()
{
return
{
coloneList
:
[],
coloneApplyList
:
[],
params
:
{
page
:
1
,
page_size
:
20
},
}
},
async
created
()
{
await
this
.
getColoneList
()
this
.
getColoneApplyList
()
},
methods
:
{
async
getColoneList
()
{
try
{
const
res
=
await
ColoneList
(
this
.
params
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
coloneList
=
res
.
result
;
}
catch
(
error
)
{
console
.
error
(
error
);
}
},
async
getColoneApplyList
()
{
try
{
const
res
=
await
ColoneApplyList
(
this
.
params
);
if
(
res
.
code
!==
0
)
return
this
.
$message
.
error
(
res
.
reason
);
this
.
coloneApplyList
=
res
.
result
;
}
catch
(
error
)
{
console
.
error
(
error
);
}
},
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.marketing {
padding: 30px;
.header {
display: flex;
justify-content: space-between;
padding: 10px;
}
}
</
style
>
src/router/Groupmeal/index.js
View file @
e6f89bb2
...
...
@@ -24,6 +24,16 @@
name
:
"MarketingCenter"
,
component
:
()
=>
import
(
/* webpackChunkName: "marketing" */
"@/pages/Groupmeal/Marketing"
)
},
{
path
:
"/op/groupmeal/headManagement"
,
name
:
"headManagement"
,
component
:
()
=>
import
(
/* webpackChunkName: "headManagement" */
"@/pages/Groupmeal/headManagement"
)
},
{
path
:
"/op/groupmeal/couponManagement"
,
name
:
"couponManagement"
,
component
:
()
=>
import
(
/* webpackChunkName: "couponManagement" */
"@/pages/Groupmeal/couponManagement"
)
},
];
export
default
groupmealRouters
;
src/service/Goods/goods.js
View file @
e6f89bb2
...
...
@@ -94,3 +94,16 @@ export async function updateMarketingList (params) {
const
res
=
await
axios
.
post
(
"/api/v1/update_marketing_list"
,
params
);
return
res
;
}
// 团长列表
export
async
function
ColoneList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/coloneList"
,
params
);
return
res
;
}
// 团长申请列表
export
async
function
ColoneApplyList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/coloneApplyList"
,
params
);
return
res
;
}
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