当前位置:网站首页>Advanced authentication of uni app [Day12]
Advanced authentication of uni app [Day12]
2022-06-24 04:17: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 .
边栏推荐
- Mac CentOS installation phpredis
- Real time monitoring of water conservancy by RTU of telemetry terminal
- Exploration of web application component automatic discovery
- Browser rendering mechanism
- LeetCode 1281. Difference of sum of bit product of integer
- Live broadcast Reservation: Micro build practice - quickly build a catering reservation applet
- API real-time signature scheme based on Yapi
- Prometheus pushgateway
- Black hat SEO actual combat search engine snapshot hijacking
- MySQL cases SQL causes 100% CPU utilization
猜你喜欢

Clickhouse (02) Clickhouse architecture design introduction overview and Clickhouse data slicing design

web技术分享| 【地图】实现自定义的轨迹回放

共建欧拉社区 共享欧拉生态|携手麒麟软件 共创数智未来

15+ urban road element segmentation application, this segmentation model is enough

Kubernetes resource topology aware scheduling optimization

Black hat SEO practice: General 301 weight PR hijacking

flutter系列之:flutter中的offstage

Black hat SEO actual combat directory wheel chain generates millions of pages in batch
![Web technology sharing | [map] to realize customized track playback](/img/b2/25677ca08d1fb83290dd825a242f06.png)
Web technology sharing | [map] to realize customized track playback

Training course of mixed accuracy from simple to deep
随机推荐
What is a virtual host server? What are the advantages?
How to draw the flow chart of C language structure, and how to draw the structure flow chart
Making a Chatbot based on gpt2
In the post epidemic era, "cloud live broadcast" saves "cloud cultural tourism"?
Prometheus PushGateway 碎碎念
Pycharm from installation to full armament
Wide & deep model and optimizer understand code practice
After 20 years of development, is im still standing still?
我与物联有个约定
3. go deep into tidb: perform optimization explanation
应用实践 | Apache Doris 整合 Iceberg + Flink CDC 构建实时湖仓一体的联邦查询分析架构
Clickhouse (02) Clickhouse architecture design introduction overview and Clickhouse data slicing design
How to adjust the incompleteness before and after TS slicing of easydss video recording?
Easyplayer consumes traffic but does not play video and reports an error libdecoder Wasm404 troubleshooting
Multi task video recommendation scheme, baidu engineers' actual combat experience sharing
[Mid Autumn Festival greeting new year with good gifts] Tengyun pioneer feedback exchange group received new benefits!
Download files and close the enhanced module security configuration to visit the website for the first time using IE browser
C string input considerations
Unable to access the CVM self built container outside the TKE cluster pod
How to restore the default route for Tencent cloud single network card machine