张延森 5 vuotta sitten
vanhempi
commit
ed201bf32c

+ 3
- 0
src/actions/house.js Näytä tiedosto

@@ -7,6 +7,7 @@ import {
7 7
   ADD_CONSULTANT,
8 8
   CHOOSE_CONSULTANT,
9 9
   MY_PRESELECT_RECORD,
10
+  SET_ONLINE_PROTOCOL,
10 11
 } from '@/constants/house'
11 12
 
12 13
 // 加入临时车
@@ -31,3 +32,5 @@ export const dispatchGetMySelection = payload => createAction({
31 32
   url: API_PRESELECTION_RECORD,
32 33
   payload,
33 34
 })
35
+
36
+export const dispatchSetOnlineProtocol = payload => createActionNormal({ type: SET_ONLINE_PROTOCOL, payload })

+ 3
- 0
src/constants/house.js Näytä tiedosto

@@ -16,3 +16,6 @@ export const CHOOSE_CONSULTANT = 'CHOOSE_CONSULTANT'
16 16
 
17 17
 // 获取预选记录
18 18
 export const MY_PRESELECT_RECORD = 'MY_PRESELECT_RECORD'
19
+
20
+//
21
+export const SET_ONLINE_PROTOCOL = 'SET_ONLINE_PROTOCOL'

+ 5
- 3
src/onlineSelling/pages/protocol/index.js Näytä tiedosto

@@ -2,9 +2,11 @@ import Taro, { Component } from '@tarojs/taro'
2 2
 import { View, RichText } from '@tarojs/components'
3 3
 import Statement from '../../components/Statement'
4 4
 import ContactConsultant from '../../components/ContactConsultant'
5
+import { connect } from '@tarojs/redux'
5 6
 
6 7
 import './index.scss'
7 8
 
9
+@connect(({ house }) => ({ house }))
8 10
 export default class Protocol extends Component {
9 11
   config = {
10 12
     navigationBarTitleText: '线上选房协议',
@@ -15,13 +17,13 @@ export default class Protocol extends Component {
15 17
   }
16 18
 
17 19
   render() {
18
-
19
-    const { agreement, buildingId } = this.$router.params
20
+    const { buildingId } = this.$router.params
21
+    const { house } = this.props
20 22
 
21 23
     return (
22 24
       <View className="protocal-box">
23 25
         <View className="content">
24
-          <RichText nodes={agreement} />
26
+          <RichText nodes={house.onlineProtocol} />
25 27
         </View>
26 28
         <View className="contact">
27 29
           <ContactConsultant text="如有问题,请联系置业顾问" buildingId={buildingId} />

+ 12
- 6
src/onlineSelling/pages/raiseProfile/index.js Näytä tiedosto

@@ -11,8 +11,9 @@ import { queryRaiseDetail } from '@/services/project'
11 11
 import { connect } from '@tarojs/redux'
12 12
 import * as noticeType from '@/constants/common.js'
13 13
 import './index.scss'
14
+import * as houseActions from '@/actions/house'
14 15
 
15
-@connect(({ user }) => ({ user }))
16
+@connect(({ user, house }) => ({ user, house }), { ...houseActions })
16 17
 
17 18
 export default class Raise extends Component {
18 19
   config = {
@@ -188,9 +189,14 @@ export default class Raise extends Component {
188 189
     num = this.toDecimal2(num)
189 190
     return num
190 191
   }
191
-  toAgreement(agreement, buildingId) {
192
+  toAgreement = () => {
193
+    const { raiseOrder } = this.state;
194
+    const { payProtocol, buildingId } = raiseOrder || {}
195
+
196
+    this.props.dispatchSetOnlineProtocol(payProtocol)
197
+
192 198
     Taro.navigateTo({
193
-      url: `/onlineSelling/pages/protocol/index?agreement=${agreement}&buildingId=${buildingId}`
199
+      url: `/onlineSelling/pages/protocol/index?buildingId=${buildingId}`
194 200
     })
195 201
   }
196 202
 
@@ -226,8 +232,8 @@ export default class Raise extends Component {
226 232
     const otherInfo = [
227 233
       { head: '其他信息', body: '供核对数据使用' },
228 234
       { head: '认筹单编号', body: raiseDeatil.raiseRecordId || '', action: true },
229
-      { head: '缴费单编号', body: raiseDeatil.orderId || '', action: true, hide: (raiseDeatil.payStatus != 'refunded' && raiseDeatil.payStatus != 'paid') || raiseDeatil.payType != 'onLine' },
230
-      { head: '退费单编号', body: refundOrder.orderId || '', action: true, hide: raiseDeatil.payStatus != 'refunded' },
235
+      { head: '缴费单编号', body: raiseDeatil.tradeNo || '', action: true, hide: (raiseDeatil.payStatus != 'refunded' && raiseDeatil.payStatus != 'paid') || raiseDeatil.payType != 'onLine' },
236
+      { head: '退费单编号', body: refundOrder.refundNo || '', action: true, hide: raiseDeatil.payStatus != 'refunded' },
231 237
     ]
232 238
 
233 239
 
@@ -240,7 +246,7 @@ export default class Raise extends Component {
240 246
           {raiseDeatil.payStatus == 'unpaid' && raiseDeatil.status == 1 && this.renderUnpayNotice()}
241 247
           <View className="raise-flex">
242 248
             <View className="date">认筹提交时间  {dayjs(raiseDeatil.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
243
-            <View className="agreement" onClick={() => this.toAgreement(raiseOrder.payProtocol, raiseOrder.buildingId)}>线选房协议<Text className="right-icon"></Text></View>
249
+            <View className="agreement" onClick={this.toAgreement}>线选房协议<Text className="right-icon"></Text></View>
244 250
           </View>
245 251
           <View>
246 252
             <CellBlock dataset={raiseInfo} />

+ 11
- 0
src/reducers/house.js Näytä tiedosto

@@ -9,6 +9,7 @@
9 9
    ADD_CONSULTANT,
10 10
    CHOOSE_CONSULTANT,
11 11
    MY_PRESELECT_RECORD,
12
+   SET_ONLINE_PROTOCOL,
12 13
  } from '@/constants/house'
13 14
 
14 15
 const INITIAL_STATE = {
@@ -23,6 +24,9 @@ const INITIAL_STATE = {
23 24
 
24 25
   // 预选房源列表
25 26
   mySelectHouses: [],
27
+
28
+  //
29
+  onlineProtocol: '',
26 30
 }
27 31
 
28 32
 export default function(state = INITIAL_STATE, action) {
@@ -67,6 +71,13 @@ export default function(state = INITIAL_STATE, action) {
67 71
         ...state,
68 72
         mySelectHouses: payload.records,
69 73
       };
74
+
75
+    case SET_ONLINE_PROTOCOL:
76
+      return {
77
+        ...state,
78
+        onlineProtocol: payload,
79
+      };
80
+
70 81
     default:
71 82
       return state;
72 83
   }