fix: 扫码轮询改用网站接受的回调名
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
package unicom
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestJSONPCallbackName(t *testing.T) {
|
||||
name := jsonpCallback()
|
||||
if !strings.HasPrefix(name, "jQuery") || !strings.Contains(name, "_") {
|
||||
t.Fatal(name)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseJSONP(t *testing.T) {
|
||||
quoted, err := parseJSONP(`cb({"resultCode":"false","ckCode":"2"});`)
|
||||
|
||||
Reference in New Issue
Block a user