微信小程序电商常用倒计时实现实例
wxml文件放个text
<text>second: {{second}} micro second:{{micro_second}}</text>
在js文件中调用
function countdown(that) {
var second = that.data.second
if (second == 0) {
// console.log(Time Out...);
that.setData({
second: Time Out...
});
return ;
}
var time = setTimeout(function