Browse Source

bug 修复

lilei 4 years ago
parent
commit
fd8460d654
2 changed files with 18 additions and 17 deletions
  1. 2 2
      components/almost-lottery/almost-lottery.vue
  2. 16 15
      pagesA/luckDraw/luckDraw.vue

+ 2 - 2
components/almost-lottery/almost-lottery.vue

@@ -239,6 +239,8 @@
     methods: {
       // 开始旋转
       onRotateStart() {
+        if (this.isRotate) return
+        this.isRotate = true
         // 奖品总数
         let prizeCount = this.prizeList.length
         let baseAngle = 360 / prizeCount
@@ -278,8 +280,6 @@
       },
       // 点击 开始抽奖 按钮
       handleActionStart() {
-        if (this.isRotate) return
-        this.isRotate = true
         this.$emit('draw-start')
       },
       // 渲染转盘

+ 16 - 15
pagesA/luckDraw/luckDraw.vue

@@ -13,6 +13,10 @@
 				@draw-end="handleDrawEnd"
 				@finish="handleDrawFinish"
 				v-if="prizeList.length"
+				:duration="6"
+				:ringCount="6"
+				:imageWidth="50"
+				:imageHeight="50"
 				:canvasWidth="canvasData.width"
 				:canvasHeight="canvasData.height"
 				:canvasMargin="canvasData.margin"
@@ -192,7 +196,7 @@ export default {
 			canvasData: {
 				width: 260,
 				height: 260,
-				margin: 5
+				margin: 3
 			},
 			// 奖品数据
 			prizeList: [],
@@ -247,7 +251,6 @@ export default {
 				let requestTimer = setTimeout(() => {
 					clearTimeout(requestTimer);
 					requestTimer = null;
-
 					resolve({
 						ok: true,
 						data: [
@@ -256,21 +259,21 @@ export default {
 								name: '0.1元现金',
 								stock: 10,
 								weight: 0,
-								prizeImage: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/56f085e0-bcfe-11ea-b244-a9f5e5565f30.png'
+								prizeImage: 'https://lese.sxzxyj.net/img/20201113/20000000081-1.jpg'
 							},
 							{
 								prizeId: 2,
 								name: '10元现金',
 								stock: 0,
 								weight: 0,
-								prizeImage: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/56f085e0-bcfe-11ea-b244-a9f5e5565f30.png'
+								prizeImage: 'https://lese.sxzxyj.net/img/20201113/20000000081-1.jpg'
 							},
-							{ prizeId: 3, name: '5元话费', stock: 1, weight: 0 },
-							{ prizeId: 4, name: '50元现金', stock: 0, weight: 0 },
-							{ prizeId: 5, name: '1卷抽纸', stock: 3, weight: 0 },
-							{ prizeId: 6, name: '0.2元现金', stock: 8, weight: 0 },
-							{ prizeId: 7, name: '谢谢参与', stock: 100, weight: 0 },
-							{ prizeId: 8, name: '100金币', stock: 100, weight: 0 }
+							{ prizeId: 3, name: '5元话费', stock: 1, weight: 0,prizeImage: 'https://lese.sxzxyj.net/img/20201113/20000000081-1.jpg' },
+							{ prizeId: 4, name: '50元现金', stock: 0, weight: 0,prizeImage: 'https://lese.sxzxyj.net/img/20201113/20000000081-1.jpg' },
+							{ prizeId: 5, name: '1卷抽纸卷抽纸卷抽纸', stock: 3, weight: 0,prizeImage: 'https://lese.sxzxyj.net/img/20201113/20000000081-1.jpg' },
+							{ prizeId: 6, name: '0.2元现金', stock: 8, weight: 0,prizeImage: 'https://lese.sxzxyj.net/img/20201113/20000000081-1.jpg' },
+							{ prizeId: 7, name: '谢谢参与', stock: 100, weight: 0,prizeImage: 'https://lese.sxzxyj.net/img/20201113/20000000081-1.jpg' },
+							{ prizeId: 8, name: '100金币', stock: 100, weight: 0,prizeImage: 'https://lese.sxzxyj.net/img/20201113/20000000081-1.jpg'}
 						]
 					});
 				}, 2000);
@@ -393,8 +396,6 @@ export default {
 			  size: true,
 			  scrollOffset: true
 			}, data => {
-			  console.log("得到节点信息" + JSON.stringify(data));
-			  console.log("节点的宽为" + data.height);
 			  this.scrollTextHeight = (data.height + 5) * 6
 			}).exec();
 		},
@@ -423,8 +424,8 @@ export default {
 		this.getPrizeSetting();
 		// 计算转盘宽度和高度
 		const res = uni.getSystemInfoSync();
-		this.canvasData.width = res.screenWidth * 0.62
-		this.canvasData.height = res.screenWidth * 0.62
+		this.canvasData.width = res.screenWidth * 0.65
+		this.canvasData.height = res.screenWidth * 0.65
 		
 		// 开启分享
 		uni.showShareMenu({
@@ -587,7 +588,7 @@ export default {
 		}
 	}
 	.taskBar{
-		background: rgba(0,0,0,0.5);
+		background: rgba(0, 180, 0, 0.8);
 		padding: 20rpx;
 		font-size: 30rpx;
 		text-align: center;