Foxtable(狐表)用户栏目专家坐堂 → 扫码加查询


  共有13人关注过本帖树形打印复制链接

主题:扫码加查询

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


加好友 发短信
等级:超级版主 帖子:109489 积分:557107 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2024/9/20 11:33:00 [显示全部帖子]

http://www.foxtable.com/mobilehelp/topics/0247.htmhttp://www.foxtable.com/mobilehelp/topics/0108.htm

2、在d:\web\lib目录下新建一个文本文件jssdk.js,内容为:

wx.ready(function () {
    document.getElementById('
scan').onclick = function () {
        wx.scanQRCode({
            needResult: 1,
            scanType: ['qrCode','barCode'],
            success: function (res) {
                document.getElementById('
number
').value = res.resultStr;
var result = sendAjaxText(res.resultStr,"查询.htm","",false);
document.getElementById("设备名称").value =result;
            }
        });
    };
});
wx.error(function (res) {
    //alert(res.errMsg);
});

后台代码
    Case "查询.htm"
        dim 编号 as string = e.PlainText
dim dr as datarow = datatables("表A").find("编号='" & 编号 & "'")
if dr isnot nothing
         e.WriteString(dr("名称"))
else
         e.WriteString("没有编号对应的名称")
end if
[此贴子已经被作者于2024/9/20 11:33:05编辑过]

 回到顶部