C端小程序
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

36 righe
696 B

  1. let Http = require('../../../utils/http.js')
  2. var app = getApp()
  3. Page({
  4. data: {
  5. list:{},
  6. cuponId:null
  7. },
  8. onLoad(e) {
  9. console.log(e.id)
  10. Http.getResquest('/wxCoupon/findById','加载中',{
  11. id: e.id
  12. },(res)=>{
  13. console.log(res)
  14. this.setData({
  15. list: res.data,
  16. cuponId:e.id
  17. })
  18. })
  19. },
  20. aaa(){
  21. Http.postResquest('/wxOrder/save', '加载中', {
  22. couponId: this.data.cuponId,
  23. openId: app.globalData.openId
  24. }, (res) => {
  25. console.log(res)
  26. if (res.code == 200) {
  27. wx.showToast({
  28. title: '购买成功',
  29. })
  30. wx.navigateBack({
  31. delta: 2
  32. })
  33. }
  34. })
  35. }
  36. })