1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- // 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())
- }
- }
- })
-
- }
|