The image cannot be deleted after the image is uploaded on the WeChat app,
I believe all the developers in microservices know that microservices are still a bit difficult in terms of manuals, and they are not very active at all. No way. during development, you can only look at the source code by yourself >>>
Okay, let's not talk about it anymore. Now let's look at a trap... directly go to the Code \
Html:
<! -- Import your own header -->
{Template 'common _ head'} <script type = "text/javascript" src = "{$ _ W ['siterot']} app/resource/js/app/util. js "> </script> <script src =" {$ _ W ['steroot']} app/resource/js/require. js "> </script> <script type =" text/javascript "src =" {$ _ W ['siteroot']} app/resource/js/lib/mui. min. js "> </script> <link href =" {$ _ W ['teroot']} app/resource/css/common.min.css "rel =" stylesheet "> <script type = "text/javascript" src = "{$ _ W ['steroot']} app/resource/js/app/common. js "> </script> <form action =" "method =" post "> <ul class =" report-list white clearfix "> <li class =" clearfix "> <div class = "pull-left"> title </div> <div class = "pull-right"> <input type = "text" placeholder = "Enter the title" name = ""report_title" value = ""> </div> </li> <li class = "clearfix"> <div class = "pull-left"> filled by </div> <div class = "pull-right"> <input type = "text" placeholder = "enter" name = "report_author" value = "> </div> </li> </ul> <button type = "button" class = "submit-report"> submit </button> <input type = "hidden" name = "token" value = "{$ _ W ['Token']}"/> </form> <script type = "text/javascript"> $ (function () {mui. init ({swipeBack: true // enable the right-slide function}); // upload the image util. image ($ ('. js-image-report_picture '), function (url) {$ ('. js-image-report_picture '). parent (). find ('. js-image-preview '). append ('<input type = "hidden" value = "' + url. attachment + '"name =" report_picture [] "/> ') ;}, {crop: false, // crop multiple: true, // multi-chart preview: '_ IMG_UPLOAD _ {$ name}' // preview}); </script> {template 'common _ footer '}
Page chart:
After uploading the image, you can click "delete image" to delete it in vain:
After reading the source code, he encapsulated webuploader with mui. the most direct and simple method is to re-write a delete operation on the page:
// Delete the image $ (document ). on ("click ",". mui-clearfix. js-submit ", function (a) {var B = $ (document ). find (". mui-slider-group. mui-active "). index (); $ (". mui-image-preview input "). eq (B ). remove (); $ (". mui-image-preview img "). eq (B ). remove (); var I = mui. previewImage ({footer: util. templates ["image.preview.html"]}); I. close ();});
You can achieve the following :::
Finally, we attached the idea of preparation for the Third Plenary Session of the 11 th CPC Central Committee: practice is the only criterion for testing truth.