学习时间

This commit is contained in:
liuye
2023-02-21 09:41:24 +08:00
parent 0644a6a800
commit f0d4c65315

View File

@@ -17,7 +17,7 @@
<p v-if="isApprove">{{ user.realName }}</p> <p v-if="isApprove">{{ user.realName }}</p>
<p v-else>{{ user.nickName }}</p> <p v-else>{{ user.nickName }}</p>
<!-- <p>{{ user.areaName || "" }}</p> --> <!-- <p>{{ user.areaName || "" }}</p> -->
<p>共累计学习<span>238</span>分钟</p> <p>共累计学习<span>{{studyDuration || 0}}</span>分钟</p>
</template> </template>
</div> </div>
<p class="info" @click.stop="$linkTo('./userInfo')" v-if="token">个人信息</p> <p class="info" @click.stop="$linkTo('./userInfo')" v-if="token">个人信息</p>
@@ -48,7 +48,8 @@ export default {
customNavigation: true, customNavigation: true,
data() { data() {
return { return {
user: {} user: {},
studyDuration: ''
} }
}, },
computed: { computed: {
@@ -98,6 +99,13 @@ export default {
} }
}) })
}, },
getStudyDuration() {
this.$instance.post(`/app/appwechatuserqujing/queryStudyDuration`).then(res=> {
if(res?.data) {
this.studyDuration = res.data.studyDuration
}
})
},
approve() { approve() {
if (!this.token) { if (!this.token) {
this.$refs.login.show(); this.$refs.login.show();
@@ -147,6 +155,7 @@ export default {
onShow() { onShow() {
this.getAuth() this.getAuth()
this.getUserInfo() this.getUserInfo()
this.getStudyDuration()
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {