微信小程序获取openid(用户惟一身份识别)

1.首先在js文件中定义存储appid,secret对象web 2.在onLoad生命周期函数里面获取openidapi /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { var that = this var user = wx.getStorageSync('user') || {};
相关文章
相关标签/搜索