index.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // components/myOrderCard/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. item: {
  8. type:Object,
  9. value:{}
  10. }
  11. },
  12. /**
  13. * 组件的初始数据
  14. */
  15. data: {
  16. },
  17. /**
  18. * 组件的方法列表
  19. */
  20. methods: {
  21. goToTest() {
  22. // console.log(this.data);
  23. const commodityUrl = this.data.item.commodityUrl;
  24. const commodityTitle = this.data.item. commodityTitle;
  25. const commodityPrice = this.data.item.commodityPrice;
  26. const orderId = this.data.item.orderId;
  27. wx.navigateTo({
  28. url: '../../pages/order_detail/order_detail?imgUrl=' + commodityUrl +
  29. '&title=' + commodityTitle + '&price=' + commodityPrice + '&orderId=' + orderId
  30. })
  31. },
  32. toChat() {
  33. const goodsId = this.data.item.goodsId;
  34. const sellerId = this.data.item.sellerId;
  35. wx.navigateTo({
  36. url: '../../pages/chat/chat?toUid=' + sellerId + '&goodsId=' + goodsId
  37. })
  38. }
  39. }
  40. })