以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 微信扫描输入打不开 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=183320) |
||
-- 作者:YDS -- 发布时间:2022/10/31 15:31:00 -- 微信扫描输入打不开 域名备案了,公众号也审核通过了,但是按照例子做的页面点扫描输入没有反应,打不开摄像机,是哪里出问题了吗? |
||
-- 作者:有点蓝 -- 发布时间:2022/10/31 15:39:00 -- 代码?http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&Id=150626 |
||
-- 作者:YDS -- 发布时间:2022/10/31 15:55:00 -- Dim e As RequestEventArgs = args(0) Dim wb As New weui Output.Show(0) wb.AppendHTML("<script src=\'https://res.wx.qq.com/open/js/jweixin-1.6.0.js\'></script>", True) \'引入JS-SDK库 wb.AppendHTML("<script src=\'./lib/jssdk.js\'></script>") \'引入脚本文件 \'在页面注入权限验证配置 Dim st As New Date(1970, 1, 1, 8, 0, 0) Dim appid As String = Functions.Execute("Get","公众号",1) \'开发者ID Dim timestamp As Integer = CInt((Date.Now - st).TotalSeconds()) \'时间戳 Dim noncestr As String = Rand.NextString(16) \'随机字符 Dim url As String = e.Request.URL.ToString \'当前页面地址 Dim signature As String = Functions.Execute("GetJsSignature", noncestr, timestamp, url) \'生成权限验证签名 Dim cfg As String = "wx.config({appId:\'{0}\',timestamp:{1},nonceStr:\'{2}\',signature:\'{3}\',jsApiList:[\'scanQRCode\']});" wb.AppendHTML("<script>" & CExp(cfg, appid, timestamp, noncestr, signature) & "</script>", True) \'开始正常生成网页内容 Output.Show(1) wb.AddForm("", "form1", "test.htm") With wb.AddInputGroup("form1", "ipg1", "产品输入") .AddInput("product", "产品", "text") With .AddInputCell("ic1") .AddLabel("lbh", "编号", 0) .AddInput("number", "text", 1) .AddVcodeButton("scan", "扫码输入", 2) \'增加二维码扫描按钮,2表示显示在右边 End With End With Output.Show(2) With wb.AddButtonGroup("form1", "btg1", True) .Add("btn1", "确定", "submit") End With Output.Show(3) e.WriteString(wb.Build) \'生成网页 Output.Show(4) 0-4都可以正常输出
|
||
-- 作者:有点蓝 -- 发布时间:2022/10/31 16:00:00 -- httprequest事件完整代码发上来 |
||
-- 作者:YDS -- 发布时间:2022/10/31 16:01:00 -- Dim e As RequestEventArgs = args(0) \'接入验证 Select Case e.path Case "wefox" Functions.Execute("wefox", e) Return "" Case "", "test.htm" Functions.Execute("test", e) Return "" End Select
|
||
-- 作者:YDS -- 发布时间:2022/10/31 16:02:00 --
|
||
-- 作者:有点蓝 -- 发布时间:2022/10/31 16:07:00 -- 3楼的函数是test函数的内容?微信里通过什么地址打开扫码页面的? |
||
-- 作者:YDS -- 发布时间:2022/10/31 16:18:00 -- http://gzh.xoar.cn/test.htm |
||
-- 作者:YDS -- 发布时间:2022/10/31 16:20:00 --
|
||
-- 作者:有点蓝 -- 发布时间:2022/10/31 16:22:00 -- 安装微信开发者工具,在微信开发者工具里打开这个地址,看看提示是怎么错误 |