当前位置:网站首页>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
边栏推荐
- Fault analysis | mongodb 5.0 reports an error, and the legal instruction solves it
- Secondary vocational group network security - memory Forensics
- 2022g2 power station boiler stoker special operation certificate examination question bank and answers
- 【MATLAB】MATLAB 仿真数字基带传输系统 — 双极性基带信号(余弦滚降成形脉冲)的眼图
- cmake
- 2022广东省赛——编码信息获取 解析flag
- [技术发展-25]:广播电视网、互联网、电信网、电网四网融合技术
- Use units of measure in your code for a better life
- appliedzkp的zkevm(12)State Proof
- Flutter calls Gaode map app to realize location search, route planning and reverse geocoding
猜你喜欢
Zhongke panyun-2022 Guangdong Trojan horse information acquisition and analysis
2022g2 power station boiler stoker special operation certificate examination question bank and answers
Trie number dictionary tree
Zhongke panyun-d module analysis and scoring standard
Simple g++ and GDB debugging
《Cross-view Transformers for real-time Map-view Semantic Segmentation》论文笔记
企业级日志分析系统ELK(如果事与愿违那一定另有安排)
2022年A特种设备相关管理(电梯)考试题模拟考试平台操作
自动化测试selenium基础篇——webdriverAPI
Maui introductory tutorial series (5.xaml and page introduction)
随机推荐
【MATLAB】通信信号调制通用函数 — 傅里叶变换
Sécurité du réseau dans les écoles professionnelles secondaires - preuve de mémoire
Zhongke Panyun - 2022 Guangxi reverse analysis ideas
如何构建属于自己的知识引擎?社群开放申请
ping端口神器psping
Use units of measure in your code for a better life
TCP state transition diagram
Zhongke panyun-d module analysis and scoring standard
Error response from daemon: You cannot remove a running container 8d6f0d2850250627cd6c2acb2497002fc3
Simulink与Arduino串口通信
如何使用postman实现简单的接口关联【增删改查】
【MATLAB】通信信号调制通用函数 — 带通滤波器
Just do it with your hands 7 - * project construction details 2 - hook configuration
空洞卷积、可变形卷积、可变形ROI Pooling
企业级日志分析系统ELK(如果事与愿违那一定另有安排)
【MATLAB】MATLAB 仿真数字基带传输系统 — 双极性基带信号(第 I 类部分响应波形)的眼图
Public inputs in appliedzkp zkevm (13)
【MATLAB】MATLAB 仿真数字基带传输系统 — 数字基带传输系统
【无标题】
Notepad++--显示相关的配置