拓恒河湖长制全民护河平台WEB端
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.

index.js 2.0KB

1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // pages/all/index.js
  2. import {getOpenidData} from '../../utils/getUserInfo.js'
  3. import {getCityTree} from '../../api/feeddback.js'
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. // 列表数据筛选条件
  10. params: {
  11. name: ''
  12. },
  13. name: '',
  14. list: [],
  15. current: "/stream/index",
  16. },
  17. /**
  18. * 生命周期函数--监听页面加载
  19. */
  20. onLoad: function (options) {
  21. this.getTabBar().setData({
  22. selected: 1
  23. })
  24. },
  25. /**
  26. * 生命周期函数--监听页面显示
  27. */
  28. onShow: function () {
  29. },
  30. /* 输入河流名称搜索 */
  31. search(e) {
  32. let params = this.data.params
  33. params.name = this.data.name
  34. this.setData({ params: params })
  35. },
  36. /* 更新数据 */
  37. updateList(e) {
  38. let list = this.data.list.concat(e.detail || [])
  39. this.setData({ list })
  40. },
  41. /* 重置数据 */
  42. resetList() {
  43. this.setData({ list: [] })
  44. },
  45. /* 跳转上报问题页面 */
  46. uploadProblem(e) {
  47. let detail = e.currentTarget.dataset.detail
  48. let openid = wx.getStorageSync('openid')
  49. if(openid) {
  50. wx.navigateTo({
  51. url: '/package_A/pages/report/index?data=' + JSON.stringify(detail),
  52. })
  53. } else {
  54. getOpenidData().then(res=> {
  55. wx.navigateTo({
  56. url: '/package_A/pages/report/index?data=' + JSON.stringify(detail),
  57. })
  58. })
  59. }
  60. },
  61. // /* 跳转至筛选页 */
  62. // goSelectLocation(e) {
  63. // const path = '/pages/all/index'
  64. // wx.redirectTo({
  65. // url: `/pages/login/login?path=${path}`,
  66. // })
  67. // },
  68. /* 跳转至详情页 */
  69. showDetail(e) {
  70. let data = e.currentTarget.dataset.item
  71. wx.navigateTo({
  72. url: '/package_A/pages/riverDetail/index?data='+ JSON.stringify(data),
  73. })
  74. }
  75. })