OfficeSystem/common/api/common.js
2025-11-07 11:18:55 +08:00

29 lines
502 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 通用 API工具类接口
*/
/**
* 获取七牛云上传token
* @returns {Promise} 返回七牛云上传token
*/
export const getQiniuUploadToken = () => {
return uni.$uv.http.get('/common/qiniuToken', {
custom: {
auth: true // 启用 token 认证
}
});
};
/**
* 获取地区树
* @returns {Promise} 返回地区树数据
*/
export const getRegionTree = () => {
return uni.$uv.http.get(`/bst/region/treaDity`, {
custom: {
auth: true
}
});
};