Home  >  Article  >  WeChat Applet  >  WeChat applet How to solve the problem of swiper not displaying pictures

WeChat applet How to solve the problem of swiper not displaying pictures

高洛峰
高洛峰Original
2017-01-10 10:21:494149browse

WeChat Mini Program How to solve the problem of swiper not displaying pictures

1. What I mean by swiper not displaying pictures is that there is only one swiper box, but the set picture is not displayed.

The first thing to make sure is that the image path is set correctly. Make sure that the path is not set wrong. Another possible reason is that the page where swiper is placed (that is, the wxml file) is not in the app. Register the pages in .json

The correct method is:

Find the app.json file under the project

微信小程序 解决swiper不显示图片的方法

In the app Pages under the .json configuration file are used to register pages, as shown in the picture below

微信小程序 解决swiper不显示图片的方法

The document of the mini program also says "Add/reduce pages in the mini program are required. Modify the pages array. "

I also ignored this problem when I was a beginner. After working on it for a long time, I suddenly remembered this and it worked after adding the pages in pages.

Thanks for reading, I hope it can help everyone, thank you for your support of this site!

For more WeChat mini programs, please pay attention to the PHP Chinese website for related articles on how to solve the problem of swiper not displaying images!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn