|
|
@@ -2,16 +2,29 @@ let Http = require('../../../utils/http.js') |
|
|
|
|
|
|
|
Page({ |
|
|
|
data: { |
|
|
|
list:{} |
|
|
|
list:{}, |
|
|
|
openId: getApp().globalData.openId, |
|
|
|
cuponId:null |
|
|
|
}, |
|
|
|
onLoad(e) { |
|
|
|
console.log(this.data) |
|
|
|
console.log(e.id) |
|
|
|
Http.getResquest('/wxCoupon/findById','加载中',{ |
|
|
|
id: e.id |
|
|
|
},(res)=>{ |
|
|
|
console.log(res) |
|
|
|
this.setData({ |
|
|
|
list: res.data |
|
|
|
list: res.data, |
|
|
|
cuponId:e.id |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
aaa(){ |
|
|
|
Http.postResquest('/wxOrder/save', '加载中', { |
|
|
|
couponId: this.data.cuponId, |
|
|
|
openId: this.data.openId |
|
|
|
}, (res) => { |
|
|
|
console.log(res) |
|
|
|
}) |
|
|
|
console.log(1) |
|
|
|
} |
|
|
|
}) |