var o = getApp(), e = require("../../resource/js/htmlToWxml.js");

Page({
    data: {
        scrollHeight: 0,
        newsData: {}
    },
    getNewsDetail: function() {
        var n = this;
        wx.request({
            url: "https://wedengta.com/wxnews/getNews?action=DiscNewsContent&type=4&id=1478677877_1406730_1_9",
            headers: {
                "Content-Type": "application/json"
            },
            success: function(t) {
                0 == (t = t.data).ret ? ((t = JSON.parse(t.content)).content = e.html2json(t.sContent), 
                t.time = o.util.formatTime(1e3 * t.iTime), n.setData({
                    newsData: t
                })) : console.log("数据拉取失败");
            },
            fail: function(o) {
                console.log("数据拉取失败");
            }
        });
    },
    stockClick: function(o) {
        console.log("stockClick:" + o.currentTarget.dataset.seccode + ";secName:" + o.currentTarget.dataset.secname);
    },
    onLoad: function(o) {
        this.getNewsDetail(), console.log("onLoad");
    },
    onShow: function() {
        console.log("onShow");
    },
    onReady: function() {
        console.log("onReady");
    },
    onHide: function() {
        console.log("onHide");
    },
    onUnload: function() {
        console.log("onUnload");
    }
});