张延森 2 年前
父节点
当前提交
178b1a8e7c

+ 1
- 1
config/prod.js 查看文件

@@ -11,7 +11,7 @@ module.exports = {
11 11
     OSS_FAST_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
12 12
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
13 13
     BROKER_CITY: '"南京,上海"',
14
-    Version: '"V0.1.00-20220830"'
14
+    Version: '"V0.1.00-20220831"'
15 15
   },
16 16
   mini: {},
17 17
   h5: {

+ 3
- 2
src/components/Auth/useAuth.js 查看文件

@@ -3,7 +3,7 @@ import { useDispatch } from 'react-redux'
3 3
 import Taro from '@tarojs/taro'
4 4
 import { dispatchUpdateUserInfo } from '@/actions/user'
5 5
 import { queryUserPhone } from '@/services/user'
6
-import { UPDATE_USER_INFO } from '@/constants/user'
6
+import { ROLE_CODE, UPDATE_USER_INFO } from '@/constants/user'
7 7
 
8 8
 export default function useAuth(consultant, router, page) {
9 9
   const dispatch = useDispatch()
@@ -41,7 +41,8 @@ export default function useAuth(consultant, router, page) {
41 41
         dispatch({
42 42
           type: UPDATE_USER_INFO,
43 43
           payload: {
44
-            phone: res.phoneNumber
44
+            phone: res.phoneNumber,
45
+            personType: ROLE_CODE.CUSTOMER,
45 46
           }
46 47
         })
47 48
         resolve()

+ 4
- 5
src/pages/index/components/Menu/index.jsx 查看文件

@@ -137,25 +137,24 @@ export default function Menu() {
137 137
   const city = useSelector(state => state.city);
138 138
   const person = useSelector(({user})=>user.userInfo?.person)
139 139
   const [List, setList] = useState(list);
140
-
140
+  
141 141
   useEffect(() => {
142 142
     // 如果是全民经纪人添加专属菜单
143 143
     const brokerCityList = BROKER_CITY.split(',')
144
-    console.log('----------->', brokerCityList)
145 144
 
146 145
     if (brokerCityList.indexOf(city.curCity.shortname) > -1) {
147 146
       if(person.personType===ROLE_CODE.BROKER){
148 147
         setList([...brokerList, ...list]);
149
-      }else if(person.personType===ROLE_CODE.CUSTOMER){
148
+      } else if (person.personType === ROLE_CODE.CUSTOMER || person.personType=== ROLE_CODE.DRIFT){
150 149
         setList([...customerList, ...list]);
151
-      }else{
150
+      } else {
152 151
         setList(list);
153 152
       }
154 153
       
155 154
     }  else {
156 155
       setList(list);
157 156
     }
158
-  }, [city.curCity.shortname,person]);
157
+  }, [city.curCity.shortname, person.personType]);
159 158
 
160 159
   const MenuList = useMemo(() => {
161 160
     let Arr = [];

+ 1
- 0
src/routes.js 查看文件

@@ -420,6 +420,7 @@ const routes = [
420 420
     page: "pages/broker/toBeBroker/index",
421 421
     pkg: "subpackages",
422 422
     type: "other",
423
+    auth: ['phone', 'avatar'],
423 424
   },
424 425
   {
425 426
     name: "我的钱包",

+ 2
- 1
src/subpackages/pages/marketing/components/ResidentListItem/index.jsx 查看文件

@@ -14,7 +14,7 @@ export default function ResidentListItem (props) {
14 14
 
15 15
   useEffect(() => {
16 16
     setStatus(data.channelStatus)
17
-  }, [])
17
+  }, [data.channelStatus])
18 18
 
19 19
   const ToUnVisable = () => {
20 20
     Taro.showModal({
@@ -42,6 +42,7 @@ export default function ResidentListItem (props) {
42 42
     }
43 43
     return '('+roleCode+')'
44 44
   }
45
+
45 46
   return (
46 47
     <view className='components ResidentListItem'>
47 48
       <view className='flex-h'>

+ 2
- 3
src/subpackages/pages/marketing/residentManager/index.jsx 查看文件

@@ -23,12 +23,11 @@ export default withLayout((props) => {
23 23
   const getListRef = useRef();
24 24
 
25 25
   useDidShow(() => {
26
-   
27 26
       setPage({pageNumber: 1});
28
-
29
-
30 27
   });
31 28
 
29
+  console.log('-------PageList------->', PageList);
30
+
32 31
   const GetMyBuildingIds = () => {
33 32
     fetch({ url: API_MY_BUILDINGIDS, method: "get" }).then((res) => {
34 33
       setBuildingIds(res || []);