Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into dev

xujing 5 years ago
parent
commit
dc6345a801

+ 15
- 4
src/onlineSelling/pages/raiseProfile/Cell.js View File

1
 import { View } from '@tarojs/components'
1
 import { View } from '@tarojs/components'
2
 import './index.scss'
2
 import './index.scss'
3
+import NamedIcon from '../../components/NamedIcon'
3
 
4
 
4
 export default function (props) {
5
 export default function (props) {
5
   const disable = props.disable ? 'disable' : ''
6
   const disable = props.disable ? 'disable' : ''
7
+  console.log('------->', props)
6
 
8
 
7
   return (
9
   return (
8
     <View className={`raiseCell ${disable}`}>
10
     <View className={`raiseCell ${disable}`}>
9
       <View className="row">
11
       <View className="row">
10
         <View className="head">{props.head}</View>
12
         <View className="head">{props.head}</View>
11
         <View className="body">{props.body}</View>
13
         <View className="body">{props.body}</View>
12
-        <View className="action" onClick={props.onActionClick}>{props.action}</View>
13
-      </View>
14
-      <View className="row desc">
15
-        <View className="desc">{props.desc}</View>
14
+        <View className="action" onClick={props.onActionClick}>
15
+          {
16
+            props.action && (<NamedIcon name="copy" size={34} />)
17
+          }
18
+        </View>
16
       </View>
19
       </View>
20
+      {
21
+        props.desc &&
22
+        (
23
+          <View className="row desc">
24
+            <View className="desc">{props.desc}</View>
25
+          </View>
26
+        )
27
+      }
17
     </View>
28
     </View>
18
   )
29
   )
19
 }
30
 }

+ 6
- 1
src/onlineSelling/pages/raiseProfile/CellBlock.js View File

6
   const dataset = props.dataset || []
6
   const dataset = props.dataset || []
7
   const disable = props.disable
7
   const disable = props.disable
8
 
8
 
9
-  const handleActionClick = props.onActionClick || (() => {})
9
+  const handleActionClick = (item) => {
10
+    if (item.action && props.onActionClick) {
11
+      props.onActionClick(item)
12
+    }
13
+  }
10
 
14
 
11
   return (
15
   return (
12
     <View className="cell-block">
16
     <View className="cell-block">
17
               disable={disable}
21
               disable={disable}
18
               head={item.head}
22
               head={item.head}
19
               body={item.body}
23
               body={item.body}
24
+              action={item.action}
20
               desc={item.desc}
25
               desc={item.desc}
21
               onActionClick={handleActionClick.bind(this, item)}
26
               onActionClick={handleActionClick.bind(this, item)}
22
               />
27
               />

+ 118
- 8
src/onlineSelling/pages/raiseProfile/index.js View File

1
 import Taro, { Component } from '@tarojs/taro'
1
 import Taro, { Component } from '@tarojs/taro'
2
-import { View } from '@tarojs/components'
2
+import { View, Block } from '@tarojs/components'
3
+import dayjs from 'dayjs'
3
 
4
 
4
-import './index.scss'
5
 import CellBlock from './CellBlock'
5
 import CellBlock from './CellBlock'
6
+import Statement from '../../components/Statement'
7
+import ContactConsultant from '../../components/ContactConsultant'
8
+import NamedIcon from '../../components/NamedIcon'
9
+
10
+import './index.scss'
6
 
11
 
7
 export default class extends Component {
12
 export default class extends Component {
8
   config = {
13
   config = {
9
     navigationBarTitleText: '认筹单',
14
     navigationBarTitleText: '认筹单',
10
   }
15
   }
11
 
16
 
12
-  state = {}
17
+  state = {
18
+    buildingId: '9f021a59b2a714822894c23ccca8c2db', // must change this
19
+  }
13
 
20
 
14
   componentWillMount () {}
21
   componentWillMount () {}
15
 
22
 
23
+  // 复制数据
16
   copyData(data) {
24
   copyData(data) {
17
     Taro.setClipboardData({
25
     Taro.setClipboardData({
18
       data,
26
       data,
20
     })
28
     })
21
   }
29
   }
22
 
30
 
31
+  // 跳转去交费
32
+  toPay = () => {
33
+
34
+  }
35
+
36
+  // 查看所有认筹房源
37
+  viewAllHouses = () => {}
38
+
39
+  renderHead() {
40
+    return (
41
+      <View className="head flexSpace">
42
+        <View className="flexSpace-fixed">
43
+          <View className="title">认筹房源</View>
44
+        </View>
45
+        <View className="flexSpace-fixed">
46
+          <View className="gray" onClick={this.viewAllHouses}>
47
+            <Text>查看全部(4)</Text>
48
+            <Text className='at-icon at-icon-chevron-right'></Text>
49
+          </View>
50
+        </View>
51
+      </View>
52
+    )
53
+  }
54
+
55
+  // 取消认购原因
56
+  renderCancelReason() {
57
+    return (
58
+      <Block>
59
+        <View className="cancelReason flexSpace">
60
+          <View className="flexSpace-fixed">
61
+            <NamedIcon name="void" size={120}/>
62
+          </View>
63
+          <View className="flexSpace-item" style="margin-left: 20px">
64
+            <View>认筹单作废原因:</View>
65
+            <View className="gray">认筹单作废原因作废原因原因认筹单作废原因作废原因原因
66
+              认筹单作废原因作废原因原因认筹单作废原因作废原因原因</View>
67
+          </View>
68
+        </View>
69
+        <View className="hr"></View>
70
+      </Block>
71
+    )
72
+  }
73
+
74
+  // 未交费提示
75
+  renderUnpayNotice() {
76
+    return (
77
+      <Block>
78
+        <View className="unpayNotice flexSpace" onClick={this.toPay}>
79
+          <View className="flexSpace-fixed">
80
+            <NamedIcon name="pay" size={64} />
81
+            <View className="a-line txt">未缴费?点我缴费</View>
82
+          </View>
83
+          <View className="flexSpace-fixed">
84
+            <Text className="a-line">认筹金额</Text>
85
+            <Text className="a-line price">30000元</Text>
86
+          </View>
87
+        </View>
88
+        <View className="hr"></View>
89
+      </Block>
90
+    )
91
+  }
92
+
23
   render() {
93
   render() {
94
+    const { buildingId } = this.state;
95
+
96
+    // 认筹信息
97
+    const raiseInfo = [
98
+      { head: '认筹人', body: '姓名' },
99
+      { head: '身份证号', body: '412702199709215528' },
100
+      { head: '手机号', body: '17716241245' },
101
+    ]
102
+
103
+    // 缴费信息
104
+    const payInfo = [
105
+      { head: '缴费方式', body: '线上缴费/线下缴费' },
106
+      { head: '实际支付费用', body: '234元' },
107
+      { head: '缴费成功时间', body: dayjs('2020-2-28 17:12:48').format('YYYY/MM/DD HH:mm:ss') },
108
+    ]
109
+
110
+    // 退费信息
111
+    const refundInfo = [
112
+      { head: '退费状态', body: '退费中/退费完成' },
113
+      { head: '退费结果', body: '成功/失败' },
114
+      { head: '退费发起时间', body: dayjs('2020-2-28 17:12:48').format('YYYY/MM/DD HH:mm:ss') },
115
+      { head: '实退费用', body: '234元' },
116
+      { head: '退费到账时间', body: dayjs('2020-2-28 17:12:48').format('YYYY/MM/DD HH:mm:ss') },
117
+      { head: '退费原因', desc: '无效原因无效原因无效原因无效原因无效原因无效原因无效原因无效原因无效原因无效原因' },
118
+    ]
119
+
120
+    // 其他信息
24
     const otherInfo = [
121
     const otherInfo = [
25
       { head: '其他信息', body: '供核对数据使用' },
122
       { head: '其他信息', body: '供核对数据使用' },
26
-      { head: '认筹单编号', body: '234567890-09876545678' },
27
-      { head: '缴费单编号', body: '234567890-09876543456' },
28
-      { head: '退费单编号', body: '234567890-09876543456' },
123
+      { head: '认筹单编号', body: '234567890-09876545678', action: true },
124
+      { head: '缴费单编号', body: '234567890-09876543456', action: true },
125
+      { head: '退费单编号', body: '234567890-09876543423', action: true },
29
     ]
126
     ]
30
 
127
 
31
     return (
128
     return (
32
       <View className="raiseProfilePage">
129
       <View className="raiseProfilePage">
33
-        <View>
130
+        <View className="main">
131
+          {this.renderHead()}
132
+          <View className="tip">注意:请在一个工作日内,到售楼处或项目现场办理认购手续。逾期未办理视为放弃购买。</View>
133
+          {this.renderCancelReason()}
134
+          {this.renderUnpayNotice()}
34
           <View>
135
           <View>
136
+            <CellBlock dataset={raiseInfo} />
137
+            <View className="hr" />
138
+            <CellBlock dataset={payInfo} />
35
             <View className="hr" />
139
             <View className="hr" />
36
-            <CellBlock dataset={otherInfo} disable />
140
+            <CellBlock dataset={refundInfo} />
141
+            <View className="hr" />
142
+            <CellBlock dataset={otherInfo} disable onActionClick={dt => this.copyData(dt.body)} />
37
           </View>
143
           </View>
38
           <View></View>
144
           <View></View>
39
           <View></View>
145
           <View></View>
40
         </View>
146
         </View>
147
+        <View className="contact">
148
+          <ContactConsultant text="如有问题,请联系置业顾问" buildingId={buildingId}/>
149
+        </View>
150
+        <Statement />
41
       </View>
151
       </View>
42
     )
152
     )
43
   }
153
   }

+ 77
- 1
src/onlineSelling/pages/raiseProfile/index.scss View File

1
+
2
+@import "~taro-ui/dist/style/components/icon.scss";
3
+
1
 .raiseProfilePage {
4
 .raiseProfilePage {
2
-  padding: 0 30px;
5
+
6
+  .main {
7
+    padding: 0 30px;
8
+    font-size: 30px;
9
+
10
+    .head {
11
+      margin: 40px 0 30px;
12
+    }
13
+
14
+    .title {
15
+      font-weight: 700;
16
+    }
17
+
18
+    .tip {
19
+      font-size: 24px;
20
+      line-height: 36px;
21
+      color: #FF3C3C;
22
+    }
23
+
24
+    .cancelReason {
25
+      font-size: 21px;
26
+      line-height: 32px;
27
+      color: #333;
28
+      margin: 40px 0 30px;
29
+    }
30
+
31
+    .unpayNotice {
32
+      margin: 30px 0 20px;
33
+      font-size: 28px;
34
+      color: #333;
35
+
36
+      .a-line {
37
+        display: inline-block;
38
+        height: 64px;
39
+        line-height: 64px;
40
+        vertical-align: bottom;
41
+      }
42
+
43
+      .txt {
44
+        margin-left: 10px;
45
+        font-size: 30px;
46
+        color: #666;
47
+      }
48
+
49
+      .price {
50
+        margin-left: 20px;
51
+        font-size: 44px;
52
+        color: #FF3C3C;
53
+      }
54
+    }
55
+
56
+    .gray {
57
+      color: #999;
58
+    }
59
+  }
3
 
60
 
4
   .hr {
61
   .hr {
5
     height: 2px;
62
     height: 2px;
6
     box-shadow:0px 2px 0px 0px rgba(0, 0, 0, 0.08);
63
     box-shadow:0px 2px 0px 0px rgba(0, 0, 0, 0.08);
7
   }
64
   }
65
+
66
+  .contact {
67
+    margin: 44px 0;
68
+  } 
69
+}
70
+
71
+.flexSpace {
72
+  display: flex;
73
+  justify-content: space-between;
74
+
75
+  &-fixed {
76
+    flex: none;
77
+  }
78
+
79
+  &-item {
80
+    flex: auto;
81
+  }
8
 }
82
 }
9
 
83
 
10
 .cell-block {
84
 .cell-block {
29
 
103
 
30
   .row {
104
   .row {
31
     display: flex;
105
     display: flex;
106
+    line-height: 1.1em;
32
 
107
 
33
     .head {
108
     .head {
34
       width: 260px;
109
       width: 260px;
49
       color: #999;
124
       color: #999;
50
       font-size: 32px;
125
       font-size: 32px;
51
       line-height: 40px;
126
       line-height: 40px;
127
+      margin-top: 28px;
52
     }
128
     }
53
   }
129
   }
54
 }
130
 }