功能:同步小程序流程
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
/**
|
||||
* Purpose: request supports auth.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: login supports auth.js by holding or executing the login 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.
|
||||
*/
|
||||
login(data) {
|
||||
return request({
|
||||
url: '/auth/login',
|
||||
@@ -9,12 +17,20 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getLoginShops supports auth.js by holding or executing the get login 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.
|
||||
*/
|
||||
getLoginShops(account) {
|
||||
return request({
|
||||
url: `/auth/login-shops/${encodeURIComponent(account)}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: switchShop supports auth.js by holding or executing the switch shop 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.
|
||||
*/
|
||||
switchShop(shopId) {
|
||||
return request({
|
||||
url: '/auth/switch-shop',
|
||||
@@ -25,6 +41,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: refreshToken supports auth.js by holding or executing the refresh token 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.
|
||||
*/
|
||||
refreshToken(refreshToken) {
|
||||
return request({
|
||||
url: '/auth/refresh',
|
||||
@@ -35,6 +55,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: logout supports auth.js by holding or executing the logout 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.
|
||||
*/
|
||||
logout() {
|
||||
return request({
|
||||
url: '/auth/logout',
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
/**
|
||||
* Purpose: request supports comment.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listComments supports comment.js by holding or executing the list comments 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.
|
||||
*/
|
||||
listComments(params) {
|
||||
return request({
|
||||
url: '/comment/list',
|
||||
@@ -8,6 +16,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: deleteComment supports comment.js by holding or executing the delete comment 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.
|
||||
*/
|
||||
deleteComment(id) {
|
||||
return request({
|
||||
url: `/comment/delete/${id}`,
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
/**
|
||||
* Purpose: request supports coupon.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listCoupons supports coupon.js by holding or executing the list coupons 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.
|
||||
*/
|
||||
listCoupons(params) {
|
||||
return request({
|
||||
url: '/coupon/list',
|
||||
@@ -8,6 +16,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listAllCoupons supports coupon.js by holding or executing the list all coupons 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.
|
||||
*/
|
||||
listAllCoupons(shopId) {
|
||||
return request({
|
||||
url: '/coupon/list/all',
|
||||
@@ -15,12 +27,20 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getCouponDetail supports coupon.js by holding or executing the get coupon detail 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.
|
||||
*/
|
||||
getCouponDetail(id) {
|
||||
return request({
|
||||
url: `/coupon/detail/${id}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: createCoupon supports coupon.js by holding or executing the create coupon 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.
|
||||
*/
|
||||
createCoupon(data) {
|
||||
return request({
|
||||
url: '/coupon/create',
|
||||
@@ -29,6 +49,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateCoupon supports coupon.js by holding or executing the update coupon 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.
|
||||
*/
|
||||
updateCoupon(id, data) {
|
||||
return request({
|
||||
url: `/coupon/update/${id}`,
|
||||
@@ -37,6 +61,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: deleteCoupon supports coupon.js by holding or executing the delete coupon 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.
|
||||
*/
|
||||
deleteCoupon(id) {
|
||||
return request({
|
||||
url: `/coupon/delete/${id}`,
|
||||
@@ -44,6 +72,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: assignCoupon supports coupon.js by holding or executing the assign coupon 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.
|
||||
*/
|
||||
assignCoupon(data) {
|
||||
return request({
|
||||
url: '/coupon/assign',
|
||||
@@ -53,6 +85,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: distributeCoupon supports coupon.js by holding or executing the distribute coupon 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.
|
||||
*/
|
||||
distributeCoupon(data) {
|
||||
return request({
|
||||
url: '/coupon/distribute',
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
/**
|
||||
* Purpose: request supports dashboard.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: getStats supports dashboard.js by holding or executing the get stats 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.
|
||||
*/
|
||||
getStats() {
|
||||
return request({
|
||||
url: '/dashboard/stats'
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
/**
|
||||
* Purpose: request supports file.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
/**
|
||||
* Purpose: actionGuard supports file.js by holding or executing the action guard page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const actionGuard = require('../utils/action-guard')
|
||||
const { ADMIN_API_BASE_URL, REQUEST_TIMEOUT } = require('../utils/config')
|
||||
|
||||
/**
|
||||
* Purpose: normalizeUploadResponse supports file.js by holding or executing the normalize upload response page or API role.
|
||||
* Usage: import, call, read, or update this function from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
function normalizeUploadResponse(response) {
|
||||
if (!response) {
|
||||
throw new Error('上传失败')
|
||||
@@ -33,6 +45,10 @@ function normalizeUploadResponse(response) {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: initChunkUpload supports file.js by holding or executing the init chunk upload 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.
|
||||
*/
|
||||
initChunkUpload(data) {
|
||||
return request({
|
||||
url: '/object-storage-file/upload/init',
|
||||
@@ -41,6 +57,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: uploadChunkFile supports file.js by holding or executing the upload chunk file 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.
|
||||
*/
|
||||
uploadChunkFile(options) {
|
||||
const signedHeaders = request.buildSignatureHeaders({
|
||||
url: '/object-storage-file/upload/chunk',
|
||||
@@ -91,6 +111,10 @@ module.exports = {
|
||||
)
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: completeChunkUpload supports file.js by holding or executing the complete chunk upload 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.
|
||||
*/
|
||||
completeChunkUpload(uploadId) {
|
||||
return request({
|
||||
url: '/object-storage-file/upload/complete',
|
||||
@@ -101,6 +125,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: cancelChunkUpload supports file.js by holding or executing the cancel chunk upload 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.
|
||||
*/
|
||||
cancelChunkUpload(uploadId) {
|
||||
return request({
|
||||
url: `/object-storage-file/upload/${uploadId}`,
|
||||
@@ -108,6 +136,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getSignedUrl supports file.js by holding or executing the get signed url 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.
|
||||
*/
|
||||
getSignedUrl(fileId) {
|
||||
return request({
|
||||
url: `/object-storage-file/get-signed-url/${fileId}`
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
/**
|
||||
* Purpose: request supports nail-artist.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listNailArtists supports nail-artist.js by holding or executing the list nail artists 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.
|
||||
*/
|
||||
listNailArtists() {
|
||||
return request({
|
||||
url: '/nail-artist/list'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getNailArtistInfo supports nail-artist.js by holding or executing the get nail artist info 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.
|
||||
*/
|
||||
getNailArtistInfo(userId) {
|
||||
return request({
|
||||
url: `/nail-artist/get/${userId}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: saveNailArtistInfo supports nail-artist.js by holding or executing the save nail artist info 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.
|
||||
*/
|
||||
saveNailArtistInfo(data) {
|
||||
return request({
|
||||
url: '/nail-artist/save',
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
/**
|
||||
* Purpose: request supports order.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listOrders supports order.js by holding or executing the list orders 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.
|
||||
*/
|
||||
listOrders(params) {
|
||||
return request({
|
||||
url: '/order/list',
|
||||
@@ -8,12 +16,30 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getOrderDetail loads an authoritative admin-scoped order detail row.
|
||||
* Usage: call with the order id when opening the order detail page so direct page entry works.
|
||||
*/
|
||||
getOrderDetail(id) {
|
||||
return request({
|
||||
url: `/order/detail/${id}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listOrderReviews supports order.js by holding or executing the list order reviews 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.
|
||||
*/
|
||||
listOrderReviews(orderId) {
|
||||
return request({
|
||||
url: `/order/${orderId}/reviews`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getArtistChangeOptions supports order.js by holding or executing the get artist change options 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.
|
||||
*/
|
||||
getArtistChangeOptions(orderId, orderItemId) {
|
||||
return request({
|
||||
url: `/order/${orderId}/artist-change/options`,
|
||||
@@ -23,6 +49,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: requestArtistChange supports order.js by holding or executing the request artist change 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.
|
||||
*/
|
||||
requestArtistChange(data) {
|
||||
return request({
|
||||
url: '/order/artist-change/request',
|
||||
@@ -31,12 +61,20 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listMyPendingArtistChangeRequests supports order.js by holding or executing the list my pending artist change requests 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.
|
||||
*/
|
||||
listMyPendingArtistChangeRequests() {
|
||||
return request({
|
||||
url: '/order/artist-change/my-pending'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateOrderStatus supports order.js by holding or executing the update order status 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.
|
||||
*/
|
||||
updateOrderStatus(id, status) {
|
||||
return request({
|
||||
url: `/order/update-status/${id}`,
|
||||
|
||||
@@ -1,30 +1,54 @@
|
||||
/**
|
||||
* Purpose: request supports permission.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: getCurrentUserPermissions supports permission.js by holding or executing the get current user permissions 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.
|
||||
*/
|
||||
getCurrentUserPermissions() {
|
||||
return request({
|
||||
url: '/permission/user/current'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getUserPermissions supports permission.js by holding or executing the get user permissions 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.
|
||||
*/
|
||||
getUserPermissions(userId) {
|
||||
return request({
|
||||
url: `/permission/user/${userId}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getAssignablePermissionIds supports permission.js by holding or executing the get assignable permission ids 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.
|
||||
*/
|
||||
getAssignablePermissionIds(userId) {
|
||||
return request({
|
||||
url: `/permission/assignable/${userId}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listAllPermissions supports permission.js by holding or executing the list all permissions 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.
|
||||
*/
|
||||
listAllPermissions() {
|
||||
return request({
|
||||
url: '/permission/list/all'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: createPermission supports permission.js by holding or executing the create permission 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.
|
||||
*/
|
||||
createPermission(data) {
|
||||
return request({
|
||||
url: '/permission/create',
|
||||
@@ -33,6 +57,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updatePermission supports permission.js by holding or executing the update permission 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.
|
||||
*/
|
||||
updatePermission(id, data) {
|
||||
return request({
|
||||
url: `/permission/update/${id}`,
|
||||
@@ -41,6 +69,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: deletePermission supports permission.js by holding or executing the delete permission 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.
|
||||
*/
|
||||
deletePermission(id) {
|
||||
return request({
|
||||
url: `/permission/delete/${id}`,
|
||||
@@ -48,6 +80,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: assignUserPermissions supports permission.js by holding or executing the assign user permissions 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.
|
||||
*/
|
||||
assignUserPermissions(userId, permissionIds) {
|
||||
return request({
|
||||
url: `/permission/assign/${userId}`,
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
/**
|
||||
* Purpose: request supports product.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listProducts supports product.js by holding or executing the list products 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.
|
||||
*/
|
||||
listProducts(params) {
|
||||
return request({
|
||||
url: '/product/list',
|
||||
@@ -8,12 +16,20 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listAllProducts supports product.js by holding or executing the list all products 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.
|
||||
*/
|
||||
listAllProducts() {
|
||||
return request({
|
||||
url: '/product/list/all'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: createProduct supports product.js by holding or executing the create product 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.
|
||||
*/
|
||||
createProduct(data) {
|
||||
return request({
|
||||
url: '/product/create',
|
||||
@@ -22,6 +38,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateProduct supports product.js by holding or executing the update product 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.
|
||||
*/
|
||||
updateProduct(id, data) {
|
||||
return request({
|
||||
url: `/product/update/${id}`,
|
||||
@@ -30,6 +50,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: deleteProduct supports product.js by holding or executing the delete product 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.
|
||||
*/
|
||||
deleteProduct(id) {
|
||||
return request({
|
||||
url: `/product/delete/${id}`,
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Purpose: request sends signed admin mini-program requests to the backend audit API.
|
||||
* Usage: require this module from the audit page and call `listLogs` with filter params.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listLogs loads read-only security audit log rows for authorized administrators.
|
||||
* Usage: pass account, action, result, time range, page, and size filters, then render the returned page result.
|
||||
*/
|
||||
listLogs(params) {
|
||||
return request({
|
||||
url: '/security-audit/logs',
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,14 @@
|
||||
/**
|
||||
* Purpose: request supports shop.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listShops supports shop.js by holding or executing the list 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.
|
||||
*/
|
||||
listShops(params) {
|
||||
return request({
|
||||
url: '/shops/list',
|
||||
@@ -8,18 +16,30 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listAllShops supports shop.js by holding or executing the list all 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.
|
||||
*/
|
||||
listAllShops() {
|
||||
return request({
|
||||
url: '/shops/list/all'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getShop supports shop.js by holding or executing the get shop 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.
|
||||
*/
|
||||
getShop(id) {
|
||||
return request({
|
||||
url: `/shops/${id}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: createShop supports shop.js by holding or executing the create shop 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.
|
||||
*/
|
||||
createShop(data) {
|
||||
return request({
|
||||
url: '/shops/create',
|
||||
@@ -28,6 +48,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateShop supports shop.js by holding or executing the update shop 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.
|
||||
*/
|
||||
updateShop(id, data) {
|
||||
return request({
|
||||
url: `/shops/update/${id}`,
|
||||
@@ -36,6 +60,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateShopStatus supports shop.js by holding or executing the update shop status 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.
|
||||
*/
|
||||
updateShopStatus(id, status) {
|
||||
return request({
|
||||
url: `/shops/status/${id}`,
|
||||
@@ -46,6 +74,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: deleteShop supports shop.js by holding or executing the delete shop 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.
|
||||
*/
|
||||
deleteShop(id) {
|
||||
return request({
|
||||
url: `/shops/delete/${id}`,
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Purpose: request sends signed admin mini-program calls to the backend system-message endpoints.
|
||||
* Usage: keep all system-message API wrappers in this module so pages do not build URLs by hand.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listMessages loads admin-visible system messages including popup and business navigation metadata.
|
||||
* Usage: call it from the system-message management page during initial load or refresh.
|
||||
*/
|
||||
listMessages() {
|
||||
return request({
|
||||
url: '/system-message/admin/list'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: createMessage publishes a new system message to the selected target users.
|
||||
* Usage: pass validated form data with targetType, popupEnabled, and optional business fields.
|
||||
*/
|
||||
createMessage(data) {
|
||||
return request({
|
||||
url: '/system-message/admin/create',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: revokeMessage withdraws a previously published message when the operator has delete permission.
|
||||
* Usage: call it with the message id after an explicit confirmation dialog.
|
||||
*/
|
||||
revokeMessage(id) {
|
||||
return request({
|
||||
url: `/system-message/admin/${id}/revoke`,
|
||||
method: 'PUT',
|
||||
data: {}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getTargetOptions loads shops and users that the current operator may target.
|
||||
* Usage: call it before showing the publish form so picker data is permission-scoped.
|
||||
*/
|
||||
getTargetOptions() {
|
||||
return request({
|
||||
url: '/system-message/admin/target-options'
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,44 @@
|
||||
/**
|
||||
* Purpose: request supports tag.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listAllTags supports tag.js by holding or executing the list all tags 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.
|
||||
*/
|
||||
listAllTags() {
|
||||
return request({
|
||||
url: '/tag/list/all'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listTagsByShopId supports tag.js by holding or executing the list tags by shop 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.
|
||||
*/
|
||||
listTagsByShopId(shopId) {
|
||||
return request({
|
||||
url: `/tag/list/by-shop/${shopId}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getTagById supports tag.js by holding or executing the get tag 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.
|
||||
*/
|
||||
getTagById(id) {
|
||||
return request({
|
||||
url: `/tag/get/${id}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: createTag supports tag.js by holding or executing the create tag 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.
|
||||
*/
|
||||
createTag(data) {
|
||||
return request({
|
||||
url: '/tag/create',
|
||||
@@ -27,6 +47,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateTag supports tag.js by holding or executing the update tag 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.
|
||||
*/
|
||||
updateTag(id, data) {
|
||||
return request({
|
||||
url: `/tag/update/${id}`,
|
||||
@@ -35,6 +59,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: deleteTag supports tag.js by holding or executing the delete tag 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.
|
||||
*/
|
||||
deleteTag(id) {
|
||||
return request({
|
||||
url: `/tag/delete/${id}`,
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
/**
|
||||
* Purpose: request supports user.js by holding or executing the request page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const request = require('../utils/request')
|
||||
|
||||
module.exports = {
|
||||
/**
|
||||
* Purpose: listUsers supports user.js by holding or executing the list users 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.
|
||||
*/
|
||||
listUsers(params) {
|
||||
return request({
|
||||
url: '/user/list',
|
||||
@@ -8,12 +16,20 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listAllUsers supports user.js by holding or executing the list all users 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.
|
||||
*/
|
||||
listAllUsers() {
|
||||
return request({
|
||||
url: '/user/list/all'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: listArtists supports user.js by holding or executing the list artists 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.
|
||||
*/
|
||||
listArtists(shopId) {
|
||||
return request({
|
||||
url: '/user/list/artists',
|
||||
@@ -21,6 +37,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: createUser supports user.js by holding or executing the create user 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.
|
||||
*/
|
||||
createUser(data) {
|
||||
return request({
|
||||
url: '/user/create',
|
||||
@@ -29,6 +49,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateUser supports user.js by holding or executing the update user 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.
|
||||
*/
|
||||
updateUser(id, data) {
|
||||
return request({
|
||||
url: `/user/update/${id}`,
|
||||
@@ -37,6 +61,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: updateUserStatus supports user.js by holding or executing the update user status 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.
|
||||
*/
|
||||
updateUserStatus(id, status) {
|
||||
return request({
|
||||
url: `/user/status/${id}`,
|
||||
@@ -47,6 +75,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: deleteUser supports user.js by holding or executing the delete user 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.
|
||||
*/
|
||||
deleteUser(id) {
|
||||
return request({
|
||||
url: `/user/delete/${id}`,
|
||||
@@ -54,6 +86,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: unbindUser supports user.js by holding or executing the unbind user 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.
|
||||
*/
|
||||
unbindUser(id) {
|
||||
return request({
|
||||
url: `/user/unbind/${id}`,
|
||||
@@ -62,6 +98,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: resetPassword supports user.js by holding or executing the reset password 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.
|
||||
*/
|
||||
resetPassword(id) {
|
||||
return request({
|
||||
url: `/user/reset-password/${id}`,
|
||||
@@ -69,24 +109,40 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getCurrentUserInfo supports user.js by holding or executing the get current user info 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.
|
||||
*/
|
||||
getCurrentUserInfo() {
|
||||
return request({
|
||||
url: '/user/info'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getUserAsset supports user.js by holding or executing the get user asset 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.
|
||||
*/
|
||||
getUserAsset(id) {
|
||||
return request({
|
||||
url: `/user/${id}/asset`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: getUserBalanceHistory supports user.js by holding or executing the get user balance history 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.
|
||||
*/
|
||||
getUserBalanceHistory(id) {
|
||||
return request({
|
||||
url: `/user/${id}/balance/history`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: changeUserBalance supports user.js by holding or executing the change user balance 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.
|
||||
*/
|
||||
changeUserBalance(id, data) {
|
||||
return request({
|
||||
url: `/user/${id}/balance/change`,
|
||||
@@ -95,6 +151,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: overrideUserVip supports user.js by holding or executing the override user vip 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.
|
||||
*/
|
||||
overrideUserVip(id, data) {
|
||||
return request({
|
||||
url: `/user/${id}/vip/override`,
|
||||
@@ -103,6 +163,10 @@ module.exports = {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Purpose: recalculateUserVip supports user.js by holding or executing the recalculate user vip 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.
|
||||
*/
|
||||
recalculateUserVip(id) {
|
||||
return request({
|
||||
url: `/user/${id}/vip/recalculate`,
|
||||
|
||||
Reference in New Issue
Block a user