榆山
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.

36 lines
874 B

// pages/index/gridChange.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
deptName:''
},
onLoad: function (options) {
let that = this
that.setData({
list: app.globalData.deptDataScopeList,
deptName: wx.getStorageSync('currentGrid').deptName
})
console.log('currentGrid', wx.getStorageSync('currentGrid'))
},
change: function (e) {
let index = e.currentTarget.dataset.index
wx.setStorageSync('currentGrid', this.data.list[index])
app.globalData.currentDept = this.data.list[index]
console.log(wx.getStorageSync('currentGrid'))
wx.reLaunch({
url: '/pages/index/index'
})
},
allchange: function (e) {
wx.setStorageSync('currentGrid', '')
console.log(wx.getStorageSync('currentGrid'))
wx.reLaunch({
url: '/pages/index/index'
})
},
})