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
c6aded8c
Commit
c6aded8c
authored
Sep 03, 2021
by
liwenhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 获取活动的预算详情
parent
d2f23b45
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
2 deletions
+32
-2
goods.js
server/controllers/goods.js
+13
-0
router.js
server/router.js
+1
-0
index.vue
src/pages/Groupmeal/Marketing/index.vue
+12
-2
goods.js
src/service/Goods/goods.js
+6
-0
No files found.
server/controllers/goods.js
View file @
c6aded8c
...
...
@@ -287,6 +287,19 @@ exports.addAmount = async (ctx) => {
ctx
.
body
=
res
;
};
//营销中心-获取充值详情
exports
.
capitalPoolDetail
=
async
(
ctx
)
=>
{
const
url
=
`
${
GOODS_URI
}
/coupon/background/capital_pool_detail`
;
const
opts
=
{
url
,
method
:
"GET"
,
json
:
true
,
body
:
ctx
.
request
.
body
,
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
//营销中心-查看活动配置
exports
.
yingxiaoConfig
=
async
(
ctx
)
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/yingxiao_config`
;
...
...
server/router.js
View file @
c6aded8c
...
...
@@ -72,6 +72,7 @@ router.post(`${API_VERSION}/colonelApplyPoint`, goods.colonelApplyPoint);
router
.
post
(
`
${
API_VERSION
}
/colonelAddApplyPoint`
,
goods
.
colonelAddApplyPoint
);
router
.
post
(
`
${
API_VERSION
}
/yingxiaoList`
,
goods
.
yingxiaoList
);
router
.
post
(
`
${
API_VERSION
}
/addAmount`
,
goods
.
addAmount
);
router
.
get
(
`
${
API_VERSION
}
/capitalPoolDetail`
,
goods
.
capitalPoolDetail
);
router
.
post
(
`
${
API_VERSION
}
/toogleYingxiaoOnlineStatus`
,
goods
.
toogleYingxiaoOnlineStatus
);
router
.
post
(
`
${
API_VERSION
}
/yingxiaoConfig`
,
goods
.
yingxiaoConfig
);
router
.
post
(
`
${
API_VERSION
}
/yingxiaoSaveConfig`
,
goods
.
yingxiaoSaveConfig
);
...
...
src/pages/Groupmeal/Marketing/index.vue
View file @
c6aded8c
...
...
@@ -86,7 +86,14 @@
<
script
>
import
Layout
from
"../../Groupmeal/layout/index.vue"
;
// import page from "@/components/Pagination";
import
{
yingxiaoList
,
addAmount
,
toogleYingxiaoOnlineStatus
,
yingxiaoConfig
,
yingxiaoSaveConfig
}
from
"@/service/Goods/goods"
;
import
{
yingxiaoList
,
addAmount
,
toogleYingxiaoOnlineStatus
,
yingxiaoConfig
,
yingxiaoSaveConfig
,
capitalPoolDetail
,
}
from
"@/service/Goods/goods"
;
import
moment
from
"moment"
;
// import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
export
default
{
...
...
@@ -187,7 +194,10 @@
});
},
async
handleAddAmount
(
item
)
{
this
.
$prompt
(
`当前账户预算:
${
this
.
anlysisObj
.
total
}
\n 当前账户可用余额:
${
this
.
anlysisObj
.
balance
}
`
,
"充值"
,
{
console
.
log
(
item
);
let
{
result
,
code
,
reason
}
=
await
capitalPoolDetail
({
capital_pool_id
:
item
.
capital_pool_id
});
if
(
code
!==
0
)
return
this
.
$message
.
error
(
reason
);
this
.
$prompt
(
`当前账户预算:
${
result
.
capital_pool_total
}
\n 当前账户可用余额:
${
result
.
capital_pool_balance
}
`
,
"充值"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
inputLabel
:
"输入调整后的账户总预算"
,
...
...
src/service/Goods/goods.js
View file @
c6aded8c
...
...
@@ -140,6 +140,12 @@ export async function addAmount(params) {
return
res
;
}
// 营销中心-充值详情
export
async
function
capitalPoolDetail
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/capitalPoolDetail"
,
{
params
});
return
res
;
}
// 营销中心-查看活动配置
export
async
function
yingxiaoConfig
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/yingxiaoConfig"
,
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