1002884655 пре 3 година
родитељ
комит
d02ce467c8

+ 2
- 2
config/dev.js Прегледај датотеку

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"https://xlk.njyz.tech"',
7
-    HOST: '"http://127.0.0.1:8081"',
6
+    HOST: '"https://xlk.njyz.tech"',
7
+    // HOST: '"http://127.0.0.1:8081"',
8 8
     WSS_HOST: '"wss://xlk.njyz.tech"',
9 9
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10 10
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',

+ 57
- 0
src/components/ProjectItemCard/index.jsx Прегледај датотеку

@@ -0,0 +1,57 @@
1
+
2
+import Taro from '@tarojs/taro'
3
+import { Image } from '@tarojs/components'
4
+import { getImgURL } from '@/utils/image'
5
+import './style.scss'
6
+
7
+export default (props) => {
8
+  const { Data = {} } = props
9
+
10
+  const goto = (it) => {
11
+    Taro.navigateTo({
12
+      url: `/pages/index/buildingDetail/index?id=${it.buildingId}`
13
+    })
14
+  }
15
+
16
+  return (
17
+    <view className='components ProjectItemCard'>
18
+      <view className='Img' onClick={() => goto(Data)}>
19
+        <Image mode='scaleToFill' src={getImgURL(Data?.buildingListImg?.length ? Data.buildingListImg[0].url : null)} className='centerLabel'></Image>
20
+      </view>
21
+      <view className='Name flex-h' onClick={() => goto(Data)}>
22
+        <view className='flex-item'>
23
+          <text>{Data.buildingName}</text>
24
+        </view>
25
+        <text></text>
26
+        <text>{Data.price || '价格待定'}</text>
27
+      </view>
28
+      <text className='Address' onClick={() => goto(Data)}>{Data.address}</text>
29
+      <view className='Tag' onClick={() => goto(Data)}>
30
+        {
31
+          (Data.buildingTag || []).map(x => x.tagName).slice(0, 6).map((x) => (<text key={x}>{x}</text>))
32
+        }
33
+      </view>
34
+      <view className='Views flex-h' onClick={() => goto(Data)}>
35
+        <view className='flex-item'>
36
+          <text className='iconfont icon-fenxiang'></text>
37
+          <text>{`${Data.shareList?.total || 0} 次分享`}</text>
38
+        </view>
39
+        {
40
+          (Data.uvList?.length || 0) > 0 && (
41
+            <view className='Icons'>
42
+              {
43
+                Data.uvList.map((x) => (
44
+                  <view key={x.uvId}>
45
+                    <Image mode='scaleToFill' src={getImgURL(x.photoOravatar)} className='centerLabel'></Image>
46
+                  </view>
47
+                ))
48
+              }
49
+            </view>
50
+          )
51
+        }
52
+        <text>{`...${Data.uvList?.length || 0}人围观`}</text>
53
+      </view>
54
+      {props.children}
55
+    </view>
56
+  )
57
+}

+ 111
- 0
src/components/ProjectItemCard/style.scss Прегледај датотеку

@@ -0,0 +1,111 @@
1
+.components.ProjectItemCard {
2
+  position: relative;
3
+  overflow: hidden;
4
+  margin-top: 34px;
5
+  > .Img {
6
+    width: 100%;
7
+    padding-bottom: 60%;
8
+    position: relative;
9
+    overflow: hidden;
10
+    background: #eee;
11
+    border-radius: 8px;
12
+    > image {
13
+      width: 100%;
14
+      height: 100%;
15
+    }
16
+  }
17
+  > .Name {
18
+    align-items: center;
19
+    margin-top: 30px;
20
+    > .flex-item {
21
+      margin-right: 10px;
22
+      > text {
23
+        display: block;
24
+        white-space: nowrap;
25
+        font-size: 32px;
26
+        font-weight: bold;
27
+        white-space: nowrap;
28
+        overflow: hidden;
29
+        text-overflow: ellipsis;
30
+      }
31
+    }
32
+    > text {
33
+      font-size: 22px;
34
+      font-weight: bold;
35
+      &:last-child {
36
+        color: #ff0000;
37
+      }
38
+    }
39
+  }
40
+  > .Address {
41
+    display: block;
42
+    font-size: 22px;
43
+    color: #666;
44
+    line-height: 1;
45
+    margin-top: 30px;
46
+    white-space: nowrap;
47
+    overflow: hidden;
48
+    text-overflow: ellipsis;
49
+  }
50
+  > .Tag {
51
+    font-size: 0;
52
+    > text {
53
+      display: inline-block;
54
+      vertical-align: middle;
55
+      font-size: 16px;
56
+      color: #333;
57
+      line-height: 28px;
58
+      padding: 0 20px;
59
+      background: rgba(251, 171, 87, 0.3);
60
+      margin-right: 20px;
61
+      margin-top: 20px;
62
+    }
63
+  }
64
+  > .Views {
65
+    align-items: center;
66
+    margin-top: 20px;
67
+    padding-bottom: 30px;
68
+    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
69
+    > .flex-item {
70
+      font-size: 0;
71
+      white-space: nowrap;
72
+      > text {
73
+        display: inline-block;
74
+        vertical-align: middle;
75
+        font-size: 16px;
76
+        line-height: 1;
77
+        &:first-child {
78
+          font-size: 20px;
79
+          color: #666;
80
+          margin-right: 10px;
81
+        }
82
+      }
83
+    }
84
+    > .Icons {
85
+      font-size: 0;
86
+      white-space: nowrap;
87
+      > view {
88
+        display: inline-block;
89
+        vertical-align: middle;
90
+        width: 24px;
91
+        height: 24px;
92
+        position: relative;
93
+        overflow: hidden;
94
+        border-radius: 100%;
95
+        background: #eee;
96
+        margin-left: -10px;
97
+        &:first-child {
98
+          margin-left: 0;
99
+        }
100
+        > image {
101
+          width: 100%;
102
+          height: 100%;
103
+        }
104
+      }
105
+    }
106
+    > text {
107
+      font-size: 16px;
108
+      margin-left: 6px;
109
+    }
110
+  }
111
+}

+ 1
- 1
src/layout/index.js Прегледај датотеку

@@ -114,7 +114,7 @@ export default (ChildComponent) => (props) => {
114 114
       }
115 115
       <FirstScreen
116 116
         info={screenInfo}
117
-        visible={screenVisible}
117
+        visible={false}
118 118
         onClick={handleScreen}
119 119
         onClose={toggleShowScreen}
120 120
       />

+ 23
- 3
src/pages/chat/chatDetail/index.jsx Прегледај датотеку

@@ -52,22 +52,42 @@ export default function MyCollectForActivity () {
52 52
 
53 53
                         {/* 对方消息(文本) */}
54 54
                         {
55
-                          index % 2 === 0 && !!index &&
55
+                          index % 2 === 0 && index > 2 &&
56 56
                           <view className='Message Left'>
57 57
                             <text>知道了</text>
58 58
                           </view>
59 59
                         }
60 60
 
61
+                        {/* 对方消息(图片) */}
62
+                        {
63
+                          index === 2 &&
64
+                          <view className='Message Left Img'>
65
+                            <view>
66
+                              <Image mode='scaleToFill' src={null}></Image>
67
+                            </view>
68
+                          </view>
69
+                        }
70
+
61 71
                         {/* 我方消息(文本) */}
62 72
                         {
63
-                          index % 2 === 1 &&
73
+                          index % 2 === 1 && index !== 1 &&
64 74
                           <view className='Message Right'>
65 75
                             <text>知道了知道了知道了知道了知道了知道了知道了知道了知道了知道了知道了知道了知道了知道了知道了知道了知道了</text>
66 76
                           </view>
67 77
                         }
68 78
 
79
+                        {/* 我方消息(图片) */}
80
+                        {
81
+                          index === 1 &&
82
+                          <view className='Message Right Img'>
83
+                            <view>
84
+                              <Image mode='scaleToFill' src={null}></Image>
85
+                            </view>
86
+                          </view>
87
+                        }
88
+
69 89
                       </view>
70
-                      
90
+
71 91
                       {/* 我方头像 */}
72 92
                       {
73 93
                         index % 2 === 1 &&

+ 23
- 6
src/pages/chat/chatDetail/index.scss Прегледај датотеку

@@ -72,32 +72,32 @@
72 72
                   position: relative;
73 73
                   overflow: hidden;
74 74
                   padding: 20px 20px 40px;
75
-                  >.Msg {
75
+                  > .Msg {
76 76
                     display: block;
77 77
                     font-size: 32px;
78 78
                     line-height: 44px;
79 79
                     color: #333;
80 80
                   }
81
-                  >.Tips {
81
+                  > .Tips {
82 82
                     color: rgba(0, 0, 0, 0.37);
83 83
                     font-size: 28px;
84 84
                     line-height: 40px;
85 85
                     margin-top: 30px;
86 86
                     display: block;
87
-                    &+view {
87
+                    & + view {
88 88
                       margin-top: 26px;
89 89
                     }
90 90
                   }
91
-                  >view {
91
+                  > view {
92 92
                     font-size: 0;
93 93
                     white-space: nowrap;
94 94
                     margin-top: 20px;
95
-                    >text {
95
+                    > text {
96 96
                       display: inline-block;
97 97
                       vertical-align: middle;
98 98
                       font-size: 28px;
99 99
                       line-height: 40px;
100
-                      color: #02C577;
100
+                      color: #02c577;
101 101
                       margin-left: 20px;
102 102
                       &:first-child {
103 103
                         margin-left: 0;
@@ -122,6 +122,23 @@
122 122
                       color: #333;
123 123
                     }
124 124
                   }
125
+                  &.Left.Img,
126
+                  &.Right.Img {
127
+                    padding: 0;
128
+                    font-size: 0;
129
+                    > view {
130
+                      width: 300px;
131
+                      height: 300px;
132
+                      position: relative;
133
+                      overflow: hidden;
134
+                      display: inline-block;
135
+                      background: rgba(0, 0, 0, 0.03);
136
+                      > image {
137
+                        width: 100%;
138
+                        height: 100%;
139
+                      }
140
+                    }
141
+                  }
125 142
                   > text {
126 143
                     display: inline-block;
127 144
                     color: #fff;

+ 2
- 2
src/pages/index/brandDetail/index.jsx Прегледај датотеку

@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'
2 2
 import withLayout from '@/layout'
3 3
 import Taro from '@tarojs/taro'
4 4
 import { ScrollView, Image } from '@tarojs/components'
5
-import ProjectListItem from '@/components/ProjectListItem/index'
5
+import ProjectItemCard from '@/components/ProjectItemCard/index'
6 6
 import { queryBrandInfo } from '@/services/common';
7 7
 import { getImgURL } from '@/utils/image'
8 8
 import { fetch } from '@/utils/request'
@@ -88,7 +88,7 @@ export default withLayout((props) => {
88 88
             <view className='ProjectList'>
89 89
               {
90 90
                 PageList.map((item, index) => (
91
-                  <ProjectListItem Data={item} key={`ProjectListItem-${index}`}></ProjectListItem>
91
+                  <ProjectItemCard Data={item} key={`ProjectItemCard-${index}`}></ProjectItemCard>
92 92
                 ))
93 93
               }
94 94
             </view>

+ 49
- 0
src/pages/index/mortgageCalculation/components/ShangYe/index.jsx Прегледај датотеку

@@ -0,0 +1,49 @@
1
+import { useState, useEffect } from 'react'
2
+import { Input } from '@tarojs/components'
3
+import './index.scss'
4
+
5
+export default function ShangYe () {
6
+
7
+  const [Years, setYears] = useState([])
8
+  const [CurrentYearsName, setCurrentYearsName] = useState('30年')
9
+  const [CurrentYearsId, setCurrentYearsId] = useState(30)
10
+
11
+  useEffect(() => {
12
+    if (!Years.length) {
13
+      let Arr = []
14
+      for (let n = 30; n > 0; n--) {
15
+        Arr.push({ name: `${n}年`, id: n })
16
+      }
17
+      setYears(Arr)
18
+    }
19
+  }, [Years])
20
+
21
+  return (
22
+    <view className='components ShangYe'>
23
+
24
+      <view className='flex-h'>
25
+        <text>计算方式</text>
26
+        <view className='flex-item'>
27
+
28
+        </view>
29
+      </view>
30
+
31
+      <view className='flex-h'>
32
+        <text>商贷金额</text>
33
+        <view className='flex-item'>
34
+          <Input></Input>
35
+        </view>
36
+        <text>万</text>
37
+      </view>
38
+
39
+      <view className='flex-h'>
40
+        <text>商贷年限</text>
41
+        <view className='flex-item'>
42
+          <picker value={0} range-key='name' range={Years}>{CurrentYearsName}</picker>
43
+        </view>
44
+        <text className='iconfont icon-jiantouright'></text>
45
+      </view>
46
+
47
+    </view>
48
+  )
49
+}

+ 4
- 0
src/pages/index/mortgageCalculation/components/ShangYe/index.scss Прегледај датотеку

@@ -0,0 +1,4 @@
1
+.components.ShangYe {
2
+  position: relative;
3
+  overflow: hidden;
4
+}

+ 39
- 31
src/pages/index/mortgageCalculation/index.jsx Прегледај датотеку

@@ -1,44 +1,52 @@
1
-import React, { useState, useEffect } from 'react'
1
+import { useState, useEffect } from 'react'
2 2
 import withLayout from '@/layout'
3
-import './index.scss'
4 3
 import { ScrollView } from '@tarojs/components'
4
+import ShangYe from './components/ShangYe/index'
5 5
 import '@/assets/css/iconfont.css'
6
+import './index.scss'
6 7
 
7
-export default withLayout((props) => {
8
+export default withLayout(() => {
8 9
 
9
-  // const [PageProps] = useState(props)
10
-  const [PageList, setPageList] = useState(['', '', '', '', '', '', '', '', '', '', '', '', ''])
11
-  const [IsPull, setPull] = useState(false)
12
-  const [PullTimer, setPullTimer] = useState(null)
10
+  const [MenuList] = useState([
11
+    { name: '商业贷款', id: 1 },
12
+    { name: '组合贷款', id: 2 },
13
+    { name: '公积金贷款', id: 3 }
14
+  ])
15
+  const [CurrnetMenuId, setCurrnetMenuId] = useState(1)
13 16
 
14
-  const PageRefresh = () => { // 页面下拉刷新回调
15
-    setPull(true)
16
-  }
17
-
18
-  useEffect(() => { // 下拉刷新触发
19
-    if (IsPull) {
20
-      clearTimeout(PullTimer)
21
-      setPullTimer(setTimeout(() => {
22
-        setPull(false)
23
-      }, 2000))
17
+  const CutMenu = (id) => {
18
+    return () => {
19
+      setCurrnetMenuId(id)
24 20
     }
25
-  }, [IsPull])
21
+  }
26 22
 
27 23
   return (
28
-    <view className='Page mortgageCalculation'>
29
-
30
-      <ScrollView scroll-y={true} refresher-enabled={true} refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
31
-        <view className='PageContent'>
32
-
33
-          房贷计算
34
-
35
-          {/* bottom */}
36
-          <view className='PageBottom'>
37
-            <text>已经到底了~</text>
38
-          </view>
39
-
24
+    <view className='Page mortgageCalculation flex-v'>
25
+
26
+      <view className='MenuList flex-h'>
27
+        {
28
+          MenuList.map((item, index) => (
29
+            <view key={`ListItem${index}`} className='flex-item'>
30
+              <text onClick={CutMenu(item.id)} className={CurrnetMenuId === item.id ? 'active' : ''}>{item.name}</text>
31
+            </view>
32
+          ))
33
+        }
34
+      </view>
35
+
36
+      <view className='flex-item'>
37
+        <view>
38
+          <ScrollView scroll-y>
39
+            <view className='PageContent'>
40
+
41
+              {
42
+                CurrnetMenuId === 1 &&
43
+                <ShangYe></ShangYe>
44
+              }
45
+
46
+            </view>
47
+          </ScrollView>
40 48
         </view>
41
-      </ScrollView>
49
+      </view>
42 50
 
43 51
     </view>
44 52
   )

+ 52
- 6
src/pages/index/mortgageCalculation/index.scss Прегледај датотеку

@@ -1,12 +1,58 @@
1 1
 .Page.mortgageCalculation {
2 2
   background: #fff;
3
-  > scroll-view {
4
-    width: 100%;
5
-    height: 100%;
6
-    .PageContent {
7
-      position: relative;
3
+  >.MenuList {
4
+    position: relative;
5
+    overflow: hidden;
6
+    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
7
+    padding: 0 30px;
8
+    >view {
9
+      text-align: center;
10
+      font-size: 0;
11
+      >text {
12
+        display: inline-block;
13
+        font-size: 30px;
14
+        font-weight: bold;
15
+        line-height: 40px;
16
+        padding: 20px 0 30px;
17
+        position: relative;
18
+        &.active {
19
+          color: #193C83;
20
+          &::after {
21
+            content: '';
22
+            width: 30px;
23
+            height: 4px;
24
+            border-radius: 4px;
25
+            background: #193C83;
26
+            display: block;
27
+            position: absolute;
28
+            left: 50%;
29
+            bottom: 4px;
30
+            transform: translateX(-50%);
31
+            -webkit-transform: translateX(-50%);
32
+          }
33
+        }
34
+      }
35
+    }
36
+  }
37
+  >.flex-item {
38
+    position: relative;
39
+    overflow: hidden;
40
+    >view {
41
+      width: 100%;
42
+      position: absolute;
43
+      left: 0;
44
+      top: 0;
45
+      bottom: 0;
8 46
       overflow: hidden;
9
-      min-height: 100vh;
47
+      > scroll-view {
48
+        width: 100%;
49
+        height: 100%;
50
+        .PageContent {
51
+          position: relative;
52
+          overflow: hidden;
53
+          min-height: 100vh;
54
+        }
55
+      }
10 56
     }
11 57
   }
12 58
 }

+ 4
- 0
src/pages/mine/addCustomer/index.jsx Прегледај датотеку

@@ -148,6 +148,10 @@ export default withLayout((props) => {
148 148
       Taro.showToast({ title: '请选择客户的意向楼盘', icon: 'none' })
149 149
       return false
150 150
     }
151
+    if (CardId === null && type !== 'consultant') {
152
+      Taro.showToast({ title: '请选择内场接待', icon: 'none' })
153
+      return false
154
+    }
151 155
     if (!CanSubmit) {
152 156
       setCanSubmit(true)
153 157
     }

+ 4
- 6
src/pages/mine/mortgageCalc/index.jsx Прегледај датотеку

@@ -1,17 +1,15 @@
1
-import React, { useState, useEffect } from 'react'
1
+import { useState, useEffect } from 'react'
2 2
 import withLayout from '@/layout'
3
-import './index.scss'
4 3
 import { ScrollView, Input } from '@tarojs/components'
5 4
 import '@/assets/css/iconfont.css'
5
+import './index.scss'
6 6
 
7
-export default withLayout((props) => {
8
-
9
-  // const [PageProps] = useState(props)
7
+export default withLayout(() => {
10 8
 
11 9
   return (
12 10
     <view className='Page mortgageCalc'>
13 11
 
14
-      <ScrollView scroll-y={true} refresher-enabled={false} refresher-background='#fff'>
12
+      <ScrollView scroll-y>
15 13
         <view className='PageContent'>
16 14
 
17 15
           <text>房产总价/万元</text>

+ 19
- 19
src/routes.js Прегледај датотеку

@@ -4,6 +4,13 @@ const routes = [
4 4
   /**********************************
5 5
    *  Tab 页面
6 6
    *********************************/
7
+  {
8
+    name: '聊天',
9
+    page: 'pages/chat/chatDetail/index',
10
+    pkg: 'main',
11
+    type: 'other',
12
+    auth: ['phone', 'avatar'],
13
+  },
7 14
   {
8 15
     name: '首页',
9 16
     page: 'pages/index/index',
@@ -39,17 +46,16 @@ const routes = [
39 46
   },
40 47
 
41 48
   // 聊天
42
-  {
43
-    name: '聊天',
44
-    page: 'pages/chat/chatDetail/index',
45
-    pkg: 'main',
46
-    type: 'other',
47
-    auth: ['phone', 'avatar'],
48
-  },
49 49
 
50 50
   // /********************************
51 51
   //  * 项目相关
52 52
   //  *******************************/
53
+  {
54
+    name: '房贷计算',
55
+    page: 'pages/index/mortgageCalculation/index',
56
+    pkg: 'main',
57
+    type: 'building',
58
+  },
53 59
   {
54 60
     name: '定位',
55 61
     page: 'pages/index/location/index',
@@ -225,12 +231,6 @@ const routes = [
225 231
     pkg: 'main',
226 232
     type: 'building',
227 233
   },
228
-  {
229
-    name: '房贷计算',
230
-    page: 'pages/index/mortgageCalculation/index',
231
-    pkg: 'main',
232
-    type: 'building',
233
-  },
234 234
   {
235 235
     name: '课程详情',
236 236
     page: 'pages/index/courseDetail/index',
@@ -253,6 +253,12 @@ const routes = [
253 253
   },
254 254
 
255 255
   // 我的
256
+  {
257
+    name: '房贷计算器',
258
+    page: 'pages/mine/mortgageCalc/index',
259
+    pkg: 'main',
260
+    type: 'mine',
261
+  },
256 262
   {
257 263
     name: '基本信息',
258 264
     page: 'pages/mine/userInfo/index',
@@ -367,12 +373,6 @@ const routes = [
367 373
     pkg: 'main',
368 374
     type: 'mine',
369 375
   },
370
-  {
371
-    name: '房贷计算器',
372
-    page: 'pages/mine/mortgageCalc/index',
373
-    pkg: 'main',
374
-    type: 'mine',
375
-  },
376 376
   {
377 377
     name: '个人主页',
378 378
     page: 'pages/mine/myHomepage/index',