聯(lián)系官方銷售客服
1835022288
028-61286886
插件名稱 | 表單系統(tǒng) V2.5 |
插件作者 | 迅睿官方團(tuán)隊(duì) |
最近更新 | 2024-10-23 13:40:58 |
修復(fù)刪除表單時(shí)的故障問(wèn)題 |
網(wǎng)站表單里面 圖片專用字段,從系統(tǒng)自帶模塊代碼復(fù)制出來(lái),自定義了個(gè)模板放進(jìn)去后出現(xiàn);
代碼如下:
<script type="text/javascript">$(function(){$("#my-dropzone-baomingzhao").sortable();Dropzone.autoDiscover=false;$("#my-dropzone-baomingzhao").dropzone({addRemoveLinks:true,maxFiles:99999,maxFilesize:5,acceptedFiles:"image/*",dictMaxFilesExceeded:"最多只能上傳1張圖片(可在自定義字段中設(shè)置本字段的個(gè)數(shù)值)",dictResponseError:'文件上傳失敗',dictInvalidFileType:"不能上傳該類型文件",dictFallbackMessage:"瀏覽器不受支持",dictFileTooBig:"文件過(guò)大上傳文件最大支持",url:"/index.php?s=api&c=file&token=7ddf5a9f31b65823455d4c30b8a1510a&siteid=1&m=upload&p=5b009e0196ca677a4370d1beee32d2ac&fid=76",init:function(){this.on("addedfile",function(file){var activeFiles=this.getActiveFiles();var num=parseInt($(".dr_dropzone_baomingzhao_total").val());if(num+activeFiles.length+1>1){this.options.maxFiles=-1}});this.on("success",function(file,res){var rt=JSON.parse(res);if(rt.code){var num=parseInt($(".dr_dropzone_baomingzhao_total").val());$(".dr_dropzone_baomingzhao_total").val(num+1);var input='<input class="dr_dropzone_baomingzhao" type="hidden" name="data[baomingzhao][]" value="'+rt.id+'" />';$(file.previewElement).append(input)}else{dr_tips(0,rt.msg);file.previewElement.classList.remove("dz-success");file.previewElement.classList.add("dz-error");file.previewElement.classList.add("dz-error")}})}});$("#my-dropzone-baomingzhao").append("<input class=\"dr_dropzone_baomingzhao_total\" type=\"hidden\" value=\"0\" />")});function dr_delete_image_baomingzhao(e){var num=parseInt($(".dr_dropzone_baomingzhao_total").val());$(".dr_dropzone_baomingzhao_total").val(num-1);$("#image-baomingzhao-"+e).remove()}</script>
){$("改成 ){ 空格 $("