webpage.js
675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// packagePersonal/pages/webpage/webpage.js
const util = require('../../utils/util.js')
const restapi = require('../../utils/restapi.js')
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
jumpLink: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
let decodePath = decodeURIComponent(options.path)
this.setData({
jumpLink: decodePath
})
},
/**
* 接收H5传过来的参数
*/
onMessage: function (e) {
console.log(e)
},
onShow: function(){
},
onUnload: function(){
}
})