Commit 1db7461c authored by Damon's avatar Damon

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

parents ab6b09d4 4ce3aa8d
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
return String(this.learnData.startDate).length > 0 ? this.learnData.time : '' return String(this.learnData.startDate).length > 0 ? this.learnData.time : ''
}, },
resultForTest() { resultForTest() {
return String(this.learnData.startDate).length > 0 ? ((this.learnData.maxPoint > 80 && '合格') || '不合格') : '' return String(this.learnData.startDate).length > 0 ? ((this.learnData.maxPoint >= 80 && '合格') || '不合格') : ''
}, },
}, },
methods: { methods: {
......
...@@ -351,6 +351,12 @@ export default { ...@@ -351,6 +351,12 @@ export default {
}, },
// 每日一练 // 每日一练
handleAnswer() { handleAnswer() {
if (!this.vuex_token) {
this.$u.route({
url: 'pages/login/index',
})
return
}
if (this.info.cardId) { if (this.info.cardId) {
// 练习 // 练习
this.$u.route({ this.$u.route({
...@@ -378,9 +384,6 @@ export default { ...@@ -378,9 +384,6 @@ export default {
}, },
}) })
} else { } else {
// 绑卡提示
// this.type = 'bound'
// this.show = true
this.$u.route({ this.$u.route({
url: 'pages/learn/detail', url: 'pages/learn/detail',
params: { params: {
...@@ -391,12 +394,15 @@ export default { ...@@ -391,12 +394,15 @@ export default {
} }
} else { } else {
this.show = true this.show = true
// this.$u.route({
// url: 'pages/learn/selectCategory',
// })
} }
}, },
handleClickLeftTop() { handleClickLeftTop() {
if (!this.vuex_token) {
this.$u.route({
url: 'pages/login/index',
})
return
}
this.$u.route({ this.$u.route({
url: 'pages/learn/selectCategory', url: 'pages/learn/selectCategory',
}) })
...@@ -413,6 +419,12 @@ export default { ...@@ -413,6 +419,12 @@ export default {
}) })
}, },
handleClickItem(key) { handleClickItem(key) {
if (!this.vuex_token) {
this.$u.route({
url: 'pages/login/index',
})
return
}
if (this.info.id) { if (this.info.id) {
// 跳转到学练记录 // 跳转到学练记录
this.$u.route({ this.$u.route({
...@@ -429,8 +441,6 @@ export default { ...@@ -429,8 +441,6 @@ export default {
} }
}, },
handleClickExperience() { handleClickExperience() {
// this.selected.state = false
// this.$u.vuex('experience', false)
// 体验 // 体验
// 1.顺序答题 2.随机练习 3.模拟考试 4.收藏答题 5.错题答题 6.专项练习-单选 7.专项练习-多选 8.专项练习-判断 9.专项练习-答案是 // 1.顺序答题 2.随机练习 3.模拟考试 4.收藏答题 5.错题答题 6.专项练习-单选 7.专项练习-多选 8.专项练习-判断 9.专项练习-答案是
this.$u.route({ this.$u.route({
...@@ -444,6 +454,12 @@ export default { ...@@ -444,6 +454,12 @@ export default {
}) })
}, },
handleClickExam(index) { handleClickExam(index) {
if (!this.vuex_token) {
this.$u.route({
url: 'pages/login/index',
})
return
}
if (this.info.cardId) { if (this.info.cardId) {
// 已绑卡 // 已绑卡
if (index == 0) { if (index == 0) {
...@@ -462,10 +478,6 @@ export default { ...@@ -462,10 +478,6 @@ export default {
} }
} else if (this.info.id) { } else if (this.info.id) {
// 已选题库 // 已选题库
// 绑卡
// this.type = 'bound'
// this.show = true
this.$u.route({ this.$u.route({
url: 'pages/learn/detail', url: 'pages/learn/detail',
params: { params: {
...@@ -476,12 +488,15 @@ export default { ...@@ -476,12 +488,15 @@ export default {
} else { } else {
// 未选题库 // 未选题库
this.show = true this.show = true
// this.$u.route({
// url: 'pages/learn/selectCategory',
// })
} }
}, },
handleClick(path, params) { handleClick(path, params) {
if (!this.vuex_token) {
this.$u.route({
url: 'pages/login/index',
})
return
}
if (this.info.cardId) { if (this.info.cardId) {
if (params) { if (params) {
this.setPageInfo(params) this.setPageInfo(params)
...@@ -492,9 +507,6 @@ export default { ...@@ -492,9 +507,6 @@ export default {
}) })
} else if (this.info.id) { } else if (this.info.id) {
// 已选题库未绑卡 // 已选题库未绑卡
// 绑卡
// this.type = 'bound'
// this.show = true
this.$u.route({ this.$u.route({
url: 'pages/learn/detail', url: 'pages/learn/detail',
params: { params: {
...@@ -504,9 +516,6 @@ export default { ...@@ -504,9 +516,6 @@ export default {
}) })
} else { } else {
this.show = true this.show = true
// this.$u.route({
// url: 'pages/learn/selectCategory',
// })
} }
}, },
// getProvinceList() { // getProvinceList() {
...@@ -527,17 +536,15 @@ export default { ...@@ -527,17 +536,15 @@ export default {
} }
}, },
chagefinishCount() { chagefinishCount() {
this.finishCount = this.questionList[this.questionWarehouseId] this.finishCount = this.answerCount[this.questionWarehouseId] || 0
? this.questionList[this.questionWarehouseId].reduce(
(accumulator, currentValue) => {
if (currentValue.submitStatus) accumulator++
return accumulator
},
0
)
: 0
}, },
handleSelectTip() { handleSelectTip() {
if (!this.vuex_token) {
this.$u.route({
url: 'pages/login/index',
})
return
}
this.$u.route({ this.$u.route({
url: 'pages/learn/detail', url: 'pages/learn/detail',
params: { params: {
...@@ -654,7 +661,7 @@ export default { ...@@ -654,7 +661,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin: 60rpx 0 160rpx 0; margin: 30rpx 0 160rpx 0;
.sub-content-item { .sub-content-item {
color: #5a6073; color: #5a6073;
font-size: 26rpx; font-size: 26rpx;
...@@ -680,7 +687,7 @@ export default { ...@@ -680,7 +687,7 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.list-view { .list-view {
width: 340rpx; width: 330rpx;
height: 136rpx; height: 136rpx;
border-radius: 16rpx; border-radius: 16rpx;
display: flex; display: flex;
......
...@@ -218,7 +218,7 @@ export default { ...@@ -218,7 +218,7 @@ export default {
// if (this.buttonDisabled) return // if (this.buttonDisabled) return
if (this.range.length <= 0 || this.range.length == null) { if (this.range.length <= 0 || this.range.length == null) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '该类型和区域没有的题库', title: '该类型和区域没有题库',
type: 'warning', type: 'warning',
duration: 1500, duration: 1500,
callback: () => { callback: () => {
...@@ -273,7 +273,7 @@ export default { ...@@ -273,7 +273,7 @@ export default {
}) })
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '该类型和区域没有的题库', title: '该类型和区域没有题库',
type: 'warning', type: 'warning',
duration: 1500, duration: 1500,
callback: () => { callback: () => {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<view class="field-view"> <view class="field-view">
<u-input <u-input
class="input-view" class="input-view"
password type="password"
input-align="center" input-align="center"
v-model="password" v-model="password"
placeholder="请输入密码" placeholder="请输入密码"
...@@ -145,7 +145,25 @@ export default { ...@@ -145,7 +145,25 @@ export default {
}, },
} }
</script> </script>
<style lang="scss">
.bound-questions {
.u-flex {
display: flex;
justify-content: center;
align-items: center;
// background-color: green;
}
.u-input__right-icon__item {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
// background-color: red;
width: 60rpx;
flex-shrink: 0;
}
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 0; width: 0;
......
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