onLaunch(options) {
this.globalData.query = options.query || {}
if (options.referrerInfo) {
this.globalData.query = Object.assign(this.globalData.query, options.referrerInfo.extraData)
}
},
onShow(options) {
if (Object.keys(options.query).length > 0) {
this.globalData.query = options.query || {}
if (options.query.scene) {
let queryObj = {}
var strs = decodeURIComponent(options.query.scene).split('&')
for (var i = 0; i < strs.length; i++) {
queryObj[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1])
}
Object.assign(this.globalData.query, queryObj)
}
}
if (options.referrerInfo) {
this.globalData.query = Object.assign(this.globalData.query, options.referrerInfo.extraData)
}
},
globalData: {
query: {}
}
onLoad(options) {
this.setData({
shareId: options.id || app.globalData.query.id || ''
})
}
