xujing 5 年前
父节点
当前提交
45d2ebaca1

+ 4
- 4
config/dev.js 查看文件

@@ -3,14 +3,14 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"https://dev.fangdeal.cn"', //测试
7
-    // WSS_HOST: '"wss://dev.fangdeal.cn"',
6
+    HOST: '"https://dev.fangdeal.cn"', //测试
7
+    WSS_HOST: '"wss://dev.fangdeal.cn"',
8 8
     // HOST: '"http://192.168.0.195:8080"', //魏超
9 9
     // WSS_HOST: '"ws://192.168.0.195:8080"',
10 10
     // HOST: '"http://192.168.0.144:8080"', //顾邵勇
11 11
     // WSS_HOST: '"ws://192.168.0.144:8080"',
12
-    HOST: '"http://192.168.0.190:8080"', //傅行帆
13
-    WSS_HOST: '"ws://192.168.0.190:8080"',
12
+    // HOST: '"http://192.168.0.190:8080"', //傅行帆
13
+    // WSS_HOST: '"ws://192.168.0.190:8080"',
14 14
     OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",
15 15
     OSS_FAST_PATH: "https://njcj.oss-accelerate.aliyuncs.com/",
16 16
     Version: "V3.5.28"

+ 2
- 1
src/pages/activity/detail/assemble.js 查看文件

@@ -358,8 +358,9 @@ export default class Detail extends Component {
358 358
         this.setState({ pointRecordId: res.recordId })
359 359
       })
360 360
     })
361
+    const notSelf = userInfo.person.personId != consultant
361 362
 
362
-    if (consultant) {
363
+    if (notSelf && consultant) {
363 364
       getCardDetail(consultant).then(res => {
364 365
         this.setState({
365 366
           consultData: res,

+ 2
- 2
src/pages/activity/detail/assistance.js 查看文件

@@ -359,8 +359,8 @@ export default class Detail extends Component {
359 359
         this.setState({ pointRecordId: res.recordId })
360 360
       })
361 361
     })
362
-
363
-    if (consultant) {
362
+    const notSelf = userInfo.person.personId != consultant
363
+    if (notSelf && consultant) {
364 364
       getCardDetail(consultant).then(res => {
365 365
         this.setState({
366 366
           consultData: res,

+ 3
- 2
src/pages/activity/detail/index.js 查看文件

@@ -154,8 +154,9 @@ export default class Detail extends Component {
154 154
       })
155 155
       WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
156 156
     })
157
-
158
-    if (consultant) {
157
+    const { userInfo = {} } = this.props
158
+    const notSelf = userInfo.person.personId != consultant
159
+    if (notSelf && consultant) {
159 160
       getCardDetail(consultant).then(res => {
160 161
         this.setState({
161 162
           consultData: res,

+ 8
- 3
src/pages/person/index.js 查看文件

@@ -13,6 +13,7 @@ import { menus } from './menus'
13 13
 import login from '@/utils/login'
14 14
 export const version = Version
15 15
 import { rule as ruleToast } from '@/utils/ruleToast'
16
+import { Loading } from '@/components/Loading'
16 17
 
17 18
 @connect(({ user, city }) => ({ user, city }), { ...actions })
18 19
 
@@ -30,6 +31,7 @@ export default class Person extends Component {
30 31
     menus: [],
31 32
     roleName: '普通用户',
32 33
     pageVisible: false,
34
+    loading: true,
33 35
   }
34 36
 
35 37
   componentDidShow() {
@@ -42,10 +44,10 @@ export default class Person extends Component {
42 44
   loadUserInfo() {
43 45
     queryUserInfo().then(users => {
44 46
       const [roleSetting, roleName] = this.getRoleName(users.personType)
45
-
46 47
       this.setState({
47 48
         users,
48 49
         phone: users.phone,
50
+        loading: false,
49 51
         pageVisible: !users.phone && !users.tel,
50 52
         menus: menus.map(group => group.filter(x => x.userTypes.indexOf(users.personType) > -1)),
51 53
         roleName,
@@ -303,8 +305,11 @@ export default class Person extends Component {
303 305
   }
304 306
 
305 307
   render() {
306
-    const { phone, tel } = this.state.users
307
-    const { pageVisible } = this.state
308
+    // const { phone, tel } = this.state.users
309
+    const { loading, pageVisible } = this.state
310
+    if (loading) {
311
+      return <View style="margin: 80px auto;"><Loading color="#BB9C79" size={100} /></View>
312
+    }
308 313
     return (
309 314
       <View className='wrap'>
310 315
         {/* {(phone || tel) && this.renderDetail()} */}

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

@@ -193,12 +193,11 @@ export default class Index extends Component {
193 193
       projectDetail: { buildingId },
194 194
       userInfo: { person: { personId, personType, userId } }
195 195
     } = this.props
196
-    const { sceneParams } = this.state
196
+    const sceneParams = this._$_scene || {}
197 197
     const consultant1 = this.$router.params.consultant || sceneParams.consultant || Taro.getStorageSync('consultantId') || ''
198 198
     const consultantId1 = this.$router.params.consultantId || sceneParams.consultantId || ''
199 199
     const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : consultant1
200 200
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : consultantId1
201
-
202 201
     const queryParams = [
203 202
       `id=${buildingId}`,
204 203
       'from=building_share',
@@ -218,7 +217,7 @@ export default class Index extends Component {
218 217
       projectDetail: { shareContents, buildingName, buildingId, poster = '' },
219 218
       userInfo: { person: { personId, personType, userId } }
220 219
     } = this.props
221
-    const { sceneParams } = this.state
220
+    const sceneParams = this._$_scene || {}
222 221
     const consultantId1 = this.$router.params.consultantId || sceneParams.consultantId || ''
223 222
     const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : consultantId1
224 223
     // 分享埋点
@@ -257,7 +256,7 @@ export default class Index extends Component {
257 256
       addItemUv(id)
258 257
       const { qrcodeParams } = this.state
259 258
       // 埋点
260
-      const consultant = Taro.getStorageSync('consultantId') || ''
259
+      const consultant = this.$router.params.consultant || sceneParams.consultant || Taro.getStorageSync('consultantId') || ''
261 260
       // const consultant = this.$router.params.consultant || qrcodeParams.consultant
262 261
       // const consultantId = this.$router.params.consultantId ||  qrcodeParams.consultantId || ""
263 262
       // const recommender = this.$router.params.recommender || qrcodeParams.recommender || ""
@@ -351,6 +350,7 @@ export default class Index extends Component {
351 350
       title: '正在加载数据',
352 351
       icon: 'loading'
353 352
     })
353
+    console.log('项目详情项目详情项目详情项目详情项目详情项目详情项目详情')
354 354
     dispatchProjectDetail(buildingId, queryInfo, { header: { ['x-consultant']: consultant, ['x-recommender']: recommender } }).then(res => {
355 355
       const connectId = (res.extendContent || [])[0] ? (res.extendContent || [])[0].contentId : null
356 356
       const extendContentList = Taro.getStorageSync('extendContent') || []

+ 13
- 6
src/pages/project/index.js 查看文件

@@ -17,6 +17,7 @@ import * as actions from '@/actions/project'
17 17
 import { transferImage } from '@/utils/tools'
18 18
 import Notice from '@/components/Notice'
19 19
 import NavIcons from './NavIcons'
20
+import { ROLE_CODE } from '@/constants/user'
20 21
 import { share as shareSavePoint } from '@/utils/shareSavePoint'
21 22
 
22 23
 @connect(
@@ -62,12 +63,6 @@ export default class Index extends Component {
62 63
       this.loadData({ curCity: city })
63 64
 
64 65
       this.getIndexShareInfo()
65
-      
66
-      const consultant = this.$router.params.consultant || Taro.getStorageSync('consultantId') || ''
67
-      const recommender = this.$router.params.recommender || Taro.getStorageSync('recommender') || ''
68
-      reportIndexCustomer({ ['x-consultant']: consultant, ['x-recommender']: recommender }).then(res => {
69
-
70
-      })
71 66
 
72 67
       savePoint({
73 68
         event: 'index',
@@ -136,6 +131,17 @@ export default class Index extends Component {
136 131
     this.loadList(props)
137 132
     this.loadExtContents(props)
138 133
     this.getIndexIcons()
134
+    console.log('首页分享绑定客户!!!!!!!!!')
135
+    this.report()
136
+  }
137
+  report() {
138
+    const consultant = this.$router.params.consultant || Taro.getStorageSync('consultantId') || ''
139
+    const recommender = this.$router.params.recommender || Taro.getStorageSync('recommender') || ''
140
+    console.log(consultant, "consultantconsultant")
141
+    console.log(recommender, "recommenderrecommenderrecommenderrecommender")
142
+    const loadOptions = wx.getLaunchOptionsSync()
143
+    reportIndexCustomer({ channelId: '', qrCodeId: '', scene: loadOptions.scene, showToast: false }, { ['x-consultant']: consultant, ['x-recommender']: recommender })
144
+
139 145
   }
140 146
 
141 147
   loadExtContents(props) {
@@ -247,6 +253,7 @@ export default class Index extends Component {
247 253
     }, 'main').then(res => {
248 254
       console.log('首页分享')
249 255
     })
256
+    console.log('Indexrouter--->', `/pages/project/index?from=share&recommender=${personId}&consultant=${consultant}&consultantId=${consultantId}&id=index`)
250 257
     return {
251 258
       title: this.state.imgDocument || ` 精准获客—上${this.props.userInfo.miniApp.name || '橙蕉'},买好房`,//分享内容
252 259
       path: `/pages/project/index?from=share&recommender=${personId}&consultant=${consultant}&consultantId=${consultantId}&id=index`,//分享地址

+ 1
- 1
src/services/project.js 查看文件

@@ -27,7 +27,7 @@ import {
27 27
  * 首页绑定私客
28 28
  * @param {*} payload
29 29
  */
30
-export const reportIndexCustomer = (header) => fetch({ url: API_INDEX_CUSTOMER, header, method: 'POST' })
30
+export const reportIndexCustomer = (payload, header) => fetch({ url: API_INDEX_CUSTOMER, payload, header, method: 'POST' })
31 31
 /**
32 32
  * 获取房源列表
33 33
  * @param {*} payload