other.js 704 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. const APP = getApp();
  2. Page({
  3. data: {
  4. device: null //设置信息
  5. },
  6. /**
  7. * 生命周期函数--监听页面加载
  8. */
  9. onLoad: function (options) {
  10. this.getOther();
  11. },
  12. getOther: function () {
  13. const param = {
  14. openNum: APP.globalData.openNum
  15. }
  16. APP.Get(APP.Url.getOther, param).then(res => {
  17. this.setData({
  18. gpsRate: res.data.gpsRate
  19. })
  20. })
  21. },
  22. /**
  23. * 设置名称
  24. */
  25. submit: function (form) {
  26. const param = {
  27. openNum: APP.globalData.openNum,
  28. gpsRate: form.detail.value.gpsRate
  29. }
  30. APP.Post(APP.Url.setGpsRate, param).then(res => {
  31. APP.Modal.tips("设置成功");
  32. this.getOther();
  33. })
  34. }
  35. })