lisenzhou 2 jaren geleden
bovenliggende
commit
a8ca7a01ba

+ 1
- 0
config/dev.js Bestand weergeven

@@ -12,6 +12,7 @@ module.exports = {
12 12
     OSS_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
13 13
     OSS_FAST_PATH: '"https://xlk-assets.oss-cn-shanghai.aliyuncs.com/"',
14 14
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
15
+    BROKER_CITY: '"南京"',
15 16
     Version: '"V0.0.20"'
16 17
   },
17 18
   mini: {},

+ 23
- 6
src/components/brokerShare/index.jsx Bestand weergeven

@@ -4,17 +4,29 @@ import { Image } from "@tarojs/components";
4 4
 import { getImgURL } from "@/utils/image";
5 5
 import "./index.scss";
6 6
 
7
-export const brokerShareLink = (buildingId) => Taro.navigateTo({
8
-  url: `/pages/mine/addCustomer/index?buildingId=${buildingId}`,
9
-});
7
+export const brokerShareLink = (buildingId) =>
8
+  Taro.navigateTo({
9
+    url: `/pages/mine/addCustomer/index?buildingId=${buildingId}`,
10
+  });
11
+export const agreementLink = (buildingId) =>
12
+  Taro.navigateTo({
13
+    url: `/subpackages/pages/broker/agreement/index?buildingId=${buildingId}`,
14
+  });
10 15
 
11 16
 export default function ProjectListItem(props) {
12 17
   return (
13 18
     <view
14 19
       className="brokerShare flex-h"
15
-      onClick={() => brokerShareLink(props.buildingId)}
20
+      onClick={(e) => {
21
+        e.stopPropagation();
22
+      }}
16 23
     >
17
-      <view className="left">
24
+      <view
25
+        className="left"
26
+        onClick={(e) => {
27
+          e.stopPropagation(), agreementLink(props.buildingId);
28
+        }}
29
+      >
18 30
         <image
19 31
           className="image"
20 32
           src={`${OSS_FAST_PATH}/miniapp/broker/钱袋.png`}
@@ -23,7 +35,12 @@ export default function ProjectListItem(props) {
23 35
         />
24 36
         <text>靓盘好卖 闪付结佣</text>
25 37
       </view>
26
-      <view className="right">
38
+      <view
39
+        className="right"
40
+        onClick={(e) => {
41
+          e.stopPropagation(), brokerShareLink(props.buildingId);
42
+        }}
43
+      >
27 44
         <text>推荐好友</text>
28 45
 
29 46
         <image

+ 3
- 0
src/constants/broker.js Bestand weergeven

@@ -22,3 +22,6 @@ export const API_BROKER_RANK_MINE = resolvePath('broker/mine')
22 22
 
23 23
 //消息
24 24
 export const API_BK_NOTICE = resolvePath('bkNotice')
25
+
26
+//我的钱包
27
+export const API_BK_ACCOUNT = resolvePath('bkAccountRecord')

+ 174
- 75
src/pages/index/components/Menu/index.jsx Bestand weergeven

@@ -1,106 +1,205 @@
1
-import { useState, useEffect, useRef } from 'react'
2
-import { Swiper, SwiperItem, Image } from '@tarojs/components'
3
-import Taro from '@tarojs/taro'
4
-import { useSelector } from 'react-redux'
5
-import { getSystemParsm } from '@/services/common'
6
-import './index.scss'
7
-import { ROLE_CODE } from '@/constants/user'
1
+import { useState, useEffect, useRef } from "react";
2
+import { Swiper, SwiperItem, Image } from "@tarojs/components";
3
+import Taro from "@tarojs/taro";
4
+import { useSelector } from "react-redux";
5
+import { getSystemParsm } from "@/services/common";
6
+import "./index.scss";
7
+import { ROLE_CODE } from "@/constants/user";
8
+import { useMemo } from "react";
8 9
 
9
-const MINI_KANGYANG = 'MINI_KANGYANG'
10
+const MINI_KANGYANG = "MINI_KANGYANG";
10 11
 
11
-export default function Menu () {
12
-  const kangyangRef = useRef()
13
-  const person = useSelector(({user})=>user.userInfo?.person)
14
-  console.log('=person=',person)
12
+const list = [
13
+  {
14
+    name: "全部楼盘",
15
+    id: 1,
16
+    icon: require("@/assets/index-icon9.png"),
17
+    router: "/pages/index/buildingList/index",
18
+  },
19
+  {
20
+    name: "品牌地产",
21
+    id: 2,
22
+    icon: require("@/assets/index-icon8.png"),
23
+    router: "/pages/index/brandList/index",
24
+  },
25
+  {
26
+    name: "近期开盘",
27
+    id: 3,
28
+    icon: require("@/assets/index-icon6.png"),
29
+    router: `/pages/index/buildingList/index?isRecentOpening=1`,
30
+  },
31
+  {
32
+    name: "帮我找房",
33
+    id: 4,
34
+    icon: require("@/assets/index-icon1.png"),
35
+    router: "/pages/index/helpToFindHouse/index",
36
+  },
37
+  {
38
+    name: "增值服务",
39
+    id: 5,
40
+    icon: require("@/assets/index-icon16.png"),
41
+    router: "/pages/index/addedValueService/index",
42
+  },
43
+  {
44
+    name: "地图找房",
45
+    id: 6,
46
+    icon: require("@/assets/index-icon2.png"),
47
+    router: "/pages/index/findHouseFromMap/index",
48
+  },
49
+  {
50
+    name: "活动信息",
51
+    id: 7,
52
+    icon: require("@/assets/index-icon5.png"),
53
+    router: "/pages/index/activityList/index?type=dymic",
54
+  },
55
+  {
56
+    name: "团房信息",
57
+    id: 8,
58
+    icon: require("@/assets/index-icon12.png"),
59
+    router: "/pages/index/activityList/index?type=house",
60
+  },
61
+  {
62
+    name: "特价房",
63
+    id: 9,
64
+    icon: require("@/assets/index-icon11.png"),
65
+    router: "/pages/index/specialPriceHouse/index",
66
+  },
67
+  {
68
+    name: "康养",
69
+    id: 10,
70
+    icon: require("@/assets/index-icon7.png"),
71
+    miniapp: MINI_KANGYANG,
72
+  },
73
+  {
74
+    name: "文旅商办",
75
+    id: 11,
76
+    icon: require("@/assets/index-icon13.png"),
77
+    router: `/pages/index/buildingList/index?isCommerce=1`,
78
+  },
79
+  {
80
+    name: "资讯",
81
+    id: 12,
82
+    icon: require("@/assets/index-icon15.png"),
83
+    router: "/pages/index/newsList/index",
84
+  },
85
+  {
86
+    name: "购房百科",
87
+    id: 13,
88
+    icon: require("@/assets/index-icon4.png"),
89
+    router: "/pages/index/encyclopediasOfBuyHouse/index",
90
+  },
91
+  {
92
+    name: "房贷计算",
93
+    id: 14,
94
+    icon: require("@/assets/index-icon3.png"),
95
+    router: "/pages/mine/mortgageCalc/index",
96
+  },
97
+];
15 98
 
16
-  const brokerList = [
17
-    { name: '我要推荐', id: 25, icon: require('@/assets/index-icon25.png'), router: '/pages/mine/addCustomer/index' },
18
-    { name: '我的客户', id: 23, icon: require('@/assets/index-icon23.png'), router: '/pages/mine/myCustomer/index' },
19
-    { name: '邀请好友', id: 26, icon: require('@/assets/index-icon26.png'), router: '/subpackages/pages/broker/invitation/index' },
20
-    { name: '我的钱包', id: 24, icon: require('@/assets/index-icon24.png'), router: '/subpackages/pages/broker/myWallet/index' },
21
-  ]
99
+const brokerList = [
100
+  {
101
+    name: "我要推荐",
102
+    id: 25,
103
+    icon: require("@/assets/index-icon25.png"),
104
+    router: "/pages/mine/addCustomer/index",
105
+  },
106
+  {
107
+    name: "我的客户",
108
+    id: 23,
109
+    icon: require("@/assets/index-icon23.png"),
110
+    router: "/pages/mine/myCustomer/index",
111
+  },
112
+  {
113
+    name: "邀请好友",
114
+    id: 26,
115
+    icon: require("@/assets/index-icon26.png"),
116
+    router: "/subpackages/pages/broker/invitation/index",
117
+  },
118
+  {
119
+    name: "我的钱包",
120
+    id: 24,
121
+    icon: require("@/assets/index-icon24.png"),
122
+    router: "/subpackages/pages/broker/myWallet/index",
123
+  },
124
+];
22 125
 
23
-  const List = [
24
-    { name: '全部楼盘', id: 1, icon: require('@/assets/index-icon9.png'), router: '/pages/index/buildingList/index' },
25
-    { name: '品牌地产', id: 2, icon: require('@/assets/index-icon8.png'), router: '/pages/index/brandList/index' },
26
-    { name: '近期开盘', id: 3, icon: require('@/assets/index-icon6.png'), router: `/pages/index/buildingList/index?isRecentOpening=1` },
27
-    { name: '帮我找房', id: 4, icon: require('@/assets/index-icon1.png'), router: '/pages/index/helpToFindHouse/index' },
28
-    { name: '增值服务', id: 5, icon: require('@/assets/index-icon16.png'), router: '/pages/index/addedValueService/index' },
29
-    { name: '地图找房', id: 6, icon: require('@/assets/index-icon2.png'), router: '/pages/index/findHouseFromMap/index' },
30
-    { name: '活动信息', id: 7, icon: require('@/assets/index-icon5.png'), router: '/pages/index/activityList/index?type=dymic' },
31
-    { name: '团房信息', id: 8, icon: require('@/assets/index-icon12.png'), router: '/pages/index/activityList/index?type=house' },
32
-    { name: '特价房', id: 9, icon: require('@/assets/index-icon11.png'), router: '/pages/index/specialPriceHouse/index' },
33
-    { name: '康养', id: 10, icon: require('@/assets/index-icon7.png'), miniapp: MINI_KANGYANG },
34
-    { name: '文旅商办', id: 11, icon: require('@/assets/index-icon13.png'), router: `/pages/index/buildingList/index?isCommerce=1` },
35
-    { name: '资讯', id: 12, icon: require('@/assets/index-icon15.png'), router: '/pages/index/newsList/index' },
36
-    { name: '购房百科', id: 13, icon: require('@/assets/index-icon4.png'), router: '/pages/index/encyclopediasOfBuyHouse/index' },
37
-    { name: '房贷计算', id: 14, icon: require('@/assets/index-icon3.png'), router: '/pages/mine/mortgageCalc/index' }
38
-  ]
126
+export default function Menu() {
127
+  const kangyangRef = useRef();
128
+  const city = useSelector((state) => state.city);
39 129
 
40
-  // 如果是全民经纪人添加专属菜单
41
-  if(person.personType===ROLE_CODE.BROKER){
42
-    List.unshift(...brokerList)
43
-  }
44
-  let Arr = []
45
-  List.map((item) => {
46
-    if (Arr.length) {
47
-      if (Arr[Arr.length - 1].length < 10) {
48
-        Arr[Arr.length - 1].push({ ...item })
49
-      } else {
50
-        Arr.push([{ ...item }])
51
-      }
130
+  const [List, setList] = useState(list);
131
+
132
+  useEffect(() => {
133
+    // 如果是全民经纪人添加专属菜单
134
+    if (city.curCity.shortname === BROKER_CITY) {
135
+      setList([...brokerList, ...list]);
52 136
     } else {
53
-      Arr.push([{ ...item }])
137
+      setList(list);
54 138
     }
55
-  })
56
-  const [MenuList] = useState(Arr)
139
+  }, [city.curCity.shortname]);
140
+
141
+
142
+  const MenuList = useMemo(() => {
143
+    let Arr = [];
144
+    List.map((item) => {
145
+      if (Arr.length) {
146
+        if (Arr[Arr.length - 1].length < 10) {
147
+          Arr[Arr.length - 1].push({ ...item });
148
+        } else {
149
+          Arr.push([{ ...item }]);
150
+        }
151
+      } else {
152
+        Arr.push([{ ...item }]);
153
+      }
154
+    });
155
+    return Arr
156
+  }, [List]);
57 157
 
58 158
   const MenuClick = (item) => {
59 159
     return () => {
60 160
       if (item.router) {
61
-        Taro.navigateTo({ url: item.router })
161
+        Taro.navigateTo({ url: item.router });
62 162
       } else if (item.miniapp === MINI_KANGYANG) {
63 163
         if (kangyangRef.current) {
64 164
           // 跳转到康养小程序
65
-          Taro.navigateToMiniProgram(kangyangRef.current)
165
+          Taro.navigateToMiniProgram(kangyangRef.current);
66 166
         }
67 167
       }
68
-    }
69
-  }
70
-  
168
+    };
169
+  };
170
+
71 171
   useEffect(() => {
72 172
     // 获取康养小程序相关
73 173
     getSystemParsm(MINI_KANGYANG).then((res) => {
74 174
       if (res && res.paramValue) {
75
-        kangyangRef.current = JSON.parse(res.paramValue)
175
+        kangyangRef.current = JSON.parse(res.paramValue);
76 176
       }
77
-    })
78
-  }, [])
177
+    });
178
+  }, []);
79 179
 
80 180
   return (
81
-    <view className='components Menu'>
181
+    <view className="components Menu">
82 182
       <view>
83 183
         <view>
84 184
           <Swiper autoplay={false} indicator-dots>
85
-            {
86
-              MenuList.map((item, index) => (
87
-                <SwiperItem key={`Banner-${index}`}>
88
-                  <view className='swiper-item'>
89
-                    {
90
-                      item.map((subItem, subIndex) => (
91
-                        <view key={`BannerItem-${subIndex}`} onClick={MenuClick(subItem)}>
92
-                          <Image mode='heightFix' src={subItem.icon || null} />
93
-                          <text>{subItem.name}</text>
94
-                        </view>
95
-                      ))
96
-                    }
97
-                  </view>
98
-                </SwiperItem>
99
-              ))
100
-            }
185
+            {MenuList.map((item, index) => (
186
+              <SwiperItem key={`Banner-${index}`}>
187
+                <view className="swiper-item">
188
+                  {item.map((subItem, subIndex) => (
189
+                    <view
190
+                      key={`BannerItem-${subIndex}`}
191
+                      onClick={MenuClick(subItem)}
192
+                    >
193
+                      <Image mode="heightFix" src={subItem.icon || null} />
194
+                      <text>{subItem.name}</text>
195
+                    </view>
196
+                  ))}
197
+                </view>
198
+              </SwiperItem>
199
+            ))}
101 200
           </Swiper>
102 201
         </view>
103 202
       </view>
104 203
     </view>
105
-  )
204
+  );
106 205
 }

+ 10
- 0
src/services/broker.js Bestand weergeven

@@ -8,6 +8,7 @@ import {
8 8
   API_BK_AGENT_RULE,
9 9
   API_BROKER_RANK_MINE,
10 10
   API_BK_NOTICE,
11
+  API_BK_ACCOUNT,
11 12
 } from "@/constants/broker";
12 13
 
13 14
 /**
@@ -59,3 +60,12 @@ export const getbkAgentRule = (payload) =>
59 60
  */
60 61
 export const getbkNotice = (payload) =>
61 62
   fetch({ url: `${API_BK_NOTICE}`, payload });
63
+
64
+  
65
+/**
66
+ * 我的钱包
67
+ * @param {*}
68
+ *            chargeCode= deal  成交喜报  noticeType=status-change&mine=true
69
+ */
70
+export const getbkAccountRecord = (payload) =>
71
+fetch({ url: `${API_BK_ACCOUNT}`, payload });

+ 2
- 2
src/subpackages/pages/broker/myMessage/components/messageItem/index.jsx Bestand weergeven

@@ -4,7 +4,7 @@ import { getDateForHumans } from '@/utils/chatDate'
4 4
 import "./index.scss";
5 5
 // const ossFastPath = OSS_FAST_PATH;
6 6
 export default (props) => {
7
-  const { message } = props;
7
+  const { item } = props;
8 8
 
9 9
   return (
10 10
     <view className="Item messageItem">
@@ -13,7 +13,7 @@ export default (props) => {
13 13
       消息提醒
14 14
      </view>
15 15
      <view className="messageItem-bottom"></view>
16
-     {message}
16
+     {`${item.buildingName}项目,您的客户${item.customerName},变更为${item.content}`}
17 17
     </view>
18 18
   );
19 19
 };

+ 2
- 2
src/subpackages/pages/broker/myMessage/index.jsx Bestand weergeven

@@ -58,8 +58,8 @@ export default withLayout((props) => {
58 58
         <view className="PageContent">
59 59
           {PageList.map((item, index) => (
60 60
             <view>
61
-              <MessageTime time="2022-07-31 9:52:14" />
62
-              <MessageItem message="尊贵的李先生,您好!衷心的感谢您对xx地产的 关注和支持!经确认,您于2022年7月22日签署了.尊贵的李先生,您好!衷心的感谢您对xx地产的 关注和支持!经确认,您于2022年7月22日签署了" />
61
+              <MessageTime item={item} time={item.createDate} />
62
+              <MessageItem item={item} />
63 63
             </view>
64 64
           ))}
65 65
 

+ 13
- 15
src/subpackages/pages/broker/myWallet/index.jsx Bestand weergeven

@@ -7,8 +7,7 @@ import { ScrollView, Input, Image, Block, Textarea } from "@tarojs/components";
7 7
 import { getImgURL } from "@/utils/image";
8 8
 import { fetch, uploadFiles } from "@/utils/request";
9 9
 import { UPDATE_USER_INFO, ROLE_CODE } from "@/constants/user";
10
-import { API_EDIT_AGENT, API_UPDATE_PHOTO } from "@/constants/api";
11
-import store from "@/store";
10
+import { queryBrokerRankMine } from "@/services/broker";
12 11
 import WalletList from "./list";
13 12
 
14 13
 import "@/assets/css/iconfont.css";
@@ -16,17 +15,14 @@ import "./index.scss";
16 15
 
17 16
 export default withLayout((props) => {
18 17
   const { person } = props;
18
+  const [activeKey, setActiveKey] = useState(1);
19
+  const [mineInfo, setMineInfo] = useState({});
19 20
 
20
-  // // 获取银行卡列表
21
-  // useEffect(() => {
22
-  //   Taro.showLoading();
23
-
24
-  //   querybkBankCard().then((res) => {
25
-  //     console.log(res, "queryBkAgreement");
26
-  //     setBankCard(res?.records || []);
27
-  //     Taro.hideLoading();
28
-  //   });
29
-  // }, []);
21
+  useEffect(() => {
22
+    queryBrokerRankMine().then((res) => {
23
+      setMineInfo(res);
24
+    });
25
+  }, []);
30 26
 
31 27
   useDidShow(() => {
32 28
     if (!person.idNo) {
@@ -65,7 +61,6 @@ export default withLayout((props) => {
65 61
     });
66 62
   });
67 63
 
68
-  const [activeKey, setActiveKey] = useState(1);
69 64
   return (
70 65
     <view className="Page myWallet">
71 66
       <view className="top">
@@ -86,10 +81,13 @@ export default withLayout((props) => {
86 81
       </view>
87 82
       <view className="middle">
88 83
         <text className="text1">总资产(元)</text>
89
-        <text className="text2">9000.00</text>
84
+        <text className="text2">
85
+          {Number((mineInfo.totalCommission || 0) / 100).toFixed(2)}
86
+        </text>
90 87
       </view>
91 88
       <view className="bottom">
92
-        <WalletList></WalletList>
89
+        <WalletList show={activeKey===1} type={'commission'}></WalletList>
90
+        <WalletList show={activeKey===2} type={'reward'}></WalletList>
93 91
       </view>
94 92
     </view>
95 93
   );

+ 11
- 5
src/subpackages/pages/broker/myWallet/list/Item/index.jsx Bestand weergeven

@@ -1,17 +1,23 @@
1 1
 import { useState, useEffect } from "react";
2
-
2
+import { formatDate } from "@/utils/chatDate";
3 3
 import "./index.scss";
4 4
 
5
-export default () => {
5
+export default (props) => {
6
+  const { item = {} } = props;
6 7
   return (
7 8
     <view className="components myWalletItem">
8 9
       <view className="item-top">
9 10
         <view className="top-text1">邀请好友</view>
10
-        <view className="top-text2">+20</view>
11
+        <view className="top-text2">
12
+          {item.chargeType === -1 ? "-" : "+"}
13
+          {Number((item.charges || 0) / 100).toFixed(2)}
14
+        </view>
11 15
       </view>
12 16
       <view className="item-bottom">
13
-        <view className="bottom-text1">成功邀请张三</view>
14
-        <view className="bottom-text2">2022.01.01</view>
17
+        <view className="bottom-text1">成功邀请{item.customerName}</view>
18
+        <view className="bottom-text2">
19
+          {formatDate(item.createDate, "yyyy.MM.dd")}
20
+        </view>
15 21
       </view>
16 22
     </view>
17 23
   );

+ 86
- 62
src/subpackages/pages/broker/myWallet/list/index.jsx Bestand weergeven

@@ -1,79 +1,103 @@
1
-import { useState, useEffect } from 'react'
2
-import { useSelector } from 'react-redux'
3
-import { useRouter } from '@tarojs/taro'
4
-import { ScrollView } from '@tarojs/components'
5
-
6
-
7
-
8
-import Item from './Item'
9
-
10
-import './index.scss'
11
-
12
-export default function MyCollectForActivity () {
13
-
14
- const router=useRouter()
15
-   const { type,buildingId } = router.params;
16
-
17
-  
18
-
19
-  const [PageList, setPageList] = useState([{},{},{},{},{},{},{},{},{},{}])
20
-  const [IsPull, setPull] = useState(false)
21
-
22
-  const [pageNumber, setPageNumber] = useState(1)
23
-  const [HasNextPage, setHasNextPage] = useState(true)
24
-
1
+import { useState, useEffect } from "react";
2
+import { useSelector } from "react-redux";
3
+import { useRouter } from "@tarojs/taro";
4
+import { ScrollView } from "@tarojs/components";
5
+import { getbkAccountRecord } from "@/services/broker";
6
+
7
+import Item from "./Item";
8
+
9
+import "./index.scss";
10
+
11
+export default function MyCollectForActivity(props) {
12
+  const { show } = props;
13
+  const router = useRouter();
14
+  const { type, buildingId } = router.params;
15
+
16
+  const [PageList, setPageList] = useState([]);
17
+
18
+  const [pageNumber, setPageNumber] = useState(1);
19
+  const [HasNextPage, setHasNextPage] = useState(true);
20
+
21
+  // useEffect(() => {
22
+  //   if(PersonId) {
23
+  //     GetPageList()
24
+  //   }
25
+  // }, [pageNumber, PersonId])
26
+
27
+  // const PageRefresh = () => { // 页面下拉刷新回调
28
+  //   setPull(true)
29
+  // }
30
+
31
+  // const GetPageList = () => {
32
+  //   setHasNextPage(false)
33
+  //   fetch({ url: API_ACTIVITY_LIST, method: 'get', payload: { city: city?.curCity?.id, buildingId, type, pageNumber, pageSize: 10 } }).then((res) => {
34
+  //     setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
35
+  //     setHasNextPage(res.current < res.pages)
36
+  //     setPull(false)
37
+  //   })
38
+  // }
39
+
40
+  // const PageLoadMore = () => { // 页面上拉加载更多
41
+  //   if(HasNextPage) {
42
+  //     setPageNumber(pageNumber + 1)
43
+  //   }
44
+  // }
25 45
 
26 46
   useEffect(() => {
27
-    if(pageNumber) {
28
-    //   GetPageList()
47
+    if (pageNumber) {
48
+      GetPageList();
29 49
     }
30
-  }, [pageNumber])
31
-
32
-  const PageRefresh = () => { // 页面下拉刷新回调
33
-    // setPull(true)
34
-  }
50
+  }, [pageNumber]);
35 51
 
36 52
   const GetPageList = () => {
37
-    setHasNextPage(false)
38
-   
39
-  }
40
-
41
-  const PageLoadMore = () => { // 页面上拉加载更多
42
-    if(HasNextPage) {
43
-      setPageNumber(pageNumber + 1)
53
+    setHasNextPage(false);
54
+    getbkAccountRecord().then((res) => {
55
+      console.log(res, "getbkAccountRecord");
56
+      setPageList(
57
+        pageNumber === 1
58
+          ? res.records || []
59
+          : PageList.concat(res.records || [])
60
+      );
61
+      setHasNextPage(res.current < res.pages);
62
+    
63
+    });
64
+    //   fetch({ url: API_ACTIVITY_LIST, method: 'get', payload: { city: city?.curCity?.id, buildingId, type, pageNumber, pageSize: 10 } }).then((res) => {
65
+    //     setPageList(pageNumber === 1 ? res.records || [] : PageList.concat(res.records || []))
66
+    //     setHasNextPage(res.current < res.pages)
67
+    //     setPull(false)
68
+    //   })
69
+  };
70
+
71
+  const PageLoadMore = () => {
72
+    // 页面上拉加载更多
73
+    if (HasNextPage) {
74
+      setPageNumber(pageNumber + 1);
44 75
     }
45
-  }
46
-
47
-  useEffect(() => { // 下拉刷新触发
48
-    // if (IsPull) {
49
-    //   if(pageNumber === 1) {
50
-    //     GetPageList()
51
-    //   } else {
52
-    //     setPageNumber(1)
53
-    //   }
54
-    // }
55
-  }, [IsPull])
76
+  };
56 77
 
57 78
   return (
58
-    <view className='components myWalletList'>
59
-      <ScrollView scroll-y  refresher-triggered={IsPull}  onscrolltolower={PageLoadMore} refresher-background='#fff'>
60
-        <view className='PageContent'>
61
-          <view className='List'>
62
-            {
63
-              PageList.map((item, index) => (
64
-                <Item data={item} key={`myWalletList-${index}`}></Item>
65
-              ))
66
-            }
79
+    <view
80
+      className="components myWalletList"
81
+      style={{ display: show ? "block" : "none" }}
82
+    >
83
+      <ScrollView
84
+        scroll-y
85
+        onscrolltolower={PageLoadMore}
86
+        refresher-background="#fff"
87
+      >
88
+        <view className="PageContent">
89
+          <view className="List">
90
+            {PageList.map((item, index) => (
91
+              <Item item={item} key={`myWalletList-${index}`}></Item>
92
+            ))}
67 93
           </view>
68 94
 
69 95
           {/* bottom */}
70
-          <view className='PageBottom'>
96
+          <view className="PageBottom">
71 97
             <text>已经到底了~</text>
72 98
           </view>
73 99
         </view>
74
-
75
-
76 100
       </ScrollView>
77 101
     </view>
78
-  )
102
+  );
79 103
 }

+ 2
- 0
src/subpackages/pages/broker/toBeBroker/index.jsx Bestand weergeven

@@ -77,12 +77,14 @@ export default withLayout((props) => {
77 77
         title: "修改成功",
78 78
         icon: "none",
79 79
       });
80
+     
80 81
       dispatch({
81 82
         type: UPDATE_USER_INFO,
82 83
         payload: {
83 84
           name: FormData.name,
84 85
           phone: FormData.phone,
85 86
           idNo: FormData.idNo,
87
+          personType: 'broker' 
86 88
         },
87 89
       });
88 90
       Taro.navigateBack({ delta: 1 });