Files
JayuCloud/JY-Artist-WeChat/api/shop.js
T
2026-06-29 23:26:43 +08:00

48 lines
1.5 KiB
JavaScript

/**
* 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: getPublicShops supports shop.js by holding or executing the get public 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.
*/
getPublicShops() {
return request({
url: '/shop/list/public'
})
},
/**
* Purpose: getShopsSimple supports shop.js by holding or executing the get shops simple 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.
*/
getShopsSimple() {
return request({
url: '/shop/list/simple'
})
},
/**
* Purpose: getShopById supports shop.js by holding or executing the get shop by id 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.
*/
getShopById(id) {
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}`
})
}
}