随笔分类 - 小程序
摘要:wx.setTabBarBadge({ //购物车不为空 ,给购物车的tabar右上角添加购物车数量标志 index: 2, //标志添加位置 text: "" + res.data.cart_num+ "" //通过编译,将购物车总数量放到这里 }) index为tabbar的索引,text要字符
阅读全文
摘要:<l-painter ref="painter"> <l-painter-view css="width: 568rpx; box-sizing:border-box; background: #ffffff; align-items: center; padding: 24rpx; border-
阅读全文
摘要:一、在main.js中引用并挂载common.js import cc from './common.js' Vue.prototype.$c = cc; index.vue {{$c}}//小程序显示undefined,其他上面可以显示,小程序上面需要重新赋值 export default{ da
阅读全文
摘要:在业务中可能会需要获取用户当前位置或者手机相机等权限,微信小程序是需要用户授权才能使用,但是当用户拒绝授权后再点击对应位置就会没有反应。操作代码如下,例子为二次授权相机权限 uni.getSetting({ success(res) { if (!res.authSetting['scope.cam
阅读全文
摘要:.index-swiper{ border-radius:10px; box-shadow: 0 10px 20px 0 rgba(50,50,50,0.1); overflow: hidden; background:transparent; } <swiper class="index-swip
阅读全文
摘要:1:直接打开文件 savePicture: function(e) { var _this=this; console.log(e); var url=e.currentTarget.dataset.url; url="https://chengfei.dev145.ynccxx.net/web/a
阅读全文
摘要:wxml: <canvas canvas-id="gameCanvas" style="width:750rpx; height:350rpx" hidden="{{!statusTag}}" ></canvas> <button bindtap="createImage">生成图片</button
阅读全文
摘要:const arealist = require('../../utils/arealist.js') const par = require('../../utils/addressparse.js') Page({ /** * 页面的初始数据 */ data: { }, /** * 生命周期函数
阅读全文
摘要:const date = new Date(); const years = []; const months = []; const days = []; const years2 = []; const months2 = []; const days2 = []; const yearInde
阅读全文
摘要:反编译主要分为三步 1、找到已经打包好的本地小程序代码包 .wxalikg文件 2、下载解包用的node.js脚本(系统需已经安装过node.js环境)下载地址:https://github.com/qwerty472123/wxappUnpacker 3、运行解包脚本 下面具体描述步骤 一、 1、
阅读全文