|
@@ -5,6 +5,7 @@ Page({
|
|
|
* 页面的初始数据
|
|
|
*/
|
|
|
data: {
|
|
|
+ user: {},
|
|
|
gridList: [{
|
|
|
name: "通告",
|
|
|
path: "/pages/annunciate/index",
|
|
@@ -28,21 +29,20 @@ Page({
|
|
|
* 生命周期函数--监听页面加载
|
|
|
*/
|
|
|
onLoad(options) {
|
|
|
- //获取胶囊位置信息
|
|
|
- this.setData({
|
|
|
- capsule: wx.getMenuButtonBoundingClientRect()
|
|
|
- })
|
|
|
-
|
|
|
- _Http.login().then(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ let user = wx.getStorageSync('userMsg');
|
|
|
+ this.refreshData(user)
|
|
|
+ this.setData({ //获取胶囊位置信息
|
|
|
+ capsule: wx.getMenuButtonBoundingClientRect(),
|
|
|
+ user
|
|
|
+ })
|
|
|
},
|
|
|
- /* 应用程序 */
|
|
|
+ /* 更新数据 */
|
|
|
+ refreshData(item) {},
|
|
|
+ /* 宫格区域应用程序 */
|
|
|
applications(e) {
|
|
|
const {
|
|
|
name
|
|
|
} = e.currentTarget.dataset;
|
|
|
- console.log(name)
|
|
|
/* switch (name) {
|
|
|
case "通告":
|
|
|
wx.navigateTo({
|
|
@@ -54,6 +54,7 @@ Page({
|
|
|
break;
|
|
|
} */
|
|
|
},
|
|
|
+ /* 去通告 */
|
|
|
toAnnunciate() {
|
|
|
wx.navigateTo({
|
|
|
url: '/pages/annunciate/index'
|