xcx 4 лет назад
Родитель
Сommit
bd1fddc680
3 измененных файлов: 3 добавлений и 3 удалений
  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 Просмотреть файл

@@ -55,7 +55,7 @@ class App extends Component {
55 55
       success: res => {
56 56
         if (res.errMsg === 'login:ok') {
57 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 59
             Taro.setStorage({ key: 'token', data: x.token })
60 60
             Taro.setStorage({ key: 'sessionKey', data: x.sessionKey })
61 61
 

+ 1
- 1
src/pages/WoDe/WoDeRenZheng/index.jsx Просмотреть файл

@@ -59,7 +59,7 @@ export default function WoDeRenZheng () {
59 59
   const SetDefaultRoom = (item) => {
60 60
     return () => {
61 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 Просмотреть файл

@@ -79,7 +79,7 @@ export default function WoDe () {
79 79
               </view>
80 80
               <view className='flex-item' onClick={() => { Taro.navigateTo({ url: '/pages/WoDe/GeRenXinXi/index' }) }}>
81 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 83
               </view>
84 84
               {
85 85
                 user.havaSigned !== undefined &&