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.
127 lines
2.6 KiB
127 lines
2.6 KiB
2 years ago
|
// pages/school/index/index.js
|
||
|
const app = getApp()
|
||
|
Page({
|
||
|
|
||
|
/**
|
||
|
* 页面的初始数据
|
||
|
*/
|
||
|
data: {
|
||
|
xmcxList: [],
|
||
|
xmMenuList: [],
|
||
|
bureauName: '',
|
||
|
badgeShow: false
|
||
|
},
|
||
|
|
||
|
//点击项目查询项
|
||
|
onGridItem(e){
|
||
|
wx.navigateTo({
|
||
|
url: '/pages/project/projectInquire/index?code=' + e.currentTarget.dataset.cell
|
||
|
});
|
||
|
},
|
||
|
|
||
|
//获取项目查询菜单(学校+电教馆)
|
||
|
getXmcx() {
|
||
|
let that = this;
|
||
|
wx.request({
|
||
|
url: app.globalData.serverUrl + '/baseService/gtzz/getXmcx',
|
||
|
method: "GET",
|
||
|
header: {
|
||
|
'content-type': 'application/json; charset=utf-8',
|
||
|
'cookie': wx.getStorageSync('sessionid')
|
||
|
},
|
||
|
success(res) {
|
||
|
|
||
|
that.setData({
|
||
|
xmcxList: res.data.data
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
},
|
||
|
|
||
|
//获取项目待办菜单(学校+电教馆)
|
||
|
getXmMenu() {
|
||
|
let that = this;
|
||
|
wx.request({
|
||
|
url: app.globalData.serverUrl + '/baseService/gtzz/getXmMenu',
|
||
|
method: "GET",
|
||
|
header: {
|
||
|
'content-type': 'application/json; charset=utf-8',
|
||
|
'cookie': wx.getStorageSync('sessionid')
|
||
|
},
|
||
|
success(res) {
|
||
|
that.setData({
|
||
|
xmMenuList: res.data.data
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
},
|
||
|
|
||
|
//点击项目待办项
|
||
|
onProjectHandle(e) {
|
||
|
wx.navigateTo({
|
||
|
url: '/pages/project/projectList/index?code=' + e.currentTarget.dataset.code
|
||
|
});
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 生命周期函数--监听页面加载
|
||
|
*/
|
||
|
onLoad: function (options) {
|
||
|
|
||
|
this.setData({
|
||
|
bureauName: wx.getStorageSync('bureauName')
|
||
|
});
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 生命周期函数--监听页面初次渲染完成
|
||
|
*/
|
||
|
onReady: function () {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 生命周期函数--监听页面显示
|
||
|
*/
|
||
|
onShow: function () {
|
||
|
this.getXmMenu();
|
||
|
this.getXmcx();
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 生命周期函数--监听页面隐藏
|
||
|
*/
|
||
|
onHide: function () {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 生命周期函数--监听页面卸载
|
||
|
*/
|
||
|
onUnload: function () {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||
|
*/
|
||
|
onPullDownRefresh: function () {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 页面上拉触底事件的处理函数
|
||
|
*/
|
||
|
onReachBottom: function () {
|
||
|
|
||
|
},
|
||
|
|
||
|
/**
|
||
|
* 用户点击右上角分享
|
||
|
*/
|
||
|
onShareAppMessage: function () {
|
||
|
|
||
|
}
|
||
|
})
|