You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

65 lines
1.5 KiB

var app = getApp()
var WxParse = require('../../wxParse/wxParse.js');
var WXAPI = require('../../utils/server.js');
Page({
data: {
notice: [],
radioindex: '',
pro_id: 0,
num: 0,
flag: false,
cartId: 0,
numbers: "",
bindData: {},
},
// 下拉刷新
onPullDownRefresh: function () {
wx.showNavigationBarLoading() //在标题栏中显示加载
this.DataonLoad();
wx.hideNavigationBarLoading() //完成停止加载
wx.stopPullDownRefresh() //停止下拉刷新
},
onLoad: function (options) {
wx.setNavigationBarTitle({
title: '公告详情', //修改页面标题
});
var that = this;
WXAPI.messageList({
}).then(res => {
if (res.code == 200) {
var data = res.data
var notice = data.message;
var detail = data.message[0].detail;
WxParse.wxParse('detail', 'html', detail, that, 5);//处理规则的富文本框
if (notice == '') {
var notice = []
}
that.setData({
notice: notice
})
}
})
},
// 数据加载
DataonLoad: function () {
var that = this;
WXAPI.messageList({
}).then(res => {
if (res.code == 200) {
var data = res.data
var notice = data.message;
var detail = data.message[0].detail;
WxParse.wxParse('detail', 'html', detail, that, 5);//处理规则的富文本框
if (notice == '') {
var notice = []
}
that.setData({
notice: notice
})
}
})
},
})