Commit 102e2650 by 谢中龙

优化

parent 2f862a5f
......@@ -11,7 +11,7 @@
<view class='card-status'>已过期</view>
</view>
</view>
<view class='card-top-info' bindtap='onTapShowMoreInfo' data-item="{{item}}" data-index="{{idx}}">
<view class='card-top-info' bindtap='onTapToInfoPage' data-item="{{item}}" data-index="{{idx}}">
<image class='bg-image {{item.isOpen ? "expand" : "unexpand"}}'
src='{{item.backGroundUrl}}'
mode='widthFix'></image>
......
......@@ -72,6 +72,7 @@ wxService.page({
no: obj.supValCardCode
},() => {
this.generatorBarCode();
this.startTimer();
});
}
});
......@@ -89,9 +90,9 @@ wxService.page({
no: this.data.no,
},() => {
this.generatorBarCode();
wx.showToast({
title: '刷新成功!',
});
// wx.showToast({
// title: '刷新成功!',
// });
})
}
else {
......@@ -104,6 +105,20 @@ wxService.page({
});
},
//开始定时任务 每10s调用一下
startTimer() {
this.timer = setInterval(() => {
this.onTapRefreshNo();
}, 10000);
},
//
onUnload() {
if (this.timer) {
clearInterval(this.timer);
}
},
//生成条形码
generatorBarCode() {
if (this.data.no) {
......
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