功能(小程序):同步用户体验流程到小程序

This commit is contained in:
xiaowang
2026-05-23 21:56:52 +08:00
parent 861eea933b
commit b67dae502f
38 changed files with 2163 additions and 126 deletions
+24
View File
@@ -0,0 +1,24 @@
/**
* Mini program API wrapper for public nail artist pages.
*/
const request = require('../utils/request')
module.exports = {
getPublicProfile(artistId) {
return request({
url: `/nail-artist/profile/${artistId}`
})
},
getAvailability(artistId) {
return request({
url: `/nail-artist/${artistId}/availability`
})
},
listReviews(artistId) {
return request({
url: `/nail-artist/${artistId}/reviews`
})
}
}
+18
View File
@@ -17,6 +17,14 @@ module.exports = {
})
},
checkoutPreview(data) {
return request({
url: '/order/checkout-preview',
method: 'POST',
data
})
},
/**
* Purpose: getOrderList supports order.js by holding or executing the get order 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.
@@ -47,6 +55,16 @@ module.exports = {
})
},
/**
* Purpose: listOrderArtistChangeRequests loads every change request attached to one order for timeline display.
* Usage: call it from the order page after loading the order list; callers may fall back to an empty list.
*/
listOrderArtistChangeRequests(orderId) {
return request({
url: `/order/${orderId}/artist-change/requests`
})
},
/**
* Purpose: submitArtistReview supports order.js by holding or executing the submit artist review 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.
+10
View File
@@ -33,5 +33,15 @@ module.exports = {
return request({
url: `/shop/get/${id}`
})
},
/**
* Purpose: getTrustProfile loads public trust signals for the shop detail page.
* Usage: render ratings, recent reviews, environment images, and booking hints.
*/
getTrustProfile(id) {
return request({
url: `/shop/trust-profile/${id}`
})
}
}
+11
View File
@@ -13,5 +13,16 @@ module.exports = {
return request({
url: '/tag/list/all'
})
},
/**
* Purpose: getFilterOptions loads grouped public tag filters for scene-based browsing.
* Usage: call it from product list pages, then pass selected tag ids to getProductPage.
*/
getFilterOptions(shopId) {
return request({
url: '/tag/list/filter-options',
params: shopId ? { shopId } : undefined
})
}
}
+28
View File
@@ -54,5 +54,33 @@ module.exports = {
return request({
url: '/wishlist/list'
})
},
getGroups() {
return request({
url: '/wishlist/groups'
})
},
getInspiration() {
return request({
url: '/wishlist/inspiration'
})
},
addWithGroup(data) {
return request({
url: '/wishlist/add-with-group',
method: 'POST',
data
})
},
moveWishlist(data) {
return request({
url: '/wishlist/move',
method: 'POST',
data
})
}
}