完成对公初始操作和专区
This commit is contained in:
@@ -20,4 +20,24 @@ export const uploadFile = (filePath) => {
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
export const uploadPublicFile = (filePath) => {
|
||||
const { api } = getConfigByEnv();
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
filePath: filePath,
|
||||
name: 'file',
|
||||
url: `${api}/wx/public/upload`,
|
||||
header: {
|
||||
authorization: wx.getStorageSync("token")
|
||||
},
|
||||
success: (res) => {
|
||||
resolve(res);
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err);
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user