123456789101112131415161718192021 |
- /**
- * 上传文件
- * @param {String} filePath 要上传文件资源的路径
- * @param {Object} config 可覆盖默认配置
- */
- export const uploadFile = (filePath, config) => {
- return uni.$u.http.upload('/file/upload', {
- name: 'file', // 文件对应的 key
- filePath,
- timeout: 1000 * 60 * 2,
- ...config,
- });
- };
- /**
- * 发送验证码
- * @param {Object} params
- */
- export const getAuthCode = (params) => {
- return uni.$u.http.get('/system/common/getAuthCode', { params });
- };
|