layer.prompt提示is not a function

发布时间:2016-08-01 11:21 | 人气数:452
HTML代码:
{eq name="item.status" value="4"}
<a class="ml-10 f-14" onclick="closeloan('/loan/closeloan','{$item.id}','7','8')" title="关闭申请">关闭</a>
{/eq}

JS配置:

closeloan = function(url,id,stat,opstat){
    layer.config({extend: 'extend/layer.ext.js'}, function(){
    layer.prompt({
      formType: 2,
      title: '请输入关闭申请的原因?必须填写!'
    }, function(value, index, elem){
        $.ajax({
            type : 'get',
            url : url,
            data : {data_id : id, data_status : stat, data_opstatus : opstat, reason : value},
            dataType : 'json',
            success : function(data){
                if (data.result_code=='1'){
                    layer.alert(data.result_msg,function(){
                        window.location.reload();
                    });
                }else{
                    layer.alert(data.result_msg);
                }
            }
        });
    layer.close(index);
    });
   });
}
<script src="jQuery的路径"></script>
<script src="layer.js的路径"></script>
关键词:layer.prompt, layer, 弹窗