xujing 5 年之前
父節點
當前提交
c3ac42ae99

+ 40
- 11
src/onlineSelling/pages/raiseMoney/index.js 查看文件

@@ -16,6 +16,7 @@ import { getCodeMessage } from '@/services/getCode'
16 16
 import { checkIDCard, isEmpty } from '@/utils/tools'
17 17
 import ContactConsultant from '../../components/ContactConsultant'
18 18
 import RadioList from './RadioList'
19
+import * as noticeType from '@/constants/common.js'
19 20
 
20 21
 const getRaiseProfile = ({ salesBatchId, raiseRecordId, personId }) => {
21 22
   const queryString = [
@@ -104,12 +105,12 @@ export default class raiseMoney extends Component {
104 105
 
105 106
       // 销售批次已被取消发布
106 107
       if (res.status != 1) {
107
-        this.setState({ current: 4, failInfo: { title: '认筹失败', desc: '销售批次已被取消发布' } })  
108
+        this.setState({ current: 4, failInfo: { title: '认筹失败', desc: '销售批次已被取消发布' } })
108 109
       }
109 110
 
110 111
       // 不在认筹时间内
111 112
       if (!dayjs().isBefore(res.raiseEndTime) || !dayjs().isAfter(res.raiseStartTime)) {
112
-        this.setState({ current: 4, failInfo: { title: '认筹失败', desc: '不在认筹时间内' } })  
113
+        this.setState({ current: 4, failInfo: { title: '认筹失败', desc: '不在认筹时间内' } })
113 114
       }
114 115
 
115 116
       // 请求置业顾问列表
@@ -140,7 +141,7 @@ export default class raiseMoney extends Component {
140 141
     return new Promise((resolve, reject) => {
141 142
       queryPreselectionRecord(params).then((res) => {
142 143
         this.setState({ preselectList: res.records })
143
-        resolve(res.records)        
144
+        resolve(res.records)
144 145
       }).catch(() => {
145 146
         resolve([])
146 147
         // reject()
@@ -228,7 +229,7 @@ export default class raiseMoney extends Component {
228 229
               {
229 230
                 !raiseProfile.needPreselection &&
230 231
                 (<View className="addhouse">从 <Text style="color:#F3B82E" onClick={this.gotoHouseSelect.bind(this, 'all')}>房源列表</Text> 中添加其他房源</View>)
231
-              }              
232
+              }
232 233
               <View className="addhouse">从 <Text style="color:#BB9C79" onClick={this.gotoHouseSelect.bind(this, 'select')}>预选记录</Text> 中添加其他房源</View>
233 234
             </Block>
234 235
           )
@@ -555,7 +556,7 @@ export default class raiseMoney extends Component {
555 556
         this.setState({ record: res })
556 557
         resolve(res)
557 558
       }).catch((err) => {
558
-        this.setState({ current: 4, failInfo: { title: '认筹失败', desc: err.message || err } }) 
559
+        this.setState({ current: 4, failInfo: { title: '认筹失败', desc: err.message || err } })
559 560
       })
560 561
     })
561 562
   }
@@ -607,9 +608,23 @@ export default class raiseMoney extends Component {
607 608
 
608 609
   }
609 610
   toRaiseProfile(id) {
610
-    Taro.navigateTo({
611
-      url: `/onlineSelling/pages/raiseProfile/index?id=${id}`
611
+    const { userInfo: { miniApp: { tpls } } } = this.props
612
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
613
+
614
+    wx.requestSubscribeMessage({
615
+      tmplIds: [tplId],
616
+      success(res) {
617
+      },
618
+      fail(res) {
619
+
620
+      },
621
+      complete() {
622
+        Taro.navigateTo({
623
+          url: `/onlineSelling/pages/raiseProfile/index?id=${id}`
624
+        })
625
+      }
612 626
     })
627
+
613 628
   }
614 629
   renderResult() {
615 630
     const { raiseProfile = {}, record = {}, failInfo } = this.state
@@ -641,7 +656,7 @@ export default class raiseMoney extends Component {
641 656
         {
642 657
           record.raiseRecordId &&
643 658
           (<View className="look-btn" onClick={() => this.toRaiseProfile(record.raiseRecordId)}>查看认筹单</View>)
644
-        }        
659
+        }
645 660
       </View>
646 661
 
647 662
     );
@@ -661,13 +676,27 @@ export default class raiseMoney extends Component {
661 676
       // 认筹确认
662 677
       case 2:
663 678
         this.makeRaiseRecord().then((res) => {
664
-          console.log(res, "res")
665
-          this.setState({
666
-            current: current + 1
679
+          const { userInfo: { miniApp: { tpls } } } = this.props
680
+          const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
681
+
682
+          wx.requestSubscribeMessage({
683
+            tmplIds: [tplId],
684
+            success(res) {
685
+            },
686
+            fail(res) {
687
+
688
+            },
689
+            complete() {
690
+              this.setState({
691
+                current: current + 1
692
+              })
693
+            }
667 694
           })
668 695
         })
669 696
         return;
670 697
 
698
+
699
+
671 700
       // 缴费
672 701
       case 3:
673 702
         this.makePay().then(() => {

+ 1
- 1
src/onlineSelling/pages/raiseProfile/index.js 查看文件

@@ -101,7 +101,7 @@ export default class Raise extends Component {
101 101
     console.log(this.props, "this.propsthis.propsthis.props")
102 102
     const { raiseDeatil: { raiseRecordId } } = this.state
103 103
     const { user: { userInfo: { miniApp: { tpls } } } } = this.props
104
-    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true)[0] || {}).tplId
104
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
105 105
 
106 106
     wx.requestSubscribeMessage({
107 107
       tmplIds: [tplId],

+ 1
- 1
src/onlineSelling/pages/records/index.js 查看文件

@@ -196,7 +196,7 @@ export default class Records extends Component {
196 196
   }
197 197
   toRaiseProfile(id) {
198 198
     const { userInfo: { miniApp: { tpls } } } = this.props
199
-    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true)[0] || {}).tplId
199
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
200 200
 
201 201
     wx.requestSubscribeMessage({
202 202
       tmplIds: [tplId],