张延森 5 vuotta sitten
vanhempi
commit
3813f45bfc

+ 2
- 2
project.config.json Näytä tiedosto

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

+ 1
- 0
src/app.js Näytä tiedosto

@@ -133,6 +133,7 @@ class App extends Component {
133 133
           'pages/detail/resultPage',
134 134
           'pages/screenHouse/index',
135 135
           'pages/protocol/index',
136
+          'pages/raiseProfile/index',
136 137
         ],
137 138
       }
138 139
     ],

+ 17
- 7
src/onlineSelling/pages/protocol/index.js Näytä tiedosto

@@ -1,7 +1,15 @@
1 1
 import Taro, { Component } from '@tarojs/taro'
2
-import { View, RichText, ScrollView } from '@tarojs/components'
2
+import { View, RichText } from '@tarojs/components'
3
+import Statement from '../../components/Statement'
4
+import ContactConsultant from '../../components/ContactConsultant'
5
+
6
+import './index.scss'
3 7
 
4 8
 export default class Protocol extends Component {
9
+  config = {
10
+    navigationBarTitleText: '线上选房协议',
11
+  }
12
+
5 13
   state = {
6 14
     content: `
7 15
       <p>New Year in china is an important festival. Nearly everyone thinks highly of it. No matter where people go and no matter how far they go, they will try their best to go home enjoying family time. And no matter what difficulty or trouble they are experiencing, they will put aside for the period of time. In every house, the main atmosphere is happiness. What do people usually do during the New Year time? They will prepare a big meal together on New Year’s Eve. In the following days, they will visit their relatives. their relatives also will pay a return visit.</p>
@@ -9,19 +17,21 @@ export default class Protocol extends Component {
9 17
       <p>No matter where people go and no matter how far they go, they will try their best to go home enjoying family time. And no matter what difficulty or trouble they are experiencing, they will put aside for the period of time. In every house, the main atmosphere is happiness. </p>
10 18
       <p>What do people usually do during the New Year time? They will prepare a big meal together on New Year’s Eve. In the following days, they will visit their relatives. their relatives also will pay a return visit. One of the most important things that they will not forget to do is to worship their ancestors.</p>
11 19
     `,
20
+    buildingId: '9f021a59b2a714822894c23ccca8c2db', // must change this
12 21
   }
13 22
 
14
-
15 23
   render() {
16
-    const { content } = this.state
24
+    const { content, buildingId } = this.state
17 25
 
18 26
     return (
19 27
       <View className="protocal-box">
20
-        <ScrollView scrollY className="content">
28
+        <View className="content">
21 29
           <RichText nodes={content}/>
22
-        </ScrollView>
23
-        <View></View>
24
-        {/* <todo /> */}
30
+        </View>
31
+        <View className="contact">
32
+          <ContactConsultant text="如有问题,请联系置业顾问" buildingId={buildingId}/>
33
+        </View>
34
+        <Statement />
25 35
       </View>
26 36
     )
27 37
   }

+ 5
- 4
src/onlineSelling/pages/protocol/index.scss Näytä tiedosto

@@ -1,12 +1,13 @@
1 1
 .protocal-box {
2 2
   width: 100vw;
3
-  height: 100vh;
4
-  overflow: hidden;
5 3
 
6 4
   .content {
7
-    height: 990px;
8 5
     margin-top: 48px;
9 6
     width: 100%;
10
-    padding: 40px;
7
+    padding: 0 40px;
8
+  }
9
+
10
+  .contact {
11
+    margin: 40px 0;
11 12
   }
12 13
 }

+ 19
- 0
src/onlineSelling/pages/raiseProfile/Cell.js Näytä tiedosto

@@ -0,0 +1,19 @@
1
+import { View } from '@tarojs/components'
2
+import './index.scss'
3
+
4
+export default function (props) {
5
+  const disable = props.disable ? 'disable' : ''
6
+
7
+  return (
8
+    <View className={`raiseCell ${disable}`}>
9
+      <View className="row">
10
+        <View className="head">{props.head}</View>
11
+        <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>
16
+      </View>
17
+    </View>
18
+  )
19
+}

+ 28
- 0
src/onlineSelling/pages/raiseProfile/CellBlock.js Näytä tiedosto

@@ -0,0 +1,28 @@
1
+
2
+import Cell from './Cell'
3
+import './index.scss'
4
+
5
+export default function(props) {
6
+  const dataset = props.dataset || []
7
+  const disable = props.disable
8
+
9
+  const handleActionClick = props.onActionClick || (() => {})
10
+
11
+  return (
12
+    <View className="cell-block">
13
+      {
14
+        dataset.map((item, inx) => (
15
+          <View key={`cell-${inx}`} className="cell-block-item">
16
+            <Cell
17
+              disable={disable}
18
+              head={item.head}
19
+              body={item.body}
20
+              desc={item.desc}
21
+              onActionClick={handleActionClick.bind(this, item)}
22
+              />
23
+          </View>
24
+        ))
25
+      }
26
+    </View>
27
+  )
28
+}

+ 44
- 0
src/onlineSelling/pages/raiseProfile/index.js Näytä tiedosto

@@ -0,0 +1,44 @@
1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View } from '@tarojs/components'
3
+
4
+import './index.scss'
5
+import CellBlock from './CellBlock'
6
+
7
+export default class extends Component {
8
+  config = {
9
+    navigationBarTitleText: '认筹单',
10
+  }
11
+
12
+  state = {}
13
+
14
+  componentWillMount () {}
15
+
16
+  copyData(data) {
17
+    Taro.setClipboardData({
18
+      data,
19
+      onSuccess: (() => {}),
20
+    })
21
+  }
22
+
23
+  render() {
24
+    const otherInfo = [
25
+      { head: '其他信息', body: '供核对数据使用' },
26
+      { head: '认筹单编号', body: '234567890-09876545678' },
27
+      { head: '缴费单编号', body: '234567890-09876543456' },
28
+      { head: '退费单编号', body: '234567890-09876543456' },
29
+    ]
30
+
31
+    return (
32
+      <View className="raiseProfilePage">
33
+        <View>
34
+          <View>
35
+            <View className="hr" />
36
+            <CellBlock dataset={otherInfo} disable />
37
+          </View>
38
+          <View></View>
39
+          <View></View>
40
+        </View>
41
+      </View>
42
+    )
43
+  }
44
+}

+ 54
- 0
src/onlineSelling/pages/raiseProfile/index.scss Näytä tiedosto

@@ -0,0 +1,54 @@
1
+.raiseProfilePage {
2
+  padding: 0 30px;
3
+
4
+  .hr {
5
+    height: 2px;
6
+    box-shadow:0px 2px 0px 0px rgba(0, 0, 0, 0.08);
7
+  }
8
+}
9
+
10
+.cell-block {
11
+  padding: 45px 0;
12
+
13
+  .cell-block-item {
14
+    & + .cell-block-item {
15
+      margin-top: 70px;
16
+    }
17
+  }
18
+}
19
+
20
+
21
+.raiseCell {
22
+  color: #333;
23
+  text-align: left;
24
+  font-size: 30px;
25
+
26
+  &.disable {
27
+    color: #999;
28
+  }
29
+
30
+  .row {
31
+    display: flex;
32
+
33
+    .head {
34
+      width: 260px;
35
+      flex: none;
36
+    }
37
+
38
+    .action {
39
+      width: 54px;
40
+      text-align: right;
41
+      flex: none;
42
+    }
43
+
44
+    .body {
45
+      flex: auto;
46
+    }
47
+
48
+    .desc {
49
+      color: #999;
50
+      font-size: 32px;
51
+      line-height: 40px;
52
+    }
53
+  }
54
+}