From 85ccaab631585aec5144fd50b9a8aa490fcfcb12 Mon Sep 17 00:00:00 2001 From: liuye Date: Fri, 3 Feb 2023 17:05:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E5=A5=96=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activeAnalysis/AppLuckyDraw/AppLuckyDraw.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/project/activeAnalysis/AppLuckyDraw/AppLuckyDraw.vue b/src/project/activeAnalysis/AppLuckyDraw/AppLuckyDraw.vue index e9241e10..12e1ea48 100644 --- a/src/project/activeAnalysis/AppLuckyDraw/AppLuckyDraw.vue +++ b/src/project/activeAnalysis/AppLuckyDraw/AppLuckyDraw.vue @@ -271,10 +271,14 @@ export default { res.data.map((item, index) => { textList[index] = `${this.geTel(res.data[index].phone)}用户获得${res.data[index].prizeName}` }) - var num = Math.floor(textList.length/3) - this.luckyList = textList.slice(0, num) - this.luckyList2 = textList.slice(num, num*2) - this.luckyList3 = textList.slice(num*2, num*3) + if(textList.length > 10) { + var num = Math.floor(textList.length/3) + this.luckyList = textList.slice(0, num) + this.luckyList2 = textList.slice(num, num*2) + this.luckyList3 = textList.slice(num*2, num*3) + }else { + this.luckyList = textList + } this.awardedList = textList } }