import request from '@/request'; // 获取回复 export const getAIResponse = (data) => request({ method: 'POST', url: '/api/chat', data }); export const getTextToAudio = (tex) => { return new Promise(resolve => { uni.request({ url: `https://tsn.baidu.com/text2audio`, method: 'POST', data : { tex, tok : '24.1c8cc30b5f7be445723b6d4b19a36152.2592000.1765094496.282335-120706844', cuid : '17619124287472660978', ctp : '1', lan : 'zh', spd : 5, pit : 5, vol : 5, per : 0, aue : 3 }, 'headers': { 'Content-Type': 'application/json', 'Accept': 'application/json' } }).then(res => { console.log('res getBaiduToken ',res); }) }) }