功能:同步小程序流程

This commit is contained in:
xiaowang
2026-05-23 18:45:41 +08:00
parent 844516988b
commit 30ae763e18
117 changed files with 8823 additions and 76 deletions
+20
View File
@@ -5,6 +5,10 @@
const request = require('../utils/request')
module.exports = {
/**
* Purpose: addToCart supports cart.js by holding or executing the add to cart 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.
*/
addToCart(data) {
return request({
url: '/cart/add',
@@ -13,6 +17,10 @@ module.exports = {
})
},
/**
* Purpose: removeFromCart supports cart.js by holding or executing the remove from cart 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.
*/
removeFromCart(productId) {
return request({
url: `/cart/remove/${productId}`,
@@ -20,6 +28,10 @@ module.exports = {
})
},
/**
* Purpose: updateCartQuantity supports cart.js by holding or executing the update cart quantity 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.
*/
updateCartQuantity(data) {
return request({
url: '/cart/update',
@@ -28,12 +40,20 @@ module.exports = {
})
},
/**
* Purpose: getCartList supports cart.js by holding or executing the get cart list 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.
*/
getCartList() {
return request({
url: '/cart/list'
})
},
/**
* Purpose: clearCart supports cart.js by holding or executing the clear cart 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.
*/
clearCart() {
return request({
url: '/cart/clear',