index.js 562 B

1234567891011121314151617181920212223242526272829303132
  1. import { fetchCouponDetail } from '../../../services/coupon/index';
  2. Page({
  3. data: {
  4. detail: null,
  5. storeInfoList: [],
  6. storeInfoStr: '',
  7. showStoreInfoList: false,
  8. },
  9. id: '',
  10. onLoad(query) {
  11. const id = parseInt(query.id);
  12. this.id = id;
  13. this.getGoodsList(id);
  14. },
  15. getGoodsList(id) {
  16. fetchCouponDetail(id).then(({ detail }) => {
  17. this.setData({
  18. detail,
  19. });
  20. });
  21. },
  22. navGoodListHandle() {
  23. wx.navigateTo({
  24. url: `/pages/coupon/coupon-activity-goods/index?id=${this.id}`,
  25. });
  26. },
  27. });