11
This commit is contained in:
+9
-2
@@ -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"),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user