Commit 101ca0a1 authored by ziyu's avatar ziyu

improvement: ui优化

parent 59228abc
...@@ -8,6 +8,10 @@ function getCommonDivisor(FirstNum,SecondNum) { ...@@ -8,6 +8,10 @@ function getCommonDivisor(FirstNum,SecondNum) {
function getProbability (quantity,coinQuantity) { function getProbability (quantity,coinQuantity) {
//如果用户克币数是0
if(quantity == 0) {
return '0/'+coinQuantity;
}
var divisor = getCommonDivisor(quantity,coinQuantity); var divisor = getCommonDivisor(quantity,coinQuantity);
var value = quantity/divisor; var value = quantity/divisor;
var value2 = coinQuantity/divisor; var value2 = coinQuantity/divisor;
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
}, },
computed: { computed: {
isWin() { isWin() {
console.log('this.joinRecord.status.value', this.joinRecord);
if (!this.joinRecord.id) return false; if (!this.joinRecord.id) return false;
return +this.joinRecord.status.value === 3; return +this.joinRecord.status.value === 3;
} }
...@@ -90,10 +89,12 @@ ...@@ -90,10 +89,12 @@
go() { go() {
this.showAnimation = false; this.showAnimation = false;
//如果得奖了走 //如果得奖了走
if(this.isWin) {
let id = 7; let id = 7;
wx.navigateTo({url:'/pages/prize?joinRecordId='+id}) wx.navigateTo({url:'/pages/prize?joinRecordId='+id})
//如果没得奖走 } else {
//wx.navigateTo({url:'/pages/myraffles'}) wx.navigateTo({url:'/pages/myraffles'})
}
} }
}, },
created() { created() {
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
} }
</style> </style>
<template> <template>
<!--解决wepy打包之后picker没有toolbar的问题-->
<import src="../components/vant/picker/toolbar.wxml" />
<view class="prize-wrapper"> <view class="prize-wrapper">
<view class="prize-top"> <view class="prize-top">
<van-image use-loading-slot src="{{prize.photoUrl}}" class="img" width="400rpx" height="400rpx" radius="10rpx"> <van-image use-loading-slot src="{{prize.photoUrl}}" class="img" width="400rpx" height="400rpx" radius="10rpx">
......
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