|
@@ -43,16 +43,27 @@ export default {
|
|
orderGoodsId: '',
|
|
orderGoodsId: '',
|
|
numberLists: [5, 10, 15, 20, 50, 100],
|
|
numberLists: [5, 10, 15, 20, 50, 100],
|
|
number: 5,
|
|
number: 5,
|
|
- questionNum: {}
|
|
|
|
|
|
+ questionNum: {},
|
|
|
|
+ timer: null,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
this.goodsId = option.goodsId
|
|
this.goodsId = option.goodsId
|
|
this.orderGoodsId = option.orderGoodsId
|
|
this.orderGoodsId = option.orderGoodsId
|
|
|
|
+ this.getLock()
|
|
|
|
+ this.timer = setInterval(this.getLock, 10000)
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
this.getQuestionTempNum()
|
|
this.getQuestionTempNum()
|
|
},
|
|
},
|
|
|
|
+ onUnload() {
|
|
|
|
+ clearInterval(this.timer)
|
|
|
|
+ this.$api.lockDelLock({
|
|
|
|
+ action: 'bank',
|
|
|
|
+ uuid: this.$method.getUuid()
|
|
|
|
+ }).then(res => {
|
|
|
|
+ })
|
|
|
|
+ },
|
|
computed: {
|
|
computed: {
|
|
accuracy() {
|
|
accuracy() {
|
|
if (this.questionNum.rightNum >= this.questionNum.totalNum) {
|
|
if (this.questionNum.rightNum >= this.questionNum.totalNum) {
|
|
@@ -64,6 +75,13 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getLock() {
|
|
|
|
+ this.$api.lockLockAction({
|
|
|
|
+ action: 'bank',
|
|
|
|
+ uuid: this.$method.getUuid()
|
|
|
|
+ }).then(res => {
|
|
|
|
+ })
|
|
|
|
+ },
|
|
changeNum(item) {
|
|
changeNum(item) {
|
|
this.number = item
|
|
this.number = item
|
|
},
|
|
},
|