|
@@ -31,6 +31,7 @@ export const uploadToServer = async (tempFilePath) => {
|
|
|
* 上传回复音频到服务器
|
|
|
*/
|
|
|
export const uploadAudioToServer = async(tempFilePath)=>{
|
|
|
+ const { envVersion } = uni.getAccountInfoSync().miniProgram
|
|
|
const temres = await uniAsync.uploadFile({
|
|
|
url: baseApiUrl + "/community/question/reply/upload_audio",
|
|
|
filePath: tempFilePath,
|
|
@@ -39,7 +40,7 @@ export const uploadAudioToServer = async(tempFilePath)=>{
|
|
|
Authorization: store.state.user.token,
|
|
|
},
|
|
|
});
|
|
|
- const res = JSON.parse(temres.data);
|
|
|
+ const res = envVersion === 'release' ? JSON.parse(CryptoJS.Des3Decrypt(temres.data)) : JSON.parse(temres.data);
|
|
|
return res;
|
|
|
|
|
|
}
|