xujing 5 年 前
コミット
f808a97050
共有3 個のファイルを変更した31 個の追加19 個の削除を含む
  1. 1
    1
      config/prod.js
  2. 1
    1
      project.config.json
  3. 29
    17
      src/pages/project/h5Page.js

+ 1
- 1
config/prod.js ファイルの表示

@@ -9,7 +9,7 @@ module.exports = {
9 9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    Version:'V3.5.6_2020-01-14'
12
+    Version:'V3.5.6_2020-01-16'
13 13
   },
14 14
   weapp: {},
15 15
   h5: {}

+ 1
- 1
project.config.json ファイルの表示

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

+ 29
- 17
src/pages/project/h5Page.js ファイルの表示

@@ -12,6 +12,7 @@ import { getMiniQrcode, savePoint, updatePoint } from '@/services/common'
12 12
 import { isEmpty } from '@/utils/tools'
13 13
 import { rule as ruleToast } from '@/utils/ruleToast'
14 14
 import { share as shareSavePoint } from '@/utils/shareSavePoint'
15
+import { report as reportCustomer } from '@/utils/customer'
15 16
 
16 17
 const bgImg = "https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/bg.png"
17 18
 
@@ -28,6 +29,7 @@ export default class Index extends Component {
28 29
     pageInfo: {},
29 30
     codeParams: '', // 解析二维码参数
30 31
     h5Id: undefined,
32
+    reportedCustomer: false,
31 33
   }
32 34
 
33 35
   componentWillMount() {
@@ -316,32 +318,42 @@ export default class Index extends Component {
316 318
       }
317 319
     })
318 320
   }
319
-
320 321
   // 报备客户
321 322
   reportClientFn() {
322 323
     const { codeParams } = this.state
323 324
     const consultant = this.$router.params.consultant || codeParams.consultant || ""
324
-    const { userInfo: { person: { phone, tel, personId, userId, personType } } } = this.props
325
-    const isConsultant = personType == ROLE_CODE['CONSULTANT']
326
-    console.log(this.$router, "this.$routerthis报备客户哈哈哈哈")
327
-    console.log(this.props.userInfo.person, "person报备客户哈哈哈哈")
328
-
329
-    if (isConsultant && consultant != userId) {
330
-      const realPhone = phone || tel
331
-      const payload = {
332
-        realtyConsultant: consultant, //报备人 置业顾问
333
-        phone: realPhone,
334
-        showToast: false
335
-      }
325
+    const { userInfo: { person } } = this.props
336 326
 
337
-      reportClient(payload).then(res => {
338
-        console.log('恭喜您绑定成功')
339
-      }).catch(err => {
340
-        console.error(err)
327
+    if (!this.state.reportedCustomer) {
328
+      reportCustomer(person, consultant).then(() => {
329
+        this.setState({ reportedCustomer: true })
341 330
       })
342 331
     }
343 332
   }
344 333
 
334
+  // // 报备客户
335
+  // reportClientFn() {
336
+  //   const { codeParams } = this.state
337
+  //   const consultant = this.$router.params.consultant || codeParams.consultant || ""
338
+  //   const { userInfo: { person: { phone, tel, personId, userId, personType } } } = this.props
339
+  //   // const isConsultant = personType == ROLE_CODE['CONSULTANT']
340
+  //   console.log(this.$router, "this.$routerthis报备客户哈哈哈哈")
341
+  //   console.log(this.props.userInfo.person, "person报备客户哈哈哈哈")
342
+  //   if (isConsultant && consultant != userId) {
343
+  //     const realPhone = phone || tel
344
+  //     const payload = {
345
+  //       realtyConsultant: consultant, //报备人 置业顾问
346
+  //       phone: realPhone,
347
+  //       showToast: false
348
+  //     }
349
+  //     reportClient(payload).then(res => {
350
+  //       console.log('恭喜您绑定成功')
351
+  //     }).catch(err => {
352
+  //       console.error(err)
353
+  //     })
354
+  //   }
355
+  // }
356
+
345 357
   renderMaskBanner() {
346 358
     const { avatarVisible, phoneVisible, pageInfo, h5Id } = this.state
347 359
     return (