Commit 1d6691a9 authored by ziyu's avatar ziyu

improvement: 修改bug

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