PageSourceSearch

https://www.86gis.com/static/js/tucao.js

js 86gis.com collected 2026-09-30 09:26:18 UTC 1,661 bytes, 55 lines download raw bytes

1/**
2 * 吐个槽接入脚本
3 * 支持 AMD,CJS,全局调用
4 */
5(function(root, factory) {
6    if (typeof define === "function" && define.amd) {
7        define(function() {
8            return (root.Tucao = factory());
9        });
10    } else if (typeof module === "object" && module.exports) {
11        module.exports = (root.Tucao = factory());
12    } else {
13        root.Tucao = factory();
14    }
15}(this, function() {
16    
17    var Tucao = (function() {
18        /**
19         * 发起接入请求
20         * @param  {Number} productId  需要接入产品 id
21         * @param  {[Object]} data     需要传递的用户信息            
22         */
23        var request = function(productId, data) {
24            var form = document.createElement("form");
25            form.id = "form";
26            form.name = "form";
27			form.target = "_blank";
28            document.body.appendChild(form);
29
30            // 设置相应参数 
31            for (key in data) {
32                var input = document.createElement("input");
33                input.type = "text";
34                input.name = key;
35                input.value = data[key];
36                // 将该输入框插入到 form 中 
37                form.appendChild(input);
38            }
39            // form 的提交方式 
40            form.method = "POST";
41            // form 提交路径 
42            form.action = "https://support.qq.com/product/" + productId;
43            // 对该 form 执行提交 
44            form.submit();
45            // 删除该 form 
46            document.body.removeChild(form);
47        }
48        return {
49            request: request,
50        }
51    })();
52
53    return Tucao;
54
55}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.