| 插件名稱 | 表單系統(tǒng) V2.7 |
| 插件作者 | 迅睿官方團隊 |
| 最近更新 | 2026-01-19 14:32:48 |
| 修復(fù)無法在列表的右側(cè)顯示評論入口按鈕 |
網(wǎng)站表單里面 圖片專用字段,從系統(tǒng)自帶模塊代碼復(fù)制出來,自定義了個模板放進去后出現(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è)置本字段的個數(shù)值)",dictResponseError:'文件上傳失敗',dictInvalidFileType:"不能上傳該類型文件",dictFallbackMessage:"瀏覽器不受支持",dictFileTooBig:"文件過大上傳文件最大支持",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>
){$("改成 ){ 空格 $("