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
ee1aaf18
Commit
ee1aaf18
authored
Jul 05, 2021
by
pengyunqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature:分销管理
parent
5a16ebec
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
718 additions
and
230 deletions
+718
-230
package-lock.json
package-lock.json
+52
-81
goods.js
server/controllers/goods.js
+61
-0
router.js
server/router.js
+6
-1
index.vue
src/pages/Goods/Retail/index.vue
+572
-147
goods.js
src/service/Goods/goods.js
+27
-1
No files found.
package-lock.json
View file @
ee1aaf18
...
...
@@ -2487,6 +2487,17 @@
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.1"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz"
,
"integrity"
:
"sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"cliui"
:
{
"version"
:
"6.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/cliui/download/cliui-6.0.0.tgz"
,
...
...
@@ -2522,6 +2533,25 @@
"ms"
:
"2.1.2"
}
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"loader-utils"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz"
,
"integrity"
:
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
},
"ms"
:
{
"version"
:
"2.1.2"
,
"resolved"
:
"https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz?cache=0&sync_timestamp=1607433988749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.2.tgz"
,
...
...
@@ -2537,6 +2567,28 @@
"minipass"
:
"^3.1.1"
}
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.2.0"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz"
,
"integrity"
:
"sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
}
},
"wrap-ansi"
:
{
"version"
:
"6.2.0"
,
"resolved"
:
"https://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-6.2.0.tgz"
,
...
...
@@ -16434,87 +16486,6 @@
}
}
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.2.0"
,
"resolved"
:
"https://registry.nlark.com/vue-loader/download/vue-loader-16.2.0.tgz?cache=0&sync_timestamp=1620717743226&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue-loader%2Fdownload%2Fvue-loader-16.2.0.tgz"
,
"integrity"
:
"sha1-BGpTMI3Ufljv4g3ewe3sAnzjtG4="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
},
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995547052&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha1-7dgDYornHATIWuegkG7a00tkiTc="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.1"
,
"resolved"
:
"https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995354302&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz"
,
"integrity"
:
"sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz"
,
"integrity"
:
"sha1-wqCah6y95pVD3m9j+jmVyCbFNqI="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s="
,
"dev"
:
true
,
"optional"
:
true
},
"loader-utils"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz"
,
"integrity"
:
"sha1-5MrOW4FtQloWa18JfhDNErNgZLA="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1622293630895&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz"
,
"integrity"
:
"sha1-G33NyzK4E4gBs+R4umpRyqiWSNo="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
}
}
},
"vue-router"
:
{
"version"
:
"4.0.8"
,
"resolved"
:
"https://registry.nlark.com/vue-router/download/vue-router-4.0.8.tgz"
,
...
...
server/controllers/goods.js
View file @
ee1aaf18
...
...
@@ -24,3 +24,64 @@ exports.getCategoryList = async ctx => {
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 营销活动列表
exports
.
getMarketingList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/marketing_list`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
console
.
log
(
res
);
ctx
.
body
=
res
;
};
// 获取查询活动列表
exports
.
getFindGoodsList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/goods_list`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
// 添加活动列表
exports
.
getAddMarketingList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/add_marketing`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
// 查看列表详情
exports
.
getMarketingInfo
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/marketing_info`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
const
res
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
res
;
};
// 开启关闭状态
exports
.
updateMarketingList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/marketing/background/update_marketing`
;
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 @
ee1aaf18
...
...
@@ -39,7 +39,12 @@ router.post(`${API_VERSION}/op_business_update`, enterprise.opBusinessUpdate);
/* 商品管理 */
router
.
get
(
`
${
API_VERSION
}
/get_goods_category_list`
,
goods
.
getCategoryList
)
// 营销活动
router
.
post
(
`
${
API_VERSION
}
/get_marketing_list`
,
goods
.
getMarketingList
)
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
}
/merchant/lifeinner/life_info`
,
life
.
get_life_info
)
router
.
get
(
`
${
API_VERSION
}
/merchant/lifeinner/life_list`
,
life
.
get_life_list
)
...
...
src/pages/Goods/Retail/index.vue
View file @
ee1aaf18
This diff is collapsed.
Click to expand it.
src/service/Goods/goods.js
View file @
ee1aaf18
import
axios
from
"@/utils/request"
;
// 获取商品分类列表
export
async
function
getGoodsList
()
{
export
async
function
getGoodsList
()
{
const
res
=
await
axios
.
get
(
"/api/v1/get_goods_category_list"
);
return
res
;
}
// 获取营销活动列表
export
async
function
getMarketingList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_marketing_list"
,
params
);
return
res
;
}
// 获取查询商品列表
export
async
function
getFindGoodsList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_find_goods_list"
,
params
);
return
res
;
}
// 获取添加活动列表
export
async
function
getAddMarketingList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_addmarketing_list"
,
params
);
return
res
;
}
// 获取查看列表
export
async
function
getMarketingInfo
(
marketing_id
)
{
const
res
=
await
axios
.
post
(
"/api/v1/get_marketing_info"
,
marketing_id
);
return
res
;
}
// 获取开启关闭
export
async
function
updateMarketingList
(
params
)
{
const
res
=
await
axios
.
post
(
"/api/v1/update_marketing_list"
,
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