123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- import request from '@/utils/request'
- // 列表
- export function list(data) {
- return request({
- url: `/admin/goods/list`,
- method: 'post',
- data
- })
- }
- // 详情
- export function detail(id) {
- return request({
- url: `/admin/goods/queryGoodById/${id}`,
- method: 'get'
- })
- }
- // 修改
- export function edit(data) {
- return request({
- url: `/admin/goods/edit`,
- method: 'put',
- data
- })
- }
- // 新增
- export function create(data) {
- return request({
- url: `/admin/goods/add`,
- method: 'post',
- data
- })
- }
- // 删除
- export function remove(id) {
- return request({
- url: `/admin/goods/remove/${id}`,
- method: 'get'
- })
- }
- // 下架
- export function shelve(id) {
- return request({
- url: `/admin/goods/unshelve/${id}`,
- method: 'get'
- })
- }
- // 流量套餐
- export function goodsList(type) {
- return request({
- url: `/admin/goods/queryPackageList?platform=${type}`,
- method: 'get'
- })
- }
- // 流量套餐
- export function newGoodsList(type, businessType) {
- return request({
- url: `/admin/goods/queryList/${type}/${businessType}`,
- method: 'get'
- })
- }
- // 查询设备下对应的赠送的商品列表
- export function deviceGoodsList(type, businessType, deviceIds) {
- // /?deviceIds=${deviceIds}&businessType=${businessType}&type=${type}
- return request({
- url: `/admin/goods/listByDevice/admin/goods/listByDevice`,
- method: 'post',
- data: {
- deviceIds,
- businessType,
- type
- }
- })
- }
|