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

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


+ 1
- 0
package.json 查看文件

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

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

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

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

9
 export default withLayout(() => {
9
 export default withLayout(() => {
10
   const [value, setValue] = useState("");
10
   const [value, setValue] = useState("");
11
   useEffect(() => {
11
   useEffect(() => {
12
-    getbkAgentRule().then((res) => {
12
+    getbkAgentRule().then(res => {
13
       setValue(res.content);
13
       setValue(res.content);
14
     });
14
     });
15
   }, []);
15
   }, []);
16
 
16
 
17
   return (
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
       <View className="broker-padding">
20
       <View className="broker-padding">
25
         <View>
21
         <View>
26
           <Text>邀请奖励说明</Text>
22
           <Text>邀请奖励说明</Text>
29
           </View>
25
           </View>
30
         </View>
26
         </View>
31
       </View>
27
       </View>
32
-    </ScrollView>
28
+    </View>
33
   );
29
   );
34
 });
30
 });

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

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
     padding: 6rpx 30rpx 24rpx 30rpx;
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
       padding: 39rpx 48rpx 80rpx 42rpx;
17
       padding: 39rpx 48rpx 80rpx 42rpx;
11
       font-size: 34rpx;
18
       font-size: 34rpx;
12
       border-radius: 40rpx;
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
         font-family: DengXian;
26
         font-family: DengXian;
16
         font-weight: 400;
27
         font-weight: 400;
17
         color: #333333;
28
         color: #333333;
18
         margin: 60rpx 194rpx 0 201rpx;
29
         margin: 60rpx 194rpx 0 201rpx;
19
       }
30
       }
20
-      >view{
31
+      > view {
21
         margin-top: 39rpx;
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
       )}
76
       )}
77
 
77
 
78
       <View style={{ width: "1px", height: "1px",overflow:'hidden' }}>
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
       </View>
80
       </View>
81
     </>
81
     </>
82
   );
82
   );

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