Loading…

Carousel chart implementation (Banner)

# Preface This tutorial is based on the "apifm-wxapi" module and teaches you how to quickly implement small program development, so you may need to understand the following knowledge points first: ["Creating HelloWorld Project"](https://www.yuque.com/apifm/doc/hezlrm) ["Use "apifm-wxapi" to quickly develop small programs"](https://www.yuque.com/apifm/doc/mdldsd) ["Register for free to open the backend and obtain an exclusive domain name"](https://www.yuque.com/apifm/doc/qr6l4m) # Requirements description A backend is needed; After logging in with your account and password, you can publish and manage carousel images; The mini program displays the corresponding data; # budget 0 yuan, free implementation # Requirements realization ### Step 1: Get the backend for free ["Register for free to open the backend and obtain an exclusive domain name"](https://www.yuque.com/apifm/doc/qr6l4m) ### Step 2: Publish/Manage Carousel Picture (Banner) Log in to the "First Step" registration background, left menu --> Factory settings --> Module management Find the "App Banner Management Interface" module, click "Enable Module", then F5 to refresh the background interface, you will see the new menu: "System Settings" --> "Banner Management"; Upload your carousel in this menu; ![](https://dcdn.it120.cc/yuque/0/2019/png/572726/1572847900954-460f39fd-66af-4a54-815b-d5904d90fe8a.png) Upload carousel image ### Step 3: Write small program code Introduce the "apifm-wxapi" plug-in into the js file: >const WXAPI = require('apifm-wxapi') > > WXAPI.init('gooking')> WXAPI.init('gooking') This code links your mini program to your backend, where **gooking** is your exclusive domain name; For your own exclusive please check the instructions of “First Step”; Read the carousel image: >WXAPI.banners()> Effect screenshot: ![](https://dcdn.it120.cc/yuque/0/2019/png/572726/1572847900936-e847768a-8552-4e6c-ad61-a7b46f927438.png) js ![](https://dcdn.it120.cc/yuque/0/2019/png/572726/1572847900971-511e5bd4-56dc-416b-a175-366d3531b880.png) wxml Running the mini program is the moment you witness the miracle! grateful!