功能:同步小程序流程
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user