You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.2 KiB
60 lines
1.2 KiB
// pages/varComm/pages/brandRatio/index.js
|
|
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
boxArr: new Array(2),
|
|
tabActive: 0,
|
|
sonCom: true
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
getEvent() {
|
|
this.setData({
|
|
boxArr: wx.getStorageSync('eventData')
|
|
})
|
|
wx.setStorageSync('brandRatioTime', {
|
|
sTimeType: '34'
|
|
})
|
|
},
|
|
onLoad(options) {
|
|
this.getEvent()
|
|
},
|
|
onShow() {
|
|
this.getEvent()
|
|
this.reLoad()
|
|
},
|
|
changeTab(val) {
|
|
let n = val.detail.index;
|
|
this.setData({
|
|
tabActive: n
|
|
})
|
|
},
|
|
switchEvent(e) {
|
|
let index = e.currentTarget.dataset.index
|
|
this.data.boxArr.splice(index, 1)
|
|
wx.setStorageSync('eventData', this.data.boxArr)
|
|
wx.navigateTo({
|
|
url: '/contrastPackages/addEvent/index',
|
|
})
|
|
},
|
|
changeTime(event) {
|
|
let {
|
|
detail
|
|
} = event
|
|
wx.setStorageSync('brandRatioTime', detail)
|
|
this.reLoad()
|
|
},
|
|
reLoad() {
|
|
this.setData({
|
|
sonCom: false
|
|
})
|
|
this.setData({
|
|
sonCom: true
|
|
})
|
|
}
|
|
}) |