收藏
回答

小程序报错Cannot read property 'split' of undefined ?

AppID
wx55389cd4235d22d8

 onLoad: function(t{
        var n = this;
        a.setNavigationBarColor(this), a.getUrl(this), a.util.request({
            url"entry/wxapp/system",
            cachetime"0",
            successfunction(t{
                console.log(t);
                var o = t.data;
                o.gs_img = o.gs_img.split(","), "" != o.kp_img && (o.kp_img = o.kp_img .split(",")), 
                n.setData({
                    xtxx: o,
                    second: o.kp_time,
                    kpggimg: o.kp_img


                });
                var e = Number(o.kp_time);
                "1" == o.model && (dsq = setInterval(function() {
                    e--, n.setData({
                        second: e
                    });
                }, 1e3), dsq1 = setTimeout(function() {
                    clearInterval(dsq), wx.reLaunch({
                        url"index"
                    });
                }, 1e3 * e));
            
        }
        });
    },
回答关注问题邀请回答
收藏

1 个回答

  • 微盟
    微盟
    2020-08-24

    这里看到你打印的数据,data为false,自然就不能使用split方法了

    2020-08-24
    有用
    回复
登录 后发表内容
问题标签