Bladeren bron

raiseMoney

xujing 5 jaren geleden
bovenliggende
commit
60a31bfe63

+ 2
- 2
project.config.json Bestand weergeven

@@ -48,8 +48,8 @@
48 48
 			"list": [
49 49
 				{
50 50
 					"id": -1,
51
-					"name": "pages/raiseProfile/index",
52
-					"pathName": "onlineSelling/pages/raiseProfile/index",
51
+					"name": "pages/raiseMoney/index",
52
+					"pathName": "onlineSelling/pages/raiseMoney/index",
53 53
 					"query": "",
54 54
 					"scene": null
55 55
 				},

BIN
src/onlineSelling/assets/close.png Bestand weergeven


+ 1
- 1
src/onlineSelling/components/ConsultantItem/index.js Bestand weergeven

@@ -11,7 +11,7 @@ export default function CConsultantItem(props) {
11 11
       <Image src={data.photo || data.avatar} className='avatar' ></Image>
12 12
       <View className="name">{data.name}<Image src={require('@/assets/person/card.png')} className='card' ></Image>{type == 'raiseProfile' && <View className="tip">您的专属置业顾问</View>}</View>
13 13
       <View className="phone">{data.phone}</View>
14
-      {type != 'raiseProfile' && <View className="home">主页</View>}
14
+      {!type && <View className="home">主页</View>}
15 15
       {type == 'raiseProfile' && <View className="contact">联系我<Text className="right-icon"></Text></View>}
16 16
     </View >
17 17
   );

+ 12
- 8
src/onlineSelling/components/RaiseCard/index.js Bestand weergeven

@@ -3,6 +3,7 @@ import { transferImage } from '@/utils/tools'
3 3
 import dayjs from 'dayjs'
4 4
 import emptyImg from '@/assets/empty.png'
5 5
 import copyImg from '../../assets/copy.png'
6
+import closeImg from '../../assets/close.png'
6 7
 
7 8
 import './index.scss'
8 9
 
@@ -40,10 +41,10 @@ export default function HouseCard(props) {
40 41
       })
41 42
     }
42 43
   }
43
-  const copyData = (e) =>{
44
+  const copyData = (e) => {
44 45
     e.stopPropagation()
45 46
     Taro.setClipboardData({
46
-      data:code,
47
+      data: code,
47 48
       onSuccess: (() => { }),
48 49
     })
49 50
   }
@@ -55,16 +56,19 @@ export default function HouseCard(props) {
55 56
         }
56 57
       </View>
57 58
       <View className="body" onClick={toHouseDetail}>
58
-        {props.type != 'raiseProfile' && props.type != 'houseResource' && <View className={status == '1' ? 'raised badge' : status == '2' ? 'unraise badge' : 'badge'}>{status == '1' ? '已缴费' : '未缴费'}</View>}
59
+        {props.type == 'raiseMoney' && <Image src={closeImg} className="close-img"></Image>}
60
+        {!props.type && <View className={status == '1' ? 'raised badge' : status == '2' ? 'unraise badge' : 'badge'}>{status == '1' ? '已缴费' : '未缴费'}</View>}
59 61
         {(props.type == 'raiseProfile' || props.type == 'houseResource') && <View style="color:#FF3C3C" className={status == '1' ? 'raised badge' : status == '2' ? 'unraise badge' : 'badge'}>{status == '1' ? '已锁给我' : '未缴费'}</View>}
60
-        {props.type == 'raiseProfile' && <View style="color:#BB9C79;font-size:30rpx;margin-top:-20rpx">{apartmentName}</View>}
62
+        {props.type == 'raiseProfile' || props.type == 'raiseMoney' && <View style={props.type == 'raiseMoney' ? 'color:#BB9C79;font-size:30rpx' : 'color:#BB9C79;font-size:30rpx;margin-top:-20rpx'}>{apartmentName}</View>}
63
+        {props.type == 'raiseMoney' && <View className="red-price">现价{Number(price) + 0}万</View>}
61 64
         {props.type == 'houseResource' && <View style="color:#BB9C79;font-size:28rpx;margin:-40rpx 0 26rpx 0">未锁定/已锁定</View>}
62 65
         <View className="title">{title}</View>
63
-        {props.type != 'raiseProfile' && props.type != 'houseResource' && <View className="meta">{showDT}</View>}
66
+        {!props.type && <View className="meta">{showDT}</View>}
64 67
         {props.type == 'raiseProfile' && <View className="price">现价<Text className="red">{Number(price) + 0}</Text>万</View>}
65
-        {props.type == 'raiseProfile' && <View className="area">建筑面积约<Text className="red">{area1}m²</Text></View>}
66
-        {props.type == 'raiseProfile' && <View className="area">使用面积约<Text className="red">{area2}m²</Text></View>}
67
-        {props.type == 'houseResource' && <View className="price" style="margin-top:26rpx">房源编号:{code}
68
+
69
+        {props.type == 'raiseProfile' || props.type == 'raiseMoney' && <View className="area">建筑面积约<Text className="red">{area1}m²</Text></View>}
70
+        {props.type == 'raiseProfile' || props.type == 'raiseMoney' && <View className="area">使用面积约<Text className="red">{area2}m²</Text></View>}
71
+        {props.type == 'houseResource' && <View className="house-code" style="margin-top:26rpx">房源编号:{code}
68 72
           <Image src={copyImg} className="copy-img" onClick={copyData}></Image>
69 73
         </View>}
70 74
       </View>

+ 20
- 1
src/onlineSelling/components/RaiseCard/index.scss Bestand weergeven

@@ -28,7 +28,14 @@
28 28
     position: relative;
29 29
     line-height: 40px;
30 30
     padding: 16px;
31
-
31
+    .close-img{
32
+      width: 46px;
33
+      height: 46px;
34
+      padding: 10px;
35
+      position: absolute;
36
+      right: 10px;
37
+      top: 10px;
38
+    }
32 39
     .badge {
33 40
       font-size: 30px;
34 41
       color: #999;
@@ -58,12 +65,24 @@
58 65
       color: #333;
59 66
       display: flex;
60 67
       align-items: center;
68
+    }
69
+    .house-code{
70
+      font-size: 28px;
71
+      color: #333;
72
+      display: flex;
73
+      align-items: center;
61 74
       justify-content: space-between;
62 75
     }
63 76
     .area{
64 77
       font-size: 24px;
65 78
       color: #333;
66 79
     }
80
+    .red-price{
81
+      color: #FF3C3C;
82
+      font-weight: 900;
83
+      line-height: 2;
84
+      font-size: 24px;
85
+    }
67 86
     .red{
68 87
       color: #FF3C3C;
69 88
       margin: 0 6px;

+ 165
- 15
src/onlineSelling/pages/raiseMoney/index.js Bestand weergeven

@@ -1,30 +1,180 @@
1 1
 import Taro, { Component } from '@tarojs/taro'
2
-import { View } from '@tarojs/components'
2
+import { View, Block } from '@tarojs/components'
3 3
 import './index.scss'
4
+import RaiseCard from '../../components/RaiseCard'
5
+import Statement from '../../components/Statement'
6
+import ConsultantItem from '../../components/ConsultantItem/index'
4 7
 
5 8
 export default class raiseMoney extends Component {
6 9
   config = {
7 10
     navigationBarTitleText: '认筹确认'
8 11
   }
12
+  state = {
13
+    current: 3,
14
+    houseList: [
15
+      {
16
+        apartmentName: 'A户型',
17
+        blockName: "1栋",
18
+        buildingId: "9f021a59b2a714822894c23ccca8c2db",
19
+        buildingImgList: null,
20
+        buildingName: "万科安平园舍",
21
+        createDate: "2020-02-27T16:31:56",
22
+        floorName: "1楼",
23
+        houseId: "820",
24
+        preselectionRecordId: 205,
25
+        price: "111.00000000",
26
+        roomName: "1户",
27
+        saleBatchStatus: "1",
28
+        status: 1,
29
+        termname: "1期",
30
+        unitName: "2单元",
31
+        area1: '290',
32
+        area2: '270',
33
+        code: '2-09876545456'
34
+      }, {
35
+        apartmentName: 'B户型',
36
+        blockName: "1栋",
37
+        buildingId: "9f021a59b2a714822894c23ccca8c2db",
38
+        buildingImgList: null,
39
+        buildingName: "凤翔新城",
40
+        createDate: "2020-02-27T16:31:56",
41
+        floorName: "1楼",
42
+        houseId: "820",
43
+        preselectionRecordId: 206,
44
+        price: "111.00000000",
45
+        roomName: "1户",
46
+        saleBatchStatus: "1",
47
+        status: 1,
48
+        termname: "1期",
49
+        unitName: "2单元",
50
+        area1: '290',
51
+        area2: '270',
52
+        code: '2-09876545333'
53
+      },
54
+    ]
9 55
 
10
-  render() {
56
+  }
57
+  renderTop() {
58
+    const tabList = [
59
+      { title: '确认房源', value: 0 },
60
+      { title: '阅读协议', value: 1 },
61
+      { title: '填写资料', value: 2 },
62
+      { title: '缴纳定金', value: 3 },
63
+      { title: '认筹结果', value: 4 },
64
+    ]
65
+    const { current } = this.state
11 66
 
12 67
     return (
13
-      <View className="raiseMoney">
14
-        <View className="top-con">
15
-          <View>确认房源</View>
16
-          <View className="right-icon1" ></View>
17
-          <View>阅读协议</View>
18
-          <View className="right-icon1" ></View>
19
-          <View>填写资料</View>
20
-          <View className="right-icon1" ></View>
21
-          <View>缴纳定金</View>
22
-          <View className="right-icon1" ></View>
23
-          <View>认筹结果</View>
24
-          
25
-       
68
+      <View className="top-con">
69
+        {tabList.map((item, index) => (
70
+          <View className="flex" key={index + 'top'} style={current == item.value ? 'color:#333;font-weight:700' : ''}>
71
+            {item.title}
72
+            {item.value != 4 &&
73
+              <View className="flex" style="margin:0 12rpx 0 4rpx">
74
+                <View className='right-icon'></View>
75
+                <View className='right-icon icon2'></View>
76
+                <View className='right-icon icon3'></View>
77
+              </View>
78
+            }
79
+
80
+          </View>
81
+        ))
82
+        }
83
+      </View>
84
+    )
85
+  }
86
+  renderHouse() {
87
+    const { houseList } = this.state
88
+    return (
89
+      <ScrollView scrollY className="container">
90
+        {
91
+          houseList.map(item => (
92
+            <View key={item.preselectionRecordId} >
93
+              <RaiseCard type="raiseMoney" summary={item} />
94
+            </View>
95
+          )
96
+          )
97
+        }
98
+        <View className="addhouse">从<Text style="color:#BB9C79">预选记录</Text>中添加其他房源</View>
99
+        <View className="addhouse">从<Text style="color:#F3B82E">房源列表</Text>中添加其他房源</View>
100
+        <Statement style="margin-top:80rpx" />
101
+      </ScrollView>
102
+    )
103
+  }
104
+  renderAgreement() {
105
+    return (
106
+      <ScrollView scrollY className="container3">
107
+        <View className="agent-box">
108
+          <View className="center-title">线上选房协议</View>
109
+          <View className="title">chgissvdsghuytredsvbnhjuytrewdsvbnmjkuytrewscvbnmkloiu6543ewsdcvbnmjkoiu65rewsazxcv bnmjytresazx nmjytredscvbnm,kuytrdszx nmjkuy6redsvbnjkoi675erdsfghjklio765ewdxc mjkuytredsxcvbnmki56resaxzc bnjku5redsx bmkju65eszx bnhjyu63wqazXCVHJKLOPIU7TR4QW	W345Y789P,KNB CXZaq1wet5uyjnhbv cxazQWETU67JM 	q1e3tyujm bncxzaa	QE35HYUJNB VCaegtyujm,n vcxzawset5hyujm bncvxza</View>
110
+        </View>
111
+      </ScrollView >
112
+    )
113
+  }
114
+  renderProfile() {
115
+    const item = { name: '哈哈哈1', phone: '138541369741', avatar: 'http://img5.imgtn.bdimg.com/it/u=3299138037,391931528&fm=26&gp=0.jpg' }
116
+
117
+    return (
118
+      <ScrollView scrollY className="container2">
119
+        <View className="profile-box">
120
+          <View className="title">我的个人信息</View>
121
+          <View style="font-size:24rpx;color:#999;line-height:60rpx">除手机号外其他信息修改后会保存到个人信息中</View>
122
+          <View className="profile-flex">
123
+            <View className="title">我的置业顾问信息</View>
124
+            <View className="choose">选择置业顾问</View>
125
+          </View>
126
+          <ConsultantItem
127
+            data={item}
128
+            style="padding:30rpx 0"
129
+            type="raiseMoney"
130
+            onClick={this.handleItemClick}>
131
+          </ConsultantItem>
26 132
         </View>
133
+      </ScrollView >
134
+    )
135
+  }
136
+  renderMoney(){
137
+    return (
138
+      <ScrollView scrollY className="container2" style="padding:0 30rpx">
139
+           <View className="profile-flex">
140
+            <View className="title">认筹金额</View>
141
+            <View className="price">30000 元</View>
142
+          </View>
143
+          <View className="center-title">线上选房协议</View>
144
+      </ScrollView >
145
+    )
146
+  }
147
+  nextStep(current) {
148
+    this.setState({
149
+      current: current + 1
150
+    })
151
+  }
152
+  upStep(current) {
153
+    this.setState({
154
+      current: current - 1
155
+    })
156
+  }
157
+  renderBottomBtn() {
158
+    const { current } = this.state
159
+    return (
160
+      <View className="bottom-btn">
161
+        {current == 1 && <View style="font-size:24rpx;color:#999;line-height:70rpx">请仔细阅读选房协议直到结尾才能进入下一步</View>}
162
+        {current != 4 && <View className="next-btn" onClick={() => this.nextStep(current)}>{current==3?'现在缴费':'下一步'}</View>}
163
+        {current != 0 && <View className="up-btn" onClick={() => this.upStep(current)}>上一步</View>}
164
+      </View>
165
+    )
166
+  }
27 167
 
168
+  render() {
169
+    const { current } = this.state
170
+    return (
171
+      <View className="raiseMoney">
172
+        {this.renderTop()}
173
+        {current == 0 && this.renderHouse()}
174
+        {current == 1 && this.renderAgreement()}
175
+        {current == 2 && this.renderProfile()}
176
+        {current == 3 && this.renderMoney()}
177
+        {this.renderBottomBtn()}
28 178
       </View>
29 179
     )
30 180
   }

+ 94
- 24
src/onlineSelling/pages/raiseMoney/index.scss Bestand weergeven

@@ -2,34 +2,104 @@
2 2
   .top-con{
3 3
     display: flex;
4 4
     align-items: center;
5
+    padding: 0 30px;
6
+    line-height: 100px;
7
+    color: #666;
8
+    font-size: 24px;
9
+    .flex{
10
+      display: flex;
11
+      align-items: center;
12
+      .right-icon{
13
+        width:10px;
14
+        height:10px;
15
+        border-top: 1px solid rgba(0,0,0,0.4);
16
+        border-right: 1px solid rgba(0,0,0,0.4);
17
+        transform:rotate(45deg);
18
+        display: inline-block;
19
+      }
20
+      .icon2{
21
+        width:13px;
22
+        height:13px;
23
+        border-top: 1px solid rgba(0,0,0,0.7);
24
+        border-right: 1px solid rgba(0,0,0,0.7);
25
+        margin-left: -2px;
26
+      }
27
+      .icon3{
28
+        width:17px;
29
+        height:17px;
30
+        border-top: 0.6px solid rgba(0,0,0,1);
31
+        border-right: 0.6px solid rgba(0,0,0,1);
32
+        margin-left: -2px;
33
+      }
34
+    }
35
+  }
36
+  .addhouse{
37
+    font-size:28px;
38
+    color: #333;
39
+    line-height: 70px;
40
+    text-align: center;
41
+  }
42
+  .container {
43
+    height: calc(100vh - 254px);
44
+  }
45
+  .container2 {
46
+    height: calc(100vh - 382px);
47
+  }
48
+  .container3 {
49
+    height: calc(100vh - 452px);
50
+  }
51
+  .agent-box{
5 52
     padding: 30px;
6
-    .right-icon1{
7
-      width:11px;
8
-      height:11px;
9
-      border-top: 1px solid rgba(0,0,0,0.4);
10
-      border-right: 1px solid rgba(0,0,0,0.4);
11
-      transform:rotate(45deg);
12
-      display: inline-block;
53
+  }
54
+  .center-title{
55
+    font-size: 24px;
56
+    color: #333;
57
+    text-align: center;
58
+  }
59
+  .profile-box{
60
+    padding: 0 30px;
61
+    .title{
62
+      font-size: 36px;
63
+      color: #333;
64
+      font-weight: 700;
13 65
     }
14
-    .right-icon2{
15
-      width:14px;
16
-      height:14px;
17
-      border-top: 1px solid rgba(0,0,0,0.7);
18
-      border-right: 1px solid rgba(0,0,0,0.4);
19
-      transform:rotate(45deg);
20
-      display: inline-block;
21
-      margin-left: -2px;
66
+  }
67
+  .profile-flex{
68
+    display: flex;
69
+    align-items: center;
70
+    justify-content: space-between;
71
+    .choose{
72
+      font-size: 24px;
73
+      color: #BB9C79;
74
+    }
75
+    .price{
76
+      color: #FF3C3C;
77
+      font-size: 44px;
78
+    }
79
+  }
80
+  .bottom-btn{
81
+      position: fixed;
82
+      width: 100vw;
83
+      padding: 30px;
84
+      .next-btn{
85
+        height:94px;
86
+        line-height: 94px;
87
+        background:rgba(187,156,121,1);
88
+        border-radius:10px;
89
+        color: #fff;
90
+        font-size: 36px;
91
+        text-align: center; 
22 92
     }
23
-    .right-icon3{
24
-      width:17px;
25
-      height:17px;
26
-      border-top: 1px solid rgba(0,0,0,7);
27
-      border-right: 1px solid rgba(0,0,0,1);
28
-      transform:rotate(45deg);
29
-      display: inline-block;
30
-      margin-left: -2px;
93
+      .up-btn{
94
+        height:94px;
95
+        line-height: 94px;
96
+        border-radius:10px;
97
+        color: #BB9C79;
98
+        border: 2px solid #BB9C79;
99
+        font-size: 36px;
100
+        text-align: center; 
101
+        margin-top: 36px;
31 102
     }
32
-    
33 103
   }
34 104
   
35 105
 }