3***@qq.com
3***@qq.com
  • 发布:2020-07-06 14:56
  • 更新:2020-07-06 14:56
  • 阅读:1066

uni.createInnerAudioContext() 这个音频要放在接口前,IOS才能发出声音

分类:uni-app

let src = '/static/ok.mp3'; //扫码成功
let src2 = '/static/no.mp3'; //扫码错误
let src3 = '/static/phwc.mp3'; //配货完成
let src4 = '/static/cfph.mp3'; //重复配货
let src5 = '/static/hpcl.mp3'; //货配错了
const Audio = uni.createInnerAudioContext();
Audio.autoplay = true;

uni.request({
url: _self.Publicurl + '/APP/PDA.ashx',
data: {
ApiID: 'AUTao',
ApiSecret: 'Ad12ASD62sdf21s2dfsdf2s',
Version: '1.0',
timestamp: timestamp,
sign: singx,
action: "JianHuo",
PdaUserID: _self.uid,
PdaUserName: _self.uname,
ExpressCode: ExpressCode,
ProCode: _self.ProCode
},
method: "POST",
header: {
'content-type': 'application/json'
},
success: function(res) {

                    Audio.src = src4;  

}});

2020-07-06 14:56 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复