请教代码问题

图1小程序刚编译的时候有5月这个选项,但是切换一下月份之后就消失了跟图2一样,还有就是开启可视化之后能看到那一些数据对象(图3)关闭之后就看不到了。有大佬帮忙看看吗?,可以有偿,我实在没有找到bug发生在哪,谢谢谢谢

图3图2图1

 图4

//这是那个界面的js文件
let app = getApp();
Page({
  data: {
    id:'',//类型id
    footerIndex: 1,
    amtType:'0',//0支出,1收入
    amtTypeArr:['支出','收入'],
    dateType:1,//时间范围1月,2年
    dateTypeIdx:0,//选中的月或年的idx
    chartList:[],
    chartListCount:0,
    yearArr: ['2023','2024'],
    monthArr: [12,11,10,9,8,7,6,5,4,3,2,1],
    year:'',
    beginMonth:'',
    endMonth:''
  },
  onLoad: function (options) {
    if(options.id){
      this.setData({
        amtType:options.type,
        id:options.id,
        year:options.year,
        beginMonth:options.mon1,
        endMonth:options.mon2
      });
      this.getChartDetail();
    }else{
      let month = new Date().getMonth() + 1;
      let year = new Date().getFullYear();
      this.setData({
        year:year,
        beginMonth:month,
        endMonth:month,
        monthArr:this.data.monthArr.slice(12-month),
        dateTypeIdx:0
      });
      thi
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值