xujing 5 år sedan
förälder
incheckning
0aa90d7d80

+ 1
- 1
config/dev.js Visa fil

@@ -15,7 +15,7 @@ module.exports = {
15 15
     // WSS_HOST: '"ws://192.168.2.52:8080"',
16 16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17 17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18
-    Version: 'V3.5.12'
18
+    Version: 'V3.5.13'
19 19
   },
20 20
   weapp: {},
21 21
   h5: {}

+ 5
- 5
config/prod.js Visa fil

@@ -5,13 +5,13 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://192.168.2.52:8080"',
7 7
     // WSS_HOST: '"ws://192.168.2.52:8080"',
8
-    HOST: '"https://dev.pawoma.cn"',// 新测试
9
-    WSS_HOST: '"wss://dev.pawoma.cn"',
10
-    // HOST: '"https://lt.pawoma.cn"',
11
-    // WSS_HOST: '"wss://lt.pawoma.cn"',
8
+    // HOST: '"https://dev.pawoma.cn"',// 新测试
9
+    // WSS_HOST: '"wss://dev.pawoma.cn"',
10
+    HOST: '"https://lt.pawoma.cn"',
11
+    WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13 13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
14
-    Version: 'V3.5.12'
14
+    Version: 'V3.5.13'
15 15
   },
16 16
   weapp: {},
17 17
   h5: {}

+ 3
- 0
src/actions/house.js Visa fil

@@ -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 Visa fil

@@ -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'

+ 2
- 2
src/onlineSelling/pages/houseList/index.js Visa fil

@@ -53,7 +53,6 @@ export default class HouseList extends Component {
53 53
     endPrice: '',
54 54
     apartmentId: '',
55 55
     reportedCustomer: false,
56
-    posterShow: false,
57 56
     posterData: {},
58 57
     buildingId: null,
59 58
     salesBatchDetail: {},
@@ -623,7 +622,8 @@ export default class HouseList extends Component {
623 622
 
624 623
     const { userInfo: { person } } = this.props
625 624
 
626
-    const showCircleBtn = posterData && posterData.qrcode
625
+    // 必须正确生成二维码, 且维护了海报图
626
+    const showCircleBtn = posterData && posterData.qrcode && posterData.poster
627 627
     console.log('==============>', posterData, showPoster, posterConfig)
628 628
 
629 629
     const screenList = [{ title: '预选热度图', value: 1 }, { title: '认筹热度图', value: 2 }]

+ 5
- 3
src/onlineSelling/pages/protocol/index.js Visa fil

@@ -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
- 8
src/onlineSelling/pages/raiseMoney/index.js Visa fil

@@ -60,10 +60,10 @@ export default class raiseMoney extends Component {
60 60
       { label: '线上缴费', value: 'onLine' },
61 61
       { label: '线下缴费', value: 'offLine' },
62 62
     ],
63
-    payClick: true,
64 63
   }
65 64
 
66 65
   captchaLock = false
66
+  paying = false
67 67
 
68 68
   // 此页面不支持分享,以及二维码
69 69
   componentWillMount() {
@@ -598,9 +598,6 @@ export default class raiseMoney extends Component {
598 598
   }
599 599
 
600 600
   makePay = () => {
601
-    this.setState({
602
-      payClick: false
603
-    })
604 601
     const { payType, record = {} } = this.state
605 602
     if (!payType) {
606 603
       Taro.showToast({
@@ -708,6 +705,8 @@ export default class raiseMoney extends Component {
708 705
   }
709 706
 
710 707
   nextStep(current) {
708
+    if (this.paying) return;
709
+
711 710
     // 缴费的下一步
712 711
     if (current > 3) {
713 712
       this.setState({
@@ -744,13 +743,18 @@ export default class raiseMoney extends Component {
744 743
 
745 744
         // 缴费
746 745
         case 3:
747
-          this.makePay().then(() => {
746
+          this.paying = true
748 747
 
748
+          this.makePay().then(() => {
749 749
             this.setState({
750
-              payClick: true,
751 750
               current: current + 1
752 751
             })
752
+
753
+            this.paying = false
754
+          }).catch(() => {            
755
+            this.paying = false
753 756
           })
757
+
754 758
           return;
755 759
 
756 760
         //
@@ -771,7 +775,7 @@ export default class raiseMoney extends Component {
771 775
   }
772 776
 
773 777
   renderBottomBtn() {
774
-    const { current, protocolCountdown, payClick } = this.state
778
+    const { current, protocolCountdown } = this.state
775 779
     const { payType } = this.state
776 780
     return (
777 781
       <View className="bottom-btn">
@@ -779,7 +783,7 @@ export default class raiseMoney extends Component {
779 783
         {current != 4 &&
780 784
           <NextStep
781 785
             countdown={current == 1 ? protocolCountdown : 0}
782
-            onClick={() => payClick ? this.nextStep(current) : ''}
786
+            onClick={() => this.nextStep(current)}
783 787
             text={current == 3 && payType === 'onLine' ? '现在缴费' : '下一步'}
784 788
           />
785 789
         }

+ 14
- 6
src/onlineSelling/pages/raiseProfile/index.js Visa fil

@@ -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,10 +232,12 @@ 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: orderDetail.tradeNo || '', action: true, hide: !(raiseDeatil.payType == 'onLine' && (raiseDeatil.payStatus == 'refunded' || raiseDeatil.payStatus == 'paid')) },
236
+      { head: '微信退费单', body: refundOrder.refundNo || '', action: true, hide: refundOrder.payStatus != 'refunded' },
231 237
     ]
232 238
 
239
+    console.log('------------------>', raiseOrder.payType == 'onLine' && (raiseDeatil.payStatus == 'refunded' || raiseDeatil.payStatus == 'paid'))
240
+
233 241
 
234 242
     return (
235 243
       <View className="raiseProfilePage">
@@ -240,7 +248,7 @@ export default class Raise extends Component {
240 248
           {raiseDeatil.payStatus == 'unpaid' && raiseDeatil.status == 1 && this.renderUnpayNotice()}
241 249
           <View className="raise-flex">
242 250
             <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>
251
+            <View className="agreement" onClick={this.toAgreement}>线选房协议<Text className="right-icon"></Text></View>
244 252
           </View>
245 253
           <View>
246 254
             <CellBlock dataset={raiseInfo} />

+ 2
- 2
src/pages/project/NavIcons/icons.js Visa fil

@@ -12,9 +12,9 @@ export default [
12 12
     iconCode: 'refercustomers',
13 13
     iconName: '推荐客户',
14 14
     page: ({ city, personType }) => {
15
-      if (personType !== ROLE_CODE['CONSULTANT']) return false;
15
+      if (personType === ROLE_CODE['CONSULTANT']) return false;
16 16
 
17
-      return `/useless/pages/agent/recommend/index?type=index&cityId=${city}`
17
+      return `/useless/pages/agent/recommend/index?type=index&cityId=${(city || {}).id}`
18 18
     },
19 19
     iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811691300-recommend-icon.png',
20 20
     default: true,

+ 1
- 1
src/pages/project/h5Page.js Visa fil

@@ -383,7 +383,7 @@ export default class Index extends Component {
383 383
 
384 384
     const originURL = parseURL(pageInfo.h5Address) || {}
385 385
     const queryString = [webUrlParams, originURL.query].join('&')
386
-    const webURL = [`${originURL.origin}${originURL.host}?${queryString}`, originURL.hash].join('#')
386
+    const webURL = [`${originURL.origin}${originURL.path}?${queryString}`, originURL.hash].join('#')
387 387
 
388 388
     return (
389 389
       <Block>

+ 11
- 0
src/reducers/house.js Visa fil

@@ -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
   }