在微信小程序里写的:
// pages/splash/splash.js
const app = getApp()
Page({
data: {
remainSecond: },
// 页面渲染完成后 调用
onReady: function() {
let that = this
let interval = setInterval(function() {
let rs = that.data.remainSecond
rs--
if (rs < ) {
clearInterval(interval);
}
this.setData({
remainSecond: rs
})
}.bind(this), )
setTimeout(function() {
wx.reLaunch({
url: '../write/write',
})
}, ) }
})