张延森 5 年前
父节点
当前提交
1c35ca0689
共有 2 个文件被更改,包括 10 次插入7 次删除
  1. 9
    6
      src/pages/activity/detail/index.js
  2. 1
    1
      src/pages/project/detail/index.js

+ 9
- 6
src/pages/activity/detail/index.js 查看文件

96
   loadDetail() {
96
   loadDetail() {
97
     const { id } = this.state
97
     const { id } = this.state
98
     Taro.showLoading()
98
     Taro.showLoading()
99
-    const router = Taro.getStorageSync('router') || { query: {} }
99
+    const router = Taro.getStorageSync('router')
100
     const consultant = this.$router.params.consultant || router.query.consultant
100
     const consultant = this.$router.params.consultant || router.query.consultant
101
     const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
101
     const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
102
     const recommender = this.$router.params.recommender || router.query.recommender || ""
102
     const recommender = this.$router.params.recommender || router.query.recommender || ""
153
 
153
 
154
   // 报备客户
154
   // 报备客户
155
   reportClientFn() {
155
   reportClientFn() {
156
-    const router = Taro.getStorageSync('router') || { query: {} }
156
+    const router = Taro.getStorageSync('router')
157
     const consultant = this.$router.params.consultant || router.query.consultant || ""
157
     const consultant = this.$router.params.consultant || router.query.consultant || ""
158
     const { userInfo: { person } } = this.props
158
     const { userInfo: { person } } = this.props
159
 
159
 
160
-    reportCustomer(person, consultant).then(() => {
161
-      this.setState({ reportedCustomer: true })
162
-    })
160
+    if (!this.state.reportedCustomer) {
161
+      reportCustomer(person, consultant).then(() => {
162
+        this.setState({ reportedCustomer: true })
163
+      })
164
+    }
163
   }
165
   }
164
   onShareAppMessage = () => {
166
   onShareAppMessage = () => {
165
     const { detail: { shareContents, title, dynamicId, imgUrl } } = this.state
167
     const { detail: { shareContents, title, dynamicId, imgUrl } } = this.state
394
   }
396
   }
395
 
397
 
396
   render() {
398
   render() {
399
+    const router = Taro.getStorageSync('router')
397
     const { detail, loaded, isSaved, isSign, posterVisible, posterData, posterShow, consultData, consultShow } = this.state
400
     const { detail, loaded, isSaved, isSign, posterVisible, posterData, posterShow, consultData, consultShow } = this.state
398
     const { userInfo = {} } = this.props
401
     const { userInfo = {} } = this.props
399
     const { person: { phone, personId, nickname, name, tel } = {} } = userInfo
402
     const { person: { phone, personId, nickname, name, tel } = {} } = userInfo
406
 
409
 
407
         {
410
         {
408
           (personId && !phone && !tel && consultant) &&
411
           (personId && !phone && !tel && consultant) &&
409
-          <AchievePhone user={person} onSuccess={this.handleAuthPhoneSuccess}></AchievePhone>
412
+          <AchievePhone user={userInfo.person} onSuccess={this.handleAuthPhoneSuccess}></AchievePhone>
410
         }
413
         }
411
 
414
 
412
         {
415
         {

+ 1
- 1
src/pages/project/detail/index.js 查看文件

121
 
121
 
122
   // 报备客户
122
   // 报备客户
123
   reportClientFn() {
123
   reportClientFn() {
124
-    const router = Taro.getStorageSync('router') || { query: {} }
124
+    const router = Taro.getStorageSync('router')
125
     const consultant = this.$router.params.consultant || router.query.consultant || ""
125
     const consultant = this.$router.params.consultant || router.query.consultant || ""
126
     const { userInfo: { person } } = this.props
126
     const { userInfo: { person } } = this.props
127
 
127