webview.js 279 B

1234567891011121314151617
  1. Page({
  2. data: {
  3. url: ''
  4. },
  5. onLoad: function (options) {
  6. // 从 options 中获取传入的 url 参数
  7. const url = options.param;
  8. if (url) {
  9. this.setData({
  10. url: url
  11. });
  12. } else {
  13. console.error('URL 参数未提供');
  14. }
  15. }
  16. });