From 2720f33d02cac15fdc55c376c844ec678c5d7c3c Mon Sep 17 00:00:00 2001 From: MemRelay Date: Fri, 16 Oct 2026 17:20:35 +0800 Subject: [PATCH] =?UTF-8?q?create:=20=E8=81=94=E9=80=9A=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=98=AF=E5=8D=95=E5=BC=95=E5=8F=B7=20JSONP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MemRelay-Operation: memory-save:cusim-sms-jsonp-20261016 MemRelay-Resource: e8fc5c34-1ec2-4c1d-9c28-686031976647 --- .../联通短信接口是单引号 JSONP.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/ccc02006-4524-4027-a2fa-5b59e35f5eb3/联通短信接口是单引号 JSONP.md diff --git a/projects/ccc02006-4524-4027-a2fa-5b59e35f5eb3/联通短信接口是单引号 JSONP.md b/projects/ccc02006-4524-4027-a2fa-5b59e35f5eb3/联通短信接口是单引号 JSONP.md new file mode 100644 index 0000000..a808556 --- /dev/null +++ b/projects/ccc02006-4524-4027-a2fa-5b59e35f5eb3/联通短信接口是单引号 JSONP.md @@ -0,0 +1,20 @@ +--- +title: 联通短信接口是单引号 JSONP +type: fact +permalink: main/projects/ccc02006-4524-4027-a2fa-5b59e35f5eb3/联通短信接口是单引号-jsonp +stable_id: e8fc5c34-1ec2-4c1d-9c28-686031976647 +scope: project +memory_type: fact +project_id: ccc02006-4524-4027-a2fa-5b59e35f5eb3 +usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 +status: active +revision: 1 +request_id: cusim-sms-jsonp-20261016 +created_at: '2026-10-16T09:20:32.415331+00:00' +updated_at: '2026-10-16T09:20:32.415331+00:00' +tags: +- unicom +- sms +--- + +联通发短信 SendMSG 是 JSONP,不是 JSON。成功响应为 jQuery回调包住不带引号的对象,例如 resultCode 为 0000、redirectURL 为 null。失败响应同样是这种对象,但 msg 使用单引号,字段还有 errDesc、needvode、errorFrom。页面用 $.getJSON,参数编码等同 encodeURIComponent,票据 uvc 里的星号原样保留,@ 编成 %40。参数顺序是 callback、req_time、mobile、uvc、verifyCode,最后是缓存参数 _。解析必须执行这段脚本,不能当 JSON。 \ No newline at end of file