webView.js 940 B

12345678910111213141516171819202122232425262728293031323334
  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. console.log(e)
  13. let url='https://www.yuque.com/docs/share/a5803b46-cffd-4ad3-aca8-f9908a743618?#'
  14. if(index=='1'){
  15. url='https://www.yuque.com/docs/share/a5803b46-cffd-4ad3-aca8-f9908a743618?#'
  16. }else if(index=='2'){
  17. url='https://www.yuque.com/docs/share/c64392c1-8c8d-40d4-9481-a5f1ad169c10?#'
  18. }else if(index=='3'){
  19. url='https://www.yuque.com/docs/share/282894d5-9309-432b-ab19-f05c06726c7e?#'
  20. }else if(index=='4'){
  21. url='https://www.yuque.com/docs/share/4ccb2328-08aa-4587-a6f5-5b5335692bd1?#'
  22. }else if(index=='5'){
  23. url='https://www.yuque.com/books/share/b0ae3780-67e7-420a-bc97-2353c6cf3f4f?#'
  24. }
  25. this.setData({
  26. url:url
  27. })
  28. }
  29. },
  30. test(){
  31. }
  32. });