重构项目文件夹目录
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* Purpose: request supports shop.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: listShops supports shop.js by holding or executing the list shops 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.
|
||||
*/
|
||||
listShops(params) {
|
||||
return request({
|
||||
url: '/shops/list',
|
||||
params
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listAllShops supports shop.js by holding or executing the list all shops 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.
|
||||
*/
|
||||
listAllShops() {
|
||||
return request({
|
||||
url: '/shops/list/all'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getShop supports shop.js by holding or executing the get shop 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.
|
||||
*/
|
||||
getShop(id) {
|
||||
return request({
|
||||
url: `/shops/${id}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: createShop supports shop.js by holding or executing the create shop 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.
|
||||
*/
|
||||
createShop(data) {
|
||||
return request({
|
||||
url: '/shops/create',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateShop supports shop.js by holding or executing the update shop 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.
|
||||
*/
|
||||
updateShop(id, data) {
|
||||
return request({
|
||||
url: `/shops/update/${id}`,
|
||||
method: 'PUT',
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateShopStatus supports shop.js by holding or executing the update shop status 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.
|
||||
*/
|
||||
updateShopStatus(id, status) {
|
||||
return request({
|
||||
url: `/shops/status/${id}`,
|
||||
method: 'PUT',
|
||||
data: {
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: deleteShop supports shop.js by holding or executing the delete shop 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.
|
||||
*/
|
||||
deleteShop(id) {
|
||||
return request({
|
||||
url: `/shops/delete/${id}`,
|
||||
method: 'DELETE'
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user