创建微服务:microservice-provider-shop-8003;小程序商品列表筛选、商品详情完成
This commit is contained in:
34
weixin-miniprogram/services/good.js
Normal file
34
weixin-miniprogram/services/good.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/* eslint-disable no-param-reassign */
|
||||
|
||||
const send_request = require('../utils/sendRequest')
|
||||
|
||||
/** 获取商品分类列表 */
|
||||
export function getGoodCategoryList() {
|
||||
return send_request({
|
||||
url: '/shop/good/miniprogram/cateList',
|
||||
method: "GET"
|
||||
})
|
||||
}
|
||||
|
||||
/** 获取商品列表 */
|
||||
export function getGoodList(goodCategoryId, searchText) {
|
||||
return send_request({
|
||||
url: '/shop/good/miniprogram/list',
|
||||
method: "GET",
|
||||
data: {
|
||||
cateId: goodCategoryId,
|
||||
searchText: searchText.trim(),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/** 获取商品详情 */
|
||||
export function getGoodDetail(id) {
|
||||
return send_request({
|
||||
url: '/shop/good/miniprogram/detail',
|
||||
method: "GET",
|
||||
data: {
|
||||
id: id,
|
||||
}
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user