/** * Purpose: request supports tag.js by holding or executing the request page or API role. * Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow. */ const request = require('../utils/request') module.exports = { /** * Purpose: listAllTags supports tag.js by holding or executing the list all tags page or API role. * Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow. */ listAllTags() { return request({ url: '/tag/list/all' }) }, /** * Purpose: listTagsByShopId supports tag.js by holding or executing the list tags by shop id page or API role. * Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow. */ listTagsByShopId(shopId) { return request({ url: `/tag/list/by-shop/${shopId}` }) }, /** * Purpose: getTagById supports tag.js by holding or executing the get tag by id page or API role. * Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow. */ getTagById(id) { return request({ url: `/tag/get/${id}` }) }, /** * Purpose: createTag supports tag.js by holding or executing the create tag page or API role. * Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow. */ createTag(data) { return request({ url: '/tag/create', method: 'POST', data }) }, /** * Purpose: updateTag supports tag.js by holding or executing the update tag page or API role. * Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow. */ updateTag(id, data) { return request({ url: `/tag/update/${id}`, method: 'PUT', data }) }, /** * Purpose: deleteTag supports tag.js by holding or executing the delete tag page or API role. * Usage: import, call, read, or update this method from the owning page/module while preserving the surrounding loading and permission flow. */ deleteTag(id) { return request({ url: `/tag/delete/${id}`, method: 'DELETE' }) } }