input_number.js 961 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. var app = getApp();
  2. const util = require('../../utils/utils.js')
  3. Page({
  4. data: {
  5. code: '',
  6. arr: [],
  7. inputLen: 11,
  8. isFocus: false,
  9. },
  10. onLoad: function(options) {
  11. },
  12. onFocus: function(e) {
  13. var that = this;
  14. that.setData({
  15. isFocus: true
  16. });
  17. },
  18. setValue: function(e) {
  19. var that = this;
  20. that.setData({
  21. code: e.detail.value
  22. });
  23. },
  24. start: util.throttle(function () {
  25. var that = this;
  26. if (that.data.code != '') {
  27. wx.navigateTo({
  28. url: '../sweep_code/sweep_code?code=' + that.data.code,
  29. })
  30. } else {
  31. wx.showToast({
  32. title: '请输入车牌号',
  33. icon: 'none',
  34. duration: 2000
  35. })
  36. }
  37. }, 1500),
  38. onReady: function() {
  39. },
  40. onShow: function() {
  41. },
  42. onHide: function() {
  43. },
  44. onUnload: function() {
  45. },
  46. onPullDownRefresh: function() {
  47. },
  48. onReachBottom: function() {
  49. },
  50. onShareAppMessage: function() {
  51. }
  52. })