微信小程序启动自动检测版本更新,检测到新版本则提示更新 微信小程序启动自动检测版本更新,检测到新版本则提示更新updateManagerUpdateManager 对象,用来管理更新,可通过 wx.getUpdateManager 接口获取实例
errMsg: “getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json 小程序获取地理位置报错:errMsg: "getLocation:fail the api need to be declared in the requiredPrivateInfos field in app.json
小程序mock数据的方法 将模拟数据编辑成json数据或者是零碎的js脚本中,通过请求,取回数据,并进行业务逻辑处理,渲染到dom,json格式也有本地格式和网路格式两种。前后端同时开发的时候,后端接口数据没有出来,前端可以mock假数据,模拟开发;在js里直接声明变量,并给变量赋值,在逻辑脚本中使用,并渲染到dom;使用工具postman或者apifox模拟接口。2.读取网络json文件。
微信小程序之跳转与关联 wx.navigateToMiniProgram 小程序的跳转wx.navigateBackMiniProgram 返回小程序onShow或者onLaunch 可以根据extraData内的数据将两个小程序关联
原生wx小程序用vant组件自定义底部导航 this.getTabBar().init() // 设置tabbar active状态。1.在根目录中创建custom-tab-bar,新建page index。init() { // 设置tab的active下标(icon)onChange(event) { // 切换tab页面。text: "首页",text: "分类",text: "我的",* 生命周期函数--监听页面显示。在tab页中的onShow()
uni-app自定义底部tabbar 1.新建custom-tab-bar目录 ,并分别创建 (js,json,wxml,wxss)main.js中添加,解决点击两次才能选择icon。在当前页下,onShow中添加。
node版本升级:与node-sass、sass-loader版本不兼容问题 npm ERR! gyp ERR! node -v v16.18.0npm ERR! gyp ERR! node-gyp -v v7.1.2npm ERR! gyp ERR! not ok
git问题error: remote origin already exists. 1、先删除远程 Git 仓库。2、再添加远程 Git 仓库。3、最后git push origin master,这样就推送到自己的仓库了。
在linux上使用nginx部署 进1. 安装依赖包切换到nginx目录cd nginx解压安装包,安装Nginx执行make命令:make执行安装命令:make install查看是否安装成功:ps -ef | grep nginx(看是否有nginx进程)