From 40b65acf45b02160633e775dbabef7ee2433f8f6 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Mon, 15 Apr 2024 17:05:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=BB=84=E7=BB=87=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 22 +++++++++++++--------- pages/index/index.wxml | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index f54f657..c58aaab 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -17,26 +17,27 @@ Page({ nodata:false, emptyHouseNum:'', catesNonIntResiNum:'', - readFlag:'' - + readFlag:'0', + agencyName:'--' }, // 事件处理函数 onLoad: async function () { - this.setData({ - statusHeight: app.globalData.deviceInfo.statusHeight, - navigationHeight: app.globalData.deviceInfo.navigationHeight, - share:app.globalData.share - }) + await this.getToken() // await this.getIntelligentMessage() await this.getStaffbasicinfo() + this.setData({ + statusHeight: app.globalData.deviceInfo.statusHeight, + navigationHeight: app.globalData.deviceInfo.navigationHeight, + share:app.globalData.share, + }) }, onShow(){ - this.getIntelligentMessage() this.getSituation() + }, onPullDownRefresh() { this.setData({ @@ -151,7 +152,10 @@ onScrollToLower(e){ }, getStaffbasicinfo(){ getStaffbasicinfo().then(res=>{ - app.globalData.user = res.data + app.globalData.user = res.data; + this.setData({ + agencyName:res.data.agencyName + }) }).catch(err=>{ console.log(err); wx.redirectTo({ diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 0d64401..0612ac6 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -2,7 +2,7 @@ - 海伦路街道 + {{agencyName}}