使用uni-app开发微信小程序过程中遇到的一些问题

获取位置信息时报错,具体如下所示:【错误现象】wx.getLocation need to be declared in the requiredPrivateInfos field in app.json/ext.json(env: Windows,mp,1.06.2303220; lib: 2.32.0)【错误说明】该错误表示你的微信小程序没有在app.json或者ext.json文件的req

- 阅读全文 -

微信小程序跳转另一个小程序

官方API 文档地址wx.navigateToMiniProgram({ appId: '目标小程序地APPID', path: '目标小程序的首页地址', extraData: { // 需要传递的数据 data: '123' }, envVersion: 'develop', // 要打开的小程序版本,develop(开发版)、trial(体验版),relea

- 阅读全文 -

微信小程序获取用户openid

info(){ wx.getUserInfo({ //成功后会返回 success:(res)=>{ console.log(res); // 把你的用户信息存到一个变量中方便下面使用 let userInfo= res.userInfo //获取openId(需要code来换取)这是用户的唯

- 阅读全文 -

微信小程序catchtap与bindtap的差异与用法

catchtap 与 bindtap 的差异catchtap 默认阻止冒泡事件bindtap 默认不阻止冒泡事件catchtap 与 bindtap 的差异他们的用发类似<view catchtap="copyTel" class="info flex flex-column flex-main-between" id="{{item.id}

- 阅读全文 -

小程序获得data中的值与Vue的差距

Vue 中 data 的取值data() { return { name: '小李' }; }, methods:{ click(){ // data取值 console.log(this.name) } }微信小程序中 data 取值data: { name: '小李' }, click(){ con

- 阅读全文 -