Commit 5d886a48 authored by linwenqing's avatar linwenqing

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

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