微信小程序
微信小程序
树旅小爷
这个作者很懒,什么都没留下…
展开
-
微信小程序——WebSocket
WebSocket:向服务器发送数据,服务器响应数据。通过监听WebSocket可以知道服务器给我们发回了什么数据API:1.wx.connectSocket:创建一个 WebSocket 连接2.wx.onSocketOpen:成功连接了服务器,通过此接受回调header:连接成功的 HTTP 响应 Header3.wx.onSocketError:出现错误4.wx.sendSoc...原创 2020-03-05 17:16:06 · 278 阅读 · 0 评论 -
微信小程序的轮播图
微信开发文档->组件->视图容器->swiper一部分属性:代码:<!--index.wxml--><view class="container"><swiper indicator-dots="true" autoplay="{{true}}" interval="3000" duration="1000"> ...原创 2020-03-05 13:55:58 · 187 阅读 · 0 评论 -
微信小程序ui-布局
tip:rpx根据机型不同的分辨率自己调整符合分辨率的值,动态一.flex布局基础容器**容器属性:**1.flex-direction:元素排列方式.container{height:100%;width:100%;background-color:aquamarine;display:flex;flex-direction: column;//竖排,主轴和交叉轴位置交...原创 2020-03-05 11:31:21 · 741 阅读 · 0 评论 -
微信小程序图片没加载进入运行报错:“Failed to load local image resource xxx.png the server responded with?
错误原因:由于这是因为初始化的时候,变量还没渲染进去导致的。解决方法:1.在src前面加个:wx:if<image wx:if='{{customerLevel.value}}'class="" src='{{customerLevel.value?tools.getLevel(customerLevel.value):"请选择"}}'></image>...原创 2020-03-05 11:23:46 · 5487 阅读 · 0 评论 -
微信小程序实战1-简单的静态页面
效果:代码:/*app.json*/{ "pages": [ "pages/index/index", "pages/logs/logs", "pages/user/user" ], "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "...原创 2020-03-05 10:22:23 · 2102 阅读 · 0 评论