diff --git a/contrastPackages/carModelsRatio/BBS/index.js b/contrastPackages/carModelsRatio/BBS/index.js index d02fdc1..d7eef7e 100644 --- a/contrastPackages/carModelsRatio/BBS/index.js +++ b/contrastPackages/carModelsRatio/BBS/index.js @@ -24,7 +24,7 @@ Component({ }, lifetimes: { attached() { - let brandRatioTime = wx.getStorageSync('brandRatioTime') + let brandRatioTime = wx.getStorageSync('brandRatioTime') || 34 let sBrand = wx.getStorageSync('sBrand') this.setData({ boxArr: wx.getStorageSync('modelsData') diff --git a/contrastPackages/carModelsRatio/survey/index.js b/contrastPackages/carModelsRatio/survey/index.js index d326291..b65eeb7 100644 --- a/contrastPackages/carModelsRatio/survey/index.js +++ b/contrastPackages/carModelsRatio/survey/index.js @@ -30,7 +30,7 @@ Component({ }, lifetimes: { attached() { - let brandRatioTime = wx.getStorageSync('brandRatioTime') + let brandRatioTime = wx.getStorageSync('brandRatioTime') || 34 let sBrand = wx.getStorageSync('sBrand') this.setData({ boxArr: wx.getStorageSync('modelsData') diff --git a/contrastPackages/carModelsRatio/thetail/index.js b/contrastPackages/carModelsRatio/thetail/index.js index 65cc73c..858b783 100644 --- a/contrastPackages/carModelsRatio/thetail/index.js +++ b/contrastPackages/carModelsRatio/thetail/index.js @@ -27,7 +27,7 @@ Component({ }, lifetimes: { attached() { - let brandRatioTime = wx.getStorageSync('brandRatioTime') + let brandRatioTime = wx.getStorageSync('brandRatioTime') || 34 let sBrand = wx.getStorageSync('sBrand') this.setData({ boxArr: wx.getStorageSync('modelsData') diff --git a/contrastPackages/carModelsRatio/weibo/index.js b/contrastPackages/carModelsRatio/weibo/index.js index 19a4ce3..d729ea3 100644 --- a/contrastPackages/carModelsRatio/weibo/index.js +++ b/contrastPackages/carModelsRatio/weibo/index.js @@ -27,7 +27,7 @@ Component({ }, lifetimes: { attached() { - let brandRatioTime = wx.getStorageSync('brandRatioTime') + let brandRatioTime = wx.getStorageSync('brandRatioTime') || 34 let sBrand = wx.getStorageSync('sBrand') this.setData({ boxArr: wx.getStorageSync('modelsData') diff --git a/pages/varComm/pages/carModels/index.js b/pages/varComm/pages/carModels/index.js index 4a16bed..ac57eda 100644 --- a/pages/varComm/pages/carModels/index.js +++ b/pages/varComm/pages/carModels/index.js @@ -47,7 +47,9 @@ Component({ return } wx.setStorageSync('modelsData', this.data.boxArr) - wx.setStorageSync('sBrand', this.data.sBrand) + if(wx.getStorageSync('sBrand').length<1){ + wx.setStorageSync('sBrand', this.data.sBrand) + } wx.navigateTo({ url: `/contrastPackages/carModelsRatio/index`, })