From cb57a49e4cbb4a734329f9c886db949a97c58af3 Mon Sep 17 00:00:00 2001 From: wulin Date: Mon, 24 Aug 2020 15:25:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=88=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 2 ++ src/views/common/dingtalkluck.vue | 4 +++- src/views/common/lzluck.vue | 11 ++++++++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index 4fd9a12..712b9b6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -9,6 +9,8 @@ import Router from 'vue-router' import { apiGetMenuNav } from '@/api/api_menu' import { isURL } from '@/utils/validate' import { clearLoginInfo } from '@/utils' +import VConsole from 'vconsole' +let vConsole = new VConsole()// eslint-disable-line no-unused-vars Vue.use(Router) // 开发环境不使用懒加载, 因为懒加载页面太多的话会造成webpack热更新太慢, 所以只有生产环境使用懒加载 diff --git a/src/views/common/dingtalkluck.vue b/src/views/common/dingtalkluck.vue index 1ed8f70..3a568a8 100644 --- a/src/views/common/dingtalkluck.vue +++ b/src/views/common/dingtalkluck.vue @@ -42,6 +42,8 @@ export default { console.log('走钉钉免登流程') this.dingtalkLogin() this.checkDingTalkLogin() + } else { + this.verify = '请使用手机钉钉扫码打开' } }, methods: { @@ -87,7 +89,7 @@ export default { if (res && res.code === 0) { console.log('获取token') - this.dataForm.verify='已经登记,祝你好运!下午1点44分员工新天地现场开奖' + this.dataForm.verify='已经登记,祝您好运!七夕下午5点20分员工新天地现场开奖' console.log('跳转') } else { diff --git a/src/views/common/lzluck.vue b/src/views/common/lzluck.vue index c21cd63..571278b 100644 --- a/src/views/common/lzluck.vue +++ b/src/views/common/lzluck.vue @@ -97,7 +97,7 @@ export default { apiUpdateLuck(this.luckdata).then(res => { console.log(res) if (res && res.code === 0) { - console.log(res.luck.isFinish) + console.log(res.luck) this.requst = res.luck if(res.luck.isFinish === 1){ this.dataForm.verify=res.luck.name + '——活动结束' @@ -135,12 +135,17 @@ export default { this.dataForm.uuid = this.requst.luckGoodsReqs[this.time].name setTimeout(() =>{ this.randData(this.requst.luckGoodsReqs[this.time].counts) - }, 100) + }, 10) } }, randData (count) { if (this.timer === true) { var obj = [] + if(count > this.requst.luckRecordReqs.length){//当奖品数量大于人数时,由人数限制 + console.log('奖品数大于报名人数') + count = this.requst.luckRecordReqs.length + console.log(count) + } for(var i = 0; i < count; i++){ if(this.rand >= this.requst.luckRecordReqs.length){ @@ -152,7 +157,7 @@ export default { this.data = obj setTimeout(() =>{ this.randData(count) - }, 100) + }, 10) } } }