// pages/webview/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    url: '',
    title: ''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let that = this
    if (options.url) {
      that.setData({
        url: options.url,
        title: options.t
      })
      wx.setNavigationBarTitle({
        title: options.t ? options.t : '详情',
      })
    }
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function (options) {
    let that = this
    return {
      title: that.data.title,
      path: '/pages/webview/index?url=' + that.data.url,
      success: function (res) { }
    }
  }
})