业务交流通
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

index.js 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // pages/release/release.js
  2. // 获取应用实例
  3. const app = getApp()
  4. Page({
  5. data: {
  6. currentIndex: 3,
  7. user: {
  8. chatHeads: "https://wx.qlogo.cn/mmopen/vi_32/GhKAicgjqaCK1oZDfibe4ciaBWicWDnMFqibzWU0qp5diaE8tatUQCyTpDvlJIHJTbVprC1Dbwjh5WkWcgdmlO4VicJ8w/132",
  9. name: "微信昵称微信昵称微微信微信昵称微信昵称微微信",
  10. isPartner: true,
  11. address: "上海市·徐汇区",
  12. // customerId:666967,
  13. customerId:666678,
  14. },
  15. listData: [
  16. {
  17. title: "我发布的需求",
  18. code: "my-release",
  19. },
  20. {
  21. title: "我收藏的需求",
  22. code: "my-collect",
  23. },
  24. {
  25. title: "我关注的类型",
  26. code: "my-attention",
  27. },
  28. {
  29. title: "联系客服",
  30. code: "my-contact",
  31. },
  32. ],
  33. },
  34. // 路由跳转
  35. goRouterPage(e) {
  36. let code = e.currentTarget.dataset.code;
  37. let customerid = this.data.user.customerId;
  38. let url = "";
  39. // 前往主页
  40. if (code == 'homepage') {
  41. url = "/pages/index/components/homepage/homepage";
  42. }
  43. // 前往发布的需求
  44. if (code == 'my-release') {
  45. url = "/pages/myModule/components/myRelease/myRelease";
  46. }
  47. // 前往发布的需求
  48. if (code == 'my-release') {
  49. url = "/pages/myModule/components/myRelease/myRelease";
  50. }
  51. // 前往关注的类型
  52. if (code == 'my-attention') {
  53. url = "/pages/myModule/components/myAttention/myAttention";
  54. }
  55. wx.navigateTo({
  56. url,
  57. success: function (res) {
  58. // 通过eventChannel向被打开页面传送数据
  59. res.eventChannel.emit('customerid', { customerid })
  60. }
  61. })
  62. },
  63. })