Your Name 3 years ago
parent
commit
13c607a8dc

+ 1
- 1
config/dev.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     HOST: '"https://xlk.njyz.tech"',
6
     HOST: '"https://xlk.njyz.tech"',
7
     // HOST: '"http://127.0.0.1:8081"',
7
     // HOST: '"http://127.0.0.1:8081"',
8
-    WSS_HOST: '"ws://127.0.0.1:8081"',
8
+    WSS_HOST: '"ws://xlk.njyz.tech"',
9
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
9
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
11
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
11
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',

+ 3
- 2
src/components/Cell/style.scss View File

3
   width: 100%;
3
   width: 100%;
4
   position: relative;
4
   position: relative;
5
   display: flex;
5
   display: flex;
6
-  border-bottom: 1px solid #eee;
7
-  padding: 0.5em 1em;
6
+  padding: 32px 1em;
8
   box-sizing: border-box;
7
   box-sizing: border-box;
8
+  font-size: 27px;
9
+  color: #000;
9
 
10
 
10
   &-header, &-footer {
11
   &-header, &-footer {
11
     flex: none;
12
     flex: none;

+ 6
- 2
src/components/Tabs/index.jsx View File

24
               <View
24
               <View
25
                 key={item}
25
                 key={item}
26
                 id={`${idPreRef.current}-${index}`}
26
                 id={`${idPreRef.current}-${index}`}
27
-                className={`yz-tabs-tab ${activeClass}`}
27
+                className='yz-tabs-tab'
28
                 onClick={() => handleTabClick(index)}
28
                 onClick={() => handleTabClick(index)}
29
-              >{item}</View>
29
+              >
30
+                <view className={`yz-tabs-tab-title ${activeClass}`}>
31
+                  {item}
32
+                </view>
33
+              </View>
30
             )
34
             )
31
           })
35
           })
32
         }
36
         }

+ 16
- 11
src/components/Tabs/style.scss View File

2
   width: 100%;
2
   width: 100%;
3
   background: #fff;
3
   background: #fff;
4
   position: relative;
4
   position: relative;
5
-  border-top: 1px solid #eee;
6
-  border-bottom: 1px solid #eee;
5
+  // border-top: 1px solid #eee;
6
+  // border-bottom: 1px solid #eee;
7
   box-sizing: border-box;
7
   box-sizing: border-box;
8
 
8
 
9
   .yz-tabs-nav {
9
   .yz-tabs-nav {
14
   .yz-tabs-tab {
14
   .yz-tabs-tab {
15
     text-align: center;
15
     text-align: center;
16
     flex: auto;
16
     flex: auto;
17
-    padding: 0.5em 0;
18
     outline: none;
17
     outline: none;
19
     box-sizing: border-box;
18
     box-sizing: border-box;
20
     min-width: 20%;
19
     min-width: 20%;
21
-    border-bottom-width: 4px;
22
-    border-bottom-style: solid;
23
-    border-bottom-color: transparent;
24
 
20
 
25
-    & + .yz-tabs-tab {
26
-      border-left: 1px solid #eee;
27
-    }
21
+    .yz-tabs-tab-title {
22
+      display: inline-block;
23
+      border-bottom-width: 4px;
24
+      border-bottom-style: solid;
25
+      border-bottom-color: transparent;
26
+      font-size: 30px;
27
+      letter-spacing: 0.1em;
28
+      padding: .9em 0;
29
+      color: #777;
28
 
30
 
29
-    &.active {
30
-      border-bottom-color: #193C83;
31
+      &.active {
32
+        border-bottom-color: #193C83;
33
+        color: #193C83;
34
+        font-weight: 700;
35
+      }      
31
     }
36
     }
32
   }
37
   }
33
 }
38
 }

+ 4
- 0
src/pages/chat/chatDetail/index.jsx View File

117
         setReceiver(res)
117
         setReceiver(res)
118
         getChatHistory({ pageNumber: 1 })
118
         getChatHistory({ pageNumber: 1 })
119
       })
119
       })
120
+
121
+      const unsubsribe = im.listen((message) => {
122
+
123
+      })
120
     } else {
124
     } else {
121
       Taro.showToast({
125
       Taro.showToast({
122
         title: '无聊天对象,请退出重试',
126
         title: '无聊天对象,请退出重试',

+ 5
- 5
src/pages/mine/mortgageCalc/components/Result.jsx View File

44
   const [summary, setSummary] = useState({})
44
   const [summary, setSummary] = useState({})
45
   const [list, setList] = useState([])
45
   const [list, setList] = useState([])
46
 
46
 
47
-  const tipText = isMixed ? '贷款总额' : (current === 1 ? '每月还款' : '首月还款')
47
+  const tipText = current === 1 ? '每月还款' : '贷款总额'
48
 
48
 
49
   useEffect(() => {
49
   useEffect(() => {
50
     if (!dataSource[0] && !dataSource[1]) return;
50
     if (!dataSource[0] && !dataSource[1]) return;
91
       <view className='header-nav'>
91
       <view className='header-nav'>
92
         <InnerTabs tabs={tabs} current={current} onChange={setCurrent} />
92
         <InnerTabs tabs={tabs} current={current} onChange={setCurrent} />
93
         <view className='header-close' onClick={onClose}>
93
         <view className='header-close' onClick={onClose}>
94
-          <text>×</text>
94
+          <text>重新计算</text>
95
         </view>
95
         </view>
96
       </view>
96
       </view>
97
 
97
 
98
       <view className='summary-card'>
98
       <view className='summary-card'>
99
         <view className='tip'>{tipText}</view>
99
         <view className='tip'>{tipText}</view>
100
         <view className='money'>
100
         <view className='money'>
101
-          {isMixed ? Number(summary.money/10000).toFixed(0) : Number(summary.moneyOfFirstMonth||0).toFixed(2)}
102
-          <text className='small'>{isMixed ? '万元' : '元'}</text>
101
+          {current !== 1 ? Number(summary.money/10000).toFixed(0) : Number(summary.moneyOfFirstMonth||0).toFixed(2)}
102
+          <text className='small'>{current !== 1 ? '万元' : '元'}</text>
103
         </view>
103
         </view>
104
         <view className='footer flex'>
104
         <view className='footer flex'>
105
           <view>
105
           <view>
111
             <view className='label'>还款总额</view>
111
             <view className='label'>还款总额</view>
112
           </view>
112
           </view>
113
           {
113
           {
114
-            !isMixed && (
114
+            current === 1 && (
115
               <view>
115
               <view>
116
                 <view>{`${Number(summary.money/10000).toFixed(0)}万`}</view>
116
                 <view>{`${Number(summary.money/10000).toFixed(0)}万`}</view>
117
                 <view className='label'>贷款金额</view>
117
                 <view className='label'>贷款金额</view>

+ 22
- 17
src/pages/mine/mortgageCalc/components/style.scss View File

1
 .calc-result {
1
 .calc-result {
2
   .header-nav {
2
   .header-nav {
3
     display: flex;
3
     display: flex;
4
+    align-items: center;
4
 
5
 
5
     & > view {
6
     & > view {
6
       &:first-child {
7
       &:first-child {
10
 
11
 
11
     .header-close {
12
     .header-close {
12
       flex: none;
13
       flex: none;
13
-      width: 3em;
14
-      text-align: center;
14
+      width: 150px;
15
       box-sizing: border-box;
15
       box-sizing: border-box;
16
-      border: 1px solid #eee;
17
-      line-height: 100%;
18
-      vertical-align: middle;
19
 
16
 
20
       text {
17
       text {
21
-        font-size: 2em;
22
-        line-height: 1.1em;
23
         display: inline-block;
18
         display: inline-block;
19
+        font-size: 24px;
20
+        color: #fff;
21
+        line-height: 2em;
22
+        height: 2em;
23
+        border-top-left-radius: 24px;
24
+        border-bottom-left-radius: 24px;
25
+        padding: 0 1em;
26
+        background: #193c83;
24
       }
27
       }
25
     }
28
     }
26
   }
29
   }
27
 
30
 
28
   .summary-card {
31
   .summary-card {
29
-    color: #fff;
30
     background: #193C83;
32
     background: #193C83;
31
     border-radius: 24px;
33
     border-radius: 24px;
32
     box-sizing: border-box;
34
     box-sizing: border-box;
34
     margin: 1em;
36
     margin: 1em;
35
 
37
 
36
     .tip {
38
     .tip {
37
-      font-size: .8em;
39
+      font-size: 24px;
40
+      color: #fff;
38
     }
41
     }
39
 
42
 
40
     .money {
43
     .money {
41
-      font-size: 1.8em;
44
+      font-size: 60px;
45
+      color: #fff;
42
       line-height: 2.0em;
46
       line-height: 2.0em;
43
 
47
 
44
       .small {
48
       .small {
51
 
55
 
52
     .footer {
56
     .footer {
53
       & > view {
57
       & > view {
58
+        font-size: 24px;
54
         color: #fff;
59
         color: #fff;
55
-        font-size: .8em;
56
         text-align: center;
60
         text-align: center;
57
         line-height: 1.6em;
61
         line-height: 1.6em;
58
       }
62
       }
59
 
63
 
60
       .label {
64
       .label {
61
-        color: rgba(255,255,255, .6);
65
+        color: #D3D3D3;
62
       }
66
       }
63
     }
67
     }
64
   }
68
   }
71
   }
75
   }
72
 
76
 
73
   .result-scroll {
77
   .result-scroll {
74
-    height: calc(100vh - 560rpx);
78
+    height: calc(100vh - 600rpx);
75
   }
79
   }
76
 
80
 
77
   .result-list {
81
   .result-list {
79
     padding: 0 1em;
83
     padding: 0 1em;
80
 
84
 
81
     .result-list-title {
85
     .result-list-title {
82
-      background:rgba(25,60,131, .1) !important;
86
+      background:rgba(26,60,131, .12) !important;
83
     }
87
     }
84
 
88
 
85
     .result-list-item {
89
     .result-list-item {
86
-      font-size: .9em;
87
-      line-height: 2.4em;
90
+      font-size: 24px;
91
+      line-height: 68px;
88
       text-align: center;
92
       text-align: center;
93
+      color: #353535;
89
 
94
 
90
       &:nth-of-type(odd) {
95
       &:nth-of-type(odd) {
91
         background: #fff;
96
         background: #fff;
92
       }
97
       }
93
       &:nth-of-type(even) {
98
       &:nth-of-type(even) {
94
-        background:rgba(25,60,131, .1);
99
+        background:rgba(26,60,131, 0.12);
95
       }
100
       }
96
     }
101
     }
97
   }
102
   }

+ 23
- 21
src/pages/mine/mortgageCalc/index.jsx View File

1
 import { useState, useEffect } from 'react'
1
 import { useState, useEffect } from 'react'
2
 import Taro from '@tarojs/taro'
2
 import Taro from '@tarojs/taro'
3
 import withLayout from '@/layout'
3
 import withLayout from '@/layout'
4
-import { RadioGroup, Label, Radio } from '@tarojs/components'
4
+import { ScrollView } from '@tarojs/components'
5
 import Tabs from '@/components/Tabs'
5
 import Tabs from '@/components/Tabs'
6
-import Cell from '@/components/Cell'
7
 import GJJForm from './components/GJJForm'
6
 import GJJForm from './components/GJJForm'
8
 import SYForm from './components/SYForm'
7
 import SYForm from './components/SYForm'
9
 import Result from './components/Result'
8
 import Result from './components/Result'
84
           <Label style={{marginLeft: '1em'}}><Radio value='debj' /> 等额本金</Label>
83
           <Label style={{marginLeft: '1em'}}><Radio value='debj' /> 等额本金</Label>
85
         </RadioGroup>
84
         </RadioGroup>
86
       </Cell> */}
85
       </Cell> */}
87
-      {
88
-        current !== 2 && (
89
-          <view className='container'>
90
-            {current === 3 && <view className='title'>商业贷款</view>}
91
-            <SYForm onChange={setSYFormData} />
92
-          </view>
93
-        )
94
-      }
95
-      {
96
-        current !== 1 && (
97
-          <view className='container'>
98
-            {current === 3 && <view className='title'>公积金贷款</view>}
99
-            <GJJForm onChange={setGJJFormData} />
100
-          </view>
101
-        )
102
-      }
103
-      <view className='Btn'>
104
-        <button loading={loading} onClick={handleCalc}>开始计算</button>
105
-      </view>
86
+      <ScrollView scrollY className='page-scroll' style={current === 3 ? { height: 'calc(100vh - 100rpx)' } : {}}>
87
+        {current === 3 && <view className='title'>商业贷款</view>}
88
+        {
89
+          current !== 2 && (
90
+            <view className='container'>
91
+              <SYForm onChange={setSYFormData} />
92
+            </view>
93
+          )
94
+        }
95
+
96
+        {current === 3 && <view className='title'>公积金贷款</view>}
97
+        {
98
+          current !== 1 && (
99
+            <view className='container'>
100
+              <GJJForm onChange={setGJJFormData} />
101
+            </view>
102
+          )
103
+        }
104
+        <view className='Btn'>
105
+          <button loading={loading} onClick={handleCalc}>开始计算</button>
106
+        </view>
107
+      </ScrollView>
106
       <page-modal show={visible} position='bottom'>
108
       <page-modal show={visible} position='bottom'>
107
         <Result dataSource={result} isMixed={current === 3} onClose={() => setVisible(false)} />
109
         <Result dataSource={result} isMixed={current === 3} onClose={() => setVisible(false)} />
108
       </page-modal>
110
       </page-modal>

+ 6
- 2
src/pages/mine/mortgageCalc/index.scss View File

4
   width: 100%;
4
   width: 100%;
5
 
5
 
6
   .container {
6
   .container {
7
-    margin-top: 1em;
7
+    margin-top: 40px;
8
+    padding: 20px 0;
8
     background: #fff;
9
     background: #fff;
9
   }
10
   }
10
 
11
 
11
   .title {
12
   .title {
13
+    margin-top: 60px;
12
     padding-left: 1em;
14
     padding-left: 1em;
13
-    padding-bottom: .5em;
14
     background: #fafafa;
15
     background: #fafafa;
16
+    font-size: 30px;
17
+    font-weight: 700;
15
   }
18
   }
16
 
19
 
17
   slider {
20
   slider {
20
   }
23
   }
21
 
24
 
22
   .Btn {
25
   .Btn {
26
+    margin-top: 25px;
23
     padding: 40px;
27
     padding: 40px;
24
     position: relative;
28
     position: relative;
25
     overflow: hidden;
29
     overflow: hidden;