Foxtable(狐表)用户栏目专家坐堂 → 求助 JASON 文件里取不到值


  共有1944人关注过本帖平板打印复制链接

主题:求助 JASON 文件里取不到值

帅哥哟,离线,有人找我吗?
lin1221
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:104 积分:1044 威望:0 精华:0 注册:2015/2/9 21:01:00
求助 JASON 文件里取不到值  发帖心情 Post By:2018/6/22 13:32:00 [只看该作者]

微信公众号里有个openlocation,但是设定jason文件后, 点击就是不显示地图,
图片点击可在新窗口打开查看此主题相关图片如下:经纬度显示.jpg
图片点击可在新窗口打开查看
jason文件内容
wx.ready(function () {
    document.getElementById('btn1').onclick = function () {
        wx.getLocation({
            type: 'gcj02',
            success: function (res) {
res.latitude = document.getElementById('number').value;
res.longtitude = document.getElementById('product').value;
                wx.openLocation({  
                    latitude : res.latitude, // 纬度,浮点数,范围为90 ~ -90  
                    longitude : res.longtitude, // 经度,浮点数,范围为180 ~ -180。
                   name : '', // 位置名  
                    address : '', // 地址详情说明  
                    scale : 6, // 地图缩放级别,整形值,范围从1~28。默认为最大  
                    infoUrl : '' // 在查看位置界面底部显示的超链接,可点击跳转(测试好像不可用)  
                     });
            }
        });
    };
});
wx.error(function (res) {
    //alert(res.errMsg);
});

HTTPREQUEST内容:
    Case "maplist1.htm",""
        wb.AppendHTML("<script src='http://res.wx.qq.com/open/js/jweixin-1.2.0.js'></script>",True) '引入JS-SDK库
        wb.AppendHTML("<script src='./lib/jssdk1.js'></script>") '引入脚本文件
        '在页面注入权限验证配置
        Dim st As New Date(1970,1,1,8,0,0)
        Dim appid As String = "wxf411b4d9008f11a0" '开发者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:['openLocation']});"
        wb.AppendHTML("<script>" & CExp(cfg,appid,timestamp,noncestr,signature) & "</script>",True)
        '开始正常生成网页内容
        Dim PrimaryKey As Integer = e.GetValues("key")
        Dim dr01 As DataRow = DataTables("跟踪表").SQLFind("[_Identify]= " & PrimaryKey)
        If dr01 IsNot Nothing Then
            wb.addform("","form1","maplist1.htm?key=" & PrimaryKey)
            With wb.AddInputGroup("form1","ipg1","在途查询")
                .AddInput("product","经度","text").Value = dr01("经度")
                .AddInput("number","纬度","text").Value = dr01("纬度")
            End With
            With wb.AddButtonGroup("form1","btg1",True)
                .add("btn1","确定","submit")
            End With
        End If


 回到顶部
总数 13 1 2 下一页