拼接数组
ES6扩展运算符【三个点(...)将一个数组转为用逗号分隔的参数序列】
goodsList: [...goodsList, ...goods]
本地存储
// 把接口数据存入本地存储中
wx.setStorageSync('cates', { time: Date.now(), data: this.Cates });
wx.getStorageSync('cart');
goodsList: [...goodsList, ...goods]
// 把接口数据存入本地存储中
wx.setStorageSync('cates', { time: Date.now(), data: this.Cates });
wx.getStorageSync('cart');