许静 5 年前
父节点
当前提交
64d5faed73
共有 2 个文件被更改,包括 16 次插入11 次删除
  1. 3
    3
      src/pages/activity/detail/assemble.js
  2. 13
    8
      src/pages/shop/index.js

+ 3
- 3
src/pages/activity/detail/assemble.js 查看文件

@@ -84,7 +84,7 @@ export default class Detail extends Component {
84 84
   componentDidShow() {
85 85
     this.startTicker()
86 86
   }
87
-
87
+  
88 88
   componentDidHide() {
89 89
     this.stopTicker()
90 90
   }
@@ -229,7 +229,7 @@ export default class Detail extends Component {
229 229
 
230 230
     Taro.showLoading()
231 231
     getGroupDetail(id, recordId).then(res => {
232
-      this.stopTicker()
232
+      this.clearTicker()
233 233
 
234 234
       const recordDetail = res.taShareRecord || {}
235 235
       let [actState, leftTime] = this.compActState(res.taShareActivity.startTime, res.taShareActivity.endTime)
@@ -486,7 +486,7 @@ export default class Detail extends Component {
486 486
     return (
487 487
       <Block>
488 488
         {/* 生成海报 */}
489
-        {posterVisible && !ltTicker.processing &&
489
+        { posterVisible && !ltTicker.processing &&
490 490
           (
491 491
             <Poster configs={posterConfigs} onCancel={this.togglePosterVisible} onFinish={this.togglePosterVisible}></Poster>
492 492
           )

+ 13
- 8
src/pages/shop/index.js 查看文件

@@ -103,9 +103,9 @@ export default class Shop extends Component {
103 103
       }, () => {
104 104
         if (res && res.length) {
105 105
           this.loadList()
106
-        }else{
106
+        } else {
107 107
           this.setState({
108
-            goodsList:[]
108
+            goodsList: []
109 109
           })
110 110
         }
111 111
       }
@@ -170,9 +170,9 @@ export default class Shop extends Component {
170 170
         title: '签到成功'
171 171
       })
172 172
       this.setState({
173
-        user: {
174
-          points: res.points
175
-        }
173
+
174
+        points: res.points
175
+
176 176
       })
177 177
 
178 178
       this.loadUserInfo()
@@ -184,8 +184,13 @@ export default class Shop extends Component {
184 184
   loadUserInfo() {
185 185
     // debugger
186 186
     queryUserInfo().then(user => {
187
+      console.log(user, "user")
187 188
       // debugger
188
-      this.setState({ user })
189
+      this.setState({
190
+        user,
191
+        points: user.points
192
+
193
+      })
189 194
     })
190 195
   }
191 196
 
@@ -266,7 +271,7 @@ export default class Shop extends Component {
266 271
   }
267 272
 
268 273
   renderDetail() {
269
-    const { user } = this.state
274
+    const { user,points } = this.state
270 275
     const { userInfo: { person }, curCity } = this.props
271 276
     const { bannerList = [] } = this.state
272 277
     return (
@@ -293,7 +298,7 @@ export default class Shop extends Component {
293 298
               <View className='message'>
294 299
                 <View className='message__left'>
295 300
                   <View className='user__jifen'>
296
-                    积分<Text className='user__jifen__right'>{person.points || 0}</Text>
301
+                    积分<Text className='user__jifen__right'>{points || 0}</Text>
297 302
                   </View>
298 303
                   <View className='message__left__btn' onClick={this.goPointRule.bind(this)}>
299 304
                     <Image className="message__left__img" src={require('@assets/shop/rule.png')} />