Browse Source

savepoint

xujing 5 years ago
parent
commit
619d0858fa

+ 9
- 2
src/pages/person/feedback/index.js View File

1
 import Taro, { Component } from '@tarojs/taro'
1
 import Taro, { Component } from '@tarojs/taro'
2
 import { isChineseMobilePhoneNumber, isEmail } from '@/utils/tools'
2
 import { isChineseMobilePhoneNumber, isEmail } from '@/utils/tools'
3
 import './index.scss'
3
 import './index.scss'
4
-
4
+import { savePoint, } from '@/services/common'
5
 import { submitFeedBack } from '@/services/feedBack'
5
 import { submitFeedBack } from '@/services/feedBack'
6
 export default class FeedBack extends Component {
6
 export default class FeedBack extends Component {
7
   state = {
7
   state = {
49
           icon: 'success',
49
           icon: 'success',
50
           duration: 2000
50
           duration: 2000
51
         })
51
         })
52
-
52
+        savePoint({
53
+          event: 'feedback',
54
+          eventType: 'center',
55
+          propertyName: '提交反馈',
56
+          data: '{}'
57
+        }).then(res => {
58
+          console.log('提交反馈')
59
+        })
53
         setTimeout(() => {
60
         setTimeout(() => {
54
           Taro.navigateBack({ delta: 1 })
61
           Taro.navigateBack({ delta: 1 })
55
         }, 1000)
62
         }, 1000)

+ 9
- 0
src/pages/person/index.js View File

9
 import * as actions from '@/actions/user'
9
 import * as actions from '@/actions/user'
10
 import Authorize from '@/components/authorize'
10
 import Authorize from '@/components/authorize'
11
 import { transferImage } from '@/utils/tools'
11
 import { transferImage } from '@/utils/tools'
12
+import { savePoint, } from '@/services/common'
12
 import { menus } from './menus'
13
 import { menus } from './menus'
13
 import login from '@/utils/login'
14
 import login from '@/utils/login'
14
 export const version = Version
15
 export const version = Version
61
       Taro.showToast({
62
       Taro.showToast({
62
         title: '签到成功'
63
         title: '签到成功'
63
       })
64
       })
65
+      savePoint({
66
+        event: 'signin',
67
+        eventType: 'center',
68
+        propertyName: '签到',
69
+        data: '{}'
70
+      }).then(res => {
71
+        console.log('签到')
72
+      })
64
       // this.setState({
73
       // this.setState({
65
       //   user: {
74
       //   user: {
66
       //     points: res.points
75
       //     points: res.points

+ 9
- 3
src/pages/person/profile/detail/index.js View File

2
 import './index.scss'
2
 import './index.scss'
3
 import { AtImagePicker } from 'taro-ui'
3
 import { AtImagePicker } from 'taro-ui'
4
 import dayjs from 'dayjs'
4
 import dayjs from 'dayjs'
5
-
6
 import { getProfileDetail, editDocumentVerify } from '@/services/user'
5
 import { getProfileDetail, editDocumentVerify } from '@/services/user'
7
-
8
 import { uploadFiles } from '@/utils/request'
6
 import { uploadFiles } from '@/utils/request'
9
 import { transferImage } from '@/utils/tools'
7
 import { transferImage } from '@/utils/tools'
10
-
11
 import "taro-ui/dist/style/components/image-picker.scss";
8
 import "taro-ui/dist/style/components/image-picker.scss";
12
 import "taro-ui/dist/style/components/icon.scss";
9
 import "taro-ui/dist/style/components/icon.scss";
10
+import { savePoint, } from '@/services/common'
13
 const add = require('@/assets/add.png')
11
 const add = require('@/assets/add.png')
14
 const closeImg = require('@/assets/close.png')
12
 const closeImg = require('@/assets/close.png')
15
 
13
 
110
           documentTitle: res.documentTitle,
108
           documentTitle: res.documentTitle,
111
         })
109
         })
112
         Taro.showToast({ icon: 'none', title: '提交成功' });
110
         Taro.showToast({ icon: 'none', title: '提交成功' });
111
+        savePoint({
112
+          event: 'material',
113
+          eventType: 'center',
114
+          propertyName: '提交资料',
115
+          data: '{}'
116
+        }).then(res => {
117
+          console.log('提交资料')
118
+        })
113
 
119
 
114
       }).catch((err) => {
120
       }).catch((err) => {
115
         Taro.showToast({ icon: 'none', title: err.errMsg || '提交失败' });
121
         Taro.showToast({ icon: 'none', title: err.errMsg || '提交失败' });

+ 22
- 13
src/pages/person/profile/index.js View File

4
 import { getDocumentVerify, commitDocumentVerify, getVerifyList } from '@/services/user'
4
 import { getDocumentVerify, commitDocumentVerify, getVerifyList } from '@/services/user'
5
 import { uploadFiles } from '@/utils/request'
5
 import { uploadFiles } from '@/utils/request'
6
 import { transferImage } from '@/utils/tools'
6
 import { transferImage } from '@/utils/tools'
7
+import { savePoint, } from '@/services/common'
7
 
8
 
8
 const profileBg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/index/profile.png'
9
 const profileBg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/index/profile.png'
9
 const add = require('@/assets/add.png')
10
 const add = require('@/assets/add.png')
35
       this.setState({
36
       this.setState({
36
         verfyList: res || []
37
         verfyList: res || []
37
       },
38
       },
38
-      //  () => {
39
-      //   if (this.state.verfyList.length == 0) {
40
-      //     this.setState({
41
-      //       showWhich: true
42
-      //     })
43
-      //   } else {
44
-      //     this.setState({
45
-      //       showWhich: false
46
-      //     })
47
-      //   }
39
+        //  () => {
40
+        //   if (this.state.verfyList.length == 0) {
41
+        //     this.setState({
42
+        //       showWhich: true
43
+        //     })
44
+        //   } else {
45
+        //     this.setState({
46
+        //       showWhich: false
47
+        //     })
48
+        //   }
48
 
49
 
49
-      // }
50
-    )
50
+        // }
51
+      )
51
       Taro.hideLoading()
52
       Taro.hideLoading()
52
     }).catch((err) => {
53
     }).catch((err) => {
53
       Taro.hideLoading()
54
       Taro.hideLoading()
144
           descVisible: false,
145
           descVisible: false,
145
         })
146
         })
146
         Taro.showToast({ icon: 'none', title: '提交成功' });
147
         Taro.showToast({ icon: 'none', title: '提交成功' });
148
+        savePoint({
149
+          event: 'material',
150
+          eventType: 'center',
151
+          propertyName: '提交资料',
152
+          data: '{}'
153
+        }).then(res => {
154
+          console.log('提交资料')
155
+        })
147
         this.getProfile()
156
         this.getProfile()
148
 
157
 
149
       }).catch((err) => {
158
       }).catch((err) => {
217
               </View>
226
               </View>
218
             </View>
227
             </View>
219
           }
228
           }
220
-          {(verfyList.length||descVisible) &&
229
+          {(verfyList.length || descVisible) &&
221
             <View>
230
             <View>
222
 
231
 
223
               {descVisible &&
232
               {descVisible &&

+ 1
- 1
src/pages/project/index.js View File

258
 
258
 
259
     const payload = {
259
     const payload = {
260
       name: keywords,
260
       name: keywords,
261
-      pageSize: 999
261
+      pageSize: 10
262
     }
262
     }
263
     if (curCity.id) {
263
     if (curCity.id) {
264
       payload.cityId = curCity.id
264
       payload.cityId = curCity.id

+ 9
- 1
src/pages/shop/index.js View File

13
 import { connect } from '@tarojs/redux'
13
 import { connect } from '@tarojs/redux'
14
 import * as actions from '@/actions/shop'
14
 import * as actions from '@/actions/shop'
15
 import { queryUserInfo, doUserSignin } from '@/services/user'
15
 import { queryUserInfo, doUserSignin } from '@/services/user'
16
-
16
+import { savePoint, } from '@/services/common'
17
 // import getUserPhone from '@/utils/getUserPhone'
17
 // import getUserPhone from '@/utils/getUserPhone'
18
 import Authorize from '@/components/authorize'
18
 import Authorize from '@/components/authorize'
19
 
19
 
171
       Taro.showToast({
171
       Taro.showToast({
172
         title: '签到成功'
172
         title: '签到成功'
173
       })
173
       })
174
+      savePoint({
175
+        event: 'signin',
176
+        eventType: 'integral',
177
+        propertyName: '签到',
178
+        data: '{}'
179
+      }).then(res => {
180
+        console.log('签到')
181
+      })
174
       this.setState({
182
       this.setState({
175
 
183
 
176
         points: res.points
184
         points: res.points