微信小程序 清空的数据再进入页面又有了 5
各位大佬,帮帮忙。我不管是splice删除单个数组数据,还是全部上传完清空,当我再返回该页面时,刚才清空的数据(console.log确实没显示了)又来了。怎么办啊,有没...
各位大佬,帮帮忙。我不管是splice删除单个数组数据,还是全部上传完清空,当我再返回该页面时,刚才清空的数据(console.log确实没显示了)又来了。怎么办啊,有没有好心人帮我看看,最好我把微信小程序代码发给你,你帮我看看,我没有积分,不甚感激。
//获取删除事件,是哪一张发票
var dataset = e.currentTarget.dataset;
var Index = dataset.index;
//that.data.list.splice(Index,1);
wx.showModal({
title: '提示',
content: '确定要删除此发票吗',
success: function (res) {
if (res.confirm) {
console.log('点击确定了');
console.log(that.data.requestDataArray)
//删除该张发票
that.data.requestDataArray.splice(Index, 1);
that.data.orderInfologs.splice(Index, 1);
that.setData({
requestDataArray: that.data.requestDataArray,
})
that.setData({
orderInfologs: that.data.orderInfologs,
})
that.setData({
orderInfologs:{}
})
that.setData({
orderInfo:''
})
wx.clearStorageSync('orderInfologs')
console.log(that.data.orderInfologs) 展开
//获取删除事件,是哪一张发票
var dataset = e.currentTarget.dataset;
var Index = dataset.index;
//that.data.list.splice(Index,1);
wx.showModal({
title: '提示',
content: '确定要删除此发票吗',
success: function (res) {
if (res.confirm) {
console.log('点击确定了');
console.log(that.data.requestDataArray)
//删除该张发票
that.data.requestDataArray.splice(Index, 1);
that.data.orderInfologs.splice(Index, 1);
that.setData({
requestDataArray: that.data.requestDataArray,
})
that.setData({
orderInfologs: that.data.orderInfologs,
})
that.setData({
orderInfologs:{}
})
that.setData({
orderInfo:''
})
wx.clearStorageSync('orderInfologs')
console.log(that.data.orderInfologs) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询