Commit 5d886a48 authored by linwenqing's avatar linwenqing

feat:我的主页刷题量字段获取方法添加

parent 9d2e9d6c
......@@ -37,6 +37,9 @@ let userApiFun = function(vm) {
apiUrl + '/rest/question/query/allStudentQuestionWarehouse',
params
)
//获取用户刷题量
let getUserDoQuestionNum = async (params = {}) =>
await vm.$u.get(apiUrl + '/rest/question/total/question/count', params)
const userApi = {
updateUserInfo,
......@@ -49,6 +52,7 @@ let userApiFun = function(vm) {
getCertFromOut,
getCertifyInfoByType,
getUserQuestionWareHouse,
getUserDoQuestionNum,
}
return userApi
}
......
......@@ -109,6 +109,7 @@ export default {
'workUnit',
],
student: {},
shauTiCount: 0,
}
},
computed: {
......@@ -129,7 +130,7 @@ export default {
return this.userInfo.nickName != undefined
},
loginTips() {
return (this.student && this.student.consumeAmount) || 0
return this.shauTiCount || 0
},
avatar() {
return (
......@@ -161,6 +162,9 @@ export default {
this.$u.api.getUserInfo().then((res) => {
this.student = res
getApp().globalData.student = res
this.$u.api.getUserDoQuestionNum().then((ret) => {
this.shauTiCount = ret || 0
})
})
}
},
......
......@@ -24,12 +24,7 @@
></u-image>
</view>
</u-cell-item>
<u-cell-item
title="证件照"
@click="changeCertPhoto"
:arrow="false"
:hover-class="none"
>
<u-cell-item title="证件照" @click="changeCertPhoto">
<view slot="right-icon">
<u-image
v-if="headCertPhoto"
......@@ -40,13 +35,12 @@
<text v-else style="color:#2953FF">去上传</text>
</view>
</u-cell-item>
<u-cell-item title="手机号" :arrow="false" :hover-class="none">
<u-cell-item title="手机号">
<view slot="right-icon">
<button
hover-class="none"
class="mobile-button"
open-type="getPhoneNumber"
@getphonenumber="getPhonenumber"
style="background: none;font-size: 26rpx;padding-right: 0;"
>
<text v-if="getMobile">{{ getMobile }}</text>
<text v-else class="empty-value">去绑定</text>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment