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

+ 1
- 1
config/dev.js Visa fil

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

+ 5
- 5
config/prod.js Visa fil

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://192.168.2.52:8080"',
6
     // HOST: '"http://192.168.2.52:8080"',
7
     // WSS_HOST: '"ws://192.168.2.52:8080"',
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
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
12
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
14
-    Version: 'V3.5.12'
14
+    Version: 'V3.5.13'
15
   },
15
   },
16
   weapp: {},
16
   weapp: {},
17
   h5: {}
17
   h5: {}

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

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

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'

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

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

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

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

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

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

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: 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
     return (
242
     return (
235
       <View className="raiseProfilePage">
243
       <View className="raiseProfilePage">
240
           {raiseDeatil.payStatus == 'unpaid' && raiseDeatil.status == 1 && this.renderUnpayNotice()}
248
           {raiseDeatil.payStatus == 'unpaid' && raiseDeatil.status == 1 && this.renderUnpayNotice()}
241
           <View className="raise-flex">
249
           <View className="raise-flex">
242
             <View className="date">认筹提交时间  {dayjs(raiseDeatil.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
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
           </View>
252
           </View>
245
           <View>
253
           <View>
246
             <CellBlock dataset={raiseInfo} />
254
             <CellBlock dataset={raiseInfo} />

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

12
     iconCode: 'refercustomers',
12
     iconCode: 'refercustomers',
13
     iconName: '推荐客户',
13
     iconName: '推荐客户',
14
     page: ({ city, personType }) => {
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
     iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811691300-recommend-icon.png',
19
     iconUrl: 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1580811691300-recommend-icon.png',
20
     default: true,
20
     default: true,

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

383
 
383
 
384
     const originURL = parseURL(pageInfo.h5Address) || {}
384
     const originURL = parseURL(pageInfo.h5Address) || {}
385
     const queryString = [webUrlParams, originURL.query].join('&')
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
     return (
388
     return (
389
       <Block>
389
       <Block>

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

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
   }