Browse Source

首页组织名称

data-paga-xiaowang
mk 1 year ago
parent
commit
40b65acf45
  1. 22
      pages/index/index.js
  2. 2
      pages/index/index.wxml

22
pages/index/index.js

@ -17,26 +17,27 @@ Page({
nodata:false, nodata:false,
emptyHouseNum:'', emptyHouseNum:'',
catesNonIntResiNum:'', catesNonIntResiNum:'',
readFlag:'' readFlag:'0',
agencyName:'--'
}, },
// 事件处理函数 // 事件处理函数
onLoad: async function () { onLoad: async function () {
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
share:app.globalData.share
})
await this.getToken() await this.getToken()
// await this.getIntelligentMessage() // await this.getIntelligentMessage()
await this.getStaffbasicinfo() await this.getStaffbasicinfo()
this.setData({
statusHeight: app.globalData.deviceInfo.statusHeight,
navigationHeight: app.globalData.deviceInfo.navigationHeight,
share:app.globalData.share,
})
}, },
onShow(){ onShow(){
this.getIntelligentMessage() this.getIntelligentMessage()
this.getSituation() this.getSituation()
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.setData({ this.setData({
@ -151,7 +152,10 @@ onScrollToLower(e){
}, },
getStaffbasicinfo(){ getStaffbasicinfo(){
getStaffbasicinfo().then(res=>{ getStaffbasicinfo().then(res=>{
app.globalData.user = res.data app.globalData.user = res.data;
this.setData({
agencyName:res.data.agencyName
})
}).catch(err=>{ }).catch(err=>{
console.log(err); console.log(err);
wx.redirectTo({ wx.redirectTo({

2
pages/index/index.wxml

@ -2,7 +2,7 @@
<view class="header"> <view class="header">
<view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;"> <view class="navigation" style="height: {{navigationHeight}}px; top: {{statusHeight}}px;">
<image src="/images/work2/Header.png" class="back" bindtap="back" mode="" /> <image src="/images/work2/Header.png" class="back" bindtap="back" mode="" />
<text lines="1" class="header_text_1" style=" top: {{statusHeight}}px;width: 50rpx;height: 50rpx;">海伦路街道</text> <text lines="1" class="header_text_1" style=" top: {{statusHeight}}px;width: 50rpx;height: 50rpx;">{{agencyName}}</text>
</view> </view>
</view> </view>
<view class="text-wrapper_8"> <view class="text-wrapper_8">

Loading…
Cancel
Save