lisenzhou 2 年之前
父節點
當前提交
c0fbcd64ef

+ 6059
- 1189
package-lock.json
文件差異過大導致無法顯示
查看文件


+ 1
- 0
package.json 查看文件

@@ -37,6 +37,7 @@
37 37
   "license": "MIT",
38 38
   "dependencies": {
39 39
     "@babel/runtime": "^7.7.7",
40
+    "@tarojs/cli": "^3.2.8",
40 41
     "@tarojs/components": "3.2.8",
41 42
     "@tarojs/react": "3.2.8",
42 43
     "@tarojs/runtime": "3.2.8",

+ 44
- 29
src/pages/index/components/Menu/index.jsx 查看文件

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

+ 4
- 8
src/subpackages/pages/broker/agentRule/index.jsx 查看文件

@@ -9,18 +9,14 @@ const defaultRuleImage =
9 9
 export default withLayout(() => {
10 10
   const [value, setValue] = useState("");
11 11
   useEffect(() => {
12
-    getbkAgentRule().then((res) => {
12
+    getbkAgentRule().then(res => {
13 13
       setValue(res.content);
14 14
     });
15 15
   }, []);
16 16
 
17 17
   return (
18
-    <ScrollView
19
-      className="Page broker-page"
20
-      style={{ height: "100vh" }}
21
-      scrollY
22
-    >
23
-      <Image mode="heightFix" className="img-set" src={defaultRuleImage} />
18
+    <View className="Page broker-page">
19
+      <Image  className="img-set" src={defaultRuleImage} />
24 20
       <View className="broker-padding">
25 21
         <View>
26 22
           <Text>邀请奖励说明</Text>
@@ -29,6 +25,6 @@ export default withLayout(() => {
29 25
           </View>
30 26
         </View>
31 27
       </View>
32
-    </ScrollView>
28
+    </View>
33 29
   );
34 30
 });

+ 25
- 12
src/subpackages/pages/broker/agentRule/index.scss 查看文件

@@ -1,26 +1,39 @@
1
-.Page.broker-page{
2
-  .img-set{
3
-     width: 100vw;
4
-     display:block;
5
-    }
6
-  .broker-padding{
7
-    background-color: #49A8C1;
1
+.Page.broker-page {
2
+  height: 100vh;
3
+
4
+  .img-set {
5
+    width: 100vw;
6
+    height: 459px;
7
+    display: block;
8
+  }
9
+  .broker-padding {
10
+    background-color: #49a8c1;
8 11
     padding: 6rpx 30rpx 24rpx 30rpx;
9
-    >view{
12
+    overflow: hidden;
13
+    flex-shrink: 0;
14
+    height: calc(100% - 459px - 30px);
15
+    > view {
16
+      height: calc(100% - 120rpx);
10 17
       padding: 39rpx 48rpx 80rpx 42rpx;
11 18
       font-size: 34rpx;
12 19
       border-radius: 40rpx;
13
-      background-color: #FFF;
14
-      >text{
20
+      background-color: #fff;
21
+      overflow: auto;
22
+      display: flex;
23
+      flex-direction: column;
24
+      overflow: auto;
25
+      > text {
15 26
         font-family: DengXian;
16 27
         font-weight: 400;
17 28
         color: #333333;
18 29
         margin: 60rpx 194rpx 0 201rpx;
19 30
       }
20
-      >view{
31
+      > view {
21 32
         margin-top: 39rpx;
22 33
       }
23 34
     }
35
+    > view::-webkit-scrollbar {
36
+      display: none;
37
+    }
24 38
   }
25 39
 }
26
-

+ 1
- 1
src/subpackages/pages/broker/invitation/poster/index.jsx 查看文件

@@ -76,7 +76,7 @@ export default (props) => {
76 76
       )}
77 77
 
78 78
       <View style={{ width: "1px", height: "1px",overflow:'hidden' }}>
79
-        <Canvas type="2d" id="canvas-broker-poster" />
79
+        <Canvas type="2d" id="canvas-broker-poster" style={{width: '1px',height:'1px'}}/>
80 80
       </View>
81 81
     </>
82 82
   );

+ 10755
- 10573
yarn.lock
文件差異過大導致無法顯示
查看文件