webView.js 898 B

1234567891011121314151617181920212223242526272829303132
  1. var app = getApp();
  2. var that;
  3. Page({
  4. data: {
  5. knowFrom:'action',
  6. url:'',
  7. },
  8. onLoad(e) {
  9. that = this;
  10. if(e.index){
  11. let index=e.index;
  12. let url='https://www.yuque.com/books/share/9aed09b4-4387-4e5f-ae0e-afc748390a1e?#'
  13. if(index=='1'){
  14. url='https://www.yuque.com/docs/share/d3459ec7-5c62-4ae5-b0dc-a3ff2770d462?#'
  15. }else if(index=='2'){
  16. url='https://www.yuque.com/docs/share/22b4bb49-2151-4b46-8465-89301957102a?#'
  17. }else if(index=='3'){
  18. url='https://www.yuque.com/docs/share/a5d976bb-f1f3-4cb6-b5ef-899fcb5d2932?#'
  19. }else if(index=='4'){
  20. url='https://www.yuque.com/books/share/3febbd74-3455-4cfa-abc0-035931cfcc3b?#'
  21. }else{
  22. url='https://www.yuque.com/docs/share/9c209c54-685e-48a6-a773-a5078e430f35?#'
  23. }
  24. this.setData({
  25. url:url
  26. })
  27. }
  28. },
  29. test(){
  30. }
  31. });