随手精灵小程序,单独为了获取WIFI信息加强围栏告警功能能力
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

list.js 2.5KB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. // pages/list/list.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. dataArr: [
  8. {name: '1冥', age: 16, className: '阿瑟斯s1'},
  9. {name: '2冥', age: 26, className: '阿瑟斯s2'},
  10. {name: '3冥', age: 36, className: '阿瑟斯s3'},
  11. {name: '4冥', age: 46, className: '阿瑟斯s4'},
  12. ],
  13. isShow: true,
  14. imgUrls: [
  15. 'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640',
  16. 'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640',
  17. 'https://images.unsplash.com/photo-1551446591-142875a901a1?w=640'
  18. ],
  19. interval: 5000,
  20. duration: 1000,
  21. indicatorDots: true,
  22. indicatorColor: "#ffffff",
  23. activecolor:"#2971f6",
  24. autoplay: true,
  25. count: 'count',
  26. nowTime: new Date().toLocaleDateString(),
  27. url: '',
  28. },
  29. /**
  30. * 生命周期函数--监听页面加载
  31. */
  32. onLoad: function (options) {
  33. wx.startWifi({
  34. success (res) {
  35. console.log("成功", res.errMsg);
  36. },
  37. fail(res) {
  38. console.log("失败", res.errMsg);
  39. }
  40. });
  41. },
  42. /**
  43. * 生命周期函数--监听页面初次渲染完成
  44. */
  45. onReady: function () {
  46. },
  47. /**
  48. * 生命周期函数--监听页面显示
  49. */
  50. onShow: function () {
  51. },
  52. /**
  53. * 生命周期函数--监听页面隐藏
  54. */
  55. onHide: function () {
  56. },
  57. // 跳转h5测试
  58. jumph5() {
  59. let id = 'test';//需要发送到H5页面的参数
  60. wx.navigateTo({
  61. //测试时可以用本地IP地址进行跳转(上线时换为线上的真实IP地址)
  62. url:`https://id.ssjlai.com/parentweb/#/index?id=${id}`,
  63. })
  64. },
  65. /**
  66. * 生命周期函数--监听页面卸载
  67. */
  68. onUnload: function () {
  69. },
  70. /**
  71. * 页面相关事件处理函数--监听用户下拉动作
  72. */
  73. onPullDownRefresh: function () {
  74. },
  75. /**
  76. * 页面上拉触底事件的处理函数
  77. */
  78. onReachBottom: function () {
  79. },
  80. /**
  81. * 用户点击右上角分享
  82. */
  83. onShareAppMessage: function () {
  84. },
  85. /*
  86. 注册点击事件
  87. */
  88. onClickCount: function() {
  89. wx.getConnectedWifi({
  90. success (res) {
  91. console.log(res);
  92. },
  93. fail(res) {
  94. console.log(res.errMsg);
  95. }
  96. })
  97. }
  98. })