// components/diy-content/content.js var Nova = getApp().Nova; Component({ /** * 组件的属性列表 */ properties: { options: null }, /** * 组件的初始数据 */ data: {}, ready: function () { // 在组件布局完成后执行,确保options参数中有data信息 this.loadData(); }, /** * 组件的方法列表 */ methods: { async loadData() { await Nova.checkComponentsDataProperties(this); console.log('文章资讯', this.data.options.data) let list = await Nova.getBlockData(this.data.options.data) let { options } = this.data console.log('文章组', options); console.log(list) let { column, data, style, } = options let { className, filter } = data this.setData({ column: 'template5', list, data, style, className, filter }) }, goNovaURL: function (ev) { let { url, id, pageview } = ev.currentTarget.dataset console.log(id, pageview); if (id) { url = `/common-page/pages/cates/article-detail/index?aid=${id}` wx.navigateTo({ url: url, }); } } } })