Browse Source

静态页面

xcx 4 years ago
parent
commit
bd1fddc680
3 changed files with 3 additions and 3 deletions
  1. 1
    1
      src/app.js
  2. 1
    1
      src/pages/WoDe/WoDeRenZheng/index.jsx
  3. 1
    1
      src/pages/WoDe/index.jsx

+ 1
- 1
src/app.js View File

55
       success: res => {
55
       success: res => {
56
         if (res.errMsg === 'login:ok') {
56
         if (res.errMsg === 'login:ok') {
57
           request({ ...apis.login, params: { code: res.code, from, recommender, scene, mpOpenId } }).then(x => {
57
           request({ ...apis.login, params: { code: res.code, from, recommender, scene, mpOpenId } }).then(x => {
58
-            setUser({ ...x.person, ShowIndexAdv: false, FirstComing: true, communityId: x.houseList !== null && x.houseList.length ? x.houseList[0].communityId : null, roomId: x.houseList !== null && x.houseList.length ? x.houseList[0].id : null, roleName: x.houseList !== null && x.houseList.length ? x.houseList[0].roleName : null })
58
+            setUser({ ...x.person, ShowIndexAdv: false, FirstComing: true, communityId: x.houseList !== null && x.houseList.length ? x.houseList[0].communityId : null, roomId: x.houseList !== null && x.houseList.length ? x.houseList[0].id : null, roleId: x.houseList !== null && x.houseList.length ? x.houseList[0].roleId : null })
59
             Taro.setStorage({ key: 'token', data: x.token })
59
             Taro.setStorage({ key: 'token', data: x.token })
60
             Taro.setStorage({ key: 'sessionKey', data: x.sessionKey })
60
             Taro.setStorage({ key: 'sessionKey', data: x.sessionKey })
61
 
61
 

+ 1
- 1
src/pages/WoDe/WoDeRenZheng/index.jsx View File

59
   const SetDefaultRoom = (item) => {
59
   const SetDefaultRoom = (item) => {
60
     return () => {
60
     return () => {
61
       if (item.id - 0 !== user.roomId - 0) {
61
       if (item.id - 0 !== user.roomId - 0) {
62
-        setUser({ ...user, communityId: item.communityId, roomId: item.id, roleName: item.roleName })
62
+        setUser({ ...user, communityId: item.communityId, roomId: item.id, roleId: item.roleId })
63
       }
63
       }
64
     }
64
     }
65
   }
65
   }

+ 1
- 1
src/pages/WoDe/index.jsx View File

79
               </view>
79
               </view>
80
               <view className='flex-item' onClick={() => { Taro.navigateTo({ url: '/pages/WoDe/GeRenXinXi/index' }) }}>
80
               <view className='flex-item' onClick={() => { Taro.navigateTo({ url: '/pages/WoDe/GeRenXinXi/index' }) }}>
81
                 <text>{user.nickname || '暂未授权用户信息'}</text>
81
                 <text>{user.nickname || '暂未授权用户信息'}</text>
82
-                <text>{user.phone ? `${user.phone} ${user.roleName}` : '游客'}</text>
82
+                <text>{user.phone ? `${user.phone} ${user.roleId - 0 === 1 ? '户主' : user.roleId - 0 === 2 ? '租客' : '家属'}` : '游客'}</text>
83
               </view>
83
               </view>
84
               {
84
               {
85
                 user.havaSigned !== undefined &&
85
                 user.havaSigned !== undefined &&