永久免费观看美女裸体的网站,尤物视频在线观看,亚洲人成网站18禁止人,亚洲欧洲日韩综合色天使,亚洲乱妇亚洲乱妇xinglu

企業(yè)微信服務(wù)商
當前位置:首頁文檔模板語法詢盤語法說明

詢盤語法說明

更新時間:2019-12-10
詢盤適用于產(chǎn)品模型、配件模型。

使用流程:

1.在模型詳情頁中配置詢盤代碼,后臺開啟詢盤業(yè)務(wù)后可正常使用。后臺關(guān)閉詢盤業(yè)務(wù)時,前臺提交詢盤表單會失敗。
2.在詢盤表單中,選擇提交驗證的方式。
3.根據(jù)選擇的表單驗證的方式,在內(nèi)容模板中里面添加相應(yīng)的代碼。
? ?詢盤提交地址:/addinquiry.html
? ?①驗證碼驗證,適用示例:
<form action="/addinquiry.html" method="post">
    姓名:<input type="text" name="name" placeholder="請輸入稱呼"><br>
    手機:<input type="text" name="tel" placeholder="請輸入手機號碼"><br>
    內(nèi)容:<input type="text" name="content"   placeholder="請輸入內(nèi)容"></p> <br>
    <input type="hidden" name="id" value="{{Pageinfo['_id']}}"><br>
    <br>
    <input type="hidden" name="hashid" value="5c26c80d4db67f32c02f6214">
    <input type="hidden" name="moduletype" value="{{globalviewdata['model']}}"><br>
    <br>
    <input type="hidden" name="basetype" value="{{globalviewdata['basetype']}}">
    <div>
        <label>完成驗證:</label>
        <div class="captcha">
            <div class="text">
                行為驗證? 安全組件加載中
            </div>
            <div class="show  wait">
                <div class="loading">
                    <div class="loading-dot"></div>
                    <div class="loading-dot"></div>
                    <div class="loading-dot"></div>
                    <div class="loading-dot"></div>
                </div>
            </div>
        </div>
    </div>
    <input type="submit" value="提交">
</form>
?
<script src="http://static.westarcloud.com/test/5c048df6a8497e03aa0665a0/js/jquery1.11.3.min.js"></script>
<script src="https://www.geetest.com/demo/libs/gt.js"></script>
<script>
    function geTest(ele) {
        this.handler = function (captchaObj) {
            captchaObj.appendTo(ele);
            captchaObj.onReady(function () {
                $(".wait").hide();
            });
            $('.send').click(function (e) {
                e.preventDefault();
                let result = captchaObj.getValidate();
                if (!result) {
                    return alert('請完成驗證');
                };
            });
            window.gt = captchaObj;
        };
        var that=this;
        this.init = function () {
            $.ajax({
                url: "/front/interface/geetest?t=" + (new Date()).getTime(), // 加隨機數(shù)防止緩存
                type: "get",
                dataType: "json",
                success: function (data) {
?
                    $('.text').hide();
                    $('.wait').show();
                    initGeetest({
                        gt: data.gt,
                        challenge: data.challenge,
                        offline: !data.success, // 表示用戶后臺檢測極驗服務(wù)器是否宕機
                        new_captcha: data.new_captcha, // 用于宕機時表示是新驗證碼的宕機
                        product: "float", // 產(chǎn)品形式,包括:float,popup
                        width: "300px"
                    }, that.handler);
                }
            });
        }
    }
?
new geTest('.captcha').init();
</script>
②手機驗證,使用示例:
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <style>
        .send{
            height: 30px;
            background-color: #fff;
        }    
    </style>
    <script src="http://www.geetest.com/demo/libs/gt.js"></script>
    <script src="http://static.westarcloud.com/test/5c048df6a8497e03aa0665a0/js/jquery1.11.3.min.js"></script>  
    <form action="/addinquiry.html" method="post" id="form2">
        <h3>需要短信驗證碼DEMO</h3>
        <div> 
            <div>稱呼:</div><input type="text" name="name" placeholder="請輸入稱呼">
        </div>
        <div>
        <div class="label">手機:</div><input type="text" name="tel" placeholder="請輸入手機號碼"> 
        <button class="send" data-url="/sendsmscode.html">獲取驗證碼</button>
        </div>
        <div>
             <div>驗證碼:</div> 
<input type="text" name="code" placeholder="請輸入驗證碼">
        </div>
        <div>
       <div> 內(nèi)容:</div> <input type="text" name="content" placeholder="請輸入回復(fù)內(nèi)容">
        </div>
        <input type="hidden" name="id" value="5d033cda4db67f1a193df39b">
        <input type="hidden" name="hashid" value="5c26c80d4db67f32c02f6214">
        <input type="hidden" name="moduletype" value="products">
        <br>
        <input type="hidden" name="basetype" value="products">
        <div>
            <label>完成驗證:</label>
            <div class="captcha">
                <div class="text">
                    行為驗證? 安全組件加載中
                </div>
                <div class="show  wait">
                    <div class="loading">
                        <div class="loading-dot"></div>
                        <div class="loading-dot"></div>
                        <div class="loading-dot"></div>
                        <div class="loading-dot"></div>
                    </div>
                </div>
            </div>
        </div>
        <input type="submit" value="提交">
    </form>
    <script>
        function GeTest(opt) {
            this.form = $(opt.formId);
            this.keyBox = this.form.find('.captcha');
            this.sendMsg = opt.sendMsg || false;
            this.captchaObj = '';
            this.getKey();
            var that = this;
            this.form.on('click', '.send', function (e) {
                e.preventDefault();
                if (that.sendMsg) {
                    that.getMsg();
                }
                else {
                    alert('沒有短信配置發(fā)送短信無效')
                }
            })
        }
        //默認處理函數(shù)  
        GeTest.prototype.getKey = function () {
            var that = this;
            function handler(captchaObj) {
                that.captchaObj = captchaObj;
                captchaObj.appendTo(that.keyBox);
                captchaObj.onReady(function () {
                    that.form.find(".wait").hide();
                });
            }
            $.ajax({
                url: "/front/interface/geetest?t=" + (new Date()).getTime(), // 加隨機數(shù)防止緩存
                type: "get",
                dataType: "json",
                success: function (data) {
                    that.form.find('.text').hide();
                    that.form.find('.wait').show();
                    initGeetest({
                        gt: data.gt,
                        challenge: data.challenge,
                        offline: !data.success, // 表示用戶后臺檢測極驗服務(wù)器是否宕機
                        new_captcha: data.new_captcha, // 用于宕機時表示是新驗證碼的宕機
                        product: "float", // 產(chǎn)品形式,包括:float,popup
                        width: "300px"
                    }, handler);
                }
            });
        }
?
        //發(fā)送短信函數(shù)
        GeTest.prototype.getMsg = function () {
            var that = this;
            if(that.form.find('input[name="tel"]').val()=='')
            {
                return alert('手機號表單不能為空');
            }
            var result = that.captchaObj.getValidate()
            if(!result)
            {
                return alert('驗證尚未通過,需通過驗證后才能下發(fā)短信');
            }
            $.ajax({
                url: '/sendsmscode.html',
                type: 'POST',
                dataType: 'json',
                data: {
                    mobile: that.form.find('input[name="tel"]').val(),
                    geetest_challenge: result.geetest_challenge,
                    geetest_validate: result.geetest_validate,
                    geetest_seccode: result.geetest_seccode
                },
                success: function (res) {
                    let data=typeof res=='object'?res:JSON.parse(res);
                    if (data.status === true) {
                        alert('發(fā)送短信成功');
                    } else if (data.status === false) {
                        alert('驗證失敗:'+data.msg);
                        that.captchaObj.reset();
                    }
                }
            });
?
        }
    </script>
?
    <script>
        //發(fā)送短信
         new GeTest({
            formId: '#form2',
            sendMsg:true
        })
        
    </script>
<script> siteConfig={"siteid":"5be9228ca624633f0d1beeb6"} </script>
<script charset="utf-8" src="https://5#westarcloud.com/static/js/main_min.js"></script>
</body>
</html>
③關(guān)閉驗證,適用示例:
<form action="/addinquiry.html" method="post"  enctype="multipart/form-data">  //表單地址及表單提交方式
    <p>姓名:<input type="text" name="name"></p>  //表單字段
    <p>手機:<input type="text" name="tel"></p>      //表單字段
    <p>內(nèi)容:<input type="text" name="content"></p>   //表單字段
    <input type="hidden" name="id"  value="{{Pageinfo['_id']}}">  //內(nèi)容id,獲取內(nèi)容標題
    <input type="hidden" name="hashid" value="5c1af4f32f03b96246325190"> //表單id
    <button>提交</button>
</form>