|
@@ -96,7 +96,7 @@ export default class Detail extends Component {
|
96
|
96
|
loadDetail() {
|
97
|
97
|
const { id } = this.state
|
98
|
98
|
Taro.showLoading()
|
99
|
|
- const router = Taro.getStorageSync('router') || { query: {} }
|
|
99
|
+ const router = Taro.getStorageSync('router')
|
100
|
100
|
const consultant = this.$router.params.consultant || router.query.consultant
|
101
|
101
|
const consultantId = this.$router.params.consultantId || router.query.consultantId || ""
|
102
|
102
|
const recommender = this.$router.params.recommender || router.query.recommender || ""
|
|
@@ -153,13 +153,15 @@ export default class Detail extends Component {
|
153
|
153
|
|
154
|
154
|
// 报备客户
|
155
|
155
|
reportClientFn() {
|
156
|
|
- const router = Taro.getStorageSync('router') || { query: {} }
|
|
156
|
+ const router = Taro.getStorageSync('router')
|
157
|
157
|
const consultant = this.$router.params.consultant || router.query.consultant || ""
|
158
|
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
|
166
|
onShareAppMessage = () => {
|
165
|
167
|
const { detail: { shareContents, title, dynamicId, imgUrl } } = this.state
|
|
@@ -394,6 +396,7 @@ export default class Detail extends Component {
|
394
|
396
|
}
|
395
|
397
|
|
396
|
398
|
render() {
|
|
399
|
+ const router = Taro.getStorageSync('router')
|
397
|
400
|
const { detail, loaded, isSaved, isSign, posterVisible, posterData, posterShow, consultData, consultShow } = this.state
|
398
|
401
|
const { userInfo = {} } = this.props
|
399
|
402
|
const { person: { phone, personId, nickname, name, tel } = {} } = userInfo
|
|
@@ -406,7 +409,7 @@ export default class Detail extends Component {
|
406
|
409
|
|
407
|
410
|
{
|
408
|
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
|
{
|