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
0be656bb
Commit
0be656bb
authored
Jun 22, 2021
by
mengwenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'commodity_mengwehao' into pyq
parents
bc9c42ad
cac07490
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
goods.js
server/controllers/goods.js
+15
-0
No files found.
server/controllers/goods.js
View file @
0be656bb
const
GOODS_URI
=
require
(
"../config.js"
).
GOODS_URI
;
const
GOODS_URI
=
require
(
"../config.js"
).
GOODS_URI
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
/**
* 示例
* exports.方法名 = async ctx => {
* const url = `${设置好的域名}/向服务端发送的请求地址`;
* const opts = {
* url,
* method:"发送什么请求",
* qs: ctx.request.query (get请求的参数)
* body:ctx.request.body (post请求的参数)
* json:boolean (是否转换为json)
* };
* ctx.body = await req(ctx,opts); 将发送请求后的数据传递给前端页面
* };
*/
exports
.
getCategoryList
=
async
ctx
=>
{
exports
.
getCategoryList
=
async
ctx
=>
{
const
url
=
`
${
GOODS_URI
}
/goods/background/get_goods_category_list`
;
const
url
=
`
${
GOODS_URI
}
/goods/background/get_goods_category_list`
;
const
opts
=
{
const
opts
=
{
...
...
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