Commit fc737891 by cen

fix: 埋点code

1 parent d3eefbb5
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
</view> </view>
</view> </view>
<Popup ref="activityRulePopup" popupClass="activityRule" title="活动规则" type="center" size="medium" :isShowFooter="false" :showClose="true" :autoClose="false"> <Popup ref="activityRulePopup" popupClass="activityRule" title="评选规则" type="center" size="medium" :isShowFooter="false" :showClose="true" :autoClose="false">
<template #content> <template #content>
<view class="activityRuleContent" v-if="currentItem"> <view class="activityRuleContent" v-if="currentItem">
<view class="activityRuleContent-box"> <view class="activityRuleContent-box">
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
created() {}, created() {},
mounted() { mounted() {
this.userInfo = uni.$storage.get('userInfo') this.userInfo = uni.$storage.get('userInfo')
uni.$track.add({ eventCode: 'app_activity_center' }) uni.$track.add({ eventCode: 'app_activeity_center' })
this.getActivityPage() this.getActivityPage()
this.getActivityReward() this.getActivityReward()
}, },
...@@ -256,9 +256,15 @@ export default { ...@@ -256,9 +256,15 @@ export default {
} }
this.pageNothing = this.cardList.length >= this.pageListTotal this.pageNothing = this.cardList.length >= this.pageListTotal
}) })
.catch(() => {
uni.hideLoading()
})
}, },
getActivityReward() { getActivityReward() {
const { phone } = uni.$storage.get('userInfo') const { phone } = uni.$storage.get('userInfo')
uni.showLoading({
mask: true
})
uni.$api.activityApi uni.$api.activityApi
.activityReward({ .activityReward({
phone: phone, phone: phone,
...@@ -266,6 +272,7 @@ export default { ...@@ -266,6 +272,7 @@ export default {
pageSize: this.pageSize pageSize: this.pageSize
}) })
.then(res => { .then(res => {
uni.hideLoading()
this.total = res.total this.total = res.total
if (this.pageNum === 1) { if (this.pageNum === 1) {
this.activityRewardList = res.list this.activityRewardList = res.list
...@@ -274,6 +281,9 @@ export default { ...@@ -274,6 +281,9 @@ export default {
} }
this.rewardNothing = this.activityRewardList.length >= this.total this.rewardNothing = this.activityRewardList.length >= this.total
}) })
.catch(() => {
uni.hideLoading()
})
}, },
scrolltolower() { scrolltolower() {
if (!this.rewardNothing && Math.ceil(this.total / this.pageSize) > this.pageNum) { if (!this.rewardNothing && Math.ceil(this.total / this.pageSize) > this.pageNum) {
...@@ -364,6 +374,9 @@ export default { ...@@ -364,6 +374,9 @@ export default {
font-size: toRpx(24); font-size: toRpx(24);
font-weight: 400; font-weight: 400;
margin-top: toRpx(12); margin-top: toRpx(12);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.activity-prize { .activity-prize {
height: toRpx(116); height: toRpx(116);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!