Page({
  data: {
    url: ''
  },
  onLoad: function(options) {
    let relayUrl = options.relayUrl
    if (options.url) {
      this.setData({
        url: decodeURIComponent(options.url),
        relayUrl
      });
    }
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    let {url, relayUrl} = this.data;
    return {
      path: `/pages/webview/index?url=${encodeURIComponent(url)}&relayUrl=${relayUrl||''}`,
      imageUrl: relayUrl || ''
    }
  }
})