diff --git a/pages/personal/grade/gradeTask.vue b/pages/personal/grade/gradeTask.vue index 6d5a84b..72b855c 100644 --- a/pages/personal/grade/gradeTask.vue +++ b/pages/personal/grade/gradeTask.vue @@ -34,6 +34,7 @@ export default { this.phoneuserinfo = uni.getStorageSync('wxUserInfo'); this.http.quickGet('/getInfo', true).then(res => { const { testerStatus } = res.data.user + console.log(testerStatus); if (testerStatus == 1) { this.taskArrays[0].state = true } else if (testerStatus == 2) { diff --git a/pages/personal/grade/gradeValue.vue b/pages/personal/grade/gradeValue.vue index 2756264..1bae734 100644 --- a/pages/personal/grade/gradeValue.vue +++ b/pages/personal/grade/gradeValue.vue @@ -15,7 +15,8 @@

- + @@ -89,10 +90,12 @@ export default { data() { return { scoreArray: Object.freeze(scoreArray), - myScore: '1900', + myScore: '0', avatar: '', phoneuserinfo: '', nickName: '', + currentImgIndex: 0, + swipeDuration:0, stateMap: Object.freeze({ '未达成': 'currentGrow3', '已达成': 'currentGrow1', @@ -106,20 +109,25 @@ export default { uni.navigateTo({ url: `./${url}` }) + }, + changeswiper(e) { + this.currentImgIndex = e.detail.current } }, onShow() { - this.http.quickGet('/getInfo',true).then(res=>{ - const {growthValue} = res.data.user + + }, + onLoad() { + this.http.quickGet('/getInfo', true).then(res => { + const { growthValue } = res.data.user this.myScore = growthValue || 0 + this.currentImgIndex = getLevel(this.myScore).level + this.swipeDuration = 500 }) this.phoneuserinfo = uni.getStorageSync('wxUserInfo'); this.avatar = uni.getStorageSync('avatar'); this.nickName = uni.getStorageSync('nickName'); }, - created() { - console.log(this.scoreArray); - }, computed: { level() { const { _, equity } = getLevel(this.myScore)