Commit 7e984544 authored by Facius's avatar Facius

improvement: 图库通过率同一次登录保持一致

parent 4accd242
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
共 共
<text class="label-blue">{{ info.number }}</text <text class="label-blue">{{ info.number }}</text
>道精编试题,通过率 >道精编试题,通过率
<text class="label-blue">{{ $u.random(95, 99) }}%</text> <text class="label-blue">{{ info.pass || $u.random(95, 99) }}%</text>
</view> </view>
</view> </view>
<u-button <u-button
......
...@@ -123,6 +123,7 @@ export default { ...@@ -123,6 +123,7 @@ export default {
loading: false, loading: false,
canExperience: false, // 体验资格 canExperience: false, // 体验资格
finishCount: 0, finishCount: 0,
pass: this.$u.random(95, 99),
} }
}, },
computed: { computed: {
...@@ -169,7 +170,7 @@ export default { ...@@ -169,7 +170,7 @@ export default {
this.data.questionWarehouse.echoMap.provinceId && this.data.questionWarehouse.echoMap.provinceId &&
this.data.questionWarehouse.echoMap.provinceId.fullName, this.data.questionWarehouse.echoMap.provinceId.fullName,
experience: this.canExperience, experience: this.canExperience,
pass: this.$u.random(95, 99) + '%', pass: this.pass + '%',
days: this.detail.totalDayCount || 0, days: this.detail.totalDayCount || 0,
today: this.detail.todayCount || 0, today: this.detail.todayCount || 0,
total: this.detail.totalCount || 0, total: this.detail.totalCount || 0,
...@@ -261,6 +262,7 @@ export default { ...@@ -261,6 +262,7 @@ export default {
this.selected = info this.selected = info
page.info = null page.info = null
this.visible = info.state this.visible = info.state
this.pass = this.$u.random(95, 99)
this.queryMyQuestionWarehouseDetail(this.selected.id) this.queryMyQuestionWarehouseDetail(this.selected.id)
} else { } else {
this.queryMyQuestionWarehouseDetail(this.info.id || 0) this.queryMyQuestionWarehouseDetail(this.info.id || 0)
...@@ -339,6 +341,9 @@ export default { ...@@ -339,6 +341,9 @@ export default {
var str = this.info.id ? 'selectedList' : 'selectCategory' var str = this.info.id ? 'selectedList' : 'selectCategory'
this.$u.route({ this.$u.route({
url: 'pages/learn/' + str, url: 'pages/learn/' + str,
params: {
pass: this.pass,
},
}) })
}, },
// 每日一练 // 每日一练
......
...@@ -51,6 +51,7 @@ export default { ...@@ -51,6 +51,7 @@ export default {
return { return {
list: [], // 已选题库列表 list: [], // 已选题库列表
loading: true, loading: true,
currentPass: null,
} }
}, },
computed: { computed: {
...@@ -68,6 +69,9 @@ export default { ...@@ -68,6 +69,9 @@ export default {
}, },
}, },
onLoad(e) { onLoad(e) {
if (e && e.pass) {
this.currentPass = e.pass
}
this.loadList() // 获取已选题库列表 this.loadList() // 获取已选题库列表
}, },
methods: { methods: {
...@@ -94,6 +98,9 @@ export default { ...@@ -94,6 +98,9 @@ export default {
for (var item of res) { for (var item of res) {
if (item && item.echoMap && item.echoMap.questionWarehouseId) { if (item && item.echoMap && item.echoMap.questionWarehouseId) {
item.echoMap.questionWarehouseId.number = item.number item.echoMap.questionWarehouseId.number = item.number
if (item.questionWarehouseId == this.questionWarehouseId) {
item.echoMap.questionWarehouseId.pass = this.currentPass
}
} }
} }
this.list = res this.list = res
......
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