2026-05-18 09:46:11 +08:00
|
|
|
/**
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
2026-04-01 15:18:35 +08:00
|
|
|
const request = require('../utils/request')
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
2026-04-01 15:18:35 +08:00
|
|
|
getPublicShops() {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/shop/list/public'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
2026-04-01 15:18:35 +08:00
|
|
|
getShopsSimple() {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/shop/list/simple'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
2026-05-23 18:45:41 +08:00
|
|
|
/**
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
2026-04-01 15:18:35 +08:00
|
|
|
getShopById(id) {
|
|
|
|
|
return request({
|
|
|
|
|
url: `/shop/get/${id}`
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|