addMattresses.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // subpages/addMattresses/addMattresses.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. showBluetoothList: false,
  8. showBluetoothConnected: false,//连接中
  9. isBluetoothConnected: false,//连接成功
  10. bluetoothConnectedStep: 5,
  11. placeOfUse: "",
  12. usingHuman: "",
  13. sn: "",
  14. wifi: "",
  15. wifiPassWord: "",
  16. bluetoothSelectIndex: -1,
  17. activeIcon: "/subpages/images/ic_blue_radio_check.png",
  18. normalIcon: "/subpages/images/ic_blue_radio_uncheck.png",
  19. bluetoothList: ['', ''],
  20. value: 90,
  21. gradientColor: {
  22. '0%': '#00CEB2',
  23. '50%': '#00C7FF',
  24. '100%': '#53DAFF',
  25. },
  26. statusDefault: ['蓝牙连接...', '蓝牙连接成功', '成功获取设备信息', '发送配置信息...', '配置信息发送成功', '连接成功'],
  27. },
  28. onClose() {
  29. this.setData({ showBluetoothList: false, showBluetoothConnected: false });
  30. },
  31. checkBluetoothSelectIndex(e) {
  32. const index = e.currentTarget.dataset.index;
  33. this.setData({ bluetoothSelectIndex: index });
  34. },
  35. /**
  36. * 生命周期函数--监听页面加载
  37. */
  38. onLoad(options) {
  39. },
  40. /**
  41. * 生命周期函数--监听页面初次渲染完成
  42. */
  43. onReady() {
  44. },
  45. /**
  46. * 生命周期函数--监听页面显示
  47. */
  48. onShow() {
  49. },
  50. /**
  51. * 生命周期函数--监听页面隐藏
  52. */
  53. onHide() {
  54. },
  55. /**
  56. * 生命周期函数--监听页面卸载
  57. */
  58. onUnload() {
  59. },
  60. /**
  61. * 页面相关事件处理函数--监听用户下拉动作
  62. */
  63. onPullDownRefresh() {
  64. },
  65. /**
  66. * 页面上拉触底事件的处理函数
  67. */
  68. onReachBottom() {
  69. },
  70. /**
  71. * 用户点击右上角分享
  72. */
  73. onShareAppMessage() {
  74. }
  75. })