Browse Source

savepoint

xujing 5 years ago
parent
commit
619d0858fa

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

@@ -1,7 +1,7 @@
1 1
 import Taro, { Component } from '@tarojs/taro'
2 2
 import { isChineseMobilePhoneNumber, isEmail } from '@/utils/tools'
3 3
 import './index.scss'
4
-
4
+import { savePoint, } from '@/services/common'
5 5
 import { submitFeedBack } from '@/services/feedBack'
6 6
 export default class FeedBack extends Component {
7 7
   state = {
@@ -49,7 +49,14 @@ export default class FeedBack extends Component {
49 49
           icon: 'success',
50 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 60
         setTimeout(() => {
54 61
           Taro.navigateBack({ delta: 1 })
55 62
         }, 1000)

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

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

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

@@ -2,14 +2,12 @@ import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3 3
 import { AtImagePicker } from 'taro-ui'
4 4
 import dayjs from 'dayjs'
5
-
6 5
 import { getProfileDetail, editDocumentVerify } from '@/services/user'
7
-
8 6
 import { uploadFiles } from '@/utils/request'
9 7
 import { transferImage } from '@/utils/tools'
10
-
11 8
 import "taro-ui/dist/style/components/image-picker.scss";
12 9
 import "taro-ui/dist/style/components/icon.scss";
10
+import { savePoint, } from '@/services/common'
13 11
 const add = require('@/assets/add.png')
14 12
 const closeImg = require('@/assets/close.png')
15 13
 
@@ -110,6 +108,14 @@ export default class Profile extends Component {
110 108
           documentTitle: res.documentTitle,
111 109
         })
112 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 120
       }).catch((err) => {
115 121
         Taro.showToast({ icon: 'none', title: err.errMsg || '提交失败' });

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

@@ -4,6 +4,7 @@ import dayjs from 'dayjs'
4 4
 import { getDocumentVerify, commitDocumentVerify, getVerifyList } from '@/services/user'
5 5
 import { uploadFiles } from '@/utils/request'
6 6
 import { transferImage } from '@/utils/tools'
7
+import { savePoint, } from '@/services/common'
7 8
 
8 9
 const profileBg = 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/images/index/profile.png'
9 10
 const add = require('@/assets/add.png')
@@ -35,19 +36,19 @@ export default class Profile extends Component {
35 36
       this.setState({
36 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 52
       Taro.hideLoading()
52 53
     }).catch((err) => {
53 54
       Taro.hideLoading()
@@ -144,6 +145,14 @@ export default class Profile extends Component {
144 145
           descVisible: false,
145 146
         })
146 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 156
         this.getProfile()
148 157
 
149 158
       }).catch((err) => {
@@ -217,7 +226,7 @@ export default class Profile extends Component {
217 226
               </View>
218 227
             </View>
219 228
           }
220
-          {(verfyList.length||descVisible) &&
229
+          {(verfyList.length || descVisible) &&
221 230
             <View>
222 231
 
223 232
               {descVisible &&

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

@@ -258,7 +258,7 @@ export default class Index extends Component {
258 258
 
259 259
     const payload = {
260 260
       name: keywords,
261
-      pageSize: 999
261
+      pageSize: 10
262 262
     }
263 263
     if (curCity.id) {
264 264
       payload.cityId = curCity.id

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

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