The image cannot be deleted after the image is uploaded on the WeChat app,

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.