Browse Source

静态页面

1002884655 4 years ago
parent
commit
2ae174f1ae
3 changed files with 57 additions and 3 deletions
  1. 21
    2
      src/pages/dichan/index.js
  2. 16
    0
      src/pages/league/detail.js
  3. 20
    1
      src/pages/league/index.js

+ 21
- 2
src/pages/dichan/index.js View File

@@ -4,19 +4,22 @@ import './index.scss'
4 4
 import { getItemList } from '@/services/item'
5 5
 import ready from '@/utils/ready'
6 6
 import { connect } from '@tarojs/redux'
7
+import { share as shareSavePoint } from '@/utils/shareSavePoint'
7 8
 
8 9
 @connect(
9 10
   state => ({ ...state.user, ...state.city })
10 11
 )
11 12
 export default class Index extends Component {
12 13
   config = {
13
-    navigationBarTitleText: '地产'
14
+    navigationBarTitleText: '雅居乐地产'
14 15
   }
15 16
   state = {
16 17
     PageList: [{}, {}, {}, {}, {}],
17 18
     filterOpt: {},
18 19
     pageIndex: 1,
19
-    Org: null
20
+    Org: null,
21
+    ShareTitle: '雅居乐地产',
22
+    ShareImg: null
20 23
   }
21 24
   componentWillMount () {
22 25
     ready.queue(async () => {
@@ -29,6 +32,22 @@ export default class Index extends Component {
29 32
       })
30 33
     })
31 34
   }
35
+  //   转发
36
+  onShareAppMessage = () => {
37
+    // shareSavePoint({
38
+    //   event: 'share',
39
+    //   eventType: 'main',
40
+    //   propertyName: '地产分享',
41
+    //   sharePersonId: personId,
42
+    //   targetId: 'dichan',
43
+    //   data: '{}'
44
+    // }, 'main')
45
+    return {
46
+      title: this.state.ShareTitle,//分享内容
47
+      path: `/pages/dichan/index`,//分享地址
48
+      imageUrl: null,
49
+    }
50
+  }
32 51
   loadList (page = 0, pageSize = 10) {
33 52
     const { curCity } = this.props
34 53
     const { filterOpt } = this.state

+ 16
- 0
src/pages/league/detail.js View File

@@ -20,6 +20,22 @@ export default class Index extends Component {
20 20
       })
21 21
     })
22 22
   }
23
+  //   转发
24
+  onShareAppMessage = () => {
25
+    // shareSavePoint({
26
+    //   event: 'share',
27
+    //   eventType: 'main',
28
+    //   propertyName: '乐客联盟分享',
29
+    //   sharePersonId: personId,
30
+    //   targetId: 'league',
31
+    //   data: '{}'
32
+    // }, 'main')
33
+    return {
34
+      title: this.state.DetailInfo.shopName,//分享内容
35
+      path: `/pages/league/detail?id=${this.state.DetailInfo.shopId}`,//分享地址
36
+      imageUrl: null,
37
+    }
38
+  }
23 39
   OpenMap () {
24 40
     const coord = this.state.DetailInfo.lngLat.split(',')
25 41
     const latitude = parseFloat(coord[1])

+ 20
- 1
src/pages/league/index.js View File

@@ -6,6 +6,7 @@ import ready from '@/utils/ready'
6 6
 import ShopItem from './item'
7 7
 import { connect } from '@tarojs/redux'
8 8
 import ListView from '@/components/ListView'
9
+import { share as shareSavePoint } from '@/utils/shareSavePoint'
9 10
 
10 11
 @connect(
11 12
   state => ({ ...state.city })
@@ -26,7 +27,9 @@ export default class Index extends Component {
26 27
     hasMore: true,
27 28
     DataLock: false,
28 29
     CurrentTypeId: null,
29
-    CityData: null
30
+    CityData: null,
31
+    ShareTitle: '雅居乐乐客联盟',
32
+    ShareImg: null
30 33
   }
31 34
   componentWillMount () {
32 35
     ready.queue(() => {
@@ -62,6 +65,22 @@ export default class Index extends Component {
62 65
       })
63 66
     })
64 67
   }
68
+  //   转发
69
+  onShareAppMessage = () => {
70
+    // shareSavePoint({
71
+    //   event: 'share',
72
+    //   eventType: 'main',
73
+    //   propertyName: '乐客联盟分享',
74
+    //   sharePersonId: personId,
75
+    //   targetId: 'league',
76
+    //   data: '{}'
77
+    // }, 'main')
78
+    return {
79
+      title: this.state.ShareTitle,//分享内容
80
+      path: `/pages/league/index`,//分享地址
81
+      imageUrl: null,
82
+    }
83
+  }
65 84
   ToGetPageList () {
66 85
     if (!this.state.hasMore || this.DataLock) return
67 86
     this.DataLock = true