浏览代码

静态页面

1002884655 4 年前
父节点
当前提交
2ae174f1ae
共有 3 个文件被更改,包括 57 次插入3 次删除
  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 查看文件

4
 import { getItemList } from '@/services/item'
4
 import { getItemList } from '@/services/item'
5
 import ready from '@/utils/ready'
5
 import ready from '@/utils/ready'
6
 import { connect } from '@tarojs/redux'
6
 import { connect } from '@tarojs/redux'
7
+import { share as shareSavePoint } from '@/utils/shareSavePoint'
7
 
8
 
8
 @connect(
9
 @connect(
9
   state => ({ ...state.user, ...state.city })
10
   state => ({ ...state.user, ...state.city })
10
 )
11
 )
11
 export default class Index extends Component {
12
 export default class Index extends Component {
12
   config = {
13
   config = {
13
-    navigationBarTitleText: '地产'
14
+    navigationBarTitleText: '雅居乐地产'
14
   }
15
   }
15
   state = {
16
   state = {
16
     PageList: [{}, {}, {}, {}, {}],
17
     PageList: [{}, {}, {}, {}, {}],
17
     filterOpt: {},
18
     filterOpt: {},
18
     pageIndex: 1,
19
     pageIndex: 1,
19
-    Org: null
20
+    Org: null,
21
+    ShareTitle: '雅居乐地产',
22
+    ShareImg: null
20
   }
23
   }
21
   componentWillMount () {
24
   componentWillMount () {
22
     ready.queue(async () => {
25
     ready.queue(async () => {
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
   loadList (page = 0, pageSize = 10) {
51
   loadList (page = 0, pageSize = 10) {
33
     const { curCity } = this.props
52
     const { curCity } = this.props
34
     const { filterOpt } = this.state
53
     const { filterOpt } = this.state

+ 16
- 0
src/pages/league/detail.js 查看文件

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
   OpenMap () {
39
   OpenMap () {
24
     const coord = this.state.DetailInfo.lngLat.split(',')
40
     const coord = this.state.DetailInfo.lngLat.split(',')
25
     const latitude = parseFloat(coord[1])
41
     const latitude = parseFloat(coord[1])

+ 20
- 1
src/pages/league/index.js 查看文件

6
 import ShopItem from './item'
6
 import ShopItem from './item'
7
 import { connect } from '@tarojs/redux'
7
 import { connect } from '@tarojs/redux'
8
 import ListView from '@/components/ListView'
8
 import ListView from '@/components/ListView'
9
+import { share as shareSavePoint } from '@/utils/shareSavePoint'
9
 
10
 
10
 @connect(
11
 @connect(
11
   state => ({ ...state.city })
12
   state => ({ ...state.city })
26
     hasMore: true,
27
     hasMore: true,
27
     DataLock: false,
28
     DataLock: false,
28
     CurrentTypeId: null,
29
     CurrentTypeId: null,
29
-    CityData: null
30
+    CityData: null,
31
+    ShareTitle: '雅居乐乐客联盟',
32
+    ShareImg: null
30
   }
33
   }
31
   componentWillMount () {
34
   componentWillMount () {
32
     ready.queue(() => {
35
     ready.queue(() => {
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
   ToGetPageList () {
84
   ToGetPageList () {
66
     if (!this.state.hasMore || this.DataLock) return
85
     if (!this.state.hasMore || this.DataLock) return
67
     this.DataLock = true
86
     this.DataLock = true