1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- const baseUrl = '/api'
- const $api = {
- login: { // 登陆
- signin: {
- method: 'post',
- url: `${baseUrl}/guest/signin`
- }
- },
- system: {
- init: { // 初始化菜单
- method: 'get',
- url: `${baseUrl}/common/system/init`
- }
- },
- goodsManager: {
- getGoodsSpecList: { // 商品规格列表
- method: 'get',
- url: `${baseUrl}/common/spec/goods`
- },
- addGoodsSpec: { // 新增商品规格
- method: 'POST',
- url: `${baseUrl}/common/spec/goods`
- },
- getGoodsSpecById: { // 根据id获取商品规格
- method: 'get',
- url: `${baseUrl}/common/spec/goods/:id`
- },
- editGoodsSpec: { // 编辑商品规格
- method: 'put',
- url: `${baseUrl}/common/spec/goods/:id`
- },
- deleteGoodsSpec: { // 删除商品规格
- method: 'DELETE',
- url: `${baseUrl}/common/spec/goods/:id`
- }
- },
- cms: {
- location: { // 图片位置
- method: 'get',
- url: `${baseUrl}/common/cms/location`
- },
- imageList: { // 轮播图列表
- method: 'get',
- url: `${baseUrl}/common/cms/image`
- },
- addImage: { // 添加轮播图
- method: 'post',
- url: `${baseUrl}/common/cms/image`
- },
- editImage: { // 编辑轮播图
- method: 'post',
- url: `${baseUrl}/common/cms/image`
- }
- },
- file: {
- image: { // 图片上传
- method: 'post',
- url: `${baseUrl}/common/file`
- }
- }
- }
- export default $api
|