当前位置:网站首页>Advanced authentication of uni app [Day12]
Advanced authentication of uni app [Day12]
2022-07-23 16:55:00 【Hua Weiyun】
uni-app Advanced certification
The communicating party authenticates by using a certificate .
Ca( Certification authority ) It is a third-party organization that both clients and servers can trust . The operator of the server sends a message to CA Request public key .CA After determining the identity of the applicant , The public key of the application will be digitally signed , Distribute the signed public key , And bind the public key into the public key certificate . stay HTTPS During the communication , The server will send the certificate to the client . After the client obtains the public key , First, use a digital signature to verify . If the verification passes , You can start communication .
The filter is as follows :
Vue.filter("formatDate",(data)=>{ const nDate=new Date(data); const year = nDate.getFullYear(); const month = nDate.getMonth()+1; const day = nDate.getDay(); return year +'-'+ month +'-'+ day})Integrity protection
SSL Provide message summarization for integrity protection .HTTP Also provide MD5 Message summary function , But it's not safe. . for example , If the message content is tampered with , And recalculate MD5 value , Then the communication receiver is unaware of the tampering .
HTTPS The message digest function of is secure , Because it combines encryption and authentication . Imagine , After the encrypted message is tampered with , It's hard to recalculate the message digest , Because plaintext cannot be easily obtained .
"privacy": { "prompt": "template", "template": { "title": " Service agreement and privacy policy ", "message": " Please read carefully 、 Full understanding “ The service agreement ” and “ Privacy policy ” Articles , Including but not limited to : In order to better serve you , We need to collect your device identification 、 Operation logs and other information are used for analysis 、 Optimize application performance .<br/> You can read <a href="">《 The service agreement 》</a> and <a href="">《 Privacy policy 》</a> Learn more . If you agree to , Please click the button below to start accepting our service .", "buttonAccept": " I got it! ", "buttonRefuse": " Disagree for the time being " }}Defined in the script data JS Variables can be used in components , But the usage in component properties is different from that in the content area .
<component-name property1="value" property2="value"> content</component-name>If each item in the long list is not updated individually , Then we don't need to turn every project into a component . We can simply loop through the long list to show items .
// index.vue Loop load long list <template> <view> <view class="thumb" v-for="item in testdata"> <ThumbItem :item='item'></ThumbItem> </view> </view></template><script> Import ThumbItem from "components/thumbitem/thumbitem.vue" export default { components: { ThumbItem }, data() { return { testdata: [" evaluation 1"," evaluation 2"," evaluation 3"," evaluation 4"," evaluation 5"] } } }</script><style> .thumb{ text-align: center; margin-top: 20px; }</style> Components consume more memory during page initialization , Traversing nodes is slower . When rendering , Each component triggers communication , Too many components will prevent communication . So we should use a good knife on the blade . If we use it in any case , It will backfire . The nesting of deep nodes is the same . Deep node nesting should be avoided during development .
In actual project development , Long lists are usually returned after being processed by the logical layer . The data is variable . If the data in the long list needs to be displayed on the page , We will define long lists in the data . If the variable does not need to be displayed in the view , We will try to set variables outside the data .
边栏推荐
- YOLOv4: Optimal Speed and Accuracy of Object Detection
- [taro] applet picker dynamically obtains data
- pip报错Could not find a version that satisfies the...No matching distribution
- 僧多粥少?程序员要怎样接私活才能有效提高收入?
- Tan Zhangxi, director of risc-v Foundation: risc-v has gradually expanded from the edge to the center
- 距7月30日PMP考试不足10天,应该做点什么?
- Acquisition of positional reliability in accurate target detection
- 主成分分析(MATLAB)
- Satisfiability of the equation of leetcode
- Using "soup.h1.text" crawler to extract the title will be one more\
猜你喜欢

一款非常棒的开源微社区轻论坛类源码

fastadmin,非超级管理员,已赋予批量更新权限,仍显示无权限

TS encapsulates the localstorage class to store information

O3DF执行董事Royal O’Brien:开源没有边界,所有共享的声音都会变成实际方向

Tan Zhangxi, director of risc-v Foundation: risc-v has gradually expanded from the edge to the center

灰色关联分析(MATLAB)

RISC-V基金会董事谭章熹:RISC-V,从边缘逐渐向中央扩展

灰色预测(MATLAB)

20220722 beaten record

Scale Match for Tiny Person Detection
随机推荐
层次分析法(MATLAB)
Go interface: go deep into internal principles
Detector: detect objects with recursive feature pyramid and switchable atolos convolution
MySQL multi table query_ Cartesian product_ Inner connection_ Implicit connection
精确的目标检测中定位置信度的获取
无心剑英汉双语诗006.《致爱妻》
tensorflow2.X实战系列softmax函数
灰色预测(MATLAB)
fastadmin,非超级管理员,已赋予批量更新权限,仍显示无权限
FreeRTOS个人笔记-创建/删除动态任务,启动调度器
快速学会使用文件的权限
[C language] structure, enumeration and union
YOLOV7
(已解决)idea编译Gradle项目提示 错误找不到符号
国内生产总值(GDP)数据可视化
CNCF基金会总经理Priyanka Sharma:一文读懂CNCF运作机制
JS之闭包
FreeRTOS个人笔记-延时函数
Visualization of gross domestic product (GDP) data
Frequently asked questions about MySQL