index.js 734 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // index.js
  2. import {
  3. ajax
  4. } from "../../utils/util";
  5. Page({
  6. data: {
  7. ori: {},
  8. video_height: 0,
  9. },
  10. toNext(e){
  11. const item = e.currentTarget.dataset.item || {};
  12. if (item.type === 'gzh'){
  13. wx.navigateTo({
  14. url: "/pages/webview/index?url=" + item.url
  15. })
  16. return
  17. }
  18. if (item.type === 'sph'){
  19. wx.openChannelsActivity({
  20. finderUserName: item.sph_id,
  21. feedId: item.sp_id,
  22. })
  23. return
  24. }
  25. },
  26. onLoad(options) {
  27. ajax({
  28. urlType: "fileurl",
  29. api: "/topic/tool/img/%E5%B0%91%E5%84%BF%E4%B9%A6%E7%94%BB%E5%A4%A7%E8%B5%9B/home.json?data=" +
  30. Date.now()
  31. }).then(res => {
  32. this.setData({
  33. ori: res || {}
  34. })
  35. })
  36. }
  37. })