张延森 5 years ago
parent
commit
ed201bf32c

+ 3
- 0
src/actions/house.js View File

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

+ 3
- 0
src/constants/house.js View File

16
 
16
 
17
 // 获取预选记录
17
 // 获取预选记录
18
 export const MY_PRESELECT_RECORD = 'MY_PRESELECT_RECORD'
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 View File

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

+ 12
- 6
src/onlineSelling/pages/raiseProfile/index.js View File

11
 import { connect } from '@tarojs/redux'
11
 import { connect } from '@tarojs/redux'
12
 import * as noticeType from '@/constants/common.js'
12
 import * as noticeType from '@/constants/common.js'
13
 import './index.scss'
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
 export default class Raise extends Component {
18
 export default class Raise extends Component {
18
   config = {
19
   config = {
188
     num = this.toDecimal2(num)
189
     num = this.toDecimal2(num)
189
     return num
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
     Taro.navigateTo({
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
     const otherInfo = [
232
     const otherInfo = [
227
       { head: '其他信息', body: '供核对数据使用' },
233
       { head: '其他信息', body: '供核对数据使用' },
228
       { head: '认筹单编号', body: raiseDeatil.raiseRecordId || '', action: true },
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
           {raiseDeatil.payStatus == 'unpaid' && raiseDeatil.status == 1 && this.renderUnpayNotice()}
246
           {raiseDeatil.payStatus == 'unpaid' && raiseDeatil.status == 1 && this.renderUnpayNotice()}
241
           <View className="raise-flex">
247
           <View className="raise-flex">
242
             <View className="date">认筹提交时间  {dayjs(raiseDeatil.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
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
           </View>
250
           </View>
245
           <View>
251
           <View>
246
             <CellBlock dataset={raiseInfo} />
252
             <CellBlock dataset={raiseInfo} />

+ 11
- 0
src/reducers/house.js View File

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