Commit 6b8b2485 authored by Facius's avatar Facius

Merge branch 'dev-v1.0.0' of https://git.banshouhui.com/wuzhenzhe/study into dev-v1.0.0

parents 283ea2c5 e6cf9504
......@@ -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
}
......
......@@ -59,7 +59,6 @@ export default {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
background-color: $uni-bg-color;
position: relative;
flex-direction: column;
}
......@@ -103,4 +102,4 @@ export default {
}
/* #endif */
</style>
</style>
......@@ -143,20 +143,16 @@ export default {
color: transparent;
display: none;
}
page {
background-color: #2953ff;
}
.begin-answer {
display: flex;
flex-direction: column;
background-size: 100% 920rpx;
background-repeat: no-repeat;
height: 100vh;
background-color: #2953ff;
position: absolute;
top: 0;
width: 100%;
}
.content {
display: flex;
flex-direction: column;
......@@ -164,7 +160,6 @@ page {
justify-content: center;
padding: 30rpx 24rpx 50rpx 24rpx;
}
.cert-body {
width: 100%;
background-color: #ffffff;
......
......@@ -109,6 +109,7 @@ export default {
'workUnit',
],
student: {},
shauTiCount: 0,
}
},
computed: {
......@@ -129,10 +130,14 @@ export default {
return this.userInfo.nickName != undefined
},
loginTips() {
return (this.student && this.student.consumeAmount) || 0
return this.shauTiCount || 0
},
avatar() {
return (this.userInfo && this.userInfo.avatarUrl) || this.pic
return (
(this.student && this.student.avatarPath) ||
(this.userInfo && this.userInfo.avatarUrl) ||
this.pic
)
},
nikeName() {
return (this.userInfo && this.userInfo.nickName) || '点击登录'
......@@ -157,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
})
})
}
},
......
This diff is collapsed.
......@@ -139,8 +139,25 @@ function initAnswerCardList(total, vm) {
}
}
const diffTime = function diffTime(startDate, endDate) {
let diff = endDate.getTime() - startDate //.getTime();//时间差的毫秒数
//计算出相差天数
let days = Math.floor(diff / (24 * 3600 * 1000))
//计算出小时数
let leave1 = diff % (24 * 3600 * 1000) //计算天数后剩余的毫秒数
let hours = Math.floor(leave1 / (3600 * 1000))
//计算相差分钟数
let leave2 = leave1 % (3600 * 1000) //计算小时数后剩余的毫秒数
let minutes = Math.floor(leave2 / (60 * 1000))
//计算相差秒数
let leave3 = leave2 % (60 * 1000) //计算分钟数后剩余的毫秒数
let seconds = Math.round(leave3 / 1000)
return seconds
}
module.exports = {
TOTAL: TOTAL,
diffTime: diffTime,
request: request,
requestMulti: requestMulti,
getInitcurrentPage: getInitcurrentPage,
......
......@@ -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>
......
This diff is collapsed.
......@@ -53,6 +53,7 @@ const store = new Vuex.Store({
: '1414854649273384960', // 科目ID
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
vuex_version: '1.0.0',
beginTime: null // 考试开始时间
},
mutations: {
$uStore(state, payload) {
......
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