提交 2f1b877a 编写于 作者: Q qiang

fix(h5): getJSONP callbackName #3681

上级 f6d4cba2
......@@ -3,7 +3,7 @@ interface Options {
callback?: string
timeout?: number
}
let index = 0
export function getJSONP(
url: string,
options: Options,
......@@ -12,7 +12,7 @@ export function getJSONP(
) {
var js = document.createElement('script')
var callbackKey = options.callback || 'callback'
var callbackName = '__callback' + Date.now()
var callbackName = '__uni_jsonp_callback_' + index++
var timeout = options.timeout || 30000
var timing: ReturnType<typeof setTimeout>
function end() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册