张延森 5 年 前
コミット
b2ff7d28c4
共有6 個のファイルを変更した32 個の追加7 個の削除を含む
  1. 1
    1
      config/dev.js
  2. 1
    1
      config/prod.js
  3. 2
    0
      src/constants/api.js
  4. 7
    3
      src/pages/project/index.js
  5. 9
    1
      src/services/news.js
  6. 12
    1
      src/utils/shareSavePoint.js

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

@@ -15,7 +15,7 @@ module.exports = {
15 15
     // WSS_HOST: '"ws://192.168.2.51:8080"',
16 16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17 17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18
-    Version: 'V3.5.13'
18
+    Version: 'V3.5.14'
19 19
   },
20 20
   weapp: {},
21 21
   h5: {}

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

@@ -11,7 +11,7 @@ module.exports = {
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13 13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
14
-    Version: 'V3.5.13'
14
+    Version: 'V3.5.14'
15 15
   },
16 16
   weapp: {},
17 17
   h5: {}

+ 2
- 0
src/constants/api.js ファイルの表示

@@ -123,6 +123,8 @@ export const API_HOUSE_POSTER = resolvePath('housePost/share')
123 123
 export const API_LIVE_SHARE = resolvePath('liveApp/share')
124 124
 export const API_LIVE_POSTER = resolvePath('livePost/share')
125 125
 
126
+export const API_INDEX_SHARE = resolvePath('main/share')
127
+
126 128
 export const API_ACTIVITY_FAVOR = resolvePath('activity/save')
127 129
 export const API_NEWS_FAVOR = resolvePath('news/save')
128 130
 export const API_CARD_FAVOR = resolvePath('card/save')

+ 7
- 3
src/pages/project/index.js ファイルの表示

@@ -16,6 +16,7 @@ import * as actions from '@/actions/project'
16 16
 import { transferImage } from '@/utils/tools'
17 17
 import Notice from '@/components/Notice'
18 18
 import NavIcons from './NavIcons'
19
+import { share as shareSavePoint } from '@/utils/shareSavePoint'
19 20
 
20 21
 @connect(
21 22
   state => ({ ...state.project, ...state.city, ...state.user, system: state.system }),
@@ -219,17 +220,19 @@ export default class Index extends Component {
219 220
       userInfo: { person: { personId } }
220 221
     } = this.props
221 222
 
222
-    savePoint({
223
+    shareSavePoint({
223 224
       event: 'share',
224 225
       eventType: 'main',
225 226
       propertyName: '首页分享',
227
+      sharePersonId: personId,
228
+      targetId: 'index',
226 229
       data: '{}'
227
-    }).then(res => {
230
+    }, 'main').then(res => {
228 231
       console.log('首页分享')
229 232
     })
230 233
     return {
231 234
       title: this.state.imgDocument || ` 精准获客—上${this.props.userInfo.miniApp.name || '橙蕉'},买好房`,//分享内容
232
-      path: `/pages/project/index?from=share&recommender=${personId}`,//分享地址
235
+      path: `/pages/project/index?from=share&recommender=${personId}&id=index`,//分享地址
233 236
       imageUrl: this.state.shareImg || 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1574145199853-97feda7895c65be33aa234a7b81b37f.jpg',
234 237
     }
235 238
   }
@@ -493,6 +496,7 @@ export default class Index extends Component {
493 496
       newsShow: visiable
494 497
     })
495 498
   }
499
+
496 500
   render() {
497 501
     const { achieve, helpGroupList, propagandaBanner, newsShow, iconList } = this.state
498 502
     const { curCity, unReadNum, userInfo: { person: { personType } } } = this.props

+ 9
- 1
src/services/news.js ファイルの表示

@@ -8,9 +8,17 @@ import {
8 8
   API_HOUSE_POSTER,
9 9
   API_LIVE_SHARE,
10 10
   API_LIVE_POSTER,
11
-  API_ACTIVITY_GROUP
11
+  API_ACTIVITY_GROUP,
12
+  API_INDEX_SHARE,
12 13
 } from '@/constants/api'
13 14
 
15
+/**
16
+ * 首页分享埋点
17
+ * @param {*} id  名片id
18
+ */
19
+export const addIndexShareNum = id => fetch({ url: `${API_INDEX_SHARE}/${id}`, method: 'POST' })
20
+
21
+
14 22
 /**
15 23
  * 项目uv埋点
16 24
  * @param {*} id  项目id

+ 12
- 1
src/utils/shareSavePoint.js ファイルの表示

@@ -2,7 +2,14 @@ import { savePoint } from '@/services/common'
2 2
 import { addItemShareNum } from '@/services/item'
3 3
 import { addActivityShareNum, addHelpShareNum, addGroupShareNum, addHFiveShareNum } from '@/services/activity'
4 4
 import { addCardShareNum } from '@/services/card'
5
-import { addNewsShareNum, addHousePosterNum, addHouseShareNum, addLivePosterNum, addLiveShareNum } from '@/services/news'
5
+import {
6
+    addIndexShareNum,
7
+    addNewsShareNum,
8
+    addHousePosterNum,
9
+    addHouseShareNum,
10
+    addLivePosterNum,
11
+    addLiveShareNum,
12
+} from '@/services/news'
6 13
 
7 14
 /**
8 15
  * 积分提示
@@ -13,6 +20,10 @@ export function share(options, type) {
13 20
 
14 21
     return new Promise((resolve, reject) => {
15 22
         switch (type) {
23
+            case 'main':
24
+                addIndexShareNum(options.targetId)
25
+                savePoint(options)
26
+                break;
16 27
             case 'project':
17 28
                 addItemShareNum(options.targetId)
18 29
                 savePoint(options)