wx.navigateToMiniProgram一个小程序跳转到另一个小程序获取extraData

小程序 文章 2022-01-10 11:40 1146 0 全屏看文

AI助手支持GPT4.0

wx.navigateToMiniProgram一个小程序跳转到另一个小程序获取extraDatawx.navigateToMiniProgramA applet jumps to another applet to get extraData

wx.navigateToMiniProgram一个小程序跳转到另一个小程序获取extraData
框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug wx.navigateToMiniProgram 工具 8.0.14 2.20.2

一个微信小程序跳转到另一个微信小程序 用hbuilderx写的微信小程序如何接收到extraData参数?

Framework type problem type API / component name terminal type wechat version basic library version applet bug Wx Navigatetominiprogram tool 8.0.14 2.20.2 how does a wechat applet written in hbuilderx receive the extradata parameter when a wechat applet jumps to another wechat applet?

回答:

X.Z.^_^:

跳转小程序版本是否正确

一壶炊烟煮黄昏:
// app.jsonLaunch(options) {  if (options.query) {    this.globalData.query = options.query  }  if (options.referrerInfo) {    this.globalData.query = Object.assign(this.globalData.query, options.referrerInfo.extraData)  }},onShow(options) {  if (options.query) {    this.globalData.query = options.query  }  if (options.referrerInfo) {    this.globalData.query = Object.assign(this.globalData.query, options.referrerInfo.extraData)  }},globalData: {  query: {}}
啊妈咪妈咪哄:请问如何测试 我在onLaunch中获取不到extraData中的值
一壶炊烟煮黄昏:在你的页面 onLoad里打印 app.globalData.query
brave:
App({  onLaunch(options) {    console.log(options)  },  onShow(options) {    console.log(options)  }})
啊妈咪妈咪哄:请问如何测试 我在onLaunch中获取不到extraData中的值

-EOF-

AI助手支持GPT4.0