微信小程序Uncaught (in promise) TypeError报错
getIndexConfig:function(){
var that = this;
getIndexData().then(res=> {
that.setData({
banner: res.data.banner,
menus: res.data.menus,
activity: res.data.activity,
lovely: res.data.lovely,
info: res.data.info,
likeInfo: res.data.likeInfo,
benefit: res.data.benefit,
logoUrl: res.data.logoUrl,
couponList: res.data.couponList,
});
getSeckillTime: function () {
let that = this;
getSeckillIndexTime().then(res => {
let timeList = res.data.seckillTime, seckillTimeIndex = res.data.seckillTimeIndex;
that.setData({
timeList: timeList,
seckillCont: res.data.seckillCont,
killIndex: seckillTimeIndex,
seckillTimeIndex: seckillTimeIndex,
killIndexTime: timeList[that.data.killIndex].stop,
status: timeList[seckillTimeIndex].status
})
wxh.time(timeList[that.data.killIndex].stop, that);
that.getSeckillLists();
});
},
getCategoryData: function () {
let that = this;
getCategoryList().then(res => {
that.setData({
categoryOne: res.data
})
});
},
get_logo_url: function () {
var that = this;
if (wx.getStorageSync('logo_url')) return this.setData({ logo_url: wx.getStorageSync('logo_url') });
getLogo().then(res=>{
wx.setStorageSync('logo_url', res.data.logo_url);
that.setData({ logo_url: res.data.logo_url });
});
},