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) { ...@@ -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
} }
......
...@@ -59,7 +59,6 @@ export default { ...@@ -59,7 +59,6 @@ export default {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
/* #endif */ /* #endif */
background-color: $uni-bg-color;
position: relative; position: relative;
flex-direction: column; flex-direction: column;
} }
...@@ -103,4 +102,4 @@ export default { ...@@ -103,4 +102,4 @@ export default {
} }
/* #endif */ /* #endif */
</style> </style>
...@@ -143,20 +143,16 @@ export default { ...@@ -143,20 +143,16 @@ export default {
color: transparent; color: transparent;
display: none; display: none;
} }
page {
background-color: #2953ff;
}
.begin-answer { .begin-answer {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background-size: 100% 920rpx; background-size: 100% 920rpx;
background-repeat: no-repeat; background-repeat: no-repeat;
height: 100vh; background-color: #2953ff;
position: absolute; position: absolute;
top: 0; top: 0;
width: 100%; width: 100%;
} }
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -164,7 +160,6 @@ page { ...@@ -164,7 +160,6 @@ page {
justify-content: center; justify-content: center;
padding: 30rpx 24rpx 50rpx 24rpx; padding: 30rpx 24rpx 50rpx 24rpx;
} }
.cert-body { .cert-body {
width: 100%; width: 100%;
background-color: #ffffff; background-color: #ffffff;
......
...@@ -109,6 +109,7 @@ export default { ...@@ -109,6 +109,7 @@ export default {
'workUnit', 'workUnit',
], ],
student: {}, student: {},
shauTiCount: 0,
} }
}, },
computed: { computed: {
...@@ -129,10 +130,14 @@ export default { ...@@ -129,10 +130,14 @@ 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 (this.userInfo && this.userInfo.avatarUrl) || this.pic return (
(this.student && this.student.avatarPath) ||
(this.userInfo && this.userInfo.avatarUrl) ||
this.pic
)
}, },
nikeName() { nikeName() {
return (this.userInfo && this.userInfo.nickName) || '点击登录' return (this.userInfo && this.userInfo.nickName) || '点击登录'
...@@ -157,6 +162,9 @@ export default { ...@@ -157,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
})
}) })
} }
}, },
......
This diff is collapsed.
...@@ -139,8 +139,25 @@ function initAnswerCardList(total, vm) { ...@@ -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 = { module.exports = {
TOTAL: TOTAL, TOTAL: TOTAL,
diffTime: diffTime,
request: request, request: request,
requestMulti: requestMulti, requestMulti: requestMulti,
getInitcurrentPage: getInitcurrentPage, getInitcurrentPage: getInitcurrentPage,
......
...@@ -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>
......
This diff is collapsed.
...@@ -53,6 +53,7 @@ const store = new Vuex.Store({ ...@@ -53,6 +53,7 @@ const store = new Vuex.Store({
: '1414854649273384960', // 科目ID : '1414854649273384960', // 科目ID
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式 // 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
vuex_version: '1.0.0', vuex_version: '1.0.0',
beginTime: null // 考试开始时间
}, },
mutations: { mutations: {
$uStore(state, payload) { $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