/** * 这是与购物有关的业务逻辑的服务 */ export default class ProductService { constructor(AjaxService) { Object.assign(this, { AjaxService }) this.name = 'ProductService' } /** * @商城首页-常用商品列表 * @param:userId 用户ID(未登录传0或者''), * @param:preferredFlag 新品上线(001) 优惠商品(010) 常用商品(100),, * @param:pageNum 页码 * @param:pageSize 每页条数 */ queryProductPreferred (data = {}) { return this.AjaxService.get({ url:'/product/preferred', data, isLoading: false }) } /** * @商品列表-查询商品价格 * @param:userId 用户ID(未登录传0或者'') * @param:productID 商品ID','符号拼接 */ querySearchProductPrice (data = {}) { return this.AjaxService.get({ url:'/product/listPrice', data, isLoading: false }) } /** * @商品详情-查询商品详情 * @param:userId 用户ID(未登录传0或者'') * @param:productIds 商品ID */ queryProductDetils (data = {}) { return this.AjaxService.get({ url:'/product/details', data, isLoading: false }) } /* 余额抵扣 orderId 订单ID */ OrderBalanceDeduction (data = {}) { return this.AjaxService.post({ url:'/order/balanceDeduction', data, isLoading: false }) } }