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

企業(yè)微信服務(wù)商
當(dāng)前位置:首頁(yè)文檔模板語(yǔ)法評(píng)論語(yǔ)法說(shuō)明
模板引擎介紹

評(píng)論語(yǔ)法說(shuō)明

更新時(shí)間:2019-12-10

評(píng)論適用于新聞模型、視頻模型、專題模型、圖庫(kù)模型 以及通過(guò)復(fù)制這幾個(gè)模型得到的自定義模型。
使用流程
1.在模型詳情頁(yè)中配置評(píng)論表單代碼,后臺(tái)開(kāi)啟詢盤(pán)業(yè)務(wù)后可正常使用。后臺(tái)關(guān)閉評(píng)論時(shí),前臺(tái)提交評(píng)論會(huì)失敗。



2.評(píng)論使用到的語(yǔ)法:
  /addcomment.html? ? ? ?//文件提交地址
? ?method=“POST”? ? ? ?//表單提交方法
3.代碼 示例:
<form action="/addcomment.html" method="post">          //提交地址
<input type="text" name="nickname" > //昵稱
<input type="text" name="mobile" > //手機(jī)
<input type="text" name="code" > //驗(yàn)證碼
<input type="text" name="content" > //評(píng)論內(nèi)容
<input type="hidden" name="id" value="{{Pageinfo['_id']}}">
<input type="hidden" name="moduletype" value="{{globalviewdata['model']}}">
<input type="hidden" name="basetype" value="{{globalviewdata['basetype']}}" >
使用舉例:獲取手機(jī)驗(yàn)證碼之前需要先進(jìn)行圖片驗(yàn)證,否則無(wú)法獲取驗(yàn)證碼
<form action="/addcomment.html" method="post">
<input type="text" name="nickname" ><br>
<input type="text" name="mobile" class="mobile" > 
<button class="send" data-url="/sendsmscode.html">獲取驗(yàn)證碼</button>
<br>
<input type="text" name="code"  >
<textarea name="content" ></textarea>
<input type="hidden" name="id" value="{{Pageinfo['_id']}}"><br>
<input type="hidden" name="moduletype" value="{{globalviewdata['model']}}"><br>
<input type="hidden" name="basetype" value="{{globalviewdata['basetype']}}" >
     <div>
            <label>完成驗(yàn)證:</label>
            <div id="captcha">
                <div id="text">
                    行為驗(yàn)證? 安全組件加載中
                </div> 
            </div>
        </div>
       <input type="submit" value="submit">
  </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>
    let handler = function (captchaObj) {
        captchaObj.appendTo('#captcha');
        captchaObj.onReady(function () {
            $("#wait").hide();
        });
        $('.send').click(function (e) {
            e.preventDefault();
            let result = captchaObj.getValidate();
            if (!result) {
                return alert('請(qǐng)完成驗(yàn)證');
            }
            $.ajax({
                url: '/sendsmscode.html',
                type: 'POST',
                dataType: 'json',
                data: {
                    mobile: $('input[name="mobile"]').val(),
                    geetest_challenge: result.geetest_challenge,
                    geetest_validate: result.geetest_validate,
                    geetest_seccode: result.geetest_seccode
                },
                success: function (data) {
                    if (data.status === 'true') {
                        alert('發(fā)送短信成功');
                    } else if (data.status === 'false') {
                        alert('驗(yàn)證失敗');
                        captchaObj.reset();
                    }
                }
            });
        });
        // 更多接口說(shuō)明請(qǐng)參見(jiàn):http://docs.geetest.com/install/client/web-front/
        window.gt = captchaObj;
    };
    $.ajax({
        url: "/front/interface/geetest?t=" + (new Date()).getTime(), // 加隨機(jī)數(shù)防止緩存
        type: "get",
        dataType: "json",
        success: function (data) {
            $('#text').hide();
            $('#wait').show();
            // 調(diào)用 initGeetest 進(jìn)行初始化
            // 參數(shù)1:配置參數(shù)
            // 參數(shù)2:回調(diào),回調(diào)的第一個(gè)參數(shù)驗(yàn)證碼對(duì)象,之后可以使用它調(diào)用相應(yīng)的接口
            initGeetest({
                // 以下 4 個(gè)配置參數(shù)為必須,不能缺少
                gt: data.gt,
                challenge: data.challenge,
                offline: !data.success, // 表示用戶后臺(tái)檢測(cè)極驗(yàn)服務(wù)器是否宕機(jī)
                new_captcha: data.new_captcha, // 用于宕機(jī)時(shí)表示是新驗(yàn)證碼的宕機(jī)
                product: "float", // 產(chǎn)品形式,包括:float,popup
                width: "300px",
                https: true
                // 更多配置參數(shù)說(shuō)明請(qǐng)參見(jiàn):http://docs.geetest.com/install/client/web-front/
            }, handler);
        }
    });
</script>
回復(fù)評(píng)論
如果是對(duì)某評(píng)論樓層的回復(fù),需要增加
<input type="hidden" name="masterid" value="##同被回復(fù)評(píng)論的masterid##">
<input type="hidden" name="relaid" value="##被回復(fù)評(píng)論的_id##">
評(píng)論數(shù)據(jù)調(diào)?。?/span>
“#域名#getcommentlist.html?id=#當(dāng)前內(nèi)容ID#&page=1

?