Commit 1d6691a9 authored by ziyu's avatar ziyu

improvement: 修改bug

parent bb711080
...@@ -16,7 +16,7 @@ function getProbability (quantity, coinQuantity) { ...@@ -16,7 +16,7 @@ function getProbability (quantity, coinQuantity) {
var value2 = coinQuantity / divisor; var value2 = coinQuantity / divisor;
// 如果分子比分母大说明中奖概率是100%,那么返回中奖概率 // 如果分子比分母大说明中奖概率是100%,那么返回中奖概率
if (value >= value2) { if (value >= value2) {
return coinQuantity + '/' + coinQuantity; return '100%';
} else { } else {
return value + '/' + value2; return value + '/' + value2;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<swiper <swiper
class="list-wrapper" class="list-wrapper"
vertical="{{true}}" vertical="{{true}}"
circular="{{true}}" circular="{{false}}"
display-multiple-items="{{activityDisplayItems}}" display-multiple-items="{{activityDisplayItems}}"
bindchange="onActivityChange" bindchange="onActivityChange"
autoplay="{{isAuto}}" autoplay="{{isAuto}}"
...@@ -45,11 +45,14 @@ ...@@ -45,11 +45,14 @@
onActivityChange(e) { onActivityChange(e) {
const lastIndex = this.list.length - this.activityDisplayItems; const lastIndex = this.list.length - this.activityDisplayItems;
if (e.$wx.detail.current === lastIndex) { if (e.$wx.detail.current === lastIndex) {
this.isActiveDone = 'anima'; this.isAuto = false;
setTimeout(() => { //当最后一个出来的时候等一秒再消失
this.isActiveDone = 'anima hide'; setTimeout(()=>{
this.isAuto = false; this.isActiveDone = 'anima';
}, 2000); setTimeout(() => {
this.isActiveDone = 'anima hide';
}, 2000);
},2000)
} }
} }
} }
......
...@@ -470,10 +470,10 @@ ...@@ -470,10 +470,10 @@
this.videoList = await getPrizeList(options.prizeId); this.videoList = await getPrizeList(options.prizeId);
}, },
async onShow() { async onShow() {
this.getMainInfo();
let join = wx.getStorageSync('userJoin'); let join = wx.getStorageSync('userJoin');
if (join === 1) { if (join === 1) {
wx.removeStorageSync('userJoin'); wx.removeStorageSync('userJoin');
this.getMainInfo();
this.showActivity(); this.showActivity();
} }
} }
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<view class="address-cont"> <view class="address-cont">
<van-field value="{{name}}" data-form="name" placeholder="收货人" bind:input ="setValue"></van-field> <van-field value="{{name}}" data-form="name" placeholder="收货人" bind:input ="setValue"></van-field>
<van-field value="{{phone}}" data-form="phone" placeholder="手机号码" bind:input ="setValue"></van-field> <van-field value="{{phone}}" data-form="phone" placeholder="手机号码" bind:input ="setValue"></van-field>
<van-field value="{{idNumber}}" data-form="idNumber" placeholder="收货人身份证号" bind:input ="setValue"></van-field> <van-field value="{{idNumber}}" data-form="idNumber" placeholder="收货人身份证号(应监管要求,必须填写)" bind:input ="setValue"></van-field>
<van-field value="{{cityValue}}" placeholder="所在地区" bindtap="onClose" is-link readonly></van-field> <van-field value="{{cityValue}}" placeholder="所在地区" bindtap="onClose" is-link readonly></van-field>
<van-field value="{{address}}" data-form="address" placeholder="详细地址:如街道、小区、门牌号、楼栋号等" bind:input ="setValue"></van-field> <van-field value="{{address}}" data-form="address" placeholder="详细地址:如街道、小区、门牌号、楼栋号等" bind:input ="setValue"></van-field>
</view> </view>
......
...@@ -319,6 +319,10 @@ ...@@ -319,6 +319,10 @@
await register(store.state.userInfo); await register(store.state.userInfo);
wx.setStorageSync('isRegister', true); wx.setStorageSync('isRegister', true);
} }
if(!this.batchId) {
Notify({message: '数据加载中,请稍后重试!'});
return;
}
this.btnfont = '参与中...'; this.btnfont = '参与中...';
confirmRaffle({batchId: this.batchId}).then(data => { confirmRaffle({batchId: this.batchId}).then(data => {
this.btnfont = '立即参与'; this.btnfont = '立即参与';
......
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