lisenzhou il y a 2 ans
Parent
révision
6f5421b6dc
71 fichiers modifiés avec 759 ajouts et 472 suppressions
  1. 1
    9
      config/dev.js
  2. 2
    2
      src/components/ProjectListItem/index.jsx
  3. 6
    3
      src/components/brokerShare/index.jsx
  4. 2
    1
      src/components/brokerShare/index.scss
  5. 2
    0
      src/constants/api.js
  6. 0
    9
      src/constants/borker.js
  7. 15
    0
      src/constants/broker.js
  8. 1
    1
      src/constants/user.js
  9. 2
    2
      src/pages/index/buildingDetail/components/BasicInfo/index.jsx
  10. 7
    1
      src/pages/index/index.jsx
  11. 143
    90
      src/pages/mine/index.jsx
  12. 4
    4
      src/pages/mine/tabData.js
  13. 27
    34
      src/routes.js
  14. 0
    12
      src/services/borker.js
  15. 28
    0
      src/services/broker.js
  16. 22
    13
      src/services/common.js
  17. 0
    22
      src/subpackages/pages/borker/components/CardItem/index.jsx
  18. 0
    26
      src/subpackages/pages/borker/invitationlist/index.jsx
  19. 0
    52
      src/subpackages/pages/borker/toBeBorker/AddBankCard/index.jsx
  20. 0
    145
      src/subpackages/pages/borker/toBeBorker/index.jsx
  21. 0
    0
      src/subpackages/pages/broker/agentRule/index.config.js
  22. 3
    3
      src/subpackages/pages/broker/agentRule/index.jsx
  23. 2
    2
      src/subpackages/pages/broker/agentRule/index.scss
  24. 0
    0
      src/subpackages/pages/broker/agreement/index.config.js
  25. 1
    1
      src/subpackages/pages/broker/agreement/index.jsx
  26. 1
    1
      src/subpackages/pages/broker/agreement/index.scss
  27. 0
    0
      src/subpackages/pages/broker/commissionSettlement/index.config.js
  28. 0
    0
      src/subpackages/pages/broker/commissionSettlement/index.jsx
  29. 0
    0
      src/subpackages/pages/broker/commissionSettlement/index.scss
  30. 44
    0
      src/subpackages/pages/broker/components/CardItem/index.jsx
  31. 14
    19
      src/subpackages/pages/broker/components/CardItem/index.scss
  32. 0
    0
      src/subpackages/pages/broker/index.config.js
  33. 0
    0
      src/subpackages/pages/broker/invitation/BottomAction.jsx
  34. 0
    0
      src/subpackages/pages/broker/invitation/index.config.js
  35. 1
    1
      src/subpackages/pages/broker/invitation/index.jsx
  36. 0
    0
      src/subpackages/pages/broker/invitation/index.scss
  37. 0
    0
      src/subpackages/pages/broker/invitationlist/index.config.js
  38. 78
    0
      src/subpackages/pages/broker/invitationlist/index.jsx
  39. 8
    0
      src/subpackages/pages/broker/invitationlist/index.scss
  40. 1
    1
      src/subpackages/pages/broker/myMessage/components/messageItem/index.jsx
  41. 0
    0
      src/subpackages/pages/broker/myMessage/components/messageItem/index.scss
  42. 0
    0
      src/subpackages/pages/broker/myMessage/components/messageTime/index.jsx
  43. 0
    0
      src/subpackages/pages/broker/myMessage/components/messageTime/index.scss
  44. 0
    0
      src/subpackages/pages/broker/myMessage/index.config.js
  45. 0
    0
      src/subpackages/pages/broker/myMessage/index.jsx
  46. 0
    0
      src/subpackages/pages/broker/myMessage/index.scss
  47. 0
    0
      src/subpackages/pages/broker/myWallet/index.config.js
  48. 0
    0
      src/subpackages/pages/broker/myWallet/index.jsx
  49. 0
    0
      src/subpackages/pages/broker/myWallet/index.scss
  50. 0
    0
      src/subpackages/pages/broker/myWallet/list/Item/index.jsx
  51. 0
    0
      src/subpackages/pages/broker/myWallet/list/Item/index.scss
  52. 0
    0
      src/subpackages/pages/broker/myWallet/list/index.jsx
  53. 0
    0
      src/subpackages/pages/broker/myWallet/list/index.scss
  54. 0
    0
      src/subpackages/pages/broker/rankingList/components/list/index.jsx
  55. 0
    0
      src/subpackages/pages/broker/rankingList/components/list/index.scss
  56. 0
    0
      src/subpackages/pages/broker/rankingList/components/list/item.jsx
  57. 0
    0
      src/subpackages/pages/broker/rankingList/components/myAchievement/index.jsx
  58. 0
    0
      src/subpackages/pages/broker/rankingList/components/myAchievement/index.scss
  59. 0
    0
      src/subpackages/pages/broker/rankingList/index.config.js
  60. 1
    1
      src/subpackages/pages/broker/rankingList/index.jsx
  61. 0
    0
      src/subpackages/pages/broker/rankingList/index.scss
  62. 1
    1
      src/subpackages/pages/broker/rankingList/invitationList/index.jsx
  63. 0
    0
      src/subpackages/pages/broker/rankingList/invitationList/index.scss
  64. 1
    1
      src/subpackages/pages/broker/rankingList/transactionList/index.jsx
  65. 0
    0
      src/subpackages/pages/broker/rankingList/transactionList/index.scss
  66. 74
    0
      src/subpackages/pages/broker/toBeBroker/AddBankCard/index.jsx
  67. 0
    0
      src/subpackages/pages/broker/toBeBroker/AddBankCard/index.scss
  68. 0
    0
      src/subpackages/pages/broker/toBeBroker/index.config.js
  69. 235
    0
      src/subpackages/pages/broker/toBeBroker/index.jsx
  70. 1
    1
      src/subpackages/pages/broker/toBeBroker/index.scss
  71. 31
    14
      src/utils/hooks/useScreen.js

+ 1
- 9
config/dev.js Voir le fichier

@@ -3,18 +3,10 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-<<<<<<< HEAD
7
-    // HOST: '"https://xlk.njyz.tech"',
8
-    // HOST: '"https://www.newhousehold.cn"',
9
-    HOST: '"http://192.168.89.147:8081"',
10
-
11
-=======
12 6
     HOST: '"https://xlk.njyz.tech"',
13 7
     // HOST: '"https://www.newhousehold.cn"',
14 8
     // HOST: '"http://192.168.89.147:8081"',
15
-    // HOST: '"http://localhost:8081"',
16
-   
17
->>>>>>> 081381f11d051ff0fcc56e6285fe77388694e23c
9
+
18 10
     // WSS_HOST: '"wss://www.newhousehold.cn"',
19 11
     WSS_HOST: '"wss://xlk.njyz.tech"',
20 12
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',

+ 2
- 2
src/components/ProjectListItem/index.jsx Voir le fichier

@@ -2,7 +2,7 @@ import "@/assets/css/iconfont.css";
2 2
 import Taro from "@tarojs/taro";
3 3
 import { Image } from "@tarojs/components";
4 4
 import { getImgURL } from "@/utils/image";
5
-import BorkerShare from "@/components/borkerShare";
5
+import BrokerShare from "@/components/brokerShare";
6 6
 import "./index.scss";
7 7
 
8 8
 export default function ProjectListItem(props) {
@@ -95,7 +95,7 @@ export default function ProjectListItem(props) {
95 95
           </view>
96 96
         </view>
97 97
       </view>
98
-      {Data?.isBorker&&<BorkerShare></BorkerShare>}
98
+      {Data?.isBroker&&<BrokerShare buildingId={Data.buildingId}></BrokerShare>}
99 99
       
100 100
     </view>
101 101
   );

src/components/borkerShare/index.jsx → src/components/brokerShare/index.jsx Voir le fichier

@@ -5,12 +5,15 @@ import { getImgURL } from "@/utils/image";
5 5
 import "./index.scss";
6 6
 
7 7
 export default function ProjectListItem(props) {
8
+  const onClick =()=>{
9
+    Taro.navigateTo({ url: `/pages/mine/addCustomer/index?buildingId=${props.buildingId}` })
10
+  }
8 11
   return (
9
-    <view className='borkerShare flex-h'>
12
+    <view className='brokerShare flex-h' onClick={()=>onClick()}>
10 13
       <view className='left'>
11 14
         <image
12 15
           className='image'
13
-          src={`${OSS_FAST_PATH}/miniapp/borker/钱袋.png`}
16
+          src={`${OSS_FAST_PATH}/miniapp/broker/钱袋.png`}
14 17
           alt=''
15 18
           srcset=''
16 19
         />
@@ -21,7 +24,7 @@ export default function ProjectListItem(props) {
21 24
       
22 25
         <image
23 26
           className='image'
24
-          src={`${OSS_FAST_PATH}/miniapp/borker/分享.png`}
27
+          src={`${OSS_FAST_PATH}/miniapp/broker/分享.png`}
25 28
           alt=''
26 29
           srcset=''
27 30
         />

src/components/borkerShare/index.scss → src/components/brokerShare/index.scss Voir le fichier

@@ -1,4 +1,4 @@
1
-.borkerShare {
1
+.brokerShare {
2 2
     width: 660px;
3 3
     height: 42px;
4 4
     background:rgba(254, 230, 204, 0.3);
@@ -6,6 +6,7 @@
6 6
     // opacity: ;
7 7
     justify-content: space-between;
8 8
     margin: 20px auto 0;
9
+    line-height: 36rpx;
9 10
     > .left {
10 11
       font-size: 22px;
11 12
       font-family: DengXian;

+ 2
- 0
src/constants/api.js Voir le fichier

@@ -51,6 +51,7 @@ export const API_HELP_FIND_HOUSE_SUBMIT = resolvePath('searchHouse') // 问卷
51 51
 export const API_PRELOAD = resolvePath('preload')
52 52
 export const API_QRCODE = resolvePath('qrcode')
53 53
 export const API_BANNER_LIST = resolvePath('extendContent')
54
+export const API_BROKER_SCREEN = resolvePath('bkFirstScreen') //全民经纪人开屏广告GET 
54 55
 export const API_QUERY_CODE_SCENE = resolvePath('qrcode/scene')
55 56
 export const API_AREA_LIST = resolvePath('city/cascade')
56 57
 
@@ -255,6 +256,7 @@ export const API_AGENT_CHANNEL = resolvePath('customer/recommend/becomeChannel')
255 256
 export const API_AGENT_CURRENT = resolvePath('user/current')
256 257
 
257 258
 export const API_EDIT_AGENT = resolvePath('editPerson')
259
+export const API_BIND_BROKER = resolvePath('bindBroker')
258 260
 
259 261
 // 活动列表-新
260 262
 export const API_ACTNEW_LIST = resolvePath('activity/list')

+ 0
- 9
src/constants/borker.js Voir le fichier

@@ -1,9 +0,0 @@
1
-import { resolvePath } from "./api";
2
-
3
-// 全民经纪人
4
-
5
-// 佣金规则
6
-export const API_BK_AGREEMENT = resolvePath('bkAgreement')
7
-
8
-// 经纪人规则
9
-export const API_BK_AGENT_RULE = resolvePath('bkAgentRule')

+ 15
- 0
src/constants/broker.js Voir le fichier

@@ -0,0 +1,15 @@
1
+import { resolvePath } from "./api";
2
+
3
+// 全民经纪人
4
+
5
+// 佣金规则
6
+export const API_BK_AGREEMENT = resolvePath('bkAgreement')
7
+
8
+// 经纪人规则
9
+export const API_BK_AGENT_RULE = resolvePath('bkAgentRule')
10
+
11
+//银行卡
12
+export const API_BK_BANk_CARD = resolvePath('bkBankCard')
13
+
14
+//我邀请的经纪人列表
15
+export const API_BROKER_LIST = resolvePath('broker')

+ 1
- 1
src/constants/user.js Voir le fichier

@@ -16,7 +16,7 @@ export const ROLE_CODE = {
16 16
   DRIFT: 'drift', // 游客
17 17
   CUSTOMER: 'customer', // 客户
18 18
   MARKETING: 'marketing', // 驻场
19
-  BORKER: 'borker', // 全民经纪人(新联家)
19
+  BROKER: 'broker', // 全民经纪人(新联家)
20 20
 }
21 21
 
22 22
 // 客户流转状态

+ 2
- 2
src/pages/index/buildingDetail/components/BasicInfo/index.jsx Voir le fichier

@@ -2,7 +2,7 @@
2 2
 import Taro from '@tarojs/taro'
3 3
 import { ScrollView, Image } from '@tarojs/components'
4 4
 import AuthRole from '@/components/Auth/AuthRole'
5
-import BorkerShare from '@/components/borkerShare'
5
+import BrokerShare from '@/components/brokerShare'
6 6
 import { ROLE_CODE } from '@/constants/user'
7 7
 import classNames from 'classnames'
8 8
 import useFavor from '@/utils/hooks/useFavor'
@@ -52,7 +52,7 @@ export default function BasicInfo (props) {
52 52
         }
53 53
       </view>
54 54
 
55
-      {Info?.isBorker&&<BorkerShare></BorkerShare>}
55
+      {Info?.isBroker&&<BrokerShare buildingId={buildingId}></BrokerShare>}
56 56
 
57 57
       {/* 项目列表 */}
58 58
       {

+ 7
- 1
src/pages/index/index.jsx Voir le fichier

@@ -13,6 +13,7 @@ import useShare from '@/utils/hooks/useShare'
13 13
 import useScreen from '@/utils/hooks/useScreen'
14 14
 import nav2Target from '@/utils/nav2Target'
15 15
 import ChatIcon from '@/components/ChatIcon/index'
16
+import {  ROLE_CODE } from "@/constants/user";
16 17
 import Location from './components/Location/index'
17 18
 import Banner from './components/Banner/index'
18 19
 import Menu from './components/Menu/index'
@@ -70,7 +71,12 @@ export default withLayout((props) => {
70 71
   
71 72
   const handleScreen = () => {
72 73
     toggleShowScreen()
73
-    nav2Target(screenInfo)
74
+    if(person.personType ===ROLE_CODE.BROKER){
75
+      Taro.navigateTo({ url: screenInfo.linkPage })
76
+    }else{
77
+      nav2Target(screenInfo)
78
+    }
79
+    
74 80
   }
75 81
 
76 82
 

+ 143
- 90
src/pages/mine/index.jsx Voir le fichier

@@ -1,90 +1,124 @@
1
-import { useState, useEffect } from 'react'
2
-import { useSelector } from 'react-redux'
3
-import withLayout from '@/layout'
4
-import { ScrollView, Image } from '@tarojs/components'
5
-import Taro from '@tarojs/taro'
6
-import '@/assets/css/iconfont.css'
7
-import { fetch } from '@/utils/request'
8
-import { API_PUT_REGISTERCONSULTANT } from '@/constants/api'
9
-import { getImgURL } from '@/utils/image'
10
-import { UPDATE_USER_INFO, ROLE_CODE } from '@/constants/user'
11
-import store from '@/store'
12
-import './index.scss'
13
-import MineMenuList from './tabData'
1
+import { useState, useEffect } from "react";
2
+import { useSelector } from "react-redux";
3
+import withLayout from "@/layout";
4
+import { ScrollView, Image } from "@tarojs/components";
5
+import Taro from "@tarojs/taro";
6
+import "@/assets/css/iconfont.css";
7
+import { fetch } from "@/utils/request";
8
+import { API_PUT_REGISTERCONSULTANT } from "@/constants/api";
9
+import { getImgURL } from "@/utils/image";
10
+import { UPDATE_USER_INFO, ROLE_CODE } from "@/constants/user";
11
+import store from "@/store";
12
+import "./index.scss";
13
+import MineMenuList from "./tabData";
14 14
 
15
-const defaultRuleImage = 'https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/index-icon18.jpg'
15
+const defaultRuleImage =
16
+  "https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/index-icon18.jpg";
16 17
 
17
-const version = `版本: ${Version}`
18
-const copyRight = `技术支持: 云致科技 @ ${(new Date()).getFullYear()}`
18
+const version = `版本: ${Version}`;
19
+const copyRight = `技术支持: 云致科技 @ ${new Date().getFullYear()}`;
19 20
 
20 21
 export default withLayout(() => {
21
-
22
-  const user = useSelector(state => state.user)
23
-  const city = useSelector(state => state.city)
24
-  const [UserRole, setUserRole] = useState(null) // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
25
-  const [MenuList, setMenuList] = useState([])
26
-  const { dispatch } = store
22
+  const user = useSelector((state) => state.user);
23
+  const city = useSelector((state) => state.city);
24
+  const [UserRole, setUserRole] = useState(null); // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
25
+  const [MenuList, setMenuList] = useState([]);
26
+  const { dispatch } = store;
27 27
 
28 28
   useEffect(() => {
29 29
     if (user?.userInfo?.person?.personId) {
30
-      console.log(city)
31
-      const person = user.userInfo.person
32
-      setUserRole(person.personType === ROLE_CODE.CHANNEL_AGENT ? 2 : person.personType === ROLE_CODE.CONSULTANT ? 3 : person.personType === ROLE_CODE.MARKETING ? 4 :ROLE_CODE.BORKER ? 5 : 1)
30
+      console.log(city);
31
+      const person = user.userInfo.person;
32
+      setUserRole(
33
+        person.personType === ROLE_CODE.CHANNEL_AGENT
34
+          ? 2
35
+          : person.personType === ROLE_CODE.CONSULTANT
36
+          ? 3
37
+          : person.personType === ROLE_CODE.MARKETING
38
+          ? 4
39
+          : person.personType == ROLE_CODE.BROKER
40
+          ? 5
41
+          : 1
42
+      );
33 43
     }
34
-  }, [user])
44
+  }, [user]);
35 45
 
36 46
   useEffect(() => {
37 47
     if (UserRole !== null) {
38
-      setMenuList(UserRole === 1 ? MineMenuList.User : UserRole === 2 ? MineMenuList.Broker : UserRole === 3 ? MineMenuList.Adviser : UserRole === 5? MineMenuList.Broker: MineMenuList.Resident)
48
+      setMenuList(
49
+        UserRole === 1
50
+          ? MineMenuList.User
51
+          : UserRole === 2
52
+          ? MineMenuList.Broker
53
+          : UserRole === 3
54
+          ? MineMenuList.Adviser
55
+          : UserRole === 5
56
+          ? MineMenuList.Broker
57
+          : MineMenuList.Resident
58
+      );
39 59
     }
40
-  }, [UserRole])
60
+  }, [UserRole]);
41 61
 
42 62
   const MenuClick = (router) => {
43 63
     return () => {
44
-      if (router === 'propertyConsultant') {
45
-        fetch({ url: API_PUT_REGISTERCONSULTANT, method: 'put' }).then(() => {
46
-          Taro.showToast({
47
-            title: '匹配成功',
48
-            icon: 'none',
49
-            duration: 2000
50
-          })
51
-          dispatch({ type: UPDATE_USER_INFO, payload: { personType: 'Realty Consultant' } })
52
-          setTimeout(() => {
53
-            Taro.navigateBack({ delta: 1 })
54
-          }, 2000)
55
-        }).catch(() => {
56
-          Taro.showToast({
57
-            title: '匹配失败,请联系相关管理人员',
58
-            icon: 'none'
64
+      if (router === "propertyConsultant") {
65
+        fetch({ url: API_PUT_REGISTERCONSULTANT, method: "put" })
66
+          .then(() => {
67
+            Taro.showToast({
68
+              title: "匹配成功",
69
+              icon: "none",
70
+              duration: 2000,
71
+            });
72
+            dispatch({
73
+              type: UPDATE_USER_INFO,
74
+              payload: { personType: "Realty Consultant" },
75
+            });
76
+            setTimeout(() => {
77
+              Taro.navigateBack({ delta: 1 });
78
+            }, 2000);
59 79
           })
60
-        })
80
+          .catch(() => {
81
+            Taro.showToast({
82
+              title: "匹配失败,请联系相关管理人员",
83
+              icon: "none",
84
+            });
85
+          });
61 86
       } else if (router) {
62
-        Taro.navigateTo({ url: router })
87
+        Taro.navigateTo({ url: router });
63 88
       }
64
-    }
65
-  }
89
+    };
90
+  };
66 91
 
67 92
   return (
68
-    <view className='Page Mine'>
69
-
93
+    <view className="Page Mine">
70 94
       <ScrollView scroll-y>
71
-        <view className='PageContent'>
72
-          <view className='Content'>
73
-
95
+        <view className="PageContent">
96
+          <view className="Content">
74 97
             {/* 用户信息 */}
75
-            <view className='UserInfo'>
76
-              <view className='UserIcon'>
77
-                <Image mode='aspectFill' className='centerLabel' src={getImgURL(user?.userInfo?.person?.userPhoto || user?.userInfo?.person?.avatarurl) || defaultRuleImage} />
98
+            <view className="UserInfo">
99
+              <view className="UserIcon">
100
+                <Image
101
+                  mode="aspectFill"
102
+                  className="centerLabel"
103
+                  src={
104
+                    getImgURL(
105
+                      user?.userInfo?.person?.userPhoto ||
106
+                        user?.userInfo?.person?.avatarurl
107
+                    ) || defaultRuleImage
108
+                  }
109
+                />
78 110
               </view>
79
-              <view className='OtherInfo'>
80
-                <view className='Name'>
111
+              <view className="OtherInfo">
112
+                <view className="Name">
81 113
                   <view>
82 114
                     <text>{user?.userInfo?.person?.nickname}</text>
83 115
                     <view>
84
-                      <text className='iconfont icon-bianji' onClick={() => {  
85
-                        if (UserRole === 5) {
116
+                      <text
117
+                        className="iconfont icon-bianji"
118
+                        onClick={() => {
119
+                          if (UserRole === 5) {
86 120
                             Taro.navigateTo({
87
-                              url: `/subpackages/pages/borker/toBeBorker/index`,
121
+                              url: `/subpackages/pages/broker/toBeBroker/index`,
88 122
                             });
89 123
                           } else {
90 124
                             Taro.navigateTo({
@@ -93,10 +127,11 @@ export default withLayout(() => {
93 127
                           }
94 128
                         }}
95 129
                       ></text>
96
-                      <text onClick={() => {
130
+                      <text
131
+                        onClick={() => {
97 132
                           if (UserRole === 5) {
98 133
                             Taro.navigateTo({
99
-                              url: `/subpackages/pages/borker/toBeBorker/index`,
134
+                              url: `/subpackages/pages/broker/toBeBroker/index`,
100 135
                             });
101 136
                           } else {
102 137
                             Taro.navigateTo({
@@ -104,48 +139,66 @@ export default withLayout(() => {
104 139
                             });
105 140
                           }
106 141
                         }}
107
-                      >个人信息资料修改</text>
142
+                      >
143
+                        个人信息资料修改
144
+                      </text>
108 145
                     </view>
109 146
                   </view>
110
-                  <text className='Role'>{UserRole === 1 ? '客户' : UserRole === 2 ? '合伙人' : UserRole === 3 ? '置业顾问' :UserRole === 5 ?'全民经纪人' :'驻场管理'}</text>
147
+                  <text className="Role">
148
+                    {UserRole === 1
149
+                      ? "客户"
150
+                      : UserRole === 2
151
+                      ? "合伙人"
152
+                      : UserRole === 3
153
+                      ? "置业顾问"
154
+                      : UserRole === 5
155
+                      ? "全民经纪人"
156
+                      : "驻场管理"}
157
+                  </text>
111 158
                   {/* <text className='New'>NEW</text> */}
112
-                  <Image mode='heightFix' src={require('@/assets/mine-icon35.png')} className='New'></Image>
159
+                  <Image
160
+                    mode="heightFix"
161
+                    src={require("@/assets/mine-icon35.png")}
162
+                    className="New"
163
+                  ></Image>
113 164
                 </view>
114 165
               </view>
115 166
             </view>
116 167
 
117 168
             {/* 用户菜单 */}
118
-            <view className='MenuList'>
119
-              {
120
-                MenuList.map((item, index) => (
121
-                  <view>
122
-                    {
123
-                      item.map((subItem, subIndex) => (
124
-                        <view key={`MenuItem-${index}-${subIndex}`} className='flex-h' onClick={MenuClick(subItem.router)}>
125
-                          <view className='Icon'>
126
-                            <Image mode='aspectFit' className='centerLabel' src={subItem.icon} />
127
-                          </view>
128
-                          <view className='flex-item flex-h'>
129
-                            <text className='flex-item'>{subItem.name}</text>
130
-                            <text className='iconfont icon-jiantouright'></text>
131
-                          </view>
132
-                        </view>
133
-                      ))
134
-                    }
135
-                  </view>
136
-                ))
137
-              }
169
+            <view className="MenuList">
170
+              {MenuList.map((item, index) => (
171
+                <view>
172
+                  {item.map((subItem, subIndex) => (
173
+                    <view
174
+                      key={`MenuItem-${index}-${subIndex}`}
175
+                      className="flex-h"
176
+                      onClick={MenuClick(subItem.router)}
177
+                    >
178
+                      <view className="Icon">
179
+                        <Image
180
+                          mode="aspectFit"
181
+                          className="centerLabel"
182
+                          src={subItem.icon}
183
+                        />
184
+                      </view>
185
+                      <view className="flex-item flex-h">
186
+                        <text className="flex-item">{subItem.name}</text>
187
+                        <text className="iconfont icon-jiantouright"></text>
188
+                      </view>
189
+                    </view>
190
+                  ))}
191
+                </view>
192
+              ))}
138 193
             </view>
139
-
140 194
           </view>
141 195
         </view>
142 196
 
143
-        <view className='copyright'>
197
+        <view className="copyright">
144 198
           <view>{version}</view>
145 199
           <view>{copyRight}</view>
146 200
         </view>
147 201
       </ScrollView>
148
-
149 202
     </view>
150
-  )
151
-})
203
+  );
204
+});

+ 4
- 4
src/pages/mine/tabData.js Voir le fichier

@@ -20,15 +20,15 @@ const MineMenuList = {
20 20
       { name: '成为驻场管理', icon: require('@/assets/mine-icon8.png'), router: '/pages/mine/toBeManager/index' },
21 21
       { name: '成为置业顾问', icon: require('@/assets/mine-icon4.png'), router: 'propertyConsultant' },
22 22
       { name: '成为合伙人', icon: require('@/assets/mine-icon2.png'), router: '/pages/mine/toBeAgent/index' },
23
-      { name: '成为全民经纪人', icon: require('@/assets/mine-icon2.png'), router: '/subpackages/pages/borker/toBeBorker/index' }
23
+      { name: '成为全民经纪人', icon: require('@/assets/mine-icon2.png'), router: '/subpackages/pages/broker/toBeBroker/index' }
24 24
     ]
25 25
   ],
26 26
   Broker: [ // 经纪人
27 27
     [
28
-      { name: '我的钱包', icon: require('@/assets/mine-icon1.png'), router: '/subpackages/pages/borker/myWallet/index' },
28
+      { name: '我的钱包', icon: require('@/assets/mine-icon1.png'), router: '/subpackages/pages/broker/myWallet/index' },
29 29
       { name: '我的客户', icon: require('@/assets/mine-icon1.png'), router: '/pages/mine/myCustomer/index' },
30
-      { name: '我的资料', icon: require('@/assets/mine-icon1.png'), router: '/subpackages/pages/borker/toBeBorker/index' },
31
-      { name: '我的消息', icon: require('@/assets/mine-icon1.png'), router: '/subpackages/pages/borker/myMessage/index' },
30
+      { name: '我的资料', icon: require('@/assets/mine-icon1.png'), router: '/subpackages/pages/broker/toBeBroker/index' },
31
+      { name: '我的消息', icon: require('@/assets/mine-icon1.png'), router: '/subpackages/pages/broker/myMessage/index' },
32 32
       { name: '我邀请的全民经纪人', icon: require('@/assets/mine-icon1.png'), router: '/pages/mine/addCustomer/index?type=estateAgent' },
33 33
     ],
34 34
     [

+ 27
- 34
src/routes.js Voir le fichier

@@ -417,76 +417,69 @@ const routes = [
417 417
   },
418 418
   {
419 419
     name: "全民经纪人",
420
-    page: "pages/borker/toBeBorker/index",
420
+    page: "pages/broker/toBeBroker/index",
421 421
     pkg: "subpackages",
422 422
     type: "other",
423 423
   },
424 424
   {
425 425
     name: "我的钱包",
426
-    page: "pages/borker/myWallet/index",
426
+    page: "pages/broker/myWallet/index",
427 427
     pkg: "subpackages",
428 428
     type: "other",
429 429
   },
430 430
   {
431 431
     name: "我的消息",
432
-    page: "pages/borker/myMessage/index",
432
+    page: "pages/broker/myMessage/index",
433 433
     pkg: "subpackages",
434 434
     type: "other",
435 435
   },
436 436
   {
437 437
     name: "排行榜",
438
-    page: "pages/borker/rankingList/index",
438
+    page: "pages/broker/rankingList/index",
439 439
     pkg: "subpackages",
440 440
     type: "other",
441 441
   },
442 442
   {
443 443
     name: "佣金结算",
444
-    page: "pages/borker/commissionSettlement/index",
444
+    page: "pages/broker/commissionSettlement/index",
445 445
     pkg: "subpackages",
446 446
     type: "other",
447 447
   },
448 448
 
449
- {
450
-    name: '经纪人',
451
-    page: 'pages/borker/agentRule/index',
452
-    pkg: 'subpackages',
453
-    type: 'other',
454
-    auth: ['phone', 'avatar'],
455
-  },
456 449
   {
457
-    name: '佣金规则',
458
-    page: 'pages/borker/agreement/index',
459
-    pkg: 'subpackages',
460
-    type: 'other',
461
-    auth: ['phone', 'avatar'],
450
+    name: "经纪人",
451
+    page: "pages/broker/agentRule/index",
452
+    pkg: "subpackages",
453
+    type: "other",
454
+    // auth: ['phone', 'avatar'],
462 455
   },
463 456
   {
464
-    name: '我的邀请',
465
-    page: 'pages/borker/invitation/index',
466
-    pkg: 'subpackages',
467
-    type: 'other',
468
-    auth: ['phone', 'avatar'],
457
+    name: "佣金规则",
458
+    page: "pages/broker/agreement/index",
459
+    pkg: "subpackages",
460
+    type: "other",
461
+    // auth: ['phone', 'avatar'],
469 462
   },
470 463
   {
471
-    name: '邀请列表',
472
-    page: 'pages/borker/invitationlist/index',
473
-    pkg: 'subpackages',
474
-    type: 'other',
475
-    auth: ['phone', 'avatar'],
464
+    name: "我的邀请",
465
+    page: "pages/broker/invitation/index",
466
+    pkg: "subpackages",
467
+    type: "other",
468
+    // auth: ['phone', 'avatar'],
476 469
   },
477 470
   {
478
-    name: '全民经纪人',
479
-    page: 'pages/borker/toBeBorker/index',
480
-    pkg: 'subpackages',
481
-    type: 'other',
471
+    name: "邀请列表",
472
+    page: "pages/broker/invitationlist/index",
473
+    pkg: "subpackages",
474
+    type: "other",
475
+    // auth: ['phone', 'avatar'],
482 476
   },
483
-  
484
-]
477
+];
485 478
 
486 479
 /**
487 480
  * 获取 app pages 列表
488 481
  */
489
-function getPages () {
482
+function getPages() {
490 483
   const grp = routes.reduce((g, r) => {
491 484
     const { pkg, page } = r;
492 485
     const pg = g[pkg] || [];

+ 0
- 12
src/services/borker.js Voir le fichier

@@ -1,12 +0,0 @@
1
-import { fetch } from '@/utils/request'
2
-
3
-import {
4
-  API_BK_AGREEMENT,
5
-} from '@/constants/borker'
6
-
7
-
8
-/**
9
- * 获取佣金数据
10
- * @param {*} id
11
- */
12
-export const queryBkAgreement = (payload) => fetch({ url: `${API_BK_AGREEMENT}`, payload })

+ 28
- 0
src/services/broker.js Voir le fichier

@@ -0,0 +1,28 @@
1
+import { fetch } from '@/utils/request'
2
+
3
+import {
4
+  API_BK_AGREEMENT,
5
+  API_BK_BANk_CARD,
6
+  API_BROKER_LIST
7
+} from '@/constants/broker'
8
+
9
+
10
+/**
11
+ * 获取佣金数据
12
+ * @param {*} id
13
+ */
14
+export const queryBkAgreement = (payload) => fetch({ url: `${API_BK_AGREEMENT}`, payload })
15
+
16
+
17
+/**
18
+ * 获取银行卡
19
+ * @param {*} 
20
+ */
21
+ export const querybkBankCard = (payload) => fetch({ url: `${API_BK_BANk_CARD}`, payload })
22
+
23
+
24
+/**
25
+ * 邀请的经纪人列表
26
+ * @param {*} 
27
+ */
28
+ export const querybrokerList = (payload) => fetch({ url: `${API_BROKER_LIST}`, payload })

+ 22
- 13
src/services/common.js Voir le fichier

@@ -3,6 +3,7 @@ import {
3 3
   API_PRELOAD,
4 4
   API_QRCODE,
5 5
   API_BANNER_LIST,
6
+  API_BROKER_SCREEN,
6 7
   API_QUERY_CODE_SCENE,
7 8
   API_BURIED_POINT,
8 9
   API_CITY_LIST,
@@ -18,7 +19,7 @@ import {
18 19
  *  @param {*} payload
19 20
  *
20 21
  */
21
-export const getPreloadData = payload =>
22
+export const getPreloadData = (payload) =>
22 23
   fetch({ url: API_PRELOAD, payload, method: "GET" });
23 24
 
24 25
 /**
@@ -26,7 +27,7 @@ export const getPreloadData = payload =>
26 27
  *  @param {*} payload
27 28
  *
28 29
  */
29
-export const getMiniQrcode = payload =>
30
+export const getMiniQrcode = (payload) =>
30 31
   fetch({ url: API_QRCODE, payload, method: "POST", showToast: false });
31 32
 
32 33
 /**
@@ -34,7 +35,7 @@ export const getMiniQrcode = payload =>
34 35
  *  @param {*} scene
35 36
  *
36 37
  */
37
-export const getCodeScene = scene =>
38
+export const getCodeScene = (scene) =>
38 39
   fetch({ url: `${API_QUERY_CODE_SCENE}/${scene}` });
39 40
 
40 41
 /**
@@ -51,21 +52,28 @@ export const queryBanners = (type, payload) =>
51 52
  * 获取 banner , 首屏等一些信息
52 53
  * @param {*} payload
53 54
  */
54
-export const queryExtContents = payload =>
55
+export const queryExtContents = (payload) =>
55 56
   fetch({ url: API_BANNER_LIST, payload });
56 57
 
58
+/**
59
+ * 获取 banner , 首屏等一些信息
60
+ * @param {*} payload
61
+ */
62
+export const queryBrokerScreen = (payload) =>
63
+  fetch({ url: API_BROKER_SCREEN, payload });
64
+
57 65
 /**
58 66
  * 获取 首页图标
59 67
  * @param {*} payload
60 68
  */
61
-export const queryIndexIcons = payload =>
69
+export const queryIndexIcons = (payload) =>
62 70
   fetch({ url: API_INDEX_ICONS, payload });
63 71
 
64 72
 /**
65 73
  * 新增埋点
66 74
  * @param {*} payload
67 75
  */
68
-export const savePoint = payload =>
76
+export const savePoint = (payload) =>
69 77
   fetch(
70 78
     { url: API_BURIED_POINT, payload, method: "POST", showToast: false },
71 79
     2
@@ -89,25 +97,26 @@ export const queryCityList = () => fetch({ url: API_CITY_LIST });
89 97
  * 获取消息模板
90 98
  * @param {*}
91 99
  */
92
-export const queryMessageTPL = type =>
100
+export const queryMessageTPL = (type) =>
93 101
   fetch({ url: `${API_TEMPLATE_TYPE}/${type}` });
94 102
 
95
-
96 103
 /**
97 104
  * 获取品牌房企列表
98 105
  * @param {*}
99 106
  */
100
-export const queryBrandList = (payload) => fetch({ url: API_BRAND_LIST, payload });
107
+export const queryBrandList = (payload) =>
108
+  fetch({ url: API_BRAND_LIST, payload });
101 109
 
102 110
 /**
103 111
  * 获取品牌房企列表
104 112
  * @param {*}
105 113
  */
106
-export const queryBrandInfo = (id) => fetch({ url: `${API_BRAND_INFO}/${id}`});
114
+export const queryBrandInfo = (id) => fetch({ url: `${API_BRAND_INFO}/${id}` });
107 115
 
108 116
 /**
109 117
  * 获取系统参数
110
- * @param {*} code 
111
- * @returns 
118
+ * @param {*} code
119
+ * @returns
112 120
  */
113
-export const getSystemParsm = (code) => fetch({ url: `${API_SYSTEM_PARAM}/${code}` })
121
+export const getSystemParsm = (code) =>
122
+  fetch({ url: `${API_SYSTEM_PARAM}/${code}` });

+ 0
- 22
src/subpackages/pages/borker/components/CardItem/index.jsx Voir le fichier

@@ -1,22 +0,0 @@
1
-import { useState, useEffect } from "react";
2
-import Taro from "@tarojs/taro";
3
-
4
-import "./index.scss";
5
-
6
-export default (props) => {
7
-  const { title,addCard } = props;
8
-
9
-  return (
10
-    <view className="CardItem">
11
-      <view>
12
-        <text>{title}</text>
13
-        <view className="FormLine flex-h">
14
-          <view className="flex-item">12321312312</view>
15
-        </view>
16
-        <view className="FormLine flex-additem-h">
17
-          <view className="flex-additem" onClick={()=>addCard()} >添加证件</view>
18
-        </view>
19
-      </view>
20
-    </view>
21
-  );
22
-};

+ 0
- 26
src/subpackages/pages/borker/invitationlist/index.jsx Voir le fichier

@@ -1,26 +0,0 @@
1
-import withLayout from '@/layout'
2
-import Taro from '@tarojs/taro'
3
-import { View, Image, Text } from '@tarojs/components'
4
-
5
-import './index.scss'
6
-
7
-export default withLayout(() => {
8
-  const img1 = 'https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/borker/%E9%82%80%E8%AF%B7%E5%A5%96%E5%8A%B1.png';
9
-  const img2 = 'https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/borker/%E9%82%80%E8%AF%B7%E6%B3%A8%E5%86%8C%E6%A6%9C.png';
10
-  const defaultRuleImage = 'https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/borker/%E5%85%A8%E6%B0%91%E7%BB%8F%E7%BA%AA%E4%BA%BA.png'
11
-  return (
12
-    <View className='invitationlist-background'>
13
-      <View className='invitationlist-font'>总邀请人数</View><View className='invitationlist-font-right'><Image className='invitationlist-img' mode='widthFix' src={img1} />邀请奖励</View>
14
-      <View className='invitationlist-background-2'>
15
-        <View className='invitationlist-font-tl'>240</View><View className='invitationlist-font-right-t'><Image className='invitationlist-img' mode='widthFix' src={img2} />邀请注册榜</View>
16
-      </View>
17
-      <View className='invitationlist-view-1'>更新时间:&nbsp;<View className='invitationlist-view'>2022-07-22</View>&nbsp;<View className='invitationlist-view'>12:00:00</View></View>
18
-      <View className='invitationlist-view-list'>
19
-        <View className='invitationlist-img-frame'><Image className='invitationlist-img-head' src={defaultRuleImage} /></View>
20
-        <View className='invitationlist-view-list-ifr'><Text className='invitationlist-text-1'>阿三三</Text><Text className='invitationlist-text'>0</Text><Text className='invitationlist-text'>0</Text><Text className='invitationlist-time'>2022/07/26</Text></View>
21
-        <View className='invitationlist-view-list-ifr-t'><Text className='invitationlist-text-t1'>16787659987</Text><Text className='invitationlist-text-t'>客户(组)</Text><Text className='invitationlist-text-t'>成交(组)</Text><Text className='invitationlist-time-t'>12:00</Text></View>
22
-        <View className='invitationlist-border'></View>
23
-      </View>
24
-    </View>
25
-  )
26
-})

+ 0
- 52
src/subpackages/pages/borker/toBeBorker/AddBankCard/index.jsx Voir le fichier

@@ -1,52 +0,0 @@
1
-import { useState, useEffect } from "react";
2
-import Taro from "@tarojs/taro";
3
-import { ScrollView, Input, Image, Block, Textarea } from '@tarojs/components'
4
-import "./index.scss";
5
-
6
-export default (props) => {
7
-  const { title,onChanel } = props;
8
-
9
-  const [FormData, setFormData] = useState({
10
-    name: '',
11
-    phone: '',
12
-    description: ''
13
-  })
14
-
15
-  const FormChange = (key, e) => {
16
-    let Data = { ...FormData }
17
-    Data[key] = e.detail.value
18
-    setFormData(Data)
19
-  }
20
-
21
-  return (
22
-    <view className="AddIdentityCard">
23
-    
24
-
25
-          <text>持卡人</text>
26
-          <view className='FormLine flex-h'>
27
-            <view className='flex-item'>
28
-              <Input placeholder='请输入用户名' value={FormData.name} onInput={FormChange.bind(this, 'name')}></Input>
29
-            </view>
30
-          </view>
31
-
32
-          <text>开户行</text>
33
-          <view className='FormLine flex-h'>
34
-            <view className='flex-item'>
35
-              <Input placeholder='请输入开户行' value={FormData.phone} onInput={FormChange.bind(this, 'phone')}></Input>
36
-            </view>
37
-          </view>
38
-
39
-          <text>银行卡号</text>
40
-          <view className='FormLine flex-h'>
41
-            <view className='flex-item'>
42
-              <Input placeholder='请输入银行卡号' value={FormData.phone} onInput={FormChange.bind(this, 'phone')}></Input>
43
-            </view>
44
-          </view>
45
-
46
-          <view className='Btn'>
47
-          <text >确定</text>
48
-          <text onClick={()=>onChanel()} >取消</text>
49
-        </view>
50
-    </view>
51
-  );
52
-};

+ 0
- 145
src/subpackages/pages/borker/toBeBorker/index.jsx Voir le fichier

@@ -1,145 +0,0 @@
1
-import { useState, useEffect } from 'react'
2
-import Taro from '@tarojs/taro'
3
-import { useSelector } from 'react-redux'
4
-import withLayout from '@/layout'
5
-import { ScrollView, Input, Image, Block, Textarea } from '@tarojs/components'
6
-import { getImgURL } from '@/utils/image'
7
-import { fetch, uploadFiles } from '@/utils/request'
8
-import { UPDATE_USER_INFO, ROLE_CODE } from '@/constants/user'
9
-import { API_EDIT_AGENT, API_UPDATE_PHOTO } from '@/constants/api'
10
-import store from '@/store'
11
-import CardItem from '../components/CardItem'
12
-import AddBankCard from './AddBankCard'
13
-
14
-import '@/assets/css/iconfont.css'
15
-import './index.scss'
16
-
17
-export default withLayout(() => {
18
-
19
-  const { dispatch } = store
20
-
21
-  const user = useSelector(state => state.user)
22
-  const [UserInfo, setUserInfo] = useState({})
23
-  const [UserRole, setUserRole] = useState(null) // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理 5-
24
-  const [FormData, setFormData] = useState({
25
-    name: '',
26
-    phone: '',
27
-    description: ''
28
-  })
29
-  const [showAddIdentityCard, setShowAddIdentityCard] = useState(false)
30
-  
31
-
32
-  useEffect(() => {
33
-    if (user?.userInfo?.person?.personId) {
34
-      const person = user.userInfo.person
35
-      setUserRole(person.personType === ROLE_CODE.CHANNEL_AGENT ? 2 : person.personType === ROLE_CODE.CONSULTANT ? 3 : person.personType === ROLE_CODE.MARKETING ? 4 : 1)
36
-    }
37
-  }, [user])
38
-
39
-  useEffect(() => {
40
-    setUserInfo(user?.userInfo?.person)
41
-    setFormData({ name: user?.userInfo?.person.name, phone: user?.userInfo?.person.phone, description: user?.userInfo?.person.description })
42
-  }, [user])
43
-
44
-  const Save = () => {
45
-    let params = ''
46
-    if(UserRole === 3) {
47
-      params = `name=${FormData.name}&phone=${FormData.phone}&description=${FormData.description}`
48
-    } else {
49
-      params = `name=${FormData.name}&phone=${FormData.phone}`
50
-    }
51
-    fetch({ url: `${API_EDIT_AGENT}?${params}`, method: 'put' }).then(() => {
52
-      Taro.showToast({
53
-        title: '修改成功',
54
-        icon: 'none'
55
-      })
56
-      dispatch({ type: UPDATE_USER_INFO, payload: { name: FormData.name, phone: FormData.phone, description: FormData.description } })
57
-      // login({ path: '', scene: '' })
58
-    })
59
-  }
60
-
61
-  const FormChange = (key, e) => {
62
-    let Data = { ...FormData }
63
-    Data[key] = e.detail.value
64
-    setFormData(Data)
65
-  }
66
-
67
-  const ToUploadImg = () => {
68
-    if (UserRole - 0 === 3) {
69
-      Taro.chooseImage({
70
-        count: 1,
71
-        success: function (res) {
72
-          if (res.errMsg === 'chooseImage:ok') {
73
-            Taro.showToast({ title: '正在上传...', icon: 'loading', mask: true, duration: 10000 })
74
-            uploadFiles(res.tempFilePaths).then((subRes) => {
75
-              fetch({ url: API_UPDATE_PHOTO, payload: { photoUrl: subRes[0] }, method: 'put' }).then(() => {
76
-                Taro.hideToast()
77
-                Taro.showToast({ title: '修改成功', icon: 'none', duration: 2000 })
78
-                dispatch({ type: UPDATE_USER_INFO, payload: { userPhoto: subRes[0] } })
79
-              })
80
-            })
81
-          }
82
-        }
83
-      })
84
-    }
85
-  }
86
-
87
-  return (
88
-    <view className='Page UserInfo'>
89
-
90
-      <ScrollView scroll-y>
91
-        <view className='PageContent'>
92
-
93
-          <text>头像</text>
94
-          <view className='FormLine flex-h' onClick={ToUploadImg}>
95
-            <view className='flex-item'>
96
-              <view className='Icon'>
97
-                <Image mode='aspectFill' src={getImgURL(UserInfo.userPhoto || UserInfo.avatarurl)}></Image>
98
-              </view>
99
-            </view>
100
-            {/* <text className='iconfont icon-jiantouright'></text> */}
101
-          </view>
102
-
103
-          <text>用户名</text>
104
-          <view className='FormLine flex-h'>
105
-            <view className='flex-item'>
106
-              <Input placeholder='请输入用户名' value={FormData.name} onInput={FormChange.bind(this, 'name')}></Input>
107
-            </view>
108
-          </view>
109
-
110
-          <text>手机号码</text>
111
-          <view className='FormLine flex-h'>
112
-            <view className='flex-item'>
113
-              <Input placeholder='请输入手机号码' value={FormData.phone} onInput={FormChange.bind(this, 'phone')}></Input>
114
-            </view>
115
-          </view>
116
-
117
-          <text>证件号码</text>
118
-          <view className='FormLine flex-h'>
119
-            <view className='flex-item'>
120
-              <Input placeholder='请输入证件号码' value={FormData.phone} onInput={FormChange.bind(this, 'phone')}></Input>
121
-            </view>
122
-          </view>
123
-
124
-
125
-          <CardItem title='银行卡号' addCard={()=>setShowAddIdentityCard(true)}></CardItem>
126
-          {/* <text>证件号码</text>
127
-          <view className='FormLine flex-h'>
128
-            <view className='flex-item'>
129
-              <Input placeholder='请输入手机号码' value={FormData.phone} onInput={FormChange.bind(this, 'phone')}></Input>
130
-            </view>
131
-          </view> */}
132
-
133
-        </view>
134
-
135
-        <view className='Btn'>
136
-          <text onClick={Save}>保存</text>
137
-        </view>
138
-      </ScrollView>
139
-
140
-
141
-{showAddIdentityCard&&  <AddBankCard onChange={(e)=>console.log(e)} onChanel={()=>setShowAddIdentityCard(false)}></AddBankCard>}
142
-
143
-    </view>
144
-  )
145
-})

src/subpackages/pages/borker/agentRule/index.config.js → src/subpackages/pages/broker/agentRule/index.config.js Voir le fichier


src/subpackages/pages/borker/agentRule/index.jsx → src/subpackages/pages/broker/agentRule/index.jsx Voir le fichier

@@ -2,13 +2,13 @@ import withLayout from '@/layout'
2 2
 import { ScrollView, View, Image, Text, RichText } from '@tarojs/components'
3 3
 import './index.scss'
4 4
 
5
-const defaultRuleImage = 'https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/borker/%E5%85%A8%E6%B0%91%E7%BB%8F%E7%BA%AA%E4%BA%BA.png'
5
+const defaultRuleImage = 'https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/broker/%E5%85%A8%E6%B0%91%E7%BB%8F%E7%BA%AA%E4%BA%BA.png'
6 6
 export default withLayout(() => {
7 7
   const value = '<p>一、给钱</p ><p>二、还是给钱</p ><p>三、就问你要不要?<br/></p>';
8 8
   return (
9
-    <ScrollView className='Page borker-page' style={{ height: '100vh' }} scrollY>
9
+    <ScrollView className='Page broker-page' style={{ height: '100vh' }} scrollY>
10 10
       <Image mode='heightFix' className='img-set' src={defaultRuleImage} />
11
-      <View className='borker-padding'>
11
+      <View className='broker-padding'>
12 12
         <View>
13 13
           <Text>邀请奖励说明</Text>
14 14
           <View>

src/subpackages/pages/borker/agentRule/index.scss → src/subpackages/pages/broker/agentRule/index.scss Voir le fichier

@@ -1,9 +1,9 @@
1
-.Page.borker-page{
1
+.Page.broker-page{
2 2
   .img-set{
3 3
      width: 100vw;
4 4
      display:block;
5 5
     }
6
-  .borker-padding{
6
+  .broker-padding{
7 7
     background-color: #49A8C1;
8 8
     padding: 6rpx 30rpx 24rpx 30rpx;
9 9
     >view{

src/subpackages/pages/borker/agreement/index.config.js → src/subpackages/pages/broker/agreement/index.config.js Voir le fichier


src/subpackages/pages/borker/agreement/index.jsx → src/subpackages/pages/broker/agreement/index.jsx Voir le fichier

@@ -2,7 +2,7 @@ import withLayout from '@/layout'
2 2
 import Taro from '@tarojs/taro'
3 3
 import { ScrollView, View, RichText } from '@tarojs/components'
4 4
 import { useEffect, useState } from 'react'
5
-import { queryBkAgreement } from "@/services/borker";
5
+import { queryBkAgreement } from "@/services/broker";
6 6
 
7 7
 import './index.scss'
8 8
 

src/subpackages/pages/borker/agreement/index.scss → src/subpackages/pages/broker/agreement/index.scss Voir le fichier

@@ -1,7 +1,7 @@
1 1
 .agreement-wrapper {
2 2
   height: 100%;
3 3
   background-color: #FF7F5F;
4
-  background-image: url(https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/borker/%E4%BD%A3%E9%87%91%E8%A7%84%E5%88%991.png), url(https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/borker/%E4%BD%A3%E9%87%91%E8%A7%84%E5%88%992.png);
4
+  background-image: url(https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/broker/%E4%BD%A3%E9%87%91%E8%A7%84%E5%88%991.png), url(https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/broker/%E4%BD%A3%E9%87%91%E8%A7%84%E5%88%992.png);
5 5
   background-size: contain, contain;
6 6
   background-position: center top, center bottom;
7 7
   background-repeat: no-repeat, no-repeat;

src/subpackages/pages/borker/commissionSettlement/index.config.js → src/subpackages/pages/broker/commissionSettlement/index.config.js Voir le fichier


src/subpackages/pages/borker/commissionSettlement/index.jsx → src/subpackages/pages/broker/commissionSettlement/index.jsx Voir le fichier


src/subpackages/pages/borker/commissionSettlement/index.scss → src/subpackages/pages/broker/commissionSettlement/index.scss Voir le fichier


+ 44
- 0
src/subpackages/pages/broker/components/CardItem/index.jsx Voir le fichier

@@ -0,0 +1,44 @@
1
+import { useState, useEffect } from "react";
2
+import Taro from "@tarojs/taro";
3
+
4
+import "./index.scss";
5
+
6
+export default (props) => {
7
+  const { title, addCard, bankCard = [], onDelete = {} } = props;
8
+
9
+  return (
10
+    <view className="CardItem">
11
+      <view>
12
+        <text>{title}</text>
13
+        <view className="FormLine flex-h">
14
+          {bankCard.map((x) => {
15
+            return (
16
+              <view key={x.cardNo} className="flex-item">
17
+                {x.cardNo}{" "}
18
+                <image
19
+                  className="image"
20
+                  src={`${OSS_FAST_PATH}/miniapp/broker/添加.png`}
21
+                  alt=""
22
+                  srcset=""
23
+                  style={{ transform: "rotate(45deg)",float:'right' }}
24
+                  onClick={()=>onDelete(x)}
25
+                />
26
+              </view>
27
+            );
28
+          })}
29
+        </view>
30
+        <view className="FormLine flex-additem-h">
31
+          <view className="flex-additem" onClick={() => addCard()}>
32
+            <image
33
+              className="image"
34
+              src={`${OSS_FAST_PATH}/miniapp/broker/添加.png`}
35
+              alt=""
36
+              srcset=""
37
+            />
38
+            添加证件
39
+          </view>
40
+        </view>
41
+      </view>
42
+    </view>
43
+  );
44
+};

src/subpackages/pages/borker/components/CardItem/index.scss → src/subpackages/pages/broker/components/CardItem/index.scss Voir le fichier

@@ -3,7 +3,7 @@
3 3
   display: grid;
4 4
   > view {
5 5
     background: #fff;
6
-margin-top: 20px;
6
+    margin-top: 20px;
7 7
     > text {
8 8
       font-size: 34px;
9 9
       font-weight: bold;
@@ -15,11 +15,14 @@ margin-top: 20px;
15 15
     }
16 16
     > .flex-h {
17 17
       box-sizing: border-box;
18
-      padding: 20px 40px;
18
+      padding: 0 40px 20px;
19 19
       border-bottom: 2px solid rgba(0, 0, 0, 0.12);
20 20
       margin-top: 10px;
21 21
       align-items: center;
22
+      flex-direction: column;
22 23
       > view {
24
+        margin-top: 20px;
25
+        width: 100%;
23 26
         > .Icon {
24 27
           width: 92px;
25 28
           height: 92px;
@@ -32,19 +35,7 @@ margin-top: 20px;
32 35
             height: 100%;
33 36
           }
34 37
         }
35
-        > input {
36
-          display: block;
37
-          width: 100%;
38
-          background: none;
39
-          font-size: 26px;
40
-          line-height: 40px;
41
-          height: 40px;
42
-        }
43
-        > textarea {
44
-          font-size: 26px;
45
-          display: block;
46
-          width: 100%;
47
-        }
38
+       
48 39
         > text {
49 40
           display: block;
50 41
           width: 100%;
@@ -54,7 +45,7 @@ margin-top: 20px;
54 45
           height: 40px;
55 46
         }
56 47
       }
57
-      >.flex-additem{
48
+      > .flex-additem {
58 49
         text-align: center;
59 50
       }
60 51
       > text {
@@ -81,15 +72,19 @@ margin-top: 20px;
81 72
             height: 100%;
82 73
           }
83 74
         }
84
-      
85
-      
86 75
       }
87
-      >.flex-additem{
76
+      > .flex-additem {
88 77
         text-align: center;
89 78
       }
90 79
       > text {
91 80
         font-size: 30px;
92 81
       }
93 82
     }
83
+    .image {
84
+      width: 27px;
85
+      height: 27px;
86
+      vertical-align: middle;
87
+      margin-right: 14px;
88
+    }
94 89
   }
95 90
 }

src/subpackages/pages/borker/index.config.js → src/subpackages/pages/broker/index.config.js Voir le fichier


src/subpackages/pages/borker/invitation/BottomAction.jsx → src/subpackages/pages/broker/invitation/BottomAction.jsx Voir le fichier


src/subpackages/pages/borker/invitation/index.config.js → src/subpackages/pages/broker/invitation/index.config.js Voir le fichier


src/subpackages/pages/borker/invitation/index.jsx → src/subpackages/pages/broker/invitation/index.jsx Voir le fichier

@@ -5,7 +5,7 @@ import './index.scss'
5 5
 
6 6
 import BottomAction from './BottomAction'
7 7
 
8
-const defaultImage = 'https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/borker/%E6%B5%B7%E6%8A%A5.png'
8
+const defaultImage = 'https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/broker/%E6%B5%B7%E6%8A%A5.png'
9 9
 
10 10
 export default withLayout(() => {
11 11
   return (

src/subpackages/pages/borker/invitation/index.scss → src/subpackages/pages/broker/invitation/index.scss Voir le fichier


src/subpackages/pages/borker/invitationlist/index.config.js → src/subpackages/pages/broker/invitationlist/index.config.js Voir le fichier


+ 78
- 0
src/subpackages/pages/broker/invitationlist/index.jsx Voir le fichier

@@ -0,0 +1,78 @@
1
+import withLayout from "@/layout";
2
+import Taro from "@tarojs/taro";
3
+import { View, Image, Text } from "@tarojs/components";
4
+
5
+import "./index.scss";
6
+import { useState, useEffect } from "react";
7
+import { querybrokerList } from "@/services/broker";
8
+
9
+export default withLayout(() => {
10
+  const [list, setList] = useState([]);
11
+  const [total, setTotal] = useState(0);
12
+  useEffect(() => {
13
+    getList();
14
+  }, []);
15
+
16
+  const getList = () => {
17
+    querybrokerList().then((res) => {
18
+      setList([...res.records,...res.records]);
19
+      setTotal(res.total);
20
+    });
21
+  };
22
+
23
+  const img1 =
24
+    "https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/broker/%E9%82%80%E8%AF%B7%E5%A5%96%E5%8A%B1.png";
25
+  const img2 =
26
+    "https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/broker/%E9%82%80%E8%AF%B7%E6%B3%A8%E5%86%8C%E6%A6%9C.png";
27
+  const defaultRuleImage =
28
+    "https://xlk-assets.oss-cn-shanghai.aliyuncs.com/miniapp/broker/%E5%85%A8%E6%B0%91%E7%BB%8F%E7%BA%AA%E4%BA%BA.png";
29
+  return (
30
+    <View className="invitationlist-background">
31
+      <View>
32
+        <View className="invitationlist-font">总邀请人数</View>
33
+        <View className="invitationlist-font-right">
34
+          <Image className="invitationlist-img" mode="widthFix" src={img1} />
35
+          邀请奖励
36
+        </View>
37
+        <View className="invitationlist-background-2">
38
+          <View className="invitationlist-font-tl">{total}</View>
39
+          <View className="invitationlist-font-right-t">
40
+            <Image className="invitationlist-img" mode="widthFix" src={img2} />
41
+            邀请注册榜
42
+          </View>
43
+        </View>
44
+        <View className="invitationlist-view-1">
45
+          更新时间:&nbsp;<View className="invitationlist-view">2022-07-22</View>
46
+          &nbsp;<View className="invitationlist-view">12:00:00</View>
47
+        </View>
48
+      </View>
49
+      <View className="invitationlist-view-list">
50
+        {list.map((item) => {
51
+          return (
52
+            <View key={item.personId} className="invitationlist-view-item">
53
+              <View className="invitationlist-img-frame">
54
+                <Image
55
+                  className="invitationlist-img-head"
56
+                  src={item.avatarurl}
57
+                />
58
+              </View>
59
+              <View className="invitationlist-view-list-ifr">
60
+                <Text className="invitationlist-text-1">{item.name}</Text>
61
+                <Text className="invitationlist-text">{item.customerNum||0}</Text>
62
+                <Text className="invitationlist-text">{item.brokerNum||0}</Text>
63
+                <Text className="invitationlist-time">2022/07/26</Text>
64
+              </View>
65
+              <View className="invitationlist-view-list-ifr-t">
66
+                <Text className="invitationlist-text-t1">{item.phone}</Text>
67
+                <Text className="invitationlist-text-t">客户(组)</Text>
68
+                <Text className="invitationlist-text-t">成交(组)</Text>
69
+                <Text className="invitationlist-time-t">12:00</Text>
70
+              </View>
71
+              <View className="invitationlist-border"></View>
72
+            </View>
73
+          );
74
+        })}
75
+      </View>
76
+    </View>
77
+  );
78
+});

src/subpackages/pages/borker/invitationlist/index.scss → src/subpackages/pages/broker/invitationlist/index.scss Voir le fichier

@@ -4,6 +4,8 @@
4 4
   background-color: #4A2FA0;
5 5
   padding-top: 80rpx;
6 6
   box-sizing: border-box;
7
+  display: flex;
8
+  flex-direction: column;
7 9
   .invitationlist-font{
8 10
     letter-spacing:4rpx;
9 11
     padding-left: 60rpx;
@@ -16,6 +18,7 @@
16 18
     width: 28rpx;
17 19
     margin-right:16rpx;
18 20
     display: inline-block;
21
+    vertical-align: middle;
19 22
   }
20 23
   .invitationlist-font-right{
21 24
     letter-spacing:4rpx;
@@ -46,6 +49,7 @@
46 49
     }
47 50
   }
48 51
   .invitationlist-view-1{
52
+   
49 53
     letter-spacing:4rpx;
50 54
     padding-left: 60rpx;
51 55
     box-sizing: border-box;
@@ -60,6 +64,7 @@
60 64
     }
61 65
   }
62 66
   .invitationlist-view-list{
67
+    flex: 1;
63 68
     height: 150rpx;
64 69
     width: 100%;
65 70
     display: inline-block;
@@ -69,6 +74,9 @@
69 74
     padding: 20rpx 30rpx 0;
70 75
     box-sizing: border-box;
71 76
     border-bottom: 1rpx solid rgba(25, 60, 131, 0.2);
77
+    .invitationlist-view-item{
78
+
79
+    }
72 80
     .invitationlist-img-frame{
73 81
       margin: 30rpx 14rpx 0 2rpx;
74 82
       width: 66rpx;

src/subpackages/pages/borker/myMessage/components/messageItem/index.jsx → src/subpackages/pages/broker/myMessage/components/messageItem/index.jsx Voir le fichier

@@ -9,7 +9,7 @@ export default (props) => {
9 9
   return (
10 10
     <view className="Item messageItem">
11 11
      <view className="messageItem-top">
12
-      <image className="image" src={`${OSS_FAST_PATH}/miniapp/borker/消息.png`} alt="" srcset="" />
12
+      <image className="image" src={`${OSS_FAST_PATH}/miniapp/broker/消息.png`} alt="" srcset="" />
13 13
       消息提醒
14 14
      </view>
15 15
      <view className="messageItem-bottom"></view>

src/subpackages/pages/borker/myMessage/components/messageItem/index.scss → src/subpackages/pages/broker/myMessage/components/messageItem/index.scss Voir le fichier


src/subpackages/pages/borker/myMessage/components/messageTime/index.jsx → src/subpackages/pages/broker/myMessage/components/messageTime/index.jsx Voir le fichier


src/subpackages/pages/borker/myMessage/components/messageTime/index.scss → src/subpackages/pages/broker/myMessage/components/messageTime/index.scss Voir le fichier


src/subpackages/pages/borker/myMessage/index.config.js → src/subpackages/pages/broker/myMessage/index.config.js Voir le fichier


src/subpackages/pages/borker/myMessage/index.jsx → src/subpackages/pages/broker/myMessage/index.jsx Voir le fichier


src/subpackages/pages/borker/myMessage/index.scss → src/subpackages/pages/broker/myMessage/index.scss Voir le fichier


src/subpackages/pages/borker/myWallet/index.config.js → src/subpackages/pages/broker/myWallet/index.config.js Voir le fichier


src/subpackages/pages/borker/myWallet/index.jsx → src/subpackages/pages/broker/myWallet/index.jsx Voir le fichier


src/subpackages/pages/borker/myWallet/index.scss → src/subpackages/pages/broker/myWallet/index.scss Voir le fichier


src/subpackages/pages/borker/myWallet/list/Item/index.jsx → src/subpackages/pages/broker/myWallet/list/Item/index.jsx Voir le fichier


src/subpackages/pages/borker/myWallet/list/Item/index.scss → src/subpackages/pages/broker/myWallet/list/Item/index.scss Voir le fichier


src/subpackages/pages/borker/myWallet/list/index.jsx → src/subpackages/pages/broker/myWallet/list/index.jsx Voir le fichier


src/subpackages/pages/borker/myWallet/list/index.scss → src/subpackages/pages/broker/myWallet/list/index.scss Voir le fichier


src/subpackages/pages/borker/rankingList/components/list/index.jsx → src/subpackages/pages/broker/rankingList/components/list/index.jsx Voir le fichier


src/subpackages/pages/borker/rankingList/components/list/index.scss → src/subpackages/pages/broker/rankingList/components/list/index.scss Voir le fichier


src/subpackages/pages/borker/rankingList/components/list/item.jsx → src/subpackages/pages/broker/rankingList/components/list/item.jsx Voir le fichier


src/subpackages/pages/borker/rankingList/components/myAchievement/index.jsx → src/subpackages/pages/broker/rankingList/components/myAchievement/index.jsx Voir le fichier


src/subpackages/pages/borker/rankingList/components/myAchievement/index.scss → src/subpackages/pages/broker/rankingList/components/myAchievement/index.scss Voir le fichier


src/subpackages/pages/borker/rankingList/index.config.js → src/subpackages/pages/broker/rankingList/index.config.js Voir le fichier


src/subpackages/pages/borker/rankingList/index.jsx → src/subpackages/pages/broker/rankingList/index.jsx Voir le fichier

@@ -20,7 +20,7 @@ export default withLayout(() => {
20 20
       <view className="rankingList-backimage">
21 21
         <image
22 22
           className="image"
23
-          src={`${OSS_FAST_PATH}/miniapp/borker/全民排行榜.png`}
23
+          src={`${OSS_FAST_PATH}/miniapp/broker/全民排行榜.png`}
24 24
           alt=""
25 25
           srcset=""
26 26
         />

src/subpackages/pages/borker/rankingList/index.scss → src/subpackages/pages/broker/rankingList/index.scss Voir le fichier


src/subpackages/pages/borker/rankingList/invitationList/index.jsx → src/subpackages/pages/broker/rankingList/invitationList/index.jsx Voir le fichier

@@ -29,7 +29,7 @@ export default withLayout(() => {
29 29
         <view>
30 30
           <image
31 31
             className="list-image"
32
-            src={`${OSS_FAST_PATH}/miniapp/borker/消息.png`}
32
+            src={`${OSS_FAST_PATH}/miniapp/broker/消息.png`}
33 33
             alt=""
34 34
             srcset=""
35 35
           />

src/subpackages/pages/borker/rankingList/invitationList/index.scss → src/subpackages/pages/broker/rankingList/invitationList/index.scss Voir le fichier


src/subpackages/pages/borker/rankingList/transactionList/index.jsx → src/subpackages/pages/broker/rankingList/transactionList/index.jsx Voir le fichier

@@ -29,7 +29,7 @@ export default withLayout(() => {
29 29
         <view>
30 30
           <image
31 31
             className="list-image"
32
-            src={`${OSS_FAST_PATH}/miniapp/borker/消息.png`}
32
+            src={`${OSS_FAST_PATH}/miniapp/broker/消息.png`}
33 33
             alt=""
34 34
             srcset=""
35 35
           />

src/subpackages/pages/borker/rankingList/transactionList/index.scss → src/subpackages/pages/broker/rankingList/transactionList/index.scss Voir le fichier


+ 74
- 0
src/subpackages/pages/broker/toBeBroker/AddBankCard/index.jsx Voir le fichier

@@ -0,0 +1,74 @@
1
+import { useState, useEffect } from "react";
2
+import Taro from "@tarojs/taro";
3
+import { ScrollView, Input, Image, Block, Textarea } from "@tarojs/components";
4
+import "./index.scss";
5
+
6
+export default (props) => {
7
+  const { title, onChanel,onChange=()=>{} } = props;
8
+
9
+  const [FormData, setFormData] = useState({
10
+    ownerName: "",
11
+    bankName: "",
12
+    cardNo: "",
13
+  });
14
+
15
+  const FormChange = (key, e) => {
16
+    let Data = { ...FormData };
17
+    Data[key] = e.detail.value;
18
+    setFormData(Data);
19
+  };
20
+  
21
+
22
+  const onsubmit = () => {
23
+    if(FormData.ownerName&&FormData.bankName&&FormData.cardNo){
24
+      onChange(FormData)
25
+    }else{
26
+      Taro.showToast({
27
+        title: "请补全银行卡信息",
28
+        icon: "none",
29
+        duration: 2000,
30
+      });
31
+    }
32
+  };
33
+  return (
34
+    <view className="AddIdentityCard">
35
+      <text>持卡人</text>
36
+      <view className="FormLine flex-h">
37
+        <view className="flex-item">
38
+          <Input
39
+            placeholder="请输入用户名"
40
+            value={FormData.ownerName}
41
+            onInput={FormChange.bind(this, "ownerName")}
42
+          ></Input>
43
+        </view>
44
+      </view>
45
+
46
+      <text>开户行</text>
47
+      <view className="FormLine flex-h">
48
+        <view className="flex-item">
49
+          <Input
50
+            placeholder="请输入开户行"
51
+            value={FormData.bankName}
52
+            onInput={FormChange.bind(this, "bankName")}
53
+          ></Input>
54
+        </view>
55
+      </view>
56
+
57
+      <text>银行卡号</text>
58
+      <view className="FormLine flex-h">
59
+        <view className="flex-item">
60
+          <Input
61
+            placeholder="请输入银行卡号"
62
+            value={FormData.cardNo}
63
+            onInput={FormChange.bind(this, "cardNo")}
64
+          ></Input>
65
+        </view>
66
+      </view>
67
+
68
+      <view className="Btn">
69
+        <text onClick={() => onChanel()}>取消</text>
70
+        <text onClick={()=>onsubmit(FormData)}>确定</text>
71
+      </view>
72
+    </view>
73
+  );
74
+};

src/subpackages/pages/borker/toBeBorker/AddBankCard/index.scss → src/subpackages/pages/broker/toBeBroker/AddBankCard/index.scss Voir le fichier


src/subpackages/pages/borker/toBeBorker/index.config.js → src/subpackages/pages/broker/toBeBroker/index.config.js Voir le fichier


+ 235
- 0
src/subpackages/pages/broker/toBeBroker/index.jsx Voir le fichier

@@ -0,0 +1,235 @@
1
+import { useState, useEffect } from "react";
2
+import Taro from "@tarojs/taro";
3
+import { useSelector } from "react-redux";
4
+import withLayout from "@/layout";
5
+import { ScrollView, Input, Image, Block, Textarea } from "@tarojs/components";
6
+import { getImgURL } from "@/utils/image";
7
+import { fetch, uploadFiles } from "@/utils/request";
8
+import { UPDATE_USER_INFO, ROLE_CODE } from "@/constants/user";
9
+import { API_BIND_BROKER, API_UPDATE_PHOTO } from "@/constants/api";
10
+import store from "@/store";
11
+import CardItem from "../components/CardItem";
12
+import AddBankCard from "./AddBankCard";
13
+import { querybkBankCard } from "@/services/broker";
14
+import "@/assets/css/iconfont.css";
15
+import "./index.scss";
16
+
17
+export default withLayout(() => {
18
+  const { dispatch } = store;
19
+
20
+  const user = useSelector((state) => state.user);
21
+  const [UserInfo, setUserInfo] = useState({});
22
+  const [UserRole, setUserRole] = useState(null); // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理 5-
23
+  const [FormData, setFormData] = useState({
24
+    name: "",
25
+    phone: "",
26
+    idNo: "",
27
+  });
28
+  const [showAddIdentityCard, setShowAddIdentityCard] = useState(false);
29
+  const [bankCard, setBankCard] = useState([]);
30
+
31
+  // 获取银行卡列表
32
+  useEffect(() => {
33
+    Taro.showLoading();
34
+
35
+    querybkBankCard().then((res) => {
36
+      console.log(res, "queryBkAgreement");
37
+      setBankCard(res?.records || []);
38
+      Taro.hideLoading();
39
+    });
40
+  }, []);
41
+
42
+  useEffect(() => {
43
+    if (user?.userInfo?.person?.personId) {
44
+      const person = user.userInfo.person;
45
+      setUserRole(
46
+        person.personType === ROLE_CODE.CHANNEL_AGENT
47
+          ? 2
48
+          : person.personType === ROLE_CODE.CONSULTANT
49
+          ? 3
50
+          : person.personType === ROLE_CODE.MARKETING
51
+          ? 4
52
+          : 1
53
+      );
54
+    }
55
+  }, [user]);
56
+
57
+  useEffect(() => {
58
+    setUserInfo(user?.userInfo?.person);
59
+    console.log(user?.userInfo?.person, "=22==");
60
+    setFormData({
61
+      name: user?.userInfo?.person.name,
62
+      phone: user?.userInfo?.person.phone,
63
+      idNo: user?.userInfo?.person.idNo,
64
+
65
+    });
66
+  }, [user]);
67
+
68
+  const Save = () => {
69
+    let params = "";
70
+   
71
+      params = `name=${FormData.name}&phone=${FormData.phone}&idNo=${FormData.idNo}`;
72
+    console.log(params)
73
+    fetch({ url: `${API_BIND_BROKER}`, method: "put",payload:{...FormData} }).then(() => {
74
+      Taro.showToast({
75
+        title: "修改成功",
76
+        icon: "none",
77
+      });
78
+      dispatch({
79
+        type: UPDATE_USER_INFO,
80
+        payload: {
81
+          name: FormData.name,
82
+          phone: FormData.phone,
83
+          idNo: FormData.idNo,
84
+        },
85
+
86
+      
87
+      });
88
+      Taro.navigateBack({ delta: 1 })
89
+      // login({ path: '', scene: '' })
90
+    });
91
+  };
92
+
93
+  const hangDeleteBankCard = (e) => {
94
+    setBankCard((data) => {
95
+      return data.filter((x) => x.cardNo !== e.cardNo);
96
+    });
97
+  };
98
+
99
+  const handAddBankCard = (e) => {
100
+    console.log(bankCard,e,bankCard.find((x) => x.cardNo === e.cardNo),'333')
101
+    if (bankCard.find((x) => x.cardNo === e.cardNo)) {
102
+      console.log('333')
103
+      Taro.showToast({
104
+        title: "存在相同银行卡",
105
+        icon: "none",
106
+        duration: 2000,
107
+      });
108
+    } else {
109
+      setShowAddIdentityCard(false);
110
+      setBankCard((data) => {
111
+        return [...data, e];
112
+      });
113
+    }
114
+  };
115
+
116
+  const FormChange = (key, e) => {
117
+    let Data = { ...FormData };
118
+    Data[key] = e.detail.value;
119
+    setFormData(Data);
120
+  };
121
+
122
+  const ToUploadImg = () => {
123
+    if (UserRole - 0 === 3) {
124
+      Taro.chooseImage({
125
+        count: 1,
126
+        success: function (res) {
127
+          if (res.errMsg === "chooseImage:ok") {
128
+            Taro.showToast({
129
+              title: "正在上传...",
130
+              icon: "loading",
131
+              mask: true,
132
+              duration: 10000,
133
+            });
134
+            uploadFiles(res.tempFilePaths).then((subRes) => {
135
+              fetch({
136
+                url: API_UPDATE_PHOTO,
137
+                payload: { photoUrl: subRes[0] },
138
+                method: "put",
139
+              }).then(() => {
140
+                Taro.hideToast();
141
+                Taro.showToast({
142
+                  title: "修改成功",
143
+                  icon: "none",
144
+                  duration: 2000,
145
+                });
146
+                dispatch({
147
+                  type: UPDATE_USER_INFO,
148
+                  payload: { userPhoto: subRes[0] },
149
+                });
150
+              });
151
+            });
152
+          }
153
+        },
154
+      });
155
+    }
156
+  };
157
+  console.log(UserInfo, "UserInfo");
158
+  return (
159
+    <view className="Page UserInfo">
160
+      <ScrollView scroll-y>
161
+        <view className="PageContent">
162
+          <text>头像</text>
163
+          <view className="FormLine flex-h" onClick={ToUploadImg}>
164
+            <view className="flex-item">
165
+              <view className="Icon">
166
+                <Image
167
+                  mode="aspectFill"
168
+                  src={getImgURL(UserInfo.userPhoto || UserInfo.avatarurl)}
169
+                ></Image>
170
+              </view>
171
+            </view>
172
+            {/* <text className='iconfont icon-jiantouright'></text> */}
173
+          </view>
174
+
175
+          <text>用户名</text>
176
+          <view className="FormLine flex-h">
177
+            <view className="flex-item">
178
+              <Input
179
+                placeholder="请输入用户名"
180
+                value={FormData.name}
181
+                onInput={FormChange.bind(this, "name")}
182
+              ></Input>
183
+            </view>
184
+          </view>
185
+
186
+          <text>手机号码</text>
187
+          <view className="FormLine flex-h">
188
+            <view className="flex-item">
189
+              <Input
190
+                placeholder="请输入手机号码"
191
+                value={FormData.phone}
192
+                onInput={FormChange.bind(this, "phone")}
193
+              ></Input>
194
+            </view>
195
+          </view>
196
+
197
+          <text>证件号码</text>
198
+          <view className="FormLine flex-h">
199
+            <view className="flex-item">
200
+              <Input
201
+                placeholder="请输入证件号码"
202
+                value={FormData.idNo}
203
+                onInput={FormChange.bind(this, "idNo")}
204
+              ></Input>
205
+            </view>
206
+          </view>
207
+
208
+          <CardItem
209
+            title="银行卡号"
210
+            bankCard={bankCard}
211
+            onDelete={hangDeleteBankCard}
212
+            addCard={() => setShowAddIdentityCard(true)}
213
+          ></CardItem>
214
+          {/* <text>证件号码</text>
215
+          <view className='FormLine flex-h'>
216
+            <view className='flex-item'>
217
+              <Input placeholder='请输入手机号码' value={FormData.phone} onInput={FormChange.bind(this, 'phone')}></Input>
218
+            </view>
219
+          </view> */}
220
+        </view>
221
+
222
+        <view className="Btn">
223
+          <text onClick={Save}>保存</text>
224
+        </view>
225
+      </ScrollView>
226
+
227
+      {showAddIdentityCard && (
228
+        <AddBankCard
229
+          onChange={(e) => handAddBankCard(e)}
230
+          onChanel={() => setShowAddIdentityCard(false)}
231
+        ></AddBankCard>
232
+      )}
233
+    </view>
234
+  );
235
+});

src/subpackages/pages/borker/toBeBorker/index.scss → src/subpackages/pages/broker/toBeBroker/index.scss Voir le fichier

@@ -9,7 +9,7 @@
9 9
     .PageContent {
10 10
       position: relative;
11 11
       overflow: hidden;
12
-      min-height: calc(100vh - 100px);
12
+      min-height: calc(100vh - 300px);
13 13
       z-index: 1;
14 14
       padding-bottom: 100px;
15 15
       > text {

+ 31
- 14
src/utils/hooks/useScreen.js Voir le fichier

@@ -4,32 +4,49 @@
4 4
  */
5 5
 import { useEffect, useState, useCallback } from 'react'
6 6
 import { useDispatch, useSelector } from 'react-redux'
7
-import { queryExtContents } from '@/services/common'
7
+import { queryExtContents, queryBrokerScreen } from '@/services/common'
8
+import { ROLE_CODE } from "@/constants/user";
8 9
 
9 10
 export default function useScreen(cityId, person) {
10 11
   const dispatch = useDispatch()
11
-
12 12
   const [firstScreen, setFirstScreen] = useState()
13 13
   const cityShow = useSelector(s => s.system.firstScreen.filter(x => x.cityId === cityId)[0])
14 14
   const toggle = useCallback(
15 15
     () => dispatch({ type: 'TOGGLE_FIRSTSCREEN', payload: { cityId } }),
16 16
     [cityId, dispatch],
17 17
   )
18
-
18
+ 
19 19
   useEffect(() => {
20 20
     if (cityId && person?.personId) {
21
-      queryExtContents({cityId}).then((res) => {
22
-        const screen = (res || []).filter(x => x.showType === 'screen' && x.showPosition === 'index')[0]
23
-        if (!screen) {
24
-          return;
25
-        }
26
-
27
-        setFirstScreen(screen)
21
+      if(person.personType === ROLE_CODE.BROKER){
22
+        // 全民经纪人的开屏广告
23
+        queryBrokerScreen({cityId}).then((res) => {
24
+          const screen = res?.records?.map(x=>({...x,image:x.imageUrl}))[0]
25
+          if (!screen) {
26
+            return;
27
+          }
28
+  
29
+          setFirstScreen(screen)
30
+    
31
+          if (screen) {
32
+            toggle()
33
+          }
34
+        })
35
+      }else{
36
+        queryExtContents({cityId}).then((res) => {
37
+          const screen = (res || []).filter(x => x.showType === 'screen' && x.showPosition === 'index')[0]
38
+          if (!screen) {
39
+            return;
40
+          }
28 41
   
29
-        if (screen) {
30
-          toggle()
31
-        }
32
-      })
42
+          setFirstScreen(screen)
43
+    
44
+          if (screen) {
45
+            toggle()
46
+          }
47
+        })
48
+      }
49
+      
33 50
     }
34 51
   }, [cityId, toggle, person?.personId])
35 52