agree.js 923 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. const signUrl="https://yyq2.oss-cn-shanghai.aliyuncs.com/pdf/sign.jpg"
  2. Page({
  3. data:{
  4. currentTime:10,
  5. },
  6. onLoad:function(options){
  7. // 页面初始化 options为页面跳转所带来的参数
  8. this.shartTick()
  9. },
  10. onReady:function(){
  11. // 页面渲染完成
  12. },
  13. gotoSign(){
  14. wx.navigateTo({
  15. url: '/pages/tool/sign/signature',
  16. })
  17. },
  18. preview(){
  19. wx.previewImage({
  20. urls: ["https://yyq2.oss-cn-shanghai.aliyuncs.com/pdf/sign.jpg"], //预览图片 数组
  21. })
  22. },
  23. shartTick:function(){
  24. let currentTime= 10
  25. let _this = this
  26. let interval = setInterval(function() {
  27. currentTime--;
  28. _this.setData({ currentTime})
  29. if( currentTime <1){
  30. clearInterval( interval )
  31. }
  32. console.log( currentTime )
  33. }, 1000)
  34. // 页面显示
  35. },
  36. onHide:function(){
  37. // 页面隐藏
  38. },
  39. onUnload:function(){
  40. // 页面关闭
  41. }
  42. })