合集-微信小程序
摘要:第一步:隐藏原生导航栏效果 (默认效果) json中配置: "window": { "navigationStyle": "custom" } (成功去除顶部tab栏,只留下了胶囊,但轮播图直接与顶部图标融在一起了) 第二步:适应各种手机的边距 第一根竖线= 状态栏高度 胶囊顶部= 状态栏高度 +
阅读全文
摘要:[基础能力 / 自定义 tabBar (qq.com)] 1.在app.json中 在原来的tabbar配置里面顶部添加 “custom”:true; 添加 "usingComponents": {}, "tabBar": { "custom": true, "color": "#000", "se
阅读全文
摘要:【基础能力 / 分包加载 / 使用分包 (qq.com)】 目录: 第一步:在app.json中配置分包 "subpackages": [ { "root": "indexPackage", "name": "indexPackage", "pages": [ "show/show" ] }, {
阅读全文
摘要:参考文章【微信小程序:用 rpx 和 wx.getSystemInfoSync() 来适配屏幕高度-CSDN博客】 1.小程序的任何机型的宽度固定为750rpx;为了适配不同设备的高度可以通过下面的公式转化 750/设备宽度=屏幕设置高度/设备高度 所以自适应屏幕应该设置的高度=750*设备高度/设
阅读全文
摘要:【快速上手 - Vant Weapp (gitee.io)】 【node 版本对应的npm版本表 - 菜小鱼~ - 博客园 (cnblogs.com)】 【报错npm ERR! A complete log of this run can be found in: npm ERR!-CSDN博客】
阅读全文
摘要:1.新建云函数 2.取好云函数的名字【video】后,即在目录下创建如下图文件 3.在index.js中编写云函数内容 4.写好云函数之后,上传并部署 5.在小程序中调用 完成
阅读全文
摘要:已知有两个集合media和users,集合中的字段(users中的)_openid和(media中的)openid值相同 小程序页面js中调用云函数getMedia wx.cloud.callFunction({ name: 'getMedia', data:{sort} }).then(res =
阅读全文
摘要:页面或者组件wxml 以 “data-”+属性名 设置自定义属性 <view class="video-item" wx:for="{{mediaData}}" wx:key="index"> <!-- 视频项 --> <view bind:tap="toVideoDetail" data-inde
阅读全文
摘要:A页面跳转分包B页面 // A页面携带 wx.navigateTo({ url: '/findPackage/video-detail-page/video-detail-page?skip='+skip+'&limit='+limit+'&index='+index, }) 路径与参数以?相连,参
阅读全文
摘要:onLoad(options) { let {limit,index} = options index = Number(index); limit = Number(limit) console.log(options); //获取视频页面数据 wx.cloud.callFunction({ na
阅读全文
摘要:单层请求 exports.main = async (event, context) => { const {from,to,date,message} = event;await db.collection('chatRoom') .where({ chat:_.all([from,to]) })
阅读全文