upgradeDetail.js 894 B

1234567891011121314151617181920212223242526272829303132
  1. var app = getApp();
  2. var that;
  3. var AParse = require('../../../Component/aParse/aParse.js');
  4. Page({
  5. data: {
  6. obj: {},
  7. },
  8. onLoad(e) {
  9. that = this;
  10. dd.setNavigationBar({ title: "公告内容" });
  11. if (e.id) {
  12. this.getList(e.id);
  13. }
  14. },
  15. getList(id) {
  16. /**
  17. * 使用说明:
  18. * AParse.AParse(bindName , type, data, target,imagePadding)
  19. * 1.bindName绑定的数据名(必填)
  20. * 2.type可以为html或者md(必填)
  21. * 3.data为传入的具体数据(必填)
  22. * 4.target为Page对象,一般为this(必填)
  23. * 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选)
  24. */
  25. app.$get("api/announcement/info", { announcement_id: id }).then((res) => {
  26. AParse.aParse('article', 'html',res.data.data.focus+'<div style="height:20px"></div>'+res.data.data.update_msg, that, 5);
  27. this.setData({
  28. obj: res.data.data
  29. })
  30. })
  31. },
  32. });