xujing 5 years ago
parent
commit
8cf50b3c9a

+ 7
- 3
config/dev.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    HOST: '"https://dev.pawoma.cn"',//测试
9
-    WSS_HOST: '"wss://dev.pawoma.cn"',
8
+    // HOST: '"https://dev.fangdeal.cn"',//测试
9
+    // WSS_HOST: '"wss://dev.fangdeal.cn"',
10
+    // HOST: '"https://dev.pawoma.cn"',//测试
11
+    // WSS_HOST: '"wss://dev.pawoma.cn"',
10
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
12
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
13
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
14
+    HOST: '"https://wx.fangdeal.cn"',//正式
15
+    WSS_HOST: '"wss://wx.fangdeal.cn"',
12
     // HOST: '"https://lt.pawoma.cn"',
16
     // HOST: '"https://lt.pawoma.cn"',
13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
17
     // WSS_HOST: '"wss://lt.pawoma.cn"',
14
     // HOST: '"http://192.168.2.52:8080"',
18
     // HOST: '"http://192.168.2.52:8080"',
15
     // WSS_HOST: '"ws://192.168.2.52:8080"',
19
     // WSS_HOST: '"ws://192.168.2.52:8080"',
16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
20
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
21
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18
-    Version: 'V3.5.17'
22
+    Version: 'V3.5.19'
19
   },
23
   },
20
   weapp: {},
24
   weapp: {},
21
   h5: {}
25
   h5: {}

+ 4
- 0
config/index.js View File

52
       {
52
       {
53
         from: 'src/onlineSelling/assets/',
53
         from: 'src/onlineSelling/assets/',
54
         to: 'dist/onlineSelling/assets/'
54
         to: 'dist/onlineSelling/assets/'
55
+      },
56
+      {
57
+        from: 'ext.json',
58
+        to: 'dist/ext.json'
55
       }
59
       }
56
     ],
60
     ],
57
     options: {
61
     options: {

+ 7
- 3
config/prod.js View File

7
     // WSS_HOST: '"ws://192.168.2.52:8080"',
7
     // WSS_HOST: '"ws://192.168.2.52:8080"',
8
     // HOST: '"https://dev.pawoma.cn"',// 新测试
8
     // HOST: '"https://dev.pawoma.cn"',// 新测试
9
     // WSS_HOST: '"wss://dev.pawoma.cn"',
9
     // WSS_HOST: '"wss://dev.pawoma.cn"',
10
-    HOST: '"https://lt.pawoma.cn"',
11
-    WSS_HOST: '"wss://lt.pawoma.cn"',
10
+    // HOST: '"https://dev.fangdeal.cn"',//测试
11
+    // WSS_HOST: '"wss://dev.fangdeal.cn"',
12
+    HOST: '"https://wx.fangdeal.cn"',//正式
13
+    WSS_HOST: '"wss://wx.fangdeal.cn"',
14
+    // HOST: '"https://lt.pawoma.cn"',
15
+    // WSS_HOST: '"wss://lt.pawoma.cn"',
12
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
14
-    Version: 'V3.5.17'
18
+    Version: 'V3.5.19'
15
   },
19
   },
16
   weapp: {},
20
   weapp: {},
17
   h5: {}
21
   h5: {}

+ 5
- 0
ext.json View File

1
+{
2
+  "extEnable": true,
3
+  "extAppid": "wxda1f84b79b3edeb3",
4
+  "ext": {}
5
+}

+ 2
- 2
project.config.json View File

1
 {
1
 {
2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "mini-chengjiao",
3
 	"projectname": "mini-chengjiao",
4
-	"description": "橙蕉宁房",
5
-	"appid": "wxbbb069a341055ef0",
4
+	"description": "胡Sir说",
5
+	"appid": "wx354293ab74df8776",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,

+ 2
- 0
src/app.js View File

130
         pages: [
130
         pages: [
131
           'pages/houseList/index',
131
           'pages/houseList/index',
132
           'pages/raiseMoney/index',
132
           'pages/raiseMoney/index',
133
+          'pages/raiseMoney/signResult',
134
+          'pages/raiseMoney/Certification',
133
           'pages/live/index',
135
           'pages/live/index',
134
           'pages/help/index',
136
           'pages/help/index',
135
           'pages/records/index',
137
           'pages/records/index',

+ 6
- 0
src/constants/api.js View File

77
 export const API_LIVE_DEATIL = resolvePath('taLiveActivity')
77
 export const API_LIVE_DEATIL = resolvePath('taLiveActivity')
78
 // /wx/location/city?location=lon,lat
78
 // /wx/location/city?location=lon,lat
79
 
79
 
80
+//sign
81
+export const API_CONTRACT_USER = resolvePath('contract/user/add')
82
+export const API_CONTRACT_GET = resolvePath('contract/user/get')
83
+export const API_CONTRACT_AUTO = resolvePath('contract/auto')
84
+export const API_CONTRACT_MANUAL = resolvePath('contract/manual')
85
+export const API_CONTRACT_CHECK = resolvePath('contract/check')
80
 
86
 
81
 // shop
87
 // shop
82
 export const API_GOODS_LIST = resolvePath('goods')
88
 export const API_GOODS_LIST = resolvePath('goods')

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

10
 // 预选消息
10
 // 预选消息
11
 export const TPL_HOUSE = "house";
11
 export const TPL_HOUSE = "house";
12
 
12
 
13
+// 签署合同消息
14
+export const TPL_SIGN = "contract-signing";
15
+
13
 // 更新预拉取数据
16
 // 更新预拉取数据
14
 export const UPDATE_PRELOAD = 'UPDATE_PRELOAD';
17
 export const UPDATE_PRELOAD = 'UPDATE_PRELOAD';
15
 
18
 

BIN
src/onlineSelling/assets/consult.png View File


BIN
src/onlineSelling/assets/download.png View File


BIN
src/onlineSelling/assets/list.png View File


BIN
src/onlineSelling/assets/loading.gif View File


BIN
src/onlineSelling/assets/project.png View File


BIN
src/onlineSelling/assets/refresh.png View File


BIN
src/onlineSelling/assets/see.png View File


BIN
src/onlineSelling/assets/sign.png View File


+ 15
- 1
src/onlineSelling/pages/detail/index.js View File

46
       queryHouseDetail(params).then(res => {
46
       queryHouseDetail(params).then(res => {
47
         this.setState({
47
         this.setState({
48
           houseDetail: !res ? {} : res,
48
           houseDetail: !res ? {} : res,
49
-          buildingImgList: res.buildingImgList || []
49
+          buildingImgList: (res && res.buildingImgList) || []
50
         })
50
         })
51
+      }).catch(err => {
52
+        Taro.hideToast()
53
+        if (err.message) {
54
+          Taro.showToast({
55
+            title: err.message,
56
+            icon: 'none',
57
+            duration: 2000
58
+          })
59
+          setTimeout(() => {
60
+            Taro.navigateBack({
61
+              delta: 1
62
+            })
63
+          }, 2000)
64
+        }
51
       })
65
       })
52
 
66
 
53
     })
67
     })

+ 22
- 5
src/onlineSelling/pages/houseList/index.js View File

131
       apartmentId,
131
       apartmentId,
132
       pageNum: 1,
132
       pageNum: 1,
133
       pageSize: 9999,
133
       pageSize: 9999,
134
+      showToast: false,
134
     }
135
     }
135
     queryHouseList(params).then(res => {
136
     queryHouseList(params).then(res => {
136
       this.setState({
137
       this.setState({
143
 
144
 
144
     }).catch(err => {
145
     }).catch(err => {
145
       Taro.hideToast()
146
       Taro.hideToast()
146
-      Taro.showToast({ title: '未找到房源批次', icon: 'none', duration: 2000 })
147
+      if (err.message) {
148
+        Taro.showModal({
149
+          content: err.message,
150
+          showCancel: false,
151
+          success: (res) => {
152
+            if (res.confirm) {
153
+              Taro.navigateBack({
154
+                delta: 1
155
+              })
156
+            }
157
+          }
158
+        })
159
+
160
+      } else {
161
+        Taro.showToast({ title: '未找到房源批次', icon: 'none', duration: 2000 })
162
+      }
163
+
147
     })
164
     })
148
   }
165
   }
149
   anotherInfo(id) {
166
   anotherInfo(id) {
583
         <View className="screen-top">
600
         <View className="screen-top">
584
           筛选房源
601
           筛选房源
585
             {conditionList.map(item => (
602
             {conditionList.map(item => (
586
-            <View key={item.value} onClick={() => this.handleCondition(item.value)} className={current == item.value ? 'top-item active' : 'top-item'}>
587
-              {item.title}
588
-            </View>
589
-          ))}
603
+          <View key={item.value} onClick={() => this.handleCondition(item.value)} className={current == item.value ? 'top-item active' : 'top-item'}>
604
+            {item.title}
605
+          </View>
606
+        ))}
590
         </View>
607
         </View>
591
         {current == 0 && this.renderApartment()}
608
         {current == 0 && this.renderApartment()}
592
         {current == 1 && displayHousePrice && this.renderPrice()}
609
         {current == 1 && displayHousePrice && this.renderPrice()}

+ 213
- 0
src/onlineSelling/pages/raiseMoney/Certification.js View File

1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View, Block } from '@tarojs/components'
3
+import './index.scss'
4
+import ready from '@/utils/ready'
5
+import { connect } from '@tarojs/redux'
6
+import * as noticeType from '@/constants/common.js'
7
+import { contractUser, contractGet, contractAuto, contractManual, queryRaiseDetail } from '@/services/project'
8
+import ContactConsultant from '../../components/ContactConsultant'
9
+
10
+@connect(({ user, house }) => ({ user, house }))
11
+
12
+export default class Certification extends Component {
13
+  config = {
14
+    navigationBarTitleText: '正在实名认证'
15
+  }
16
+  state = {
17
+    signDetail: null,
18
+    autoErr: null,
19
+    manualErr: null,
20
+    userErr: null,
21
+    raiseDetail: {}
22
+  }
23
+  
24
+  componentDidShow() {
25
+    // componentWillMount() {
26
+    ready.queue(() => {
27
+      const { id: raiseRecordId, raiseId } = this.$router.params
28
+      const storageId = Taro.getStorageSync('raiseRecordId')
29
+      queryRaiseDetail(storageId || raiseRecordId).then(res => {
30
+        this.setState({
31
+          raiseDetail: res.taRaiseRecord || {},
32
+        })
33
+      })
34
+      contractUser({ raiseRecordId: storageId || raiseRecordId }).then(res => {
35
+        this.setState({
36
+          signDetail: res || {}
37
+        }, () => {
38
+          const { signDetail } = this.state
39
+          if (signDetail.status == 2 && signDetail.authStatus == 'autoSign') {
40
+            // 自动签署
41
+            contractAuto({ raiseRecordId: storageId || raiseRecordId, showToast: false }).then(res => {
42
+              // if (res.status == 0) {
43
+              // 自动签署成功后调手动签署
44
+              contractManual({ ...res, showToast: false }).then(res => {
45
+                if (res) {
46
+                  Taro.navigateTo({
47
+                    url: `/pages/project/panorama/index?url=${encodeURIComponent(res)}&from=contractManual&raiseId=${raiseId}&id=${storageId || raiseRecordId}`
48
+                  })
49
+                } else {
50
+                  Taro.showToast({
51
+                    title: '无可跳转的认证地址',
52
+                    icon: 'none'
53
+                  })
54
+                }
55
+              }).catch(err => {
56
+                this.setState({
57
+                  manualErr: err.message || ''
58
+                })
59
+              })
60
+              // } else {
61
+              //   Taro.navigateTo({
62
+              //     url: `/onlineSelling/pages/raiseMoney/signResult?id=${raiseRecordId}`
63
+              //   })
64
+              // }
65
+            }).catch(err => {
66
+              this.setState({
67
+                autoErr: err.message || ''
68
+              })
69
+            })
70
+          }
71
+        })
72
+      }).catch(error => {
73
+        this.setState({
74
+          userErr: error.message || ''
75
+        })
76
+      })
77
+
78
+    })
79
+  }
80
+
81
+  handleChatClick() {
82
+    const { raiseDetail: { consultantInfo = {} } } = this.state
83
+    const { user: { userInfo: { miniApp: { tpls }, person: { personId, nickname, name } } } } = this.props
84
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true)[0] || {}).tplId
85
+    wx.requestSubscribeMessage({
86
+      tmplIds: [tplId],
87
+      success(res) {
88
+      },
89
+      fail(res) {
90
+
91
+      },
92
+      complete() {
93
+        Taro.navigateTo({
94
+          url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${consultantInfo.consultantPersonId}&receiverName=${encodeURIComponent(consultantInfo.nickname || consultantInfo.userName)}`
95
+        })
96
+      }
97
+    })
98
+  }
99
+  handleBtnClick() {
100
+    contractGet().then(res => {
101
+      this.setState({
102
+        signDetail: res || {}
103
+      }, () => {
104
+        const { id: raiseRecordId, raiseId } = this.$router.params
105
+        const storageId = Taro.getStorageSync('raiseRecordId')
106
+        contractUser({ raiseRecordId: storageId || raiseRecordId }).then(res => {
107
+          this.setState({
108
+            signDetail: res || {}
109
+          }, () => {
110
+            const { signDetail } = this.state
111
+            if (signDetail.status == 2 && signDetail.authStatus == 'autoSign') {
112
+              // 自动签署
113
+              contractAuto({ raiseRecordId: storageId || raiseRecordId, showToast: false }).then(res => {
114
+                // if (res.status == 0) {
115
+                // 自动签署成功后调手动签署
116
+                contractManual({ ...res, showToast: false }).then(res => {
117
+                  if (res) {
118
+                    Taro.navigateTo({
119
+                      url: `/pages/project/panorama/index?url=${encodeURIComponent(res)}&from=contractManual&raiseId=${raiseId}&id=${storageId || raiseRecordId}`
120
+                    })
121
+                  } else {
122
+                    Taro.showToast({
123
+                      title: '无可跳转的认证地址',
124
+                      icon: 'none'
125
+                    })
126
+                  }
127
+                }).catch(err => {
128
+                  this.setState({
129
+                    manualErr: err.message || ''
130
+                  })
131
+                })
132
+                // } else {
133
+                //   Taro.navigateTo({
134
+                //     url: `/onlineSelling/pages/raiseMoney/signResult?id=${raiseRecordId}`
135
+                //   })
136
+                // }
137
+              }).catch(err => {
138
+                this.setState({
139
+                  autoErr: err.message || ''
140
+                })
141
+              })
142
+            }
143
+          })
144
+        }).catch(error => {
145
+          this.setState({
146
+            userErr: error.message || ''
147
+          })
148
+        })
149
+      })
150
+    })
151
+  }
152
+  renderLoading() {
153
+    return (
154
+      <Block>
155
+        <Image style=" width:60px;height:60px;margin-bottom:10px" src={require('../../assets/loading.gif')}></Image>
156
+        <View className="status" >请稍等,正在准备实名认证</View>
157
+      </Block>
158
+    )
159
+  }
160
+
161
+
162
+  render() {
163
+    const { signDetail, autoErr, userErr, manualErr } = this.state
164
+    const status = signDetail ? signDetail.status : ''
165
+    const showIcon = status == 2 ? require('../../assets/success2.png') : (status == 0 || status == 1 || status == 4) ? require('../../assets/fail2.png') : require('../../assets/going.png')
166
+
167
+    const showTitle = (status == 0 || status == 1) ? '未激活/未认证' : status == 2 ? '审核通过' : status == 3 ? '待审核' : status == 4 ? '未通过' : '注册/获取失败'
168
+    return (
169
+      <View className="result" style="height:100vh">
170
+
171
+        {!signDetail && !userErr && this.renderLoading()}
172
+        {
173
+          signDetail &&
174
+          <Block>
175
+            <Image className="result-img" src={showIcon}></Image>
176
+            <View className="status" >实名认证<Text style={status == 3 ? 'color:#2CD7AA' : status == 2 ? 'color:#118EE9' : 'color:#F4333B'}>{showTitle}</Text></View>
177
+
178
+            {status == 4 && <View className="tip" style="margin-top:14rpx">不通过原因:{signDetail.reason || ''}</View>}
179
+
180
+            {status == 2 && <Block>
181
+              {!autoErr && !manualErr && < View className="tip" style="margin-top:14rpx">正在准备合同,请不要退出···</View>}
182
+              {autoErr && <Block>
183
+                <View className="tip" style="margin-top:14rpx;color:#F4333B">自动签署失败</View>
184
+                <View className="tip" style="margin-top:14rpx;color:#333">原因:{autoErr}</View>
185
+              </Block>}
186
+              {manualErr && <Block>
187
+                <View className="tip" style="margin-top:14rpx;color:#F4333B">手动签署失败</View>
188
+                <View className="tip" style="margin-top:14rpx;color:#333">原因:{manualErr}</View>
189
+              </Block>}
190
+            </Block>
191
+            }
192
+            {userErr && <View className="tip" style="margin-top:14rpx;color:#333">原因:{userErr}</View>}
193
+            {(autoErr || userErr) && <Block>
194
+              <View className="tip" style="margin-top:24rpx">请联系专属置业顾问解决</View>
195
+              <ContactConsultant contactClick={() => this.handleChatClick()} text="请联系专属置业顾问" style=" position: absolute;bottom: 9vh;" />
196
+            </Block>
197
+            }
198
+
199
+            {(status == 0 || status == 1 || status == 4) && <View className="tip" style="margin-top:14rpx">请返回重新发起认证</View>}
200
+
201
+            {status == 3 && <View className="tip" style="margin-top:14rpx; display: flex;align-items: center;justify-content: center;" onClick={() => this.handleBtnClick()}>实名信息需要法大大审核,请刷新状态
202
+            <Image style="width:18px;height:18px;margin-left:8rpx" src={require('../../assets/refresh.png')} />
203
+            </View>}
204
+
205
+            {status == 4 && <View class="certification-btn" onClick={() => this.handleBtnClick()}>查询不通过原因</View>}
206
+
207
+            {status == 3 && <View class="certification-btn" onClick={() => this.handleBtnClick()}>更新我的实名认证信息</View>}
208
+          </Block>
209
+        }
210
+      </View>
211
+    )
212
+  }
213
+}

+ 123
- 13
src/onlineSelling/pages/raiseMoney/index.js View File

11
 import NextStep from './NextStep'
11
 import NextStep from './NextStep'
12
 import { fetch, apis } from '@/utils/request'
12
 import { fetch, apis } from '@/utils/request'
13
 import Captcha from './Captcha'
13
 import Captcha from './Captcha'
14
-import { raiseOrder, cancelOrder, queryPreselectionRecord, raiseOffline } from '@/services/project'
14
+import { raiseOrder, cancelOrder, queryPreselectionRecord, raiseOffline, contractUser, queryRaiseDetail } from '@/services/project'
15
 import { getCodeMessage, checkCaptcha } from '@/services/getCode'
15
 import { getCodeMessage, checkCaptcha } from '@/services/getCode'
16
 import { checkRaise } from '@/services/house'
16
 import { checkRaise } from '@/services/house'
17
-import { checkIDCard, isEmpty } from '@/utils/tools'
17
+import { checkIDCard, isEmpty, transferImage } from '@/utils/tools'
18
 import ContactConsultant from '../../components/ContactConsultant'
18
 import ContactConsultant from '../../components/ContactConsultant'
19
 import RadioList from './RadioList'
19
 import RadioList from './RadioList'
20
 import * as noticeType from '@/constants/common.js'
20
 import * as noticeType from '@/constants/common.js'
21
 import { UPDATE_USER_INFO } from '@/constants/user'
21
 import { UPDATE_USER_INFO } from '@/constants/user'
22
+import BackHomeBtn from '@/components/BackHomeBtn'
22
 
23
 
23
 const getRaiseProfile = ({ salesBatchId, raiseRecordId }) => {
24
 const getRaiseProfile = ({ salesBatchId, raiseRecordId }) => {
24
   const queryString = [
25
   const queryString = [
61
       { label: '线上缴费', value: 'onLine' },
62
       { label: '线上缴费', value: 'onLine' },
62
       { label: '线下缴费', value: 'offLine' },
63
       { label: '线下缴费', value: 'offLine' },
63
     ],
64
     ],
65
+    signDetail: null,
66
+    raiseDeatil: {},
64
   }
67
   }
65
 
68
 
66
   captchaLock = false
69
   captchaLock = false
104
         payType = payTypeSettings[0]
107
         payType = payTypeSettings[0]
105
       }
108
       }
106
 
109
 
107
-      this.setState({ raiseProfile: res, payType, record: res.record || defaultRecord })
110
+      this.setState({
111
+        raiseProfile: res, payType,
112
+        record: res.record || defaultRecord
113
+      })
108
 
114
 
109
       // 销售批次已被取消发布
115
       // 销售批次已被取消发布
110
       if (res.status != 1) {
116
       if (res.status != 1) {
162
       })
168
       })
163
     })
169
     })
164
   }
170
   }
171
+  // 获取认筹单详情
172
+  getRaiseDetail(raiseRecordId) {
173
+    queryRaiseDetail(raiseRecordId).then(res => {
174
+      this.setState({
175
+
176
+        raiseDeatil: res.taRaiseRecord || {},
165
 
177
 
178
+        // contractDetail: res.taContract || null,
179
+      }, () => {
180
+        const { raiseDeatil: { showContract } } = this.state
181
+        if (showContract == 1) {
182
+          contractUser({ raiseRecordId, }).then(res => {
183
+            this.setState({
184
+              signDetail: res || null
185
+            })
186
+          })
187
+        }
188
+      })
189
+    })
190
+  }
166
   initRecord = () => {
191
   initRecord = () => {
167
     const { userInfo } = this.props
192
     const { userInfo } = this.props
168
     const { personId, name, idcard, tel, phone } = userInfo.person
193
     const { personId, name, idcard, tel, phone } = userInfo.person
288
 
313
 
289
     if (this.captchaLock) {
314
     if (this.captchaLock) {
290
       Taro.showToast({
315
       Taro.showToast({
291
-        title: '发送中, 请稍',
316
+        title: '发送中, 请稍',
292
         icon: 'none'
317
         icon: 'none'
293
       })
318
       })
294
       return false;
319
       return false;
454
           )
479
           )
455
         }
480
         }
456
         <View className="center-title">{payTip}</View>
481
         <View className="center-title">{payTip}</View>
457
-        <RichText  nodes={showProtocal || ''} />
482
+        <RichText nodes={showProtocal || ''} />
458
       </ScrollView >
483
       </ScrollView >
459
     )
484
     )
460
   }
485
   }
696
       }
721
       }
697
     })
722
     })
698
   }
723
   }
724
+  toBuilding(buildingId) {
725
+    Taro.navigateTo({
726
+      url: `/pages/project/detail/index?id=${buildingId}`
727
+    })
728
+  }
729
+  toHouseList(id) {
730
+    Taro.navigateTo({
731
+      url: `/onlineSelling/pages/houseList/index?id=${id}`
732
+    })
733
+  }
734
+  toSign() {
735
+    Taro.setStorageSync('raiseRecordId', this.$router.params.id || this.state.record.raiseRecordId)
736
+    const { signDetail = {}, record = {} } = this.state
737
+    const status = signDetail ? signDetail.status : ''
738
+    const consultant = this.getConsultant()
739
+    const { id: raiseRecordId } = this.$router.params
740
+    const { userInfo: { miniApp: { tpls } } } = this.props
741
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
742
+
743
+    wx.requestSubscribeMessage({
744
+      tmplIds: [tplId],
745
+      success(res) {
746
+      },
747
+      fail(res) {
748
+
749
+      },
750
+      complete() {
751
+        if (status == 2) {
752
+          Taro.reLaunch({
753
+            url: `/onlineSelling/pages/raiseMoney/Certification?id=${raiseRecordId || record.raiseRecordId}&consultantInfo=${encodeURIComponent(consultant)}`
754
+          })
755
+        } else {
756
+          if (signDetail.certifiedAddress) {
757
+            Taro.reLaunch({
758
+              url: `/pages/project/panorama/index?url=${encodeURIComponent(signDetail.certifiedAddress)}&from=raiseProfile&consultantInfo=${encodeURIComponent(consultant)}`
759
+            })
760
+          } else {
761
+            Taro.showToast({
762
+              title: '无可跳转的认证地址',
763
+              icon: 'none'
764
+            })
765
+          }
766
+        }
767
+      }
768
+    })
769
+
770
+  }
771
+  renderBtn() {
772
+    const { raiseProfile = {}, record = {}, signDetail, raiseDeatil = {} } = this.state
773
+    return (
774
+      <View className="bottombar">
775
+        <View className="bt-nav__left">
776
+          <Button class='bt-nav__item' onClick={() => this.toBuilding(raiseProfile.buildingId)}>
777
+            <Image src={transferImage(require('@/assets/news/property.png'))} style="width:42rpx;height:42rpx"></Image>
778
+            <Text className="text">查看项目</Text>
779
+          </Button>
780
+          <Button className='bt-nav__item' onClick={() => this.toHouseList(raiseProfile.salesBatchId)}>
781
+            <Image src={transferImage(require('../../assets/list.png'))} style="width:40rpx;height:40rpx" ></Image>
782
+            <Text className="text">房源列表</Text>
783
+          </Button>
784
+          <Button className='bt-nav__item' onClick={() => this.handleChatClick()}>
785
+            <Image src={transferImage(require('../../assets/consult.png'))} style="width:36rpx;height:40rpx"></Image>
786
+            <Text className="text">置业顾问</Text>
787
+          </Button>
788
+          {
789
+            raiseDeatil.showContract == 1 && signDetail &&
790
+            <Button className='bt-nav__item' onClick={() => this.toSign()}>
791
+              <Image src={transferImage(require('../../assets/sign.png'))} style="width:42rpx;height:40rpx"></Image>
792
+              <Text className="text" style="color:#E4A938" >签署合同</Text>
793
+            </Button>
794
+          }
795
+
796
+        </View>
797
+        <Button className="btn" onClick={() => this.toRaiseProfile(record.raiseRecordId)}>
798
+          认筹单
799
+        </Button>
800
+      </View>
801
+    )
802
+  }
699
   renderResult() {
803
   renderResult() {
700
-    const { raiseProfile = {}, record = {}, failInfo, payType } = this.state
804
+    const { failInfo, payType, record = {}, signDetail, raiseDeatil = {} } = this.state
701
     const isOk = !failInfo
805
     const isOk = !failInfo
702
     const showIcon = isOk ? require('../../assets/success2.png') : require('../../assets/fail2.png')
806
     const showIcon = isOk ? require('../../assets/success2.png') : require('../../assets/fail2.png')
703
     const showTitle = isOk ? '提交成功' : failInfo.title
807
     const showTitle = isOk ? '提交成功' : failInfo.title
706
       <View className="result">
810
       <View className="result">
707
         <Image className="result-img" src={showIcon}></Image>
811
         <Image className="result-img" src={showIcon}></Image>
708
 
812
 
709
-        <View className="status">{showTitle}</View>
813
+        <View className="status" style={failInfo ? 'color:#F4333B' : 'color:#118EE9'}>{showTitle}</View>
710
 
814
 
711
         {
815
         {
712
           isOk &&
816
           isOk &&
713
           (
817
           (
714
             <Block>
818
             <Block>
715
-              <View className="tip" style="margin-bottom:10rpx">详情请查看认筹单</View>
819
+              <View className="tip" style="margin:16rpx 0">详情请查看认筹单</View>
716
               {payType === 'onLine' && <Block>
820
               {payType === 'onLine' && <Block>
717
                 <View className="tip">支付结果请留意微信支付通知</View>
821
                 <View className="tip">支付结果请留意微信支付通知</View>
718
-              </Block>}
822
+                {raiseDeatil.showContract == 1 && signDetail &&
823
+                  <View style="font-size: 30rpx;color: #E4A938;line-height:2">为保障您的权益,请签署认筹合同!</View>}
824
+              </Block>
825
+              }
719
               {payType === 'offLine' && <Block>
826
               {payType === 'offLine' && <Block>
720
                 <View className="tip" style="margin-bottom:10rpx">后台已收到认筹申请,您尚未付款!</View>
827
                 <View className="tip" style="margin-bottom:10rpx">后台已收到认筹申请,您尚未付款!</View>
721
                 <View className="tip">请尽快联系您的专属置业顾问缴纳定金</View>
828
                 <View className="tip">请尽快联系您的专属置业顾问缴纳定金</View>
727
         {
834
         {
728
           !isOk && (<View className="tip">{(failInfo || {}).desc}</View>)
835
           !isOk && (<View className="tip">{(failInfo || {}).desc}</View>)
729
         }
836
         }
730
-
731
-        <ContactConsultant buildingId={raiseProfile.buildingId} contactClick={() => this.handleChatClick()} text="联系专属置业顾问" style=" position: absolute;bottom: 11vh;" />
732
-        {
837
+        {/* <ContactConsultant buildingId={raiseProfile.buildingId} contactClick={() => this.handleChatClick()} text="联系专属置业顾问" style=" position: absolute;bottom: 11vh;" /> */}
838
+        {/* {
733
           record.raiseRecordId &&
839
           record.raiseRecordId &&
734
           (<View className="look-btn" onClick={() => this.toRaiseProfile(record.raiseRecordId)}>查看认筹单</View>)
840
           (<View className="look-btn" onClick={() => this.toRaiseProfile(record.raiseRecordId)}>查看认筹单</View>)
735
-        }
841
+        } */}
842
+        {this.renderBtn()}
843
+        <BackHomeBtn style={{ right: '3%', bottom: '190rpx' }}></BackHomeBtn>
736
       </View>
844
       </View>
737
 
845
 
738
     );
846
     );
780
           this.paying = true
888
           this.paying = true
781
 
889
 
782
           this.makePay().then(() => {
890
           this.makePay().then(() => {
891
+            const { record = {} } = this.state
892
+            this.getRaiseDetail(this.$router.params.raiseRecordId || record.raiseRecordId)
783
             this.setState({
893
             this.setState({
784
               current: current + 1
894
               current: current + 1
785
             })
895
             })

+ 111
- 38
src/onlineSelling/pages/raiseMoney/index.scss View File

162
         margin-top: 36px;
162
         margin-top: 36px;
163
     }
163
     }
164
   }
164
   }
165
-  .result{
166
-    background-color: #fff;
167
-    height: 88vh;
168
-    width: 100vw;
169
-    position: relative;
170
-    text-align: center;
171
-    padding-top: 19vh;
172
-    font-weight: 300;
173
-    .result-img{
174
-      width:168px;
175
-      height:168px;
176
-    }
177
-    .status{
178
-      font-size: 34px;
179
-      color: #333;
180
-      line-height: 1.8;
181
-    }
182
-    .tip{
183
-      font-size: 30px;
184
-      color: #999;
185
-      padding: 0 100px;
165
+}
166
+.result{
167
+  background-color: #fff;
168
+  height: 88vh;
169
+  width: 100vw;
170
+  position: relative;
171
+  text-align: center;
172
+  padding-top: 19vh;
173
+  font-weight: 400;
174
+  .result-img{
175
+    width:168px;
176
+    height:168px;
177
+  }
178
+  .status{
179
+    font-size: 34px;
180
+    color: #333;
181
+    line-height: 1.8;
182
+  }
183
+  .tip{
184
+    font-size: 30px;
185
+    color: #999;
186
+    padding: 0 80px;
187
+  }
188
+  .last-tip{
189
+    color: #BB9C79;
190
+    font-size: 32px;
191
+    margin-top: 50px;
192
+    padding: 0 100px;
193
+  }
194
+ .look-btn{
195
+   width: 690px;
196
+   height:94px;
197
+   background:rgba(187,156,121,1);
198
+   border-radius:10px;
199
+   color: #fff;
200
+   font-size: 36px;
201
+   line-height: 94px;
202
+   position: absolute;
203
+   bottom: 1vh;
204
+   left: 30px;
205
+ }
206
+}
207
+.bottombar {
208
+  height: 164px;
209
+  box-shadow:0px 16px 48px 0px rgba(0, 0, 0, 0.12);
210
+  width: 100%;
211
+  padding: 0 35px;
212
+  overflow: hidden;
213
+  display: flex;
214
+  align-items: center;
215
+  position: fixed;
216
+  bottom: 0;
217
+  background-color: #fff;
218
+
219
+  .btn {
220
+    height: 88px;
221
+    flex: none;
222
+    border-radius: 10px;
223
+    line-height: 88px;
224
+    display: flex;
225
+    align-items: center;
226
+    justify-content: center;
227
+    background: #BB9C79;
228
+    color: #fff;
229
+    width: 24%;
230
+    margin-left: 4%;
231
+    font-size: 26px;
232
+  }
233
+  .bt-nav {
234
+  
235
+    &__item {
236
+      margin: 0;
237
+      padding: 0;
238
+      line-height: 1;
239
+      width: 25%;
240
+      box-sizing: border-box;
241
+      background: transparent;
242
+      border-radius: none;
243
+      height: 80px;
244
+      display: flex;
245
+      flex-direction: column;
246
+      justify-content: center;
247
+      align-items: center;
248
+      .text {
249
+        margin-top: 12px;
250
+        text-align: center;
251
+        font-size: 24px;
252
+        color: #a1a1a1;
253
+      }
186
     }
254
     }
187
-    .last-tip{
188
-      color: #BB9C79;
189
-      font-size: 32px;
190
-      margin-top: 50px;
191
-      padding: 0 100px;
255
+  
256
+    &__left {
257
+      width: 100%;
258
+      display: flex;
259
+      align-items: center;
260
+      // justify-content: space-between;
261
+      padding: 20px 0;
192
     }
262
     }
193
-   .look-btn{
194
-     width: 690px;
195
-     height:94px;
196
-     background:rgba(187,156,121,1);
197
-     border-radius:10px;
198
-     color: #fff;
199
-     font-size: 36px;
200
-     line-height: 94px;
201
-     position: absolute;
202
-     bottom: 1vh;
203
-     left: 30px;
204
-   }
263
+    
205
   }
264
   }
265
+
266
+}
267
+.certification-btn{
268
+  width: 690px;
269
+  line-height:90px;
270
+  background:rgba(187,156,121,1);
271
+  border-radius:10px;
272
+  font-size: 32px;
273
+  color: #fff;
274
+  text-align: center;
275
+  position: absolute;
276
+  bottom: 7vh;
277
+  left: 30px;
278
+
206
 }
279
 }

+ 191
- 0
src/onlineSelling/pages/raiseMoney/signResult.js View File

1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View, Block } from '@tarojs/components'
3
+import './index.scss'
4
+import ready from '@/utils/ready'
5
+import { connect, getStore } from '@tarojs/redux'
6
+import * as houseActions from '@/actions/house'
7
+import * as noticeType from '@/constants/common.js'
8
+import BackHomeBtn from '@/components/BackHomeBtn'
9
+import { queryRaiseDetail, contractCheck } from '@/services/project'
10
+import { transferImage } from '@/utils/tools'
11
+
12
+@connect(({ user, house }) => ({ ...user, house }), { ...houseActions })
13
+export default class signResult extends Component {
14
+  config = {
15
+    navigationBarTitleText: '签署结果'
16
+  }
17
+  state = {
18
+    result: {},
19
+    raiseDetail: {},
20
+  }
21
+
22
+
23
+  componentWillMount() {
24
+    Taro.showToast({
25
+      title: '加载中...',
26
+      icon: 'loading'
27
+    })
28
+    ready.queue(() => {
29
+      const storageId = Taro.getStorageSync('raiseRecordId')
30
+      const { id: raiseRecordId, } = this.$router.params
31
+      contractCheck(({ raiseRecordId: storageId || raiseRecordId, showToast: false })).then(res => {
32
+        Taro.hideToast()
33
+        this.setState({
34
+          result: res || {}
35
+        })
36
+      })
37
+      queryRaiseDetail(storageId || raiseRecordId).then(res => {
38
+        this.setState({
39
+          raiseDetail: res.taRaiseRecord || {},
40
+
41
+        })
42
+      })
43
+    })
44
+  }
45
+
46
+  toRaiseProfile(id) {
47
+    const { userInfo: { miniApp: { tpls } } } = this.props
48
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
49
+
50
+    wx.requestSubscribeMessage({
51
+      tmplIds: [tplId],
52
+      success(res) {
53
+      },
54
+      fail(res) {
55
+
56
+      },
57
+      complete() {
58
+        Taro.navigateTo({
59
+          url: `/onlineSelling/pages/raiseProfile/index?id=${id}`
60
+        })
61
+      }
62
+    })
63
+  }
64
+
65
+  handleChatClick() {
66
+    const { raiseDetail: { consultantInfo = {} } } = this.state
67
+    const { userInfo: { miniApp: { tpls }, person: { personId, nickname, name } } } = this.props
68
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true)[0] || {}).tplId
69
+    wx.requestSubscribeMessage({
70
+      tmplIds: [tplId],
71
+      success(res) {
72
+      },
73
+      fail(res) {
74
+
75
+      },
76
+      complete() {
77
+        Taro.navigateTo({
78
+          url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${consultantInfo.consultantPersonId}&receiverName=${encodeURIComponent(consultantInfo.nickname || consultantInfo.userName)}`
79
+        })
80
+      }
81
+    })
82
+  }
83
+  toBuilding(buildingId) {
84
+    Taro.navigateTo({
85
+      url: `/pages/project/detail/index?id=${buildingId}`
86
+    })
87
+  }
88
+  toHouseList(id) {
89
+    Taro.navigateTo({
90
+      url: `/onlineSelling/pages/houseList/index?id=${id}`
91
+    })
92
+  }
93
+
94
+  toSeeContract = (url) => {
95
+    const { userInfo: { miniApp: { fddServerHost } } } = this.props
96
+
97
+    // 替换 location.origin 部分
98
+    const redirect = fddServerHost ? url.replace(/^http[^/]+\/\/[^/]+\//, fddServerHost) : url
99
+
100
+    Taro.navigateTo({
101
+      url: `/pages/project/panorama/index?url=${encodeURIComponent(redirect)}`
102
+    })
103
+  }
104
+
105
+  toDownloadContract(url) {
106
+    Taro.downloadFile({
107
+      url,
108
+      success: function (param) {
109
+        if (param.statusCode === 200) {
110
+          Taro.showToast({
111
+            title: '下载合同成功',
112
+            icon: 'none'
113
+          })
114
+        }
115
+      },
116
+      fail: function (res) {
117
+        console.log('下载合同失败');
118
+      }
119
+    })
120
+
121
+  }
122
+  renderBtn() {
123
+    const storageId = Taro.getStorageSync('raiseRecordId')
124
+    const { result = {}, raiseDetail = {} } = this.state
125
+    const status = this.$router.params.result_code == 3000 ? '1' : '2'
126
+    const { id: raiseRecordId } = this.$router.params
127
+    const viewUrl = this.$router.params.viewpdf_url ? decodeURIComponent(decodeURIComponent(this.$router.params.viewpdf_url)) : ''
128
+
129
+    return (
130
+      <View className="bottombar">
131
+        <View className="bt-nav__left">
132
+          <Button class='bt-nav__item' onClick={() => this.toBuilding(raiseDetail.buildingId || result.buildingId)}>
133
+            <Image src={transferImage(require('@/assets/news/property.png'))} style="width:42rpx;height:42rpx"></Image>
134
+            <Text className="text">查看项目</Text>
135
+          </Button>
136
+          <Button className='bt-nav__item' onClick={() => this.toHouseList(raiseDetail.salesBatchId)}>
137
+            <Image src={transferImage(require('../../assets/list.png'))} style="width:40rpx;height:40rpx" ></Image>
138
+            <Text className="text">房源列表</Text>
139
+          </Button>
140
+          {status != 1 && <Button className='bt-nav__item' onClick={() => this.handleChatClick()}>
141
+            <Image src={transferImage(require('../../assets/consult.png'))} style="width:36rpx;height:40rpx"></Image>
142
+            <Text className="text">置业顾问</Text>
143
+          </Button>}
144
+          {status == 1 && viewUrl && <Button className='bt-nav__item' onClick={() => this.toSeeContract(viewUrl)} >
145
+            <Image src={transferImage(require('../../assets/see.png'))} style="width:42rpx;height:40rpx"></Image>
146
+            <Text className="text" style="color:#E4A938" >查看合同</Text>
147
+          </Button>}
148
+          {/* {status == 1 && <Button className='bt-nav__item' onClick={() => this.toDownloadContract(result.contractDownloadUrl)} >
149
+            <Image src={transferImage(require('../../assets/download.png'))} style="width:42rpx;height:40rpx"></Image>
150
+            <Text className="text" style="color:#E4A938" >下载合同</Text>
151
+          </Button>} */}
152
+
153
+        </View>
154
+        <Button className="btn" onClick={() => this.toRaiseProfile(storageId || result.invoiceTargetId || raiseRecordId)}>
155
+          认筹单
156
+        </Button>
157
+      </View>
158
+    )
159
+  }
160
+
161
+  render() {
162
+    // const { result = {} } = this.state
163
+    const status = this.$router.params.result_code == 3000 ? '1' : '2'
164
+    const failInfo = { title: '合同签署失败', desc: '签署失败描述' }
165
+    const showIcon = status == 1 ? require('../../assets/success2.png') : status == 2 ? require('../../assets/fail2.png') : ''
166
+    const showTitle = status == 1 ? '恭喜已成功签署合同' : status == 2 ? failInfo.title : ''
167
+    const reason = this.$router.params.result_desc ? decodeURIComponent(decodeURIComponent(this.$router.params.result_desc)) : ''
168
+    console.log(reason, "reasonreasonreasonreasonreason")
169
+
170
+    return (
171
+      <View className="result">
172
+        <Image className="result-img" src={showIcon}></Image>
173
+
174
+        <View className="status" style={status != 1 ? 'color:#F4333B' : 'color:#118EE9'}>{showTitle}</View>
175
+        {
176
+          status == 2 && (
177
+            <Block>
178
+              <View className="tip" style="margin-top:10rpx">{reason || ''}</View>
179
+              <View className="tip" style="margin-top:10rpx">请到认筹单中尝试重新签署合同</View>
180
+              <View className="tip" style="margin-top:10rpx">或联系您的专属置业顾问</View>
181
+            </Block>
182
+          )
183
+        }
184
+        {this.renderBtn()}
185
+        <BackHomeBtn style={{ right: '3%', bottom: '190rpx' }}></BackHomeBtn>
186
+      </View>
187
+
188
+    )
189
+  }
190
+
191
+}

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

5
 import Statement from '../../components/Statement'
5
 import Statement from '../../components/Statement'
6
 import ContactConsultant from '../../components/ContactConsultant'
6
 import ContactConsultant from '../../components/ContactConsultant'
7
 import ConsultantItem from '../../components/ConsultantItem/index'
7
 import ConsultantItem from '../../components/ConsultantItem/index'
8
-import NamedIcon from '../../components/NamedIcon'
9
 import RaiseCard from '../../components/RaiseCard'
8
 import RaiseCard from '../../components/RaiseCard'
10
-import { queryRaiseDetail } from '@/services/project'
9
+import { queryRaiseDetail, contractUser } from '@/services/project'
11
 import { connect } from '@tarojs/redux'
10
 import { connect } from '@tarojs/redux'
12
 import * as noticeType from '@/constants/common.js'
11
 import * as noticeType from '@/constants/common.js'
13
 import './index.scss'
12
 import './index.scss'
28
     orderDetail: {},
27
     orderDetail: {},
29
     refundOrder: {},
28
     refundOrder: {},
30
     payDisable: true,
29
     payDisable: true,
30
+    signDetail: null,
31
+    contractDetail: null,
31
   }
32
   }
32
-
33
-  componentWillMount() {
33
+  componentDidShow() {
34
+    // componentWillMount() {
35
+    Taro.showToast({
36
+      title: '加载中...',
37
+      icon: 'loading'
38
+    })
34
     const { id: raiseRecordId } = this.$router.params
39
     const { id: raiseRecordId } = this.$router.params
35
     queryRaiseDetail(raiseRecordId).then(res => {
40
     queryRaiseDetail(raiseRecordId).then(res => {
36
       this.setState({
41
       this.setState({
40
         raiseOrder: res.taRaise || {},
45
         raiseOrder: res.taRaise || {},
41
         orderDetail: res.taOrder || {},
46
         orderDetail: res.taOrder || {},
42
         refundOrder: res.refundOrder || {},
47
         refundOrder: res.refundOrder || {},
48
+        contractDetail: res.taContract || null,
49
+      }, () => {
50
+        const { raiseDeatil: { showContract } } = this.state
51
+        if (showContract == 1) {
52
+          contractUser({ showToast: false, raiseRecordId, }).then(res => {
53
+            this.setState({
54
+              signDetail: res || null
55
+            }, () => {
56
+              Taro.hideToast()
57
+            })
58
+          }).catch(err => {
59
+            Taro.hideToast()
60
+          })
61
+        } else {
62
+          Taro.hideToast()
63
+        }
43
       })
64
       })
44
     })
65
     })
45
   }
66
   }
200
       url: `/onlineSelling/pages/protocol/index?buildingId=${buildingId}&id=${raiseRecordId}`
221
       url: `/onlineSelling/pages/protocol/index?buildingId=${buildingId}&id=${raiseRecordId}`
201
     })
222
     })
202
   }
223
   }
224
+  toSign = () => {
225
+    Taro.setStorageSync('raiseRecordId', this.$router.params.id)
226
+    const { signDetail, raiseDeatil: { consultantInfo: { name, userName, personId, consultantPersonId } } } = this.state
227
+    const { id: raiseRecordId } = this.$router.params
228
+    const status = signDetail ? signDetail.status : ''
229
+    const { user: { userInfo: { miniApp: { tpls } } } } = this.props
230
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
231
+    wx.requestSubscribeMessage({
232
+      tmplIds: [tplId],
233
+      success(res) {
234
+      },
235
+      fail(res) {
236
+
237
+      },
238
+      complete() {
239
+        if (status == 2) {
240
+          Taro.reLaunch({
241
+            url: `/onlineSelling/pages/raiseMoney/Certification?id=${raiseRecordId}&consultantName=${encodeURIComponent(name || userName || '')}&consultantId=${consultantPersonId || personId || ''}`
242
+          })
243
+        } else {
244
+          if (signDetail.certifiedAddress) {
245
+            Taro.reLaunch({
246
+              url: `/pages/project/panorama/index?url=${encodeURIComponent(signDetail.certifiedAddress)}&from=raiseProfile&consultantName=${encodeURIComponent(name || userName || '')}&consultantId=${consultantPersonId || personId || ''}&id=${raiseRecordId}`
247
+            })
248
+          } else {
249
+            Taro.showToast({
250
+              title: '无可跳转的认证地址',
251
+              icon: 'none'
252
+            })
253
+          }
254
+
255
+        }
256
+      }
257
+    })
258
+  }
259
+  toSeeContract(url) {
260
+    Taro.navigateTo({
261
+      url: `/pages/project/panorama/index?url=${encodeURIComponent(url)}`
262
+    })
263
+  }
264
+  toDownloadContract(url) {
265
+    Taro.downloadFile({
266
+      url,
267
+      success: function (param) {
268
+        if (param.statusCode === 200) {
269
+          Taro.showToast({
270
+            title: '下载合同成功',
271
+            icon: 'none'
272
+          })
273
+        }
274
+      },
275
+      fail: function (res) {
276
+        console.log('下载合同失败');
277
+      }
278
+    })
279
+
280
+  }
203
 
281
 
204
   render() {
282
   render() {
205
-    const { buildingId, raiseDeatil, orderDetail, refundOrder, raiseOrder } = this.state;
283
+    const { buildingId, raiseDeatil, orderDetail, refundOrder, raiseOrder, signDetail, contractDetail } = this.state;
206
 
284
 
207
 
285
 
208
     // 认筹信息
286
     // 认筹信息
251
             <View className="date">认筹提交时间  {dayjs(raiseDeatil.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
329
             <View className="date">认筹提交时间  {dayjs(raiseDeatil.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
252
             <View className="agreement" onClick={this.toAgreement}>在线选房协议<Text className="right-icon"></Text></View>
330
             <View className="agreement" onClick={this.toAgreement}>在线选房协议<Text className="right-icon"></Text></View>
253
           </View>
331
           </View>
332
+          {contractDetail &&
333
+            <View className="raise-flex">
334
+              <View className="date">合同签署时间  {dayjs(contractDetail.customerTime).format('YYYY/MM/DD HH:mm:ss')}
335
+                {/* <Image className="download" onClick={() => this.toDownloadContract(contractDetail.contractDownloadUrl)} src={require('../../assets/download.png')} /> */}
336
+              </View>
337
+              <View className="agreement" onClick={() => this.toSeeContract(contractDetail.contractViewUrl)}>查看合同<Text className="right-icon"></Text></View>
338
+            </View>}
339
+
340
+          {
341
+            raiseDeatil.showContract == 1 && signDetail &&
342
+            <View className="sign" onClick={this.toSign}>
343
+              为保障您的权益,请签署认筹合同<Text className="right-icon" style="opacity:0.3"></Text><Text className="right-icon" style="opacity:0.6"></Text><Text className="right-icon"></Text>
344
+            </View>
345
+          }
254
           <View>
346
           <View>
255
             <CellBlock dataset={raiseInfo} />
347
             <CellBlock dataset={raiseInfo} />
256
             {raiseDeatil.consultantInfo && <ConsultantItem
348
             {raiseDeatil.consultantInfo && <ConsultantItem
257
               data={raiseDeatil.consultantInfo}
349
               data={raiseDeatil.consultantInfo}
258
               type="raiseProfile"
350
               type="raiseProfile"
259
-              style="height:140rpx;margin-bottom:0rpx;width:690rpx"
351
+              style="height:140rpx;margin-bottom:0rpx;width:690rpx;padding:1px 0"
260
               contactClick={() => this.handleChatClick(raiseDeatil.consultantInfo)}
352
               contactClick={() => this.handleChatClick(raiseDeatil.consultantInfo)}
261
             />}
353
             />}
262
             <View className="hr" />
354
             <View className="hr" />

+ 24
- 0
src/onlineSelling/pages/raiseProfile/index.scss View File

138
   .date{
138
   .date{
139
     font-size: 28px;
139
     font-size: 28px;
140
     color: #666;
140
     color: #666;
141
+    display: flex;
142
+    align-items: center;
143
+  }
144
+  .download{
145
+    width:44px;
146
+    height:38px;
147
+    margin-left: 6px;
141
   }
148
   }
142
   .agreement{
149
   .agreement{
143
     color: #BB9C79;
150
     color: #BB9C79;
153
       display: inline-block;
160
       display: inline-block;
154
     }
161
     }
155
   }
162
   }
163
+}
164
+.sign{
165
+  display: flex;
166
+  align-items: center;
167
+  color: #E4A938;
168
+  text-align: right;
169
+  justify-content: flex-end;
170
+  margin: 40px 0 15px 0;
171
+  .right-icon{
172
+    width:18px;
173
+    height:18px;
174
+    border-top: 2px solid #E4A938;
175
+    border-right: 2px solid #E4A938;
176
+    transform:rotate(45deg);
177
+    display: inline-block;
178
+    margin-left: -3px;
179
+  }
156
 }
180
 }

+ 52
- 3
src/pages/project/panorama/index.js View File

1
 import Taro, { Component } from '@tarojs/taro'
1
 import Taro, { Component } from '@tarojs/taro'
2
 import { WebView } from '@tarojs/components'
2
 import { WebView } from '@tarojs/components'
3
+// import { contractUser, contractCheck } from '@/services/project'
3
 
4
 
4
 export default class Panorama extends Component {
5
 export default class Panorama extends Component {
5
   state = {}
6
   state = {}
7
+  // tk = undefined
8
+  // tk2 = undefined
9
+  componentWillMount() {
10
+    // const { from = '', id: raiseRecordId, consultantName, consultantId } = this.$router.params
11
+    // if (from == 'raiseProfile') {
12
+    //   console.log('!!!!')
13
+    //   this.tk = setInterval(() => {
14
+    //     contractUser({ raiseRecordId, showToast: false }).then(res => {
15
+    //       console.log(res, res.status, '每5秒请求一次!!!!')
16
+    //       if (res.status != 0 && res.status != 1) {
17
+    //         const { id } = this.$router.params
18
+    //         clearInterval(this.tk)
19
+    //         Taro.navigateTo({
20
+    //           url: `/onlineSelling/pages/raiseMoney/Certification?id=${res.raiseRecordId || id}&consultantName=${encodeURIComponent(consultantName)}&consultantId=${consultantId}`
21
+    //         })
22
+    //       }
23
+    //     })
24
+    //   }, 5000)
25
+    // }
26
+    // if (from == 'contractManual') {
27
+    //   console.log('contractManual!!!!')
28
+    //   this.tk2 = setInterval(() => {
29
+    //     contractCheck({ raiseRecordId, showToast: false }).then(res => {
30
+    //       console.log(res, res.status, 'contractManual每5秒请求一次!!!')
31
+    //       if (res.status != 0) {
32
+    //         clearInterval(this.tk2)
33
+    //         Taro.navigateTo({
34
+    //           url: `/onlineSelling/pages/raiseMoney/signResult?status=${res.status}&id=${raiseRecordId}&consultantName=${encodeURIComponent(consultantName)}&consultantId=${consultantId}`
35
+    //         })
36
+    //       }
37
+    //     })
38
+    //   }, 5000)
39
+    // }
40
+  }
41
+  // componentDidHide() {
42
+  //   if (this.tk) {
43
+  //     clearInterval(this.tk)
44
+  //   }
45
+  //   if (this.tk2) {
46
+  //     clearInterval(this.tk2)
47
+  //   }
48
+  // }
49
+  // componentWillUnmount() {
50
+  //   if (this.tk) {
51
+  //     clearInterval(this.tk)
52
+  //   }
53
+  //   if (this.tk2) {
54
+  //     clearInterval(this.tk2)
55
+  //   }
56
+  // }
6
 
57
 
7
-  componentWillMount() {}
8
-
9
-  render () {
58
+  render() {
10
     const url = decodeURIComponent(this.$router.params.url)
59
     const url = decodeURIComponent(this.$router.params.url)
11
 
60
 
12
     return (
61
     return (

+ 31
- 1
src/services/project.js View File

12
   API_SALES_BATCH,
12
   API_SALES_BATCH,
13
   API_RATSE_DETAIL,
13
   API_RATSE_DETAIL,
14
   API_RATSE_ORDER,
14
   API_RATSE_ORDER,
15
-  API_CANCEL_ORDER
15
+  API_CANCEL_ORDER,
16
+  API_CONTRACT_USER,
17
+  API_CONTRACT_GET,
18
+  API_CONTRACT_AUTO,
19
+  API_CONTRACT_MANUAL,
20
+  API_CONTRACT_CHECK
16
 
21
 
17
 } from '@/constants/api'
22
 } from '@/constants/api'
18
 
23
 
90
  * @param {*} payload
95
  * @param {*} payload
91
  */
96
  */
92
 export const cancelOrder = payload => fetch({ url: API_CANCEL_ORDER, payload, method: 'POST' })
97
 export const cancelOrder = payload => fetch({ url: API_CANCEL_ORDER, payload, method: 'POST' })
98
+/**
99
+ *获取签约信息
100
+ * @param {*} payload
101
+ */
102
+export const contractUser = payload => fetch({ url: API_CONTRACT_USER, payload, method: 'POST' })
103
+/**
104
+ *获取签约信息
105
+ * @param {*} payload
106
+ */
107
+export const contractGet = payload => fetch({ url: API_CONTRACT_GET, payload })
108
+/**
109
+ *自动签署
110
+ * @param {*} payload
111
+ */
112
+export const contractAuto = payload => fetch({ url: API_CONTRACT_AUTO, payload, method: 'POST' })
113
+/**
114
+ *手动签署
115
+ * @param {*} payload
116
+ */
117
+export const contractManual = payload => fetch({ url: API_CONTRACT_MANUAL, payload, method: 'POST' })
118
+/**
119
+ *手动签署结果
120
+ * @param {*} payload
121
+ */
122
+export const contractCheck = payload => fetch({ url: API_CONTRACT_CHECK, payload, method: 'POST' })
93
 
123
 
94
 
124
 
95
 
125
 

+ 11
- 7
src/useless/pages/agent/client/index.js View File

6
 import dayjs from 'dayjs'
6
 import dayjs from 'dayjs'
7
 import { savePoint, updatePoint } from '@/services/common'
7
 import { savePoint, updatePoint } from '@/services/common'
8
 import { connect } from '@tarojs/redux'
8
 import { connect } from '@tarojs/redux'
9
+import { transferImage } from '@/utils/tools'
9
 @connect(
10
 @connect(
10
   state => ({ ...state.project, ...state.city }))
11
   state => ({ ...state.project, ...state.city }))
11
 export default class Index extends Component {
12
 export default class Index extends Component {
21
     verifyStatus: ['待审核', '审核同意', '未通过'],
22
     verifyStatus: ['待审核', '审核同意', '未通过'],
22
     floorList: '',
23
     floorList: '',
23
     floor: '',
24
     floor: '',
24
-    recordId: null
25
+    recordId: null,
26
+    noRecord: false,
25
   }
27
   }
26
   componentWillMount() {
28
   componentWillMount() {
27
     savePoint({
29
     savePoint({
67
     }
69
     }
68
     this.loadGetFloor()
70
     this.loadGetFloor()
69
     getClientList(params).then(res => {
71
     getClientList(params).then(res => {
72
+      const list = res.records
70
       that.setState({
73
       that.setState({
71
-        list: res.records
74
+        list,
75
+        noRecord: (list || []).length ? false : true
72
       }, () => {
76
       }, () => {
73
       })
77
       })
74
     })
78
     })
94
     })
98
     })
95
   }
99
   }
96
   render() {
100
   render() {
97
-    const { list, status, floorList } = this.state
101
+    const { list, status, floorList, noRecord } = this.state
98
     return (
102
     return (
99
       <View className='myClient'>
103
       <View className='myClient'>
100
         {/* <View className='search__box'>
104
         {/* <View className='search__box'>
104
         {/*<View className='client__status'>
108
         {/*<View className='client__status'>
105
              <Text>{status[item.status - 1]}</Text>
109
              <Text>{status[item.status - 1]}</Text>
106
           </View>*/}
110
           </View>*/}
107
-        {!list.length &&
111
+        {noRecord &&
108
           <View className="empty">
112
           <View className="empty">
109
             <Image className="empty__img" mode="widthFix" src={emptyImg}></Image>
113
             <Image className="empty__img" mode="widthFix" src={emptyImg}></Image>
110
             <View className="empty__text">暂无我的客户数据~</View>
114
             <View className="empty__text">暂无我的客户数据~</View>
111
           </View>
115
           </View>
112
         }
116
         }
113
-        {list.length &&
117
+        {!noRecord &&
114
           <View className='client__content'>
118
           <View className='client__content'>
115
             <ScrollView
119
             <ScrollView
116
               scrollY
120
               scrollY
124
                 list.map((item, index) => {
128
                 list.map((item, index) => {
125
                   return (
129
                   return (
126
                     <View className='client__list' key={index + 'client'} onClick={this.navigateTo.bind(this, item.customerId)}>
130
                     <View className='client__list' key={index + 'client'} onClick={this.navigateTo.bind(this, item.customerId)}>
127
-                      <Image className='bg' src={item.verifyStatus == 2 ? require('@/assets/person/card1.png') : require('@/assets/person/card2.png')}></Image>
131
+                      <Image className='bg' src={item.verifyStatus == 2 ? transferImage(require('@/assets/person/card1.png')) : transferImage(require('@/assets/person/card2.png'))}></Image>
128
                       <View className='client'>
132
                       <View className='client'>
129
                         <View className='client__status2'>
133
                         <View className='client__status2'>
130
                           {
134
                           {
157
 
161
 
158
         {/* <View className='recommend' onClick={this.toRecomonedPage}>123</View> */}
162
         {/* <View className='recommend' onClick={this.toRecomonedPage}>123</View> */}
159
         <View className="recommend" onClick={this.toRecomonedPage}  >
163
         <View className="recommend" onClick={this.toRecomonedPage}  >
160
-          <Image src={require('@/assets/tuijiankehu.png')} className='home-img'></Image>
164
+          <Image src={transferImage(require('@/assets/tuijiankehu.png'))} className='home-img'></Image>
161
           <Text className="text">推荐</Text>
165
           <Text className="text">推荐</Text>
162
         </View>
166
         </View>
163
       </View>
167
       </View>

+ 3
- 3
src/utils/request.js View File

97
   ]
97
   ]
98
 }
98
 }
99
 
99
 
100
-export function reqSuccess (res, opts) {
100
+export function reqSuccess(res, opts) {
101
   const [, settings] = opts || []
101
   const [, settings] = opts || []
102
   const { showMessage, autoLogin = true } = settings || {}
102
   const { showMessage, autoLogin = true } = settings || {}
103
 
103
 
110
     throw new Error('请检查网络')
110
     throw new Error('请检查网络')
111
   }
111
   }
112
 
112
 
113
-  const { data, code, message } = res.data
113
+  const { data, code, message } = typeof res.data === 'string' ? JSON.parse(res.data) : res.data
114
   if (code === CODE_SUCCESS) {
114
   if (code === CODE_SUCCESS) {
115
     return data
115
     return data
116
   } else {
116
   } else {
143
   }
143
   }
144
 }
144
 }
145
 
145
 
146
-export function reqFail (err, opts) {
146
+export function reqFail(err, opts) {
147
   const [reqParams, settings] = opts || []
147
   const [reqParams, settings] = opts || []
148
   const { showMessage } = settings || {}
148
   const { showMessage } = settings || {}
149
 
149
 

+ 1
- 1
src/utils/tools.js View File

367
       }
367
       }
368
     },
368
     },
369
     fail: function (res) {
369
     fail: function (res) {
370
-      console.log('生成失败请稍重试');
370
+      console.log('生成失败请稍重试');
371
     }
371
     }
372
   })
372
   })
373
 }
373
 }