https://github.com/suhaotian/sms-timer
发送短信验证码定时用
https://github.com/suhaotian/sms-timer
Last synced: 2 months ago
JSON representation
发送短信验证码定时用
- Host: GitHub
- URL: https://github.com/suhaotian/sms-timer
- Owner: suhaotian
- Created: 2015-11-27T04:29:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-28T18:03:41.000Z (over 9 years ago)
- Last Synced: 2025-02-02T22:13:00.572Z (4 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
发送短信倒计时函数 core
# Usage
```js
/*
* options 是一个 object
* 包含一个 update 和 finish 函数
* update 函数 接受倒计时的剩余秒数
* finish 函数 是倒计时完毕执行的函数
*/var options = {
update: function(timer) {
console.log(timer)
},
finish: function() {
alert('倒计时完毕')
}
}
// 第一个参数是分钟,这里指定为 1 分钟,也就是 60 秒
var sms = new sms(1, options)
```如何用在项目中使用,请看 **example**:
```shell
npm install browser-sync gulp-uglify gulp-umd
npm build
npm server
```