当前位置:网站首页>Write a complete answer applet (including single choice questions, judgment questions and multiple topics) (III) single choice questions, judgment questions, and the first question display
Write a complete answer applet (including single choice questions, judgment questions and multiple topics) (III) single choice questions, judgment questions, and the first question display
2022-07-04 05:09:00 【gaoshanpingyuan】
This is an online applet , Open the applet , Search for “ Primary school students must recite poems ”, Click the poem answer button : Single topic selection 、 Judgment questions , Enter the page , The first thing I see is the first question , So the first question is particularly important , Now let's take a look at how the first question is displayed on the interface .
The applet runs first onLond function , Call a function to get data and display .
This data acquisition and display function is written , There are two cases of retrieving and using data . The first is the first question , Because the data is placed in the cloud database , No data locally , So first call the load data countdown and progress bar functions , Avoid long loading time , Interface blank . Then use cloud functions to obtain cloud data , Assign the obtained cloud data to data In the empty array declared in , adopt setData Assignment displays the title and options of the first question on the interface . The second is to show other questions besides the first one , After the first question is displayed , The local array already has data , At this time, it is no longer necessary to call cloud functions to obtain cloud data , At this time, there is no need to call the load data countdown and progress bar functions , Directly pass the data in the local array setData Assignment displays the title and options of the question on the interface . Here's an explanation , The title begins with the first question , Array index from 0 Start , The index of the array stored in question 1 is 0. No more explanation , Look at the code .

Applet search “ Primary school students must recite poems ”, You can experience . Contact the source code :qq 3570340763
Sweep code experience

边栏推荐
- [技术发展-25]:广播电视网、互联网、电信网、电网四网融合技术
- STM32F1与STM32CubeIDE编程实例-74HC595驱动4位7段数码管
- 2022危险化学品经营单位安全管理人员上岗证题库及答案
- 中职组网络安全—内存取证
- 中職組網絡安全—內存取證
- Programming example of stm32f1 and stm32subeide -74hc595 drives 4-bit 7-segment nixie tube
- Fault analysis | mongodb 5.0 reports an error, and the legal instruction solves it
- 2022g2 power station boiler stoker special operation certificate examination question bank and answers
- [matlab] matlab simulation modulation system - VSB system
- 定制一个自己项目里需要的分页器
猜你喜欢

Programming example of stm32f1 and stm32subeide -74hc595 drives 4-bit 7-segment nixie tube

Share some of my telecommuting experience

【QT】定时器

NTFS 安全权限

June 2022 summary

STM32F1与STM32CubeIDE编程实例-74HC595驱动4位7段数码管

Test cs4344 stereo DA converter

Unity is connected to the weather system

2022年R2移动式压力容器充装复训题库及答案

VSCode的有用插件
随机推荐
KMP匹配字符串
Use units of measure in your code for a better life
laravel 中获取刚刚插入的记录的id
Just do it with your hands 7 - * project construction details 2 - hook configuration
Fault analysis | mongodb 5.0 reports an error, and the legal instruction solves it
【MATLAB】MATLAB 仿真数字基带传输系统 — 数字基带传输系统
Zhongke panyun-d module analysis and scoring standard
NTFS security permissions
Programming example of stm32f1 and stm32subeide -74hc595 drives 4-bit 7-segment nixie tube
TCP状态转换图
STM32F1与STM32CubeIDE编程实例-74HC595驱动4位7段数码管
[matlab] general function of communication signal modulation inverse Fourier transform
Simulated small root pile
Yolov6 practice: teach you to use yolov6 for object detection (with data set)
数据标注是一块肥肉,盯上这块肉的不止中国丨曼孚科技
【MATLAB】通信信号调制通用函数 — 带通滤波器
Share some of my telecommuting experience
定制一个自己项目里需要的分页器
【兴趣阅读】Adversarial Filtering Modeling on Long-term User Behavior Sequences for Click-Through Rate Pre
appliedzkp zkevm(11)中的EVM Proof