diff --git a/contrastPackages/addEvent/index.js b/contrastPackages/addEvent/index.js index 5d214db..87f3dfb 100644 --- a/contrastPackages/addEvent/index.js +++ b/contrastPackages/addEvent/index.js @@ -1,5 +1,3 @@ -// pages/varComm/pages/addEvent/index.js -import Dialog from '../../miniprogram_npm/@vant/weapp/dialog/dialog'; const app = getApp() Page({ data: { @@ -63,7 +61,7 @@ Page({ evData: [], }, getData() { - let eventData = wx.getStorageSync('eventData'); + let eventData = wx.getStorageSync('eventData') || []; let evData = []; eventData.forEach(ele => { if(ele) { @@ -72,8 +70,7 @@ Page({ }); this.setData({ evData: evData, - }) - + }); app.globalData.request({ action: 'getEventList', token: wx.getStorageSync('token'), @@ -95,9 +92,10 @@ Page({ deleteIndex.push(n); }; }; - data.splice(deleteIndex[0], 1); - data.splice(deleteIndex[1]-1, 1); - + if(deleteIndex.length != 0) { + data.splice(deleteIndex[0], 1); + data.splice(deleteIndex[1]-1, 1); + } this.setData({ eventList: data, }) diff --git a/contrastPackages/addEvent/index.wxml b/contrastPackages/addEvent/index.wxml index 24a698f..995769b 100644 --- a/contrastPackages/addEvent/index.wxml +++ b/contrastPackages/addEvent/index.wxml @@ -9,7 +9,6 @@ - diff --git a/contrastPackages/addTheme/index.wxml b/contrastPackages/addTheme/index.wxml index eae7721..6888efb 100644 --- a/contrastPackages/addTheme/index.wxml +++ b/contrastPackages/addTheme/index.wxml @@ -36,38 +36,4 @@ - - - - \ No newline at end of file diff --git a/contrastPackages/brandRatio/index.js b/contrastPackages/brandRatio/index.js index dcdd9bb..58db87b 100644 --- a/contrastPackages/brandRatio/index.js +++ b/contrastPackages/brandRatio/index.js @@ -147,10 +147,4 @@ Page({ sonCom: true }) }, - // handlerBack() { - // this.triggerEvent('hide') - // wx.navigateBack({ - // delta: 1 - // }); - // } }) \ No newline at end of file diff --git a/custom-tab-bar/index.js b/custom-tab-bar/index.js index fc5c277..d09add7 100644 --- a/custom-tab-bar/index.js +++ b/custom-tab-bar/index.js @@ -58,11 +58,11 @@ Component({ openid: wx.getStorageSync('openid'), token: wx.getStorageSync('token') }).then(res => { - let arr = this.data.list; - arr[2].selectedIconPath = res.brandnImg; - this.setData({ - list: arr, - selected: n + let arr = this.data.list; + arr[2].selectedIconPath = res.brandnImg; + this.setData({ + list: arr, + selected: n }); }) } else { diff --git a/pages/index/Brandsales/Brandsales.js b/pages/index/Brandsales/Brandsales.js index 5544b06..9af4fe6 100644 --- a/pages/index/Brandsales/Brandsales.js +++ b/pages/index/Brandsales/Brandsales.js @@ -49,39 +49,6 @@ Page({ app.globalData.request(obj).then(res => { if (res && res.length > 0) { iPageIndex++; - // const arr = [] - // const time = [] - // const obj = {} - // var totalSum = 0 - // var num = 0 - - // res.forEach(i => { - // totalSum += parseInt(i.salescount) - // // console.log(i.salescount) - // if (!obj[i.sourcetime]) { - // obj[i.sourcetime] = [] - // time.push(i.sourcetime) - // num++ - // } - // obj[i.sourcetime].push(i) - // }) - // for (let j = 0; j < num; j++) { - // var sum = 0 - // for (let a = 0; a < obj[time[j]].length; a++) { - // sum += parseInt(obj[time[j]][a].salescount) - // } - // arr.push({ - // times: time[j], - // sales: sum, - // share: ((sum / totalSum) * 100).toFixed(2), - // brand: this.data.carName - // }) - // } - // if (arr.length == 0) { - // this.data.loadMore = true - // } else { - // this.data.loadMore = false - // } let arr = this.data.ranking.concat(res); this.setData({ ranking: arr, @@ -172,18 +139,18 @@ Page({ this.data.carName = options.carName if (options.date == undefined) { this.data.date = times2(wx.getStorageSync('newTime')), - this.data.date2 = wx.getStorageSync('newTime') + this.data.date2 = wx.getStorageSync('newTime') } else { this.data.date = options.date this.data.date2 = options.date2 } iPageIndex = 1; this.getData() - + this.setData({ date: this.data.date, date2: this.data.date2, - }) + }); }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/index/Brandsales/Brandsales.wxml b/pages/index/Brandsales/Brandsales.wxml index 7cb186e..7c67994 100644 --- a/pages/index/Brandsales/Brandsales.wxml +++ b/pages/index/Brandsales/Brandsales.wxml @@ -3,13 +3,13 @@ - + {{date}} - - + {{date2}} diff --git a/pages/index/Rankdetail/Rankdetail.js b/pages/index/Rankdetail/Rankdetail.js index dca0c79..949e579 100644 --- a/pages/index/Rankdetail/Rankdetail.js +++ b/pages/index/Rankdetail/Rankdetail.js @@ -275,56 +275,5 @@ Page({ onLoad: function (options) { console.log('111',this.data.sortOpt[0].value1) }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - // this.getTabBar().init(); - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - } - }) \ No newline at end of file diff --git a/pages/index/Salesranking/Salesranking.js b/pages/index/Salesranking/Salesranking.js index 1f9360e..c17ce5a 100644 --- a/pages/index/Salesranking/Salesranking.js +++ b/pages/index/Salesranking/Salesranking.js @@ -224,7 +224,6 @@ Page({ app.globalData.request(obj, (database) => {}).then(res => { const carName = [] const carValue = [] - // console.log("这是数据",res) if (res && res.length > 0) { iPageIndex++; //把新请求到的数据添加到列表里 @@ -233,8 +232,6 @@ Page({ carName.push(e.seriesname) carValue.push(e.salescount) }) - // length=(carName.length/carName.length)*100 - // console.log(carName.length) this.setData({ ranking: list, //获取数据数组 loadMore: false, //把"上拉加载"的变量设为false,显示 @@ -413,7 +410,6 @@ Page({ sStartTime: times(this.data.startDate), sEndTime: this.data.endDate, }).then(res => { - // console.log(res) const dataTime = [] const dataCar = [] res.forEach(e => { @@ -448,12 +444,10 @@ Page({ startDate: wx.getStorageSync('newTime'), endDate: wx.getStorageSync('newTime') }) - // this.getTabBar().init(); this.getData() }, changeTab(val) { let n = val.detail.index; - // console.log(n) this.setData({ active: n }) diff --git a/pages/index/detailedvolume/detailedvolume.js b/pages/index/detailedvolume/detailedvolume.js index 2b25cee..e74debc 100644 --- a/pages/index/detailedvolume/detailedvolume.js +++ b/pages/index/detailedvolume/detailedvolume.js @@ -48,18 +48,6 @@ Page({ }) } app.globalData.request(obj).then(res => { - // console.log(res) - // const arr=[] - // res.forEach(e => { - // let obj={ - // models:e.carseries, - // count:e.salescount, - // space:e.specname, - // specm:e.specpm, - // salespm:e.salespm - // } - // arr.push(obj) - // }); if (res && res.length > 0) { iPageIndex++; let arr = this.data.content.concat(res); @@ -80,47 +68,7 @@ Page({ }); } }) - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ onReachBottom() { console.log("上拉触底事件") let that = this @@ -134,11 +82,4 @@ Page({ } }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } }) \ No newline at end of file diff --git a/pages/index/total/tatal.js b/pages/index/total/tatal.js index 146671b..c966813 100644 --- a/pages/index/total/tatal.js +++ b/pages/index/total/tatal.js @@ -17,26 +17,7 @@ Page({ url: '/subPackages/pages/detail/index?id=' + id }) } - - console.log('000', token) }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ onShow() { this.setData({ sQuDao: wx.getStorageSync('sQuDao') || '', @@ -77,38 +58,4 @@ Page({ wx.hideToast(); }, 500) }, - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } }) \ No newline at end of file diff --git a/pages/themeList/index.js b/pages/themeList/index.js deleted file mode 100644 index 6663c15..0000000 --- a/pages/themeList/index.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/themeList/index.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file diff --git a/pages/themeList/index.json b/pages/themeList/index.json deleted file mode 100644 index 3928faa..0000000 --- a/pages/themeList/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/themeList/index.wxml b/pages/themeList/index.wxml deleted file mode 100644 index 99361c9..0000000 --- a/pages/themeList/index.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/themeList/index.wxml diff --git a/pages/themeList/index.wxss b/pages/themeList/index.wxss deleted file mode 100644 index 9a3b2aa..0000000 --- a/pages/themeList/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/themeList/index.wxss */ \ No newline at end of file diff --git a/pages/varComm/pages/event/index.js b/pages/varComm/pages/event/index.js index 5ed1f92..de9ca2d 100644 --- a/pages/varComm/pages/event/index.js +++ b/pages/varComm/pages/event/index.js @@ -94,7 +94,7 @@ Component({ eventList: res }) let arr = []; - let x = wx.getStorageSync('eventData'); + let x = wx.getStorageSync('eventData') || []; x.forEach(ele => { arr.push(JSON.parse(ele)) }) diff --git a/pages/varComm/pages/theme/index.js b/pages/varComm/pages/theme/index.js index 67569e1..ddc511e 100644 --- a/pages/varComm/pages/theme/index.js +++ b/pages/varComm/pages/theme/index.js @@ -121,7 +121,7 @@ Component({ }) }); - let x = wx.getStorageSync('themeData') + let x = wx.getStorageSync('themeData') || []; let arr = []; x.forEach(ele => { arr.push(JSON.stringify(ele)) diff --git a/subPackages/pages/logs/PushSettings/index.js b/subPackages/pages/logs/PushSettings/index.js index 272a274..aa379ff 100644 --- a/subPackages/pages/logs/PushSettings/index.js +++ b/subPackages/pages/logs/PushSettings/index.js @@ -118,12 +118,6 @@ Page({ weekList: event.detail, }); }, - // onChange3(event) { - // wx.setStorageSync('EmailWeek', event.detail.toString()); - // this.setData({ - // result: event.detail, - // }); - // }, Emailpush() { if(this.data.checked == false && this.data.checked2 == false) { let data = {