This commit is contained in:
cansnow
2025-12-08 02:29:46 +08:00
parent 69a61178e1
commit 22ee59cd3d
17 changed files with 895 additions and 244 deletions
+9 -2
View File
@@ -90,12 +90,19 @@ export const getFriendCircleNewcount = () =>{
export const getFriendCircleInfo = () =>{
return uni.$u?.http.get("/friendcircle/info");
}
export const upload = (url,onProgress) =>{
export const upload = (files,data,onProgress) =>{
if(typeof data == 'function'){
onProgress = data;
data = {};
}
console.log(typeof files);
return new Promise((resolve,reject)=>{
var u = uni.uploadFile({
url: config.getRegisterUrl()+"/user/upload", // 仅为示例,非真实的接口地址
filePath: url,
filePath: files,
//files:files.length > 1 ? files : files[0],
name: "file",
formData:data,
header:{
token:uni.getStorageSync("BusinessToken"),
},