index.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import {
  2. ApiModel
  3. } from "../../utils/api";
  4. const _Http = new ApiModel;
  5. Page({
  6. /**
  7. * 页面的初始数据
  8. */
  9. data: {
  10. showIndex:-1,//显示按钮的下标
  11. },
  12. /**
  13. * 生命周期函数--监听页面加载
  14. */
  15. onLoad: function (options) {
  16. _Http.basic({
  17. "accesstoken": wx.getStorageSync('userData').token,
  18. "classname": "customer.tagents.tagents",
  19. "method": "query_cooperation",
  20. "content": {
  21. "where": {
  22. "condition": "",
  23. "ftype":"",
  24. "fstatus":""
  25. }
  26. }
  27. }).then(res=>{
  28. console.log(res)
  29. })
  30. },
  31. showBtnIndex(e) {
  32. const {
  33. index
  34. } = e.currentTarget.dataset;
  35. this.setData({
  36. showIndex:index
  37. })
  38. },
  39. /* 跳转商户 */
  40. jumpForDetails(){
  41. wx.navigateTo({
  42. url: '/pages/businessPartner/details',
  43. })
  44. },
  45. /**
  46. * 生命周期函数--监听页面初次渲染完成
  47. */
  48. onReady: function () {
  49. },
  50. /**
  51. * 生命周期函数--监听页面显示
  52. */
  53. onShow: function () {
  54. },
  55. /**
  56. * 生命周期函数--监听页面隐藏
  57. */
  58. onHide: function () {
  59. },
  60. /**
  61. * 生命周期函数--监听页面卸载
  62. */
  63. onUnload: function () {
  64. },
  65. /**
  66. * 页面相关事件处理函数--监听用户下拉动作
  67. */
  68. onPullDownRefresh: function () {
  69. },
  70. /**
  71. * 页面上拉触底事件的处理函数
  72. */
  73. onReachBottom: function () {
  74. },
  75. /**
  76. * 用户点击右上角分享
  77. */
  78. onShareAppMessage: function () {
  79. }
  80. })