当前位置:网站首页>How does the applet solve the rendering layer network layer error?
How does the applet solve the rendering layer network layer error?
2022-07-05 03:57:00 【Chu Junjun】
Use uni-app A small hole in developing small programs :
In the development process , An error is reported :
[ Render layer network layer error ] Failed to load font http://172.16.0.234:8081/profile/upload/style.ttf net::ERR_CONNECTION_TIMED_OUT (env: Windows,mp,1.05.2109131; lib: 2.20.2)
When other methods cannot solve it , We can set the global variable mechanism to solve
Use globalData( Global variable mechanism . This mechanism is in uni-app You can also use , And universal at all ends )
uni-app Official website uni-app: A use Vue.js Develop a front-end framework for cross platform applications https://uniapp.dcloud.io/collocation/App?id=globaldata stay APP.vue Join in
<script>
export default {
data() {
return {
code: null,
sessionKey: null,
signature: null,
rawData: null,
encryptedData: null,
iv: null,
}
},
globalData: {
baseUrl: 'https://xxxxx.xxxxzg.com/web-api/'
//baseUrl: 'http://172.16.0.xxx:8081'
},
onLaunch: function() {
this.globalData
},
onLoad() {
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
},
methods: {
}
}
</script>
<style>
/* Every page is public css */
body {
font-family: 'PingFang-SC-Regular';
}
@font-face {
font-family: 'PingFang-SC-Regular'; // Create a number_font Font name
/* src: url("http://172.16.0.234:8081/profile/upload/style.ttf"); // Import local font source file */
/* src: url("https://exercise.zjyqzg.com/web-api//profile/upload/style.ttf"); // Import local font source file */
}
::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
</style>
Then use it in the corresponding page
边栏推荐
- Analysis of glibc strlen implementation mode
- NEW:Devart dotConnect ADO.NET
- postman和postman interceptor的安装
- 灵魂三问:什么是接口测试,接口测试怎么玩,接口自动化测试怎么玩?
- Containerd series - detailed explanation of plugins
- How to use jedis of redis
- [move pictures up, down, left and right through the keyboard in JS]
- v-if VS v-show 2.0
- Difference between MotionEvent. getRawX and MotionEvent. getX
- [luat-air105] 4.1 file system FS
猜你喜欢
随机推荐
Necessary fonts for designers
Containerd series - what is containerd?
[groovy] groovy environment setup (download groovy | install groovy | configure groovy environment variables)
天干地支纪年法中为什么是60年一个轮回,而不是120年
【软件逆向-基础知识】分析方法、汇编指令体系结构
EasyCVR平台出现WebRTC协议视频播放不了是什么原因?
@The problem of cross database query invalidation caused by transactional annotation
反絮凝剂-氨碘肽滴眼液
Learning notes of raspberry pie 4B - IO communication (I2C)
Containerization Foundation
Assembly - getting started
Some enterprise interview questions of unity interview
Operation flow of UE4 DMX and grandma2 onpc 3.1.2.5
一文带你了解BI的前世今身与企业数字化转型的关系
@Transactional 注解导致跨库查询失效的问题
面试字节,过关斩将直接干到 3 面,结果找了个架构师来吊打我?
[安洵杯 2019]不是文件上传
[数组]566. 重塑矩阵-简单
[punch in questions] integrated daily 5-question sharing (phase III)
[wp]bmzclub几道题的writeup