WebView.js 408 B

1234567891011121314151617181920212223242526
  1. // pages/WebView/WebView.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. comUrl:''
  8. },
  9. /**
  10. * 生命周期函数--监听页面加载
  11. */
  12. onLoad: function (options) {
  13. // console.log('options', options)
  14. var url = options.getUrl
  15. var title = options.getTitle
  16. var that = this
  17. if (url.trim().length > 0){
  18. that.setData({
  19. comUrl: url
  20. })
  21. }
  22. }
  23. })