| @@ -1,9 +1,9 @@ | |||||
| var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; | var extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}; | ||||
| var appId = extConfig.appId; | var appId = extConfig.appId; | ||||
| var config = { | var config = { | ||||
| url: "https://ciformall.youlane.cn/C/api", | |||||
| // url: "https://ciformall.youlane.cn/C/api", | |||||
| // url:"https://c.malls.iformall.com/C/api", | // url:"https://c.malls.iformall.com/C/api", | ||||
| // url:'https://ctest.malls.iformall.com/C/api', | |||||
| url:'https://ctest.malls.iformall.com/C/api', | |||||
| // url:'http://10.100.33.68:7000/C/api', | // url:'http://10.100.33.68:7000/C/api', | ||||
| // url: 'http://10.100.30.172:7000/C/api', | // url: 'http://10.100.30.172:7000/C/api', | ||||
| api: { | api: { | ||||
| @@ -199,7 +199,7 @@ var config = { | |||||
| }, | }, | ||||
| weapp: { | weapp: { | ||||
| AppId: "wxea71200db93d756b" | |||||
| AppId: "wx649b3be73c1afe47" | |||||
| }, | }, | ||||
| ErrorCode: { | ErrorCode: { | ||||
| @@ -27,11 +27,9 @@ Page({ | |||||
| mystatus: '', | mystatus: '', | ||||
| showPage: false | showPage: false | ||||
| }, | }, | ||||
| onLoad() { | |||||
| this.getList(4, 1); | |||||
| }, | |||||
| onShow: function() { | onShow: function() { | ||||
| let that = this; | let that = this; | ||||
| that.getList(4,1); | |||||
| wx.setStorage({ | wx.setStorage({ | ||||
| key: 'couponNum2', | key: 'couponNum2', | ||||
| data: "couponNum3", | data: "couponNum3", | ||||
| @@ -43,12 +41,20 @@ Page({ | |||||
| // 扫一扫去支付 | // 扫一扫去支付 | ||||
| gotoPay: function(e) { | gotoPay: function(e) { | ||||
| let that = this; | let that = this; | ||||
| console.log(e.currentTarget.dataset.remainingamount) | |||||
| wx.scanCode({ | wx.scanCode({ | ||||
| success: (res) => { | success: (res) => { | ||||
| wx.navigateTo({ | |||||
| url: `/pages/scanPay/scanPay?merChant=${res.result}&cardid=${e.currentTarget.dataset.cardid}&remainingAmount=${e.currentTarget.dataset.remainingamount}`, | |||||
| }) | |||||
| console.log(JSON.parse(res.result).merchant_id) | |||||
| if(JSON.parse(res.result).merchant_id&&e.currentTarget.dataset.cardid&&e.currentTarget.dataset.remainingamount){ | |||||
| wx.navigateTo({ | |||||
| url: `/pages/scanPay/scanPay?merChant=${res.result}&cardid=${e.currentTarget.dataset.cardid}&remainingAmount=${e.currentTarget.dataset.remainingamount}`, | |||||
| }) | |||||
| }else{ | |||||
| wx.showToast({ | |||||
| title:"未识别到商户二维码", | |||||
| icon:"none", | |||||
| mask: false | |||||
| }) | |||||
| } | |||||
| }, | }, | ||||
| fail: (res) => { | fail: (res) => { | ||||
| console.log(res); | console.log(res); | ||||
| @@ -19,8 +19,8 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| goIndex:function(){ | goIndex:function(){ | ||||
| wx.switchTab({ | |||||
| url: '/pages/index/index', | |||||
| wx.navigateBack({ | |||||
| delta: 2 | |||||
| }) | }) | ||||
| }, | }, | ||||
| /** | /** | ||||
| @@ -15,5 +15,5 @@ | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <button bindtap='goIndex' hover-class='active'>返回首页</button> | |||||
| <button bindtap='goIndex' hover-class='active'>返回卡包</button> | |||||
| </view> | </view> | ||||
| @@ -13,7 +13,7 @@ | |||||
| }, | }, | ||||
| "compileType": "miniprogram", | "compileType": "miniprogram", | ||||
| "libVersion": "2.0.9", | "libVersion": "2.0.9", | ||||
| "appid": "wxea71200db93d756b", | |||||
| "appid": "wx649b3be73c1afe47", | |||||
| "projectname": "C", | "projectname": "C", | ||||
| "isGameTourist": false, | "isGameTourist": false, | ||||
| "condition": { | "condition": { | ||||