webview.js 493 B

1234567891011121314151617181920212223242526
  1. const constant = require('../../../utils/constant.js');
  2. Page({
  3. data: {
  4. url: constant.app.webSkipUrl,
  5. },
  6. onLoad: function (options) {
  7. // 从 options 中获取传入的 url 参数
  8. var that = this;
  9. const url = that.data.url;
  10. if (url) {
  11. that.setData({
  12. url: url
  13. });
  14. } else {
  15. console.error('URL 参数未提供');
  16. }
  17. },
  18. onShareAppMessage() {
  19. return {
  20. title: 'OhPlay',
  21. path: 'pages/pageD/webview/webview'
  22. }
  23. },
  24. });