xujing 5 年 前
コミット
ac8ab1236a
共有1 個のファイルを変更した4 個の追加9 個の削除を含む
  1. 4
    9
      src/pages/project/index.js

+ 4
- 9
src/pages/project/index.js ファイルの表示

@@ -8,7 +8,7 @@ import BannerTwo from './swiper'
8 8
 import ready from '@/utils/ready'
9 9
 import { savePoint, updatePoint, queryExtContents, queryIndexIcons } from '@/services/common'
10 10
 import { queryHelpGroup } from '@/services/news'
11
-import { getIndexShare, queryUserInfo } from '@/services/user'
11
+import { getIndexShare } from '@/services/user'
12 12
 import { dispatchCitySelected } from '@/actions/city'
13 13
 import { SET_SCREEN_SHOWED } from '@/constants/project'
14 14
 import { getStore, connect } from '@tarojs/redux'
@@ -48,7 +48,6 @@ export default class Index extends Component {
48 48
     newsShow: false,
49 49
     city: null,
50 50
     iconList: [],
51
-    users: {},
52 51
   }
53 52
 
54 53
   componentWillMount() {
@@ -110,11 +109,7 @@ export default class Index extends Component {
110 109
   }
111 110
   componentDidShow() {
112 111
     // this.getIndexShareInfo()
113
-    queryUserInfo().then(users => {
114
-      this.setState({
115
-        users,
116
-      })
117
-    })
112
+
118 113
     const city = this.state.city || this.props.curCity
119 114
     if (city && city.id) {
120 115
       ready.queue(() => {
@@ -513,7 +508,7 @@ export default class Index extends Component {
513 508
   }
514 509
 
515 510
   render() {
516
-    const { achieve, helpGroupList, propagandaBanner, newsShow, iconList, newImg, users } = this.state
511
+    const { achieve, helpGroupList, propagandaBanner, newsShow, iconList, newImg } = this.state
517 512
     const { curCity, unReadNum, userInfo: { person: { personType } } } = this.props
518 513
     console.log(personType, "personTypepersonTypepersonTypepersonType")
519 514
 
@@ -560,7 +555,7 @@ export default class Index extends Component {
560 555
                 </View>
561 556
               </View>
562 557
               {/* 菜单栏 */}
563
-              <NavIcons city={curCity} personType={users.personType || personType} iconList={iconList} ></NavIcons>
558
+              <NavIcons city={curCity} personType={personType} iconList={iconList} ></NavIcons>
564 559
               {/* <View style={propagandaBanner.length > 0 ? "border-bottom:20rpx solid #f5f5f5" : ''}> */}
565 560
               <View style={(newsShow || propagandaBanner.length > 0) ? "border-bottom:20rpx solid #f5f5f5" : ''}>
566 561
                 {/* 展示位轮播图 */}