Files
JayuCloud/YumiNail-Admin-Program/api/tag.js
T

73 lines
2.4 KiB
JavaScript
Raw Normal View History

2026-05-23 18:45:41 +08:00
/**
* 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 = {
2026-05-23 18:45:41 +08:00
/**
* 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'
})
},
2026-05-23 18:45:41 +08:00
/**
* 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}`
})
},
2026-05-23 18:45:41 +08:00
/**
* 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}`
})
},
2026-05-23 18:45:41 +08:00
/**
* 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
})
},
2026-05-23 18:45:41 +08:00
/**
* 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
})
},
2026-05-23 18:45:41 +08:00
/**
* 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'
})
}
}