功能:同步小程序流程

This commit is contained in:
xiaowang
2026-05-23 18:45:41 +08:00
parent 844516988b
commit 30ae763e18
117 changed files with 8823 additions and 76 deletions
+32
View File
@@ -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}`