Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
80408014fd
@ -13,7 +13,7 @@
|
||||
* onTimeout {Function} 超时后调用,默认超时时间为60秒
|
||||
*/
|
||||
export function btts(param, options) {
|
||||
var url = 'http://tsn.baidu.com/text2audio';
|
||||
var url = process.env.NODE_ENV === 'development' ? 'http://tsn.baidu.com/text2audio' : 'https://tsn.baidu.com/text2audio';
|
||||
var opt = options || {};
|
||||
var p = param || {};
|
||||
|
||||
@ -49,7 +49,7 @@ export function btts(param, options) {
|
||||
// 创建form参数
|
||||
var data = {};
|
||||
for (var p in param) {
|
||||
data[p] = param[p]
|
||||
data[p] = param[p];
|
||||
}
|
||||
|
||||
// 赋值预定义参数
|
||||
@ -90,7 +90,7 @@ export function btts(param, options) {
|
||||
if (opt.autoDestory) {
|
||||
audio.onended = function() {
|
||||
document.body.removeChild(audio);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
isFunction(opt.onSuccess) && opt.onSuccess(audio);
|
||||
@ -106,7 +106,7 @@ export function btts(param, options) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 判断是否是函数
|
||||
function isFunction(obj) {
|
||||
|
Loading…
Reference in New Issue
Block a user