// components/toufang/index.ts namespace shiduan { const { line, upLine } = require("./F2"); let { getSaturation } = require('../../../../utils/api') let first = true; Component({ /** * 组件的属性列表 */ properties: { array: { type: Object }, channel: { type: Object }, }, observers: { }, ready() { first && this.init() first = false }, /** * 组件的初始数据 */ data: { onInitChart: undefined, DayList: {}, }, /** * 组件的方法列表 */ methods: { init() { let channelItem = this.data.channel; let arrayItem = this.data.array; Promise.all([ getSaturation({ channelId: channelItem.channelId, end: arrayItem.endDate, start: arrayItem.startDate }), ]).then((res: adDay[]) => { this.data.DayList = res[0]; this.setData({ onInitChart: line.bind(this) }) }) }, channelChange(event:wxPicker){ this.setData({ select_act: Number(event.detail.value) },()=>this.upData()) } } }) }