以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 微信sdk扫一扫接口可用,选择图片的接口没反应 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=110253) |
-- 作者:fubblyc -- 发布时间:2017/11/29 22:35:00 -- 微信sdk扫一扫接口可用,选择图片的接口没反应 老师,微信扫一扫的我按照帮助的说明设置了,可用。 同样的,图像接口的选择图片没起作用。 扫一扫可用: wx.ready(function () { document.getElementById(\'scan\').onclick = function () { wx.scanQRCode({ needResult: 1, scanType: [\'qrCode\',\'barCode\'], success: function (res) { document.getElementById(\'条形码\').value = res.resultStr; } }); }; }); wx.error(function (res) { //alert(res.errMsg); }); 选择图片接口没反应 wx.ready(function () { document.getElementById(\'paizhao\').onclick = function () { wx.chooseImage({ count: 9, // 默认9 sizeType: [\'compressed\'], // 可以指定是原图还是压缩图,默认二者都有 sourceType: [\'camera\'], // 可以指定来源是相册还是相机,默认二者都有 success: function (res) { var localIds = res.localIds; // 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片 document.getElementById(\'lujing\').value = localids } }); }; }); wx.error(function (res) { //alert(res.errMsg); }); 网页的写法: With .AddInputCell("ic2") .AddLabel("lbh2","上传照片",0) .AddInput("lujing","text",1) .AddVcodeButton("paizhao","拍照",2) \'增加二维码扫描按钮,2表示显示在右边 End With [此贴子已经被作者于2017/11/29 22:37:28编辑过]
|
-- 作者:有点甜 -- 发布时间:2017/11/29 22:38:00 -- 单独测试的,还是写在了一起?先单独测试。
下载web开发者工具,看报什么错 https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1455784140
|
-- 作者:fubblyc -- 发布时间:2017/11/29 22:41:00 -- 是单独测试。我现在下载调试一下。。。 |
-- 作者:fubblyc -- 发布时间:2017/11/29 22:52:00 -- 提示这样: [此贴子已经被作者于2017/11/29 22:53:58编辑过]
|
-- 作者:fubblyc -- 发布时间:2017/11/29 23:01:00 -- 我百度了下,是这个意思: the permission value is offline verifying这个错误是因为config没有正确执行,或者是调用的JSAPI没有传入config的jsApiList参数中。建议按如下顺序检查:
但是为什么扫一扫的可以呢。。。 这个要怎么再特殊操作一下吗
|
-- 作者:fubblyc -- 发布时间:2017/11/29 23:09:00 -- Dim cfg As String = "wx.config({appId:\'{0}\',timestamp:{1},nonceStr:\'{2}\',signature:\'{3}\',jsApiList:[\'scanQRCode\']});" 发现了是这个原因,这个要改成对应的图像接口的
|