lisenzhou 2 年 前
コミット
551245ef94

+ 0
- 0
ext.json ファイルの表示


+ 27276
- 45
package-lock.json
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 4
- 0
src/app.config.js ファイルの表示

54
       desc: "你的位置信息将用于显示当前区域信息"
54
       desc: "你的位置信息将用于显示当前区域信息"
55
     }
55
     }
56
   },
56
   },
57
+  requiredPrivateInfos: [
58
+		"getLocation"
59
+	]
60
+
57
 }
61
 }

+ 19
- 2
src/pages/index/index.jsx ファイルの表示

42
   // 开屏广告
42
   // 开屏广告
43
   const [screenInfo, screenVisible, toggleShowScreen] = useScreen(
43
   const [screenInfo, screenVisible, toggleShowScreen] = useScreen(
44
     city.id,
44
     city.id,
45
-    person
45
+    person,
46
+    city?.shortname
46
   );
47
   );
47
 
48
 
48
   // 分享
49
   // 分享
84
 
85
 
85
   const handleScreen = () => {
86
   const handleScreen = () => {
86
     toggleShowScreen();
87
     toggleShowScreen();
87
-    if (person.personType === ROLE_CODE.BROKER) {
88
+    const brokerCityList = BROKER_CITY.split(",");
89
+console.log(city.shortname,'city.curCity.shortname')
90
+    if (
91
+      brokerCityList.indexOf(city.shortname) > -1 &&
92
+      (person.personType === ROLE_CODE.BROKER ||
93
+        person.personType === ROLE_CODE.DRIFT ||
94
+        person.personType === ROLE_CODE.CUSTOMER)
95
+    ) {
88
       if (screenInfo.linkPage) {
96
       if (screenInfo.linkPage) {
89
         const queryStr = screenInfo.pageParam ? screenInfo.pageParam : "";
97
         const queryStr = screenInfo.pageParam ? screenInfo.pageParam : "";
90
         Taro.navigateTo({ url: `${screenInfo.linkPage}?${queryStr}` });
98
         Taro.navigateTo({ url: `${screenInfo.linkPage}?${queryStr}` });
92
     } else {
100
     } else {
93
       nav2Target(screenInfo);
101
       nav2Target(screenInfo);
94
     }
102
     }
103
+
104
+    // if (person.personType === ROLE_CODE.BROKER) {
105
+    //   if (screenInfo.linkPage) {
106
+    //     const queryStr = screenInfo.pageParam ? screenInfo.pageParam : "";
107
+    //     Taro.navigateTo({ url: `${screenInfo.linkPage}?${queryStr}` });
108
+    //   }
109
+    // } else {
110
+    //   nav2Target(screenInfo);
111
+    // }
95
   };
112
   };
96
 
113
 
97
   useEffect(() => {
114
   useEffect(() => {

+ 23
- 18
src/subpackages/pages/broker/rankingList/components/list/index.scss ファイルの表示

1
 .component.rankingListList {
1
 .component.rankingListList {
2
+  // height: calc(100% - 200px);
2
   margin-top: 50px;
3
   margin-top: 50px;
4
+  overflow: hidden;
3
   .list-header {
5
   .list-header {
4
     display: flex;
6
     display: flex;
5
     font-size: 26px;
7
     font-size: 26px;
8
     color: #666666;
10
     color: #666666;
9
     margin-bottom: 13px;
11
     margin-bottom: 13px;
10
   }
12
   }
11
-  .list-tbody{
12
-    .list-tbody-row{
13
-      display: flex;
14
-      justify-content: space-around;
15
-      align-items: center;
16
-      padding: 16px 0;
17
-      border-bottom: 1px solid rgba(0, 0, 0, 0.0800);
13
+  scroll-view {
14
+    height: calc(100vh - 1000px);
15
+    .list-tbody {
16
+      .list-tbody-row {
17
+        display: flex;
18
+        justify-content: space-around;
19
+        align-items: center;
20
+        padding: 16px 0;
21
+        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
22
+      }
18
     }
23
     }
19
-  }
20
-   .PageBottom {
21
-    text-align: center;
22
-    font-size: 0;
23
-    white-space: nowrap;
24
-    > text {
25
-      display: inline-block;
26
-      font-size: 28px;
27
-      color: #666;
28
-      line-height: 40px;
29
-      margin: 20px auto;
24
+    .PageBottom {
25
+      text-align: center;
26
+      font-size: 0;
27
+      white-space: nowrap;
28
+      > text {
29
+        display: inline-block;
30
+        font-size: 28px;
31
+        color: #666;
32
+        line-height: 40px;
33
+        margin: 20px auto;
34
+      }
30
     }
35
     }
31
   }
36
   }
32
 }
37
 }

+ 93
- 33
src/subpackages/pages/broker/toBeBroker/index.jsx ファイルの表示

2
 import Taro from "@tarojs/taro";
2
 import Taro from "@tarojs/taro";
3
 import { useSelector } from "react-redux";
3
 import { useSelector } from "react-redux";
4
 import withLayout from "@/layout";
4
 import withLayout from "@/layout";
5
-import { ScrollView, Input, Image, Block, Textarea } from "@tarojs/components";
5
+import {
6
+  ScrollView,
7
+  Input,
8
+  Image,
9
+  Block,
10
+  Textarea,
11
+  Radio
12
+} from "@tarojs/components";
6
 import { getImgURL } from "@/utils/image";
13
 import { getImgURL } from "@/utils/image";
7
 import { fetch, uploadFiles } from "@/utils/request";
14
 import { fetch, uploadFiles } from "@/utils/request";
8
 import { UPDATE_USER_INFO, ROLE_CODE } from "@/constants/user";
15
 import { UPDATE_USER_INFO, ROLE_CODE } from "@/constants/user";
15
 import "./index.scss";
22
 import "./index.scss";
16
 
23
 
17
 //身份证正则
24
 //身份证正则
18
-export const idNumberReg =
19
-  /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
25
+export const idNumberReg = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
20
 
26
 
21
-export default withLayout((props) => {
27
+export default withLayout(props => {
22
   const { dispatch } = store;
28
   const { dispatch } = store;
23
   const { router } = props;
29
   const { router } = props;
24
   const recommendAgent = router?.params?.recommendAgent;
30
   const recommendAgent = router?.params?.recommendAgent;
25
 
31
 
26
-  const user = useSelector((state) => state.user);
32
+  const user = useSelector(state => state.user);
27
   const [UserInfo, setUserInfo] = useState({});
33
   const [UserInfo, setUserInfo] = useState({});
28
   const [FormData, setFormData] = useState({
34
   const [FormData, setFormData] = useState({
29
     name: "",
35
     name: "",
30
     phone: "",
36
     phone: "",
31
-    idNo: "",
37
+    idNo: ""
32
   });
38
   });
33
   const [showAddIdentityCard, setShowAddIdentityCard] = useState(false);
39
   const [showAddIdentityCard, setShowAddIdentityCard] = useState(false);
34
   const [bankCard, setBankCard] = useState([]);
40
   const [bankCard, setBankCard] = useState([]);
41
+  const [checked,setChecked] = useState(false)
35
 
42
 
36
   // 获取银行卡列表
43
   // 获取银行卡列表
37
   useEffect(() => {
44
   useEffect(() => {
38
     Taro.showLoading();
45
     Taro.showLoading();
39
 
46
 
40
-    querybkBankCard().then((res) => {
47
+    querybkBankCard().then(res => {
41
       setBankCard(res?.records || []);
48
       setBankCard(res?.records || []);
42
       Taro.hideLoading();
49
       Taro.hideLoading();
43
     });
50
     });
49
     setFormData({
56
     setFormData({
50
       name: user?.userInfo?.person.name,
57
       name: user?.userInfo?.person.name,
51
       phone: user?.userInfo?.person.phone,
58
       phone: user?.userInfo?.person.phone,
52
-      idNo: user?.userInfo?.person.idNo,
59
+      idNo: user?.userInfo?.person.idNo
53
     });
60
     });
54
   }, [user]);
61
   }, [user]);
55
 
62
 
56
   const Save = () => {
63
   const Save = () => {
57
 
64
 
58
-    if(FormData?.idNo){
59
-      if(!idNumberReg?.test(FormData?.idNo)){
65
+    if(!checked){
66
+      Taro.showToast({
67
+        title: "请输勾选协议",
68
+        icon: "none"
69
+      });
70
+      return;
71
+    }
72
+
73
+    if (FormData?.idNo) {
74
+      if (!idNumberReg?.test(FormData?.idNo)) {
60
         Taro.showToast({
75
         Taro.showToast({
61
           title: "请输入正确的身份证",
76
           title: "请输入正确的身份证",
62
-          icon: "none",
77
+          icon: "none"
63
         });
78
         });
64
-        return
65
-      }  
79
+        return;
80
+      }
66
     }
81
     }
67
 
82
 
68
     fetch({
83
     fetch({
69
       url: `${API_BIND_BROKER}`,
84
       url: `${API_BIND_BROKER}`,
70
       method: "put",
85
       method: "put",
71
-      payload: { ...FormData, bankCardList: bankCard, recommendAgent },
86
+      payload: { ...FormData, bankCardList: bankCard, recommendAgent }
72
     }).then(() => {
87
     }).then(() => {
73
       Taro.showToast({
88
       Taro.showToast({
74
         title: "修改成功",
89
         title: "修改成功",
75
-        icon: "none",
90
+        icon: "none"
76
       });
91
       });
77
 
92
 
78
       dispatch({
93
       dispatch({
81
           name: FormData.name,
96
           name: FormData.name,
82
           phone: FormData.phone,
97
           phone: FormData.phone,
83
           idNo: FormData.idNo,
98
           idNo: FormData.idNo,
84
-          personType: "broker",
85
-        },
99
+          personType: "broker"
100
+        }
86
       });
101
       });
87
       Taro.navigateBack({
102
       Taro.navigateBack({
88
-        delta: 1,
89
-      }).catch((err) => {
103
+        delta: 1
104
+      }).catch(err => {
90
         Taro.switchTab({
105
         Taro.switchTab({
91
-          url: "/pages/index/index",
106
+          url: "/pages/index/index"
92
         });
107
         });
93
       });
108
       });
94
       // login({ path: '', scene: '' })
109
       // login({ path: '', scene: '' })
95
     });
110
     });
96
   };
111
   };
97
 
112
 
98
-  const hangDeleteBankCard = (e) => {
99
-    setBankCard((data) => {
100
-      return data.filter((x) => x.cardNo !== e.cardNo);
113
+  const hangDeleteBankCard = e => {
114
+    setBankCard(data => {
115
+      return data.filter(x => x.cardNo !== e.cardNo);
101
     });
116
     });
102
   };
117
   };
103
 
118
 
104
-  const handDefaultChang = (e) => {
105
-    setBankCard((data) => {
106
-      return data.map((x) => {
119
+  const handDefaultChang = e => {
120
+    setBankCard(data => {
121
+      return data.map(x => {
107
         if (x.cardNo === e.cardNo) {
122
         if (x.cardNo === e.cardNo) {
108
           return {
123
           return {
109
             ...x,
124
             ...x,
110
-            isDefault: 1,
125
+            isDefault: 1
111
           };
126
           };
112
         } else {
127
         } else {
113
           return {
128
           return {
114
             ...x,
129
             ...x,
115
-            isDefault: 0,
130
+            isDefault: 0
116
           };
131
           };
117
         }
132
         }
118
       });
133
       });
119
     });
134
     });
120
   };
135
   };
121
 
136
 
122
-  const handAddBankCard = (e) => {
123
-    if (bankCard.find((x) => x.cardNo === e.cardNo)) {
137
+  const handAddBankCard = e => {
138
+    if (bankCard.find(x => x.cardNo === e.cardNo)) {
124
       Taro.showToast({
139
       Taro.showToast({
125
         title: "存在相同银行卡",
140
         title: "存在相同银行卡",
126
         icon: "none",
141
         icon: "none",
127
-        duration: 2000,
142
+        duration: 2000
128
       });
143
       });
129
     } else {
144
     } else {
130
       setShowAddIdentityCard(false);
145
       setShowAddIdentityCard(false);
131
-      setBankCard((data) => {
146
+      setBankCard(data => {
132
         const isDefault = data?.length === 0 ? 1 : 0;
147
         const isDefault = data?.length === 0 ? 1 : 0;
133
         return [...data, { ...e, isDefault }];
148
         return [...data, { ...e, isDefault }];
134
       });
149
       });
206
             </view>
221
             </view>
207
           </view> */}
222
           </view> */}
208
         </view>
223
         </view>
224
+        {/* <View className={style.agreement}>
225
+          <Radio
226
+            value="选中"
227
+            checked={checked}
228
+            color="#1890ff"
229
+            onClick={() => setChecked(e => !e)}
230
+          ></Radio>
231
+          <View>
232
+            点击勾选表示同意
233
+            <Text
234
+              style={{ color: "#1890ff" }}
235
+              onClick={e => {
236
+                Taro.navigateTo({ url: "/pages/agreement/index?type=user" });
237
+              }}
238
+            >
239
+              《访客平台用户服务协议》
240
+            </Text>
241
+            和
242
+            <Text
243
+              style={{ color: "#1890ff" }}
244
+              onClick={e => {
245
+                Taro.navigateTo({ url: "/pages/agreement/index?type=privacy" });
246
+              }}
247
+            >
248
+              《隐私政策》
249
+            </Text>
250
+          </View>
251
+        </View> */}
252
+        <view className="agreement">
209
 
253
 
254
+          <Radio
255
+            value="选中"
256
+            checked={checked}
257
+            color="#193C83"
258
+            onClick={() => setChecked(e => !e)}
259
+          ></Radio>
260
+          点击勾选表示同意
261
+          <text
262
+            style={{ color: "#193C83" }}
263
+            onClick={e => {
264
+              Taro.navigateTo({ url: "/subpackages/pages/broker/agentRule/index" });
265
+            }}
266
+          >
267
+            《全民营销注册协议》
268
+          </text>
269
+        </view>
210
         <view className="Btn">
270
         <view className="Btn">
211
           <text onClick={Save}>保存</text>
271
           <text onClick={Save}>保存</text>
212
         </view>
272
         </view>
214
 
274
 
215
       {showAddIdentityCard && (
275
       {showAddIdentityCard && (
216
         <AddBankCard
276
         <AddBankCard
217
-          onChange={(e) => handAddBankCard(e)}
277
+          onChange={e => handAddBankCard(e)}
218
           onChanel={() => setShowAddIdentityCard(false)}
278
           onChanel={() => setShowAddIdentityCard(false)}
219
         ></AddBankCard>
279
         ></AddBankCard>
220
       )}
280
       )}

+ 4
- 0
src/subpackages/pages/broker/toBeBroker/index.scss ファイルの表示

65
         }
65
         }
66
       }
66
       }
67
     }
67
     }
68
+    .agreement{
69
+      padding: 0 40px;
70
+      font-size: 28px;
71
+    }
68
     .Btn {
72
     .Btn {
69
       padding: 0 40px;
73
       padding: 0 40px;
70
       position: relative;
74
       position: relative;

+ 18
- 3
src/utils/hooks/useScreen.js ファイルの表示

7
 import { queryExtContents, queryBrokerScreen } from '@/services/common'
7
 import { queryExtContents, queryBrokerScreen } from '@/services/common'
8
 import { ROLE_CODE } from "@/constants/user";
8
 import { ROLE_CODE } from "@/constants/user";
9
 
9
 
10
-export default function useScreen(cityId, person) {
10
+export default function useScreen(cityId, person,shortname) {
11
   const dispatch = useDispatch()
11
   const dispatch = useDispatch()
12
   const [firstScreen, setFirstScreen] = useState()
12
   const [firstScreen, setFirstScreen] = useState()
13
   const cityShow = useSelector(s => s.system.firstScreen.filter(x => x.cityId === cityId)[0])
13
   const cityShow = useSelector(s => s.system.firstScreen.filter(x => x.cityId === cityId)[0])
18
  
18
  
19
   useEffect(() => {
19
   useEffect(() => {
20
     if (cityId && person?.personId) {
20
     if (cityId && person?.personId) {
21
-      if(person.personType === ROLE_CODE.BROKER){
21
+
22
+      // brokerCityList.indexOf(city.curCity.shortname) > -1 &&
23
+      // (person.personType === ROLE_CODE.BROKER ||
24
+      //   person.personType === ROLE_CODE.DRIFT ||
25
+      //   person.personType === ROLE_CODE.CUSTOMER)
26
+      const brokerCityList = BROKER_CITY.split(",");
27
+
28
+      console.log(shortname,brokerCityList.indexOf(shortname) > -1 ,
29
+      (person.personType === ROLE_CODE.BROKER ||
30
+        person.personType === ROLE_CODE.DRIFT ||
31
+        person.personType === ROLE_CODE.CUSTOMER),'pppp')
32
+
33
+      if(brokerCityList.indexOf(shortname) > -1 &&
34
+      (person.personType === ROLE_CODE.BROKER ||
35
+        person.personType === ROLE_CODE.DRIFT ||
36
+        person.personType === ROLE_CODE.CUSTOMER)){
22
         // 全民经纪人的开屏广告
37
         // 全民经纪人的开屏广告
23
         queryBrokerScreen({cityId}).then((res) => {
38
         queryBrokerScreen({cityId}).then((res) => {
24
           const screen = res?.records?.map(x=>({...x,image:x.imageUrl}))[0]
39
           const screen = res?.records?.map(x=>({...x,image:x.imageUrl}))[0]
48
       }
63
       }
49
       
64
       
50
     }
65
     }
51
-  }, [cityId, toggle, person?.personId])
66
+  }, [cityId, toggle, person?.personId,shortname])
52
 
67
 
53
   return [firstScreen, cityShow?.visible, toggle]
68
   return [firstScreen, cityShow?.visible, toggle]
54
 }
69
 }

+ 4054
- 192
yarn.lock
ファイル差分が大きすぎるため省略します
ファイルの表示