1234567891011121314151617181920212223242526272829303132 |
- var app = getApp();
- var that;
- var AParse = require('../../../Component/aParse/aParse.js');
- Page({
- data: {
- obj: {},
- },
- onLoad(e) {
- that = this;
- dd.setNavigationBar({ title: "公告内容" });
- if (e.id) {
- this.getList(e.id);
- }
- },
- getList(id) {
- /**
- * 使用说明:
- * AParse.AParse(bindName , type, data, target,imagePadding)
- * 1.bindName绑定的数据名(必填)
- * 2.type可以为html或者md(必填)
- * 3.data为传入的具体数据(必填)
- * 4.target为Page对象,一般为this(必填)
- * 5.imagePadding为当图片自适应是左右的单一padding(默认为0,可选)
- */
- app.$get("api/announcement/info", { announcement_id: id }).then((res) => {
- AParse.aParse('article', 'html',res.data.data.focus+'<div style="height:20px"></div>'+res.data.data.update_msg, that, 5);
- this.setData({
- obj: res.data.data
- })
- })
- },
- });
|