| @@ -1,9 +1,8 @@ | |||||
| let Http = require('../../../utils/http.js') | let Http = require('../../../utils/http.js') | ||||
| var app = getApp() | |||||
| Page({ | Page({ | ||||
| data: { | data: { | ||||
| list:{}, | list:{}, | ||||
| openId: getApp().globalData.openId, | |||||
| cuponId:null | cuponId:null | ||||
| }, | }, | ||||
| onLoad(e) { | onLoad(e) { | ||||
| @@ -21,10 +20,17 @@ Page({ | |||||
| aaa(){ | aaa(){ | ||||
| Http.postResquest('/wxOrder/save', '加载中', { | Http.postResquest('/wxOrder/save', '加载中', { | ||||
| couponId: this.data.cuponId, | couponId: this.data.cuponId, | ||||
| openId: this.data.openId | |||||
| openId: app.globalData.openId | |||||
| }, (res) => { | }, (res) => { | ||||
| console.log(res) | console.log(res) | ||||
| if (res.code == 200) { | |||||
| wx.showToast({ | |||||
| title: '购买成功', | |||||
| }) | |||||
| wx.navigateBack({ | |||||
| delta: 2 | |||||
| }) | |||||
| } | |||||
| }) | }) | ||||
| console.log(1) | |||||
| } | } | ||||
| }) | }) | ||||