Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into dev

张延森 5 years ago
parent
commit
7cfb05d820

+ 3
- 1
config/dev.js View File

@@ -5,6 +5,8 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
+    HOST: '"https://dev.fangdeal.cn"',//测试
9
+    WSS_HOST: '"wss://dev.fangdeal.cn"',
8 10
     // HOST: '"https://dev.pawoma.cn"',//测试
9 11
     // WSS_HOST: '"wss://dev.pawoma.cn"',
10 12
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
@@ -15,7 +17,7 @@ module.exports = {
15 17
     WSS_HOST: '"ws://127.0.0.1:8080"',
16 18
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17 19
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18
-    Version: 'V3.5.15'
20
+    Version: 'V3.5.19'
19 21
   },
20 22
   weapp: {},
21 23
   h5: {}

+ 7
- 3
config/prod.js View File

@@ -5,13 +5,17 @@ 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"',
8
+    // HOST: '"https://dev.pawoma.cn"',// 新测试
9
+    // WSS_HOST: '"wss://dev.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"',
10 14
     // HOST: '"https://lt.pawoma.cn"',
11 15
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12 16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13 17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
14
-    Version: 'V3.5.15'
18
+    Version: 'V3.5.19'
15 19
   },
16 20
   weapp: {},
17 21
   h5: {}

ext111.json → ext.json View File


+ 2
- 2
project.config.json View File

@@ -1,8 +1,8 @@
1 1
 {
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "mini-chengjiao",
4
-	"description": "知与行联调",
5
-	"appid": "wxd9ee3a9480a4e544",
4
+	"description": "大营销云测试",
5
+	"appid": "wxda1f84b79b3edeb3",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,

+ 3
- 0
src/app.js View File

@@ -51,6 +51,7 @@ class App extends Component {
51 51
       "wx74767bf0b684f7d3",
52 52
       "wx6fa58869f7b65e7f",
53 53
       "wxc4f812079fc9ff0d",
54
+      "wx60d176f873ca2d67",
54 55
     ],
55 56
     pages: [
56 57
       'pages/project/index',
@@ -129,6 +130,8 @@ class App extends Component {
129 130
         pages: [
130 131
           'pages/houseList/index',
131 132
           'pages/raiseMoney/index',
133
+          'pages/raiseMoney/signResult',
134
+          'pages/raiseMoney/Certification',
132 135
           'pages/live/index',
133 136
           'pages/help/index',
134 137
           'pages/records/index',

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

@@ -77,6 +77,12 @@ export const API_ADDLIVE_NUM = resolvePath('addVisitNum')
77 77
 export const API_LIVE_DEATIL = resolvePath('taLiveActivity')
78 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 87
 // shop
82 88
 export const API_GOODS_LIST = resolvePath('goods')

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


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

@@ -46,7 +46,7 @@ export default class Index extends Component {
46 46
       queryHouseDetail(params).then(res => {
47 47
         this.setState({
48 48
           houseDetail: !res ? {} : res,
49
-          buildingImgList: res.buildingImgList || []
49
+          buildingImgList: (res && res.buildingImgList) || []
50 50
         })
51 51
       })
52 52
 

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

@@ -31,7 +31,7 @@ export default class Protocol extends Component {
31 31
     const { buildingId } = this.$router.params
32 32
     const { house } = this.props
33 33
     const { raiseDeatil } = this.state
34
-    const payProtocol = house.onlineProtocol.replace(/\${name}/ig, raiseDeatil.name || '').replace(/\${idcard}/ig, raiseDeatil.idcard || '').replace(/\${phone}/ig, raiseDeatil.tel || '').replace(/\${date}/ig, dayjs(raiseDeatil.createDate).format('YYYY/MM/DD') || '') || ''
34
+    const payProtocol = house.onlineProtocol.replace(/\${name}/ig, raiseDeatil.name || '').replace(/0.096rem/g, '').replace(/\${idcard}/ig, raiseDeatil.idcard || '').replace(/\${phone}/ig, raiseDeatil.tel || '').replace(/\${date}/ig, dayjs(raiseDeatil.createDate).format('YYYY/MM/DD') || '') || ''
35 35
 
36 36
     return (
37 37
       <View className="protocal-box">

+ 1
- 0
src/onlineSelling/pages/protocol/index.scss View File

@@ -5,6 +5,7 @@
5 5
     margin-top: 48px;
6 6
     width: 100%;
7 7
     padding: 0 40px;
8
+    font-size: initial;
8 9
   }
9 10
 
10 11
   .contact {

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

@@ -0,0 +1,152 @@
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 } 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
+    userErr: null,
20
+  }
21
+
22
+  componentWillMount() {
23
+    ready.queue(() => {
24
+      const { id: raiseRecordId, raiseId, consultantName, consultantId } = this.$router.params
25
+      contractUser({ raiseRecordId, }).then(res => {
26
+        this.setState({
27
+          signDetail: res || {}
28
+        }, () => {
29
+          const { signDetail } = this.state
30
+          if (signDetail.status == 2 && signDetail.authStatus == 'autoSign') {
31
+            // 自动签署
32
+            contractAuto({ raiseRecordId, showToast: false }).then(res => {
33
+              if (res.status == 0) {
34
+                // 自动签署成功后调手动签署
35
+                contractManual({ ...res, showToast: false }).then(res => {
36
+                  if (res) {
37
+                    Taro.navigateTo({
38
+                      url: `/pages/project/panorama/index?url=${encodeURIComponent(res)}&from=contractManual&raiseId=${raiseId}&consultantName=${encodeURIComponent(consultantName)}&consultantId=${consultantId}&id=${raiseRecordId}`
39
+                    })
40
+                  } else {
41
+                    Taro.showToast({
42
+                      title: '无可跳转的认证地址',
43
+                      icon: 'none'
44
+                    })
45
+                  }
46
+                })
47
+              } else {
48
+                Taro.navigateTo({
49
+                  url: `/onlineSelling/pages/raiseMoney/signResult?status=${res.status}&id=${raiseRecordId}&consultantName=${encodeURIComponent(consultantName)}&consultantId=${consultantId}`
50
+                })
51
+              }
52
+
53
+
54
+
55
+            }).catch(err => {
56
+              this.setState({
57
+                autoErr: err.message || ''
58
+              })
59
+            })
60
+          }
61
+        })
62
+      }).catch(error => {
63
+        this.setState({
64
+          userErr: error.message || ''
65
+        })
66
+      })
67
+
68
+    })
69
+  }
70
+
71
+  handleChatClick() {
72
+
73
+    const { consultantName, consultantId } = this.$router.params
74
+    const { user: { userInfo: { miniApp: { tpls }, person: { personId, nickname, name } } } } = this.props
75
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true)[0] || {}).tplId
76
+    wx.requestSubscribeMessage({
77
+      tmplIds: [tplId],
78
+      success(res) {
79
+      },
80
+      fail(res) {
81
+
82
+      },
83
+      complete() {
84
+        Taro.navigateTo({
85
+          url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${consultantId}&receiverName=${encodeURIComponent(consultantName)}`
86
+        })
87
+      }
88
+    })
89
+  }
90
+  handleBtnClick() {
91
+    contractGet().then(res => {
92
+    })
93
+  }
94
+  renderLoading() {
95
+    return (
96
+      <Block>
97
+        <Image style=" width:60px;height:60px;margin-bottom:10px" src={require('../../assets/loading.gif')}></Image>
98
+        <View className="status" >请稍等,正在准备实名认证</View>
99
+      </Block>
100
+    )
101
+  }
102
+
103
+
104
+  render() {
105
+    const { signDetail, autoErr, userErr } = this.state
106
+    const status = signDetail ? signDetail.status : ''
107
+    const showIcon = status == 2 ? require('../../assets/success2.png') : (status == 0 || status == 1) ? require('../../assets/fail2.png') : status == 2 ? require('../../assets/fail2.png') : require('../../assets/going.png')
108
+
109
+    const showTitle = (status == 0 || status == 1) ? '未激活/未认证' : status == 2 ? '审核通过' : status == 3 ? '待审核' : status == 4 ? '未通过' : '注册/获取失败'
110
+    return (
111
+      <View className="result" style="height:100vh">
112
+
113
+        {!signDetail && !userErr && this.renderLoading()}
114
+        {
115
+          signDetail &&
116
+          <Block>
117
+            <Image className="result-img" src={showIcon}></Image>
118
+            <View className="status" >实名认证<Text style={status == 3 ? 'color:#2CD7AA' : status == 2 ? 'color:#118EE9' : 'color:#F4333B'}>{showTitle}</Text></View>
119
+
120
+            {status == 4 && <View className="tip" style="margin-top:14rpx">不通过原因:XXXXXX</View>}
121
+
122
+            {status == 2 && <Block>
123
+              {!autoErr && <View className="tip" style="margin-top:14rpx">正在准备合同,请不要退出···</View>}
124
+              {autoErr && <Block>
125
+                <View className="tip" style="margin-top:14rpx;color:#F4333B">自动签署失败</View>
126
+                <View className="tip" style="margin-top:14rpx;color:#333">原因:{autoErr}</View>
127
+                {/* <ContactConsultant contactClick={() => this.handleChatClick()} text="请联系专属置业顾问" style=" position: absolute;bottom: 9vh;" /> */}
128
+              </Block>}
129
+            </Block>
130
+            }
131
+            {userErr && <View className="tip" style="margin-top:14rpx;color:#333">原因:{userErr}</View>}
132
+            {(autoErr || userErr) && <Block>
133
+              <View className="tip" style="margin-top:24rpx">请联系专属置业顾问解决</View>
134
+              <ContactConsultant contactClick={() => this.handleChatClick()} text="请联系专属置业顾问" style=" position: absolute;bottom: 9vh;" />
135
+            </Block>
136
+            }
137
+
138
+            {(status == 0 || status == 1 || status == 4) && <View className="tip" style="margin-top:14rpx">请返回重新发起认证</View>}
139
+
140
+            {status == 3 && <View className="tip" style="margin-top:14rpx; display: flex;align-items: center;" onClick={() => this.handleBtnClick()}>实名信息需要法大大审核,请刷新状态
141
+            <Image style="width:18px;height:18px;margin-left:8rpx" src={require('../../assets/refresh.png')} />
142
+            </View>}
143
+
144
+            {status == 4 && <View class="certification-btn" onClick={() => this.handleBtnClick()}>查询不通过原因</View>}
145
+
146
+            {status == 3 && <View class="certification-btn" onClick={() => this.handleBtnClick()}>更新我的实名认证信息</View>}
147
+          </Block>
148
+        }
149
+      </View>
150
+    )
151
+  }
152
+}

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

@@ -11,14 +11,15 @@ import * as houseActions from '@/actions/house'
11 11
 import NextStep from './NextStep'
12 12
 import { fetch, apis } from '@/utils/request'
13 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 15
 import { getCodeMessage, checkCaptcha } from '@/services/getCode'
16 16
 import { checkRaise } from '@/services/house'
17
-import { checkIDCard, isEmpty } from '@/utils/tools'
17
+import { checkIDCard, isEmpty, transferImage } from '@/utils/tools'
18 18
 import ContactConsultant from '../../components/ContactConsultant'
19 19
 import RadioList from './RadioList'
20 20
 import * as noticeType from '@/constants/common.js'
21 21
 import { UPDATE_USER_INFO } from '@/constants/user'
22
+import BackHomeBtn from '@/components/BackHomeBtn'
22 23
 
23 24
 const getRaiseProfile = ({ salesBatchId, raiseRecordId }) => {
24 25
   const queryString = [
@@ -61,6 +62,8 @@ export default class raiseMoney extends Component {
61 62
       { label: '线上缴费', value: 'onLine' },
62 63
       { label: '线下缴费', value: 'offLine' },
63 64
     ],
65
+    signDetail: {},
66
+    raiseDeatil: {},
64 67
   }
65 68
 
66 69
   captchaLock = false
@@ -104,7 +107,10 @@ export default class raiseMoney extends Component {
104 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 116
       if (res.status != 1) {
@@ -162,7 +168,26 @@ export default class raiseMoney extends Component {
162 168
       })
163 169
     })
164 170
   }
171
+  // 获取认筹单详情
172
+  getRaiseDetail(raiseRecordId) {
173
+    queryRaiseDetail(raiseRecordId).then(res => {
174
+      this.setState({
165 175
 
176
+        raiseDeatil: res.taRaiseRecord || {},
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 191
   initRecord = () => {
167 192
     const { userInfo } = this.props
168 193
     const { personId, name, idcard, tel, phone } = userInfo.person
@@ -254,7 +279,7 @@ export default class raiseMoney extends Component {
254 279
   }
255 280
   renderAgreement() {
256 281
     const { raiseProfile = {} } = this.state
257
-    const payProtocol = raiseProfile.payProtocol.replace(/\${name}/ig, '').replace(/\${idcard}/ig, '').replace(/\${phone}/ig, '').replace(/\${date}/ig, '') || ''
282
+    const payProtocol = raiseProfile.payProtocol.replace(/\${name}/ig, '').replace(/\${idcard}/ig, '').replace(/\${phone}/ig, '').replace(/\${date}/ig, '').replace(/0.096rem/g, '') || ''
258 283
     return (
259 284
       <ScrollView scrollY className="container3">
260 285
         <View className="agent-box">
@@ -288,7 +313,7 @@ export default class raiseMoney extends Component {
288 313
 
289 314
     if (this.captchaLock) {
290 315
       Taro.showToast({
291
-        title: '发送中, 请稍',
316
+        title: '发送中, 请稍',
292 317
         icon: 'none'
293 318
       })
294 319
       return false;
@@ -621,6 +646,7 @@ export default class raiseMoney extends Component {
621 646
       const paramsId = this.$router.params.raiseRecordId || record.raiseRecordId
622 647
       return new Promise((resolve, reject) => {
623 648
         raiseOffline(paramsId).then(res => {
649
+          this.getRaiseDetail(this.$router.params.raiseRecordId || record.raiseRecordId)
624 650
           resolve()
625 651
         }).catch(err => {
626 652
           reject()
@@ -644,6 +670,7 @@ export default class raiseMoney extends Component {
644 670
           paySign: res.sign,
645 671
 
646 672
           success(res) {
673
+            this.getRaiseDetail(this.$router.params.raiseRecordId || record.raiseRecordId)
647 674
             // 最后
648 675
             resolve()
649 676
           },
@@ -696,8 +723,73 @@ export default class raiseMoney extends Component {
696 723
       }
697 724
     })
698 725
   }
726
+  toBuilding(buildingId) {
727
+    Taro.navigateTo({
728
+      url: `/pages/project/detail/index?id=${buildingId}`
729
+    })
730
+  }
731
+  toHouseList(id) {
732
+    Taro.navigateTo({
733
+      url: `/onlineSelling/pages/houseList/index?id=${id}`
734
+    })
735
+  }
736
+  toSign = () => {
737
+    const { signDetail } = this.state
738
+    const status = signDetail ? signDetail.status : ''
739
+    const consultant = this.getConsultant()
740
+    if (status == 0 || status == 1) {
741
+      if (signDetail.certifiedAddress) {
742
+        Taro.navigateTo({
743
+          url: `/pages/project/panorama/index?url=${encodeURIComponent(signDetail.certifiedAddress)}&from=raiseProfile&consultantInfo=${consultant}`
744
+        })
745
+      } else {
746
+        Taro.showToast({
747
+          title: '无可跳转的认证地址',
748
+          icon: 'none'
749
+        })
750
+      }
751
+    } else {
752
+      const { record = {} } = this.state
753
+      const { id: raiseRecordId } = this.$router.params
754
+      Taro.navigateTo({
755
+        url: `/onlineSelling/pages/raiseMoney/Certification?id=${raiseRecordId || record.raiseRecordId}&consultantInfo=${consultant}`
756
+      })
757
+    }
758
+  }
759
+  renderBtn() {
760
+    const { raiseProfile = {}, record = {}, signDetail, raiseDeatil = {} } = this.state
761
+    return (
762
+      <View className="bottombar">
763
+        <View className="bt-nav__left">
764
+          <Button class='bt-nav__item' onClick={() => this.toBuilding(raiseProfile.buildingId)}>
765
+            <Image src={transferImage(require('@/assets/news/property.png'))} style="width:42rpx;height:42rpx"></Image>
766
+            <Text className="text">查看项目</Text>
767
+          </Button>
768
+          <Button className='bt-nav__item' onClick={() => this.toHouseList(raiseProfile.salesBatchId)}>
769
+            <Image src={transferImage(require('../../assets/list.png'))} style="width:40rpx;height:40rpx" ></Image>
770
+            <Text className="text">房源列表</Text>
771
+          </Button>
772
+          <Button className='bt-nav__item' onClick={() => this.handleChatClick()}>
773
+            <Image src={transferImage(require('../../assets/consult.png'))} style="width:36rpx;height:40rpx"></Image>
774
+            <Text className="text">置业顾问</Text>
775
+          </Button>
776
+          {
777
+            raiseDeatil.showContract == 1 && signDetail &&
778
+            <Button className='bt-nav__item' >
779
+              <Image src={transferImage(require('../../assets/sign.png'))} style="width:42rpx;height:40rpx"></Image>
780
+              <Text className="text" style="color:#E4A938" onClick={this.toSign}>签署合同</Text>
781
+            </Button>
782
+          }
783
+
784
+        </View>
785
+        <Button className="btn" onClick={() => this.toRaiseProfile(record.raiseRecordId)}>
786
+          认筹单
787
+        </Button>
788
+      </View>
789
+    )
790
+  }
699 791
   renderResult() {
700
-    const { raiseProfile = {}, record = {}, failInfo, payType } = this.state
792
+    const { failInfo, payType, record = {}, signDetail, raiseDeatil = {} } = this.state
701 793
     const isOk = !failInfo
702 794
     const showIcon = isOk ? require('../../assets/success2.png') : require('../../assets/fail2.png')
703 795
     const showTitle = isOk ? '提交成功' : failInfo.title
@@ -706,16 +798,19 @@ export default class raiseMoney extends Component {
706 798
       <View className="result">
707 799
         <Image className="result-img" src={showIcon}></Image>
708 800
 
709
-        <View className="status">{showTitle}</View>
801
+        <View className="status" style={failInfo ? 'color:#F4333B' : 'color:#118EE9'}>{showTitle}</View>
710 802
 
711 803
         {
712 804
           isOk &&
713 805
           (
714 806
             <Block>
715
-              <View className="tip" style="margin-bottom:10rpx">详情请查看认筹单</View>
807
+              <View className="tip" style="margin:16rpx 0">详情请查看认筹单</View>
716 808
               {payType === 'onLine' && <Block>
717 809
                 <View className="tip">支付结果请留意微信支付通知</View>
718
-              </Block>}
810
+                {raiseDeatil.showContract == 1 && signDetail &&
811
+                  <View style="font-size: 30rpx;color: #E4A938;line-height:2">为保障您的权益,请签署认筹合同!</View>}
812
+              </Block>
813
+              }
719 814
               {payType === 'offLine' && <Block>
720 815
                 <View className="tip" style="margin-bottom:10rpx">后台已收到认筹申请,您尚未付款!</View>
721 816
                 <View className="tip">请尽快联系您的专属置业顾问缴纳定金</View>
@@ -727,12 +822,13 @@ export default class raiseMoney extends Component {
727 822
         {
728 823
           !isOk && (<View className="tip">{(failInfo || {}).desc}</View>)
729 824
         }
730
-
731
-        <ContactConsultant buildingId={raiseProfile.buildingId} contactClick={() => this.handleChatClick()} text="联系专属置业顾问" style=" position: absolute;bottom: 11vh;" />
732
-        {
825
+        {/* <ContactConsultant buildingId={raiseProfile.buildingId} contactClick={() => this.handleChatClick()} text="联系专属置业顾问" style=" position: absolute;bottom: 11vh;" /> */}
826
+        {/* {
733 827
           record.raiseRecordId &&
734 828
           (<View className="look-btn" onClick={() => this.toRaiseProfile(record.raiseRecordId)}>查看认筹单</View>)
735
-        }
829
+        } */}
830
+        {this.renderBtn()}
831
+        <BackHomeBtn style={{ right: '3%', bottom: '190rpx' }}></BackHomeBtn>
736 832
       </View>
737 833
 
738 834
     );
@@ -780,6 +876,7 @@ export default class raiseMoney extends Component {
780 876
           this.paying = true
781 877
 
782 878
           this.makePay().then(() => {
879
+            this.loadInfo(salesBatchId, raiseRecordId)
783 880
             this.setState({
784 881
               current: current + 1
785 882
             })

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

@@ -162,45 +162,118 @@
162 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
 }

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

@@ -0,0 +1,167 @@
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 { 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
+  }
20
+
21
+
22
+  componentWillMount() {
23
+    ready.queue(() => {
24
+      const { id: raiseRecordId, } = this.$router.params
25
+      contractCheck(({ raiseRecordId, showToast: false })).then(res => {
26
+        this.setState({
27
+          result: res
28
+        })
29
+      })
30
+
31
+    })
32
+  }
33
+
34
+
35
+  toRaiseProfile(id) {
36
+    const { userInfo: { miniApp: { tpls } } } = this.props
37
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
38
+
39
+    wx.requestSubscribeMessage({
40
+      tmplIds: [tplId],
41
+      success(res) {
42
+      },
43
+      fail(res) {
44
+
45
+      },
46
+      complete() {
47
+        Taro.navigateTo({
48
+          url: `/onlineSelling/pages/raiseProfile/index?id=${id}`
49
+        })
50
+      }
51
+    })
52
+  }
53
+
54
+  handleChatClick() {
55
+    const { userInfo: { miniApp: { tpls }, person: { personId, nickname, name } } } = this.props
56
+    const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_NOTICE && x.isSubscribe == true)[0] || {}).tplId
57
+    wx.requestSubscribeMessage({
58
+      tmplIds: [tplId],
59
+      success(res) {
60
+      },
61
+      fail(res) {
62
+
63
+      },
64
+      complete() {
65
+        Taro.navigateTo({
66
+          url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${consultant.id}&receiverName=${encodeURIComponent(consultant.name || consultant.nickname || consultant.userName)}`
67
+        })
68
+      }
69
+    })
70
+  }
71
+  toBuilding(buildingId) {
72
+    Taro.navigateTo({
73
+      url: `/pages/project/detail/index?id=${buildingId}`
74
+    })
75
+  }
76
+  toHouseList(id) {
77
+    Taro.navigateTo({
78
+      url: `/onlineSelling/pages/houseList/index?id=${id}`
79
+    })
80
+  }
81
+  toSeeContract(url) {
82
+    Taro.navigateTo({
83
+      url: `/pages/project/panorama/index?url=${encodeURIComponent(url)}`
84
+    })
85
+  }
86
+  toDownloadContract(url) {
87
+    Taro.downloadFile({
88
+      url,
89
+      success: function (param) {
90
+        if (param.statusCode === 200) {
91
+          Taro.showToast({
92
+            title: '下载合同成功',
93
+            icon: 'none'
94
+          })
95
+        }
96
+      },
97
+      fail: function (res) {
98
+        console.log('下载合同失败');
99
+      }
100
+    })
101
+
102
+  }
103
+  renderBtn() {
104
+    const { result = {} } = this.state
105
+    const { status } = this.$router.params
106
+
107
+    return (
108
+      <View className="bottombar">
109
+        <View className="bt-nav__left">
110
+          <Button class='bt-nav__item' onClick={() => this.toBuilding(result.buildingId)}>
111
+            <Image src={transferImage(require('@/assets/news/property.png'))} style="width:42rpx;height:42rpx"></Image>
112
+            <Text className="text">查看项目</Text>
113
+          </Button>
114
+          <Button className='bt-nav__item' onClick={() => this.toHouseList(result.salesBatchId)}>
115
+            <Image src={transferImage(require('../../assets/list.png'))} style="width:40rpx;height:40rpx" ></Image>
116
+            <Text className="text">房源列表</Text>
117
+          </Button>
118
+          {status != 1 && <Button className='bt-nav__item' onClick={() => this.handleChatClick()}>
119
+            <Image src={transferImage(require('../../assets/consult.png'))} style="width:36rpx;height:40rpx"></Image>
120
+            <Text className="text">置业顾问</Text>
121
+          </Button>}
122
+          {status == 1 && <Button className='bt-nav__item' onClick={() => this.toSeeContract(result.contractViewUrl)} >
123
+            <Image src={transferImage(require('../../assets/see.png'))} style="width:42rpx;height:40rpx"></Image>
124
+            <Text className="text" style="color:#E4A938" >查看合同</Text>
125
+          </Button>}
126
+          {status == 1 && <Button className='bt-nav__item' onClick={() => this.toDownloadContract(result.contractDownloadUrl)} >
127
+            <Image src={transferImage(require('../../assets/download.png'))} style="width:42rpx;height:40rpx"></Image>
128
+            <Text className="text" style="color:#E4A938" >下载合同</Text>
129
+          </Button>}
130
+
131
+        </View>
132
+        <Button className="btn" onClick={() => this.toRaiseProfile(result.invoiceTargetId)}>
133
+          认筹单
134
+        </Button>
135
+      </View>
136
+    )
137
+  }
138
+
139
+  render() {
140
+    const { status } = this.$router.params
141
+    const { result = {} } = this.state
142
+    const failInfo = { title: '合同签署失败', desc: '签署失败描述' }
143
+    const showIcon = status == 1 ? require('../../assets/success2.png') : require('../../assets/fail2.png')
144
+    const showTitle = status == 1 ? '恭喜已成功签署合同' : failInfo.title
145
+
146
+    return (
147
+      <View className="result">
148
+        <Image className="result-img" src={showIcon}></Image>
149
+
150
+        <View className="status" style={status != 1 ? 'color:#F4333B' : 'color:#118EE9'}>{showTitle}</View>
151
+        {
152
+          status != 1 && (
153
+            <Block>
154
+              <View className="tip" style="margin-top:10rpx">{result.reason || ''}</View>
155
+              <View className="tip" style="margin-top:10rpx">请到认筹单中尝试重新签署合同</View>
156
+              <View className="tip" style="margin-top:10rpx">或联系您的专属置业顾问</View>
157
+            </Block>
158
+          )
159
+        }
160
+        {this.renderBtn()}
161
+        <BackHomeBtn style={{ right: '3%', bottom: '190rpx' }}></BackHomeBtn>
162
+      </View>
163
+
164
+    )
165
+  }
166
+
167
+}

+ 72
- 4
src/onlineSelling/pages/raiseProfile/index.js View File

@@ -5,9 +5,8 @@ import CellBlock from './CellBlock'
5 5
 import Statement from '../../components/Statement'
6 6
 import ContactConsultant from '../../components/ContactConsultant'
7 7
 import ConsultantItem from '../../components/ConsultantItem/index'
8
-import NamedIcon from '../../components/NamedIcon'
9 8
 import RaiseCard from '../../components/RaiseCard'
10
-import { queryRaiseDetail } from '@/services/project'
9
+import { queryRaiseDetail, contractUser } from '@/services/project'
11 10
 import { connect } from '@tarojs/redux'
12 11
 import * as noticeType from '@/constants/common.js'
13 12
 import './index.scss'
@@ -28,6 +27,8 @@ export default class Raise extends Component {
28 27
     orderDetail: {},
29 28
     refundOrder: {},
30 29
     payDisable: true,
30
+    signDetail: null,
31
+    contractDetail: null,
31 32
   }
32 33
 
33 34
   componentWillMount() {
@@ -40,6 +41,16 @@ export default class Raise extends Component {
40 41
         raiseOrder: res.taRaise || {},
41 42
         orderDetail: res.taOrder || {},
42 43
         refundOrder: res.refundOrder || {},
44
+        contractDetail: res.taContract || null,
45
+      }, () => {
46
+        const { raiseDeatil: { showContract } } = this.state
47
+        if (showContract == 1) {
48
+          contractUser({ raiseRecordId, }).then(res => {
49
+            this.setState({
50
+              signDetail: res || null
51
+            })
52
+          })
53
+        }
43 54
       })
44 55
     })
45 56
   }
@@ -200,9 +211,53 @@ export default class Raise extends Component {
200 211
       url: `/onlineSelling/pages/protocol/index?buildingId=${buildingId}&id=${raiseRecordId}`
201 212
     })
202 213
   }
214
+  toSign = () => {
215
+    const { signDetail, raiseOrder: { raiseId }, raiseDeatil: { consultantInfo: { name, userName, personId, consultantPersonId } } } = this.state
216
+    const { id: raiseRecordId } = this.$router.params
217
+    const status = signDetail ? signDetail.status : ''
218
+    if (status == 0 || status == 1) {
219
+      if (signDetail.certifiedAddress) {
220
+        Taro.navigateTo({
221
+          url: `/pages/project/panorama/index?url=${encodeURIComponent(signDetail.certifiedAddress)}&raiseId=${raiseId}&from=raiseProfile&consultantName=${encodeURIComponent(name || userName || '')}&consultantId=${consultantPersonId || personId || ''}&id=${raiseRecordId}`
222
+        })
223
+      } else {
224
+        Taro.showToast({
225
+          title: '无可跳转的认证地址',
226
+          icon: 'none'
227
+        })
228
+      }
229
+    } else {
230
+      const { id: raiseRecordId } = this.$router.params
231
+      Taro.navigateTo({
232
+        url: `/onlineSelling/pages/raiseMoney/Certification?id=${raiseRecordId}&raiseId=${raiseId}&consultantName=${encodeURIComponent(name || userName || '')}&consultantId=${consultantPersonId || personId || ''}`
233
+      })
234
+    }
235
+  }
236
+  toSeeContract(url) {
237
+    Taro.navigateTo({
238
+      url: `/pages/project/panorama/index?url=${encodeURIComponent(url)}`
239
+    })
240
+  }
241
+  toDownloadContract(url) {
242
+    Taro.downloadFile({
243
+      url,
244
+      success: function (param) {
245
+        if (param.statusCode === 200) {
246
+          Taro.showToast({
247
+            title: '下载合同成功',
248
+            icon: 'none'
249
+          })
250
+        }
251
+      },
252
+      fail: function (res) {
253
+        console.log('下载合同失败');
254
+      }
255
+    })
256
+
257
+  }
203 258
 
204 259
   render() {
205
-    const { buildingId, raiseDeatil, orderDetail, refundOrder, raiseOrder } = this.state;
260
+    const { buildingId, raiseDeatil, orderDetail, refundOrder, raiseOrder, signDetail, contractDetail } = this.state;
206 261
 
207 262
 
208 263
     // 认筹信息
@@ -251,12 +306,25 @@ export default class Raise extends Component {
251 306
             <View className="date">认筹提交时间  {dayjs(raiseDeatil.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
252 307
             <View className="agreement" onClick={this.toAgreement}>在线选房协议<Text className="right-icon"></Text></View>
253 308
           </View>
309
+          {contractDetail &&
310
+            <View className="raise-flex">
311
+              <View className="date">合同签署时间  {dayjs(raiseDeatil.createDate).format('YYYY/MM/DD HH:mm:ss')}
312
+                <Image className="download" onClick={() => this.toDownloadContract(contractDetail.contractDownloadUrl)} src={require('../../assets/download.png')} /></View>
313
+              <View className="agreement" onClick={() => this.toSeeContract(contractDetail.contractViewUrl)}>查看合同<Text className="right-icon"></Text></View>
314
+            </View>}
315
+
316
+          {
317
+            raiseDeatil.showContract == 1 && signDetail &&
318
+            <View className="sign" onClick={this.toSign}>
319
+              为保障您的权益,请签署认筹合同<Text className="right-icon" style="opacity:0.3"></Text><Text className="right-icon" style="opacity:0.6"></Text><Text className="right-icon"></Text>
320
+            </View>
321
+          }
254 322
           <View>
255 323
             <CellBlock dataset={raiseInfo} />
256 324
             {raiseDeatil.consultantInfo && <ConsultantItem
257 325
               data={raiseDeatil.consultantInfo}
258 326
               type="raiseProfile"
259
-              style="height:140rpx;margin-bottom:0rpx;width:690rpx"
327
+              style="height:140rpx;margin-bottom:0rpx;width:690rpx;padding:1px 0"
260 328
               contactClick={() => this.handleChatClick(raiseDeatil.consultantInfo)}
261 329
             />}
262 330
             <View className="hr" />

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

@@ -138,6 +138,13 @@
138 138
   .date{
139 139
     font-size: 28px;
140 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 149
   .agreement{
143 150
     color: #BB9C79;
@@ -153,4 +160,21 @@
153 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
 }

+ 48
- 0
src/pages/project/NavIcons/icons.js View File

@@ -108,4 +108,52 @@ export default [
108 108
     iconName: '意见反馈',
109 109
     page: '/useless/pages/person/feedback/index',
110 110
   },
111
+  {
112
+    iconCode: 'NewsDetail',
113
+    iconName: '资讯详情',
114
+    page: '/pages/news/detail/index',
115
+  },
116
+  {
117
+    iconCode: 'BuildingDetail',
118
+    iconName: '项目详情',
119
+    page: '/pages/project/detail/index',
120
+  },
121
+  {
122
+    iconCode: 'ActivityDetail',
123
+    iconName: '报名活动详情',
124
+    page: '/pages/activity/detail/index',
125
+  },
126
+  {
127
+    iconCode: 'LiveDetail',
128
+    iconName: '直播活动详情',
129
+    page: '/onlineSelling/pages/live/index',
130
+  },
131
+  {
132
+    iconCode: 'AssistanceDetail',
133
+    iconName: '助力活动详情',
134
+    page: '/pages/activity/detail/assistance',
135
+  },
136
+  {
137
+    iconCode: 'AssembleDetail',
138
+    iconName: '拼团活动详情',
139
+    page: '/pages/activity/detail/assemble',
140
+  },
141
+  {
142
+    iconCode: 'HouseListDetail',
143
+    iconName: '房源列表详情',
144
+    page: '/onlineSelling/pages/houseList/index',
145
+  },
146
+  {
147
+    iconCode: 'H5Detail',
148
+    iconName: 'H5活动详情',
149
+    page: '/pages/project/h5Page',
150
+  },
151
+  {
152
+    iconCode: 'H5WebView',
153
+    iconName: 'H5',
154
+    page: ({ navIcon }) => {
155
+      return `/pages/project/panorama/index?url=${encodeURIComponent(navIcon.params)}`
156
+    },
157
+  },
111 158
 ]
159
+

+ 6
- 3
src/pages/project/NavIcons/index.js View File

@@ -21,7 +21,7 @@ export default function (props) {
21 21
     if (isEmpty(navIcon.page) && isEmpty(navIcon.tab)) return false;
22 22
 
23 23
     if (isFunction(navIcon.page)) {
24
-      const pg = navIcon.page(props)
24
+      const pg = navIcon.page({ ...props, navIcon: navIcon })
25 25
       if (!pg) return false;
26 26
 
27 27
       return { ...navIcon, page: pg }
@@ -31,12 +31,15 @@ export default function (props) {
31 31
   }).filter(Boolean)
32 32
 
33 33
   const naviTo = (icon) => {
34
-    const { page, tab } = icon || {}
34
+
35
+
36
+    const { page, tab, params } = icon || {}
37
+    const urlParams = params && params.indexOf('?') === -1 ? '?' + params : '&' + params
35 38
 
36 39
     if (tab) {
37 40
       Taro.switchTab({ url: tab })
38 41
     } else {
39
-      Taro.navigateTo({ url: page })
42
+      Taro.navigateTo({ url: params ? page + urlParams : page })
40 43
     }
41 44
   }
42 45
 

+ 2
- 2
src/pages/project/index.scss View File

@@ -495,8 +495,8 @@
495 495
   height:94px;
496 496
   font-size: 34px;
497 497
   line-height: 94px;
498
-  background-color: #f8f8f8;
499
-  color: #bb9c79;
498
+  background-color: #bb9c79;
499
+  color: #fff;
500 500
   text-align: center;
501 501
   border-radius: 10px;
502 502
   margin: 40px 30px;

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

@@ -1,12 +1,63 @@
1 1
 import Taro, { Component } from '@tarojs/taro'
2 2
 import { WebView } from '@tarojs/components'
3
+import { contractUser, contractCheck } from '@/services/project'
3 4
 
4 5
 export default class Panorama extends Component {
5 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().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
+    } else {
40
+      console.log(this.$router.params, "this.$router.paramsthis.$router.paramsthis.$router.paramsthis.$router.params")
41
+    }
42
+  }
43
+  componentDidHide() {
44
+    if (this.tk) {
45
+      clearInterval(this.tk)
46
+    }
47
+    if (this.tk2) {
48
+      clearInterval(this.tk2)
49
+    }
50
+  }
51
+  componentWillUnmount() {
52
+    if (this.tk) {
53
+      clearInterval(this.tk)
54
+    }
55
+    if (this.tk2) {
56
+      clearInterval(this.tk2)
57
+    }
58
+  }
6 59
 
7
-  componentWillMount() {}
8
-
9
-  render () {
60
+  render() {
10 61
     const url = decodeURIComponent(this.$router.params.url)
11 62
 
12 63
     return (

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

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

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

@@ -97,7 +97,7 @@ export function optionBuilder(options) {
97 97
   ]
98 98
 }
99 99
 
100
-export function reqSuccess (res, opts) {
100
+export function reqSuccess(res, opts) {
101 101
   const [, settings] = opts || []
102 102
   const { showMessage, autoLogin = true } = settings || {}
103 103
 
@@ -110,7 +110,7 @@ export function reqSuccess (res, opts) {
110 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 114
   if (code === CODE_SUCCESS) {
115 115
     return data
116 116
   } else {
@@ -143,7 +143,7 @@ export function reqSuccess (res, opts) {
143 143
   }
144 144
 }
145 145
 
146
-export function reqFail (err, opts) {
146
+export function reqFail(err, opts) {
147 147
   const [reqParams, settings] = opts || []
148 148
   const { showMessage } = settings || {}
149 149
 

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

@@ -367,7 +367,7 @@ export const downloadFile = (imgUrl, callback) => {
367 367
       }
368 368
     },
369 369
     fail: function (res) {
370
-      console.log('生成失败请稍重试');
370
+      console.log('生成失败请稍重试');
371 371
     }
372 372
   })
373 373
 }