联系官方销售客服

1835022288

028-61286886

POSCMS 版主:POSCMS负责人
官方阅读插件使用问题
类型:POSCMS 更新时间:2021-04-30 10:33:02
{if $yuedumima}
<?php include_once FCPATH."app/ydmm/func.php";?>
{if dr_is_jiami($id, MOD_DIR)}
{$content}
{else}

<form action="" class="form-horizontal" method="post" name="myform" id="myform">

    <div class="form-group">
        <label class="control-label col-md-2">输入阅读密码</label>
        <div class="col-md-3">
            <label>
                <input type="password" class="form-control" name="password">
            </label>
            <label>
                <button type="button" onclick="mysubmit()" class="btn green"> <i class="fa fa-save"></i> 提交验证</button>
            </label>
        </div>
    </div>

</form>
<script>
    function mysubmit() {
        $.ajax({
            type: "POST",
            dataType:"json",
            url: '/index.php?s=ydmm&c=home&id={$id}&mid={MOD_DIR}',
            data: $('#myform').serialize(),
            success: function(json) {
              if (json.status) {
                  alert('验证成功');
                  window.location.reload();
              } else {
                  alert(json.code);
              }
            }
        });
    }
</script>


{/if}
{else}
{$content}
{/if}

我自己替换代码:

  <div class="portlet-body" style="height: auto;">
                                        <div class="bd"> {if $yuedumima}
<?php include_once FCPATH."app/ydmm/func.php";?>
{if dr_is_jiami($id, MOD_DIR)}
{if $content}{$content}{else}{/if} </div> <style> .bd img{display:block;max-width:100%;height:auto;} .bd{display: block;font-family: "微软雅黑";font-size: 18px;color: #000000;font-weight: normal;text-decoration: none;} </style>
                                   
                                    {if $ship}{dr_player($ship, 0, 500, 1, 10, $next_page.url, $preview ? $preview : $thumb)}{else}{/if}
{else}

<form action="" class="form-horizontal" method="post" name="myform" id="myform">

    <div class="form-group">
        <label class="control-label">输入阅读密码</label>
        <div>
            <label>
                <input type="password" class="form-control" name="password">
            </label>
            <label>
                <button type="button" onclick="mysubmit()" class="btn green"> <i class="fa fa-save"></i> 提交验证</button>
            </label>
        </div>
    </div>

</form>
<script>
    function mysubmit() {
        $.ajax({
            type: "POST",
            dataType:"json",
            url: '/index.php?s=ydmm&c=home&id={$id}&mid={MOD_DIR}',
            data: $('#myform').serialize(),
            success: function(json) {
              if (json.status) {
                  alert('验证成功');
                  window.location.reload();
              } else {
                  alert(json.code);
              }
            }
        });
    }
</script>


{/if}
{else}
{if $content}{$content}{else}{/if} </div> <style> .bd img{display:block;max-width:100%;height:auto;} .bd{display: block;font-family: "微软雅黑";font-size: 18px;color: #000000;font-weight: normal;text-decoration: none;} </style>
                                   
                                    {if $ship}{dr_player($ship, 0, 500, 1, 10, $next_page.url, $preview ? $preview : $thumb)}{else}{/if}
{/if}
                                    </div>


不知道写对没有,现在是输入密码 没有反应  在伪静态状态下面

回帖
  • 迅睿粉丝
    #1楼    迅睿粉丝
    2018-11-02 00:07:24
    0
    要看了页面才能下结论,如果官方默认代码没有问题的话,基本上就是js问题了
    满意答案
  • 迅睿粉丝
    #2楼    迅睿粉丝
    2021-04-30 10:33:02
    Chrome 0
    @阿初:1111111111111111111