重构项目文件夹目录
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Mini program API wrapper for this module.
|
||||
* Call guide: require this module in a page, then invoke the matching method from page event handlers or lifecycle hooks.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: likeProduct supports product-like.js by holding or executing the like product 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.
|
||||
*/
|
||||
likeProduct(productId) {
|
||||
return request({
|
||||
url: `/product-like/like/${productId}`,
|
||||
method: 'POST'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: unlikeProduct supports product-like.js by holding or executing the unlike product 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.
|
||||
*/
|
||||
unlikeProduct(productId) {
|
||||
return request({
|
||||
url: `/product-like/unlike/${productId}`,
|
||||
method: 'POST'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: checkLikeStatus supports product-like.js by holding or executing the check like 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.
|
||||
*/
|
||||
checkLikeStatus(productId) {
|
||||
return request({
|
||||
url: `/product-like/check/${productId}`
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user