diff --git a/App.vue b/App.vue index d0dc6c7..4e988ba 100644 --- a/App.vue +++ b/App.vue @@ -10,9 +10,7 @@ queueId: null, }, onLaunch: function(options) { - console.log(3333) - console.log(options) - if ( options.query.qrCode ) { + if ( options.query&&options.query.qrCode ) { if (this.getQueryString(options.query.qrCode, 'code')) { this.globalData.tableCode = this.getQueryString(options.query.qrCode, 'code') } diff --git a/components/cwx-keyboard/cwx-keyboard.vue b/components/cwx-keyboard/cwx-keyboard.vue index 2b4a0ff..9478598 100644 --- a/components/cwx-keyboard/cwx-keyboard.vue +++ b/components/cwx-keyboard/cwx-keyboard.vue @@ -82,7 +82,12 @@ //处理按键 _handleKeyPress(e) { // console.log('点击传e', e.target.dataset.num); + // #ifdef MP-WEIXIN let num = e.target.dataset.num; + // #endif + // #ifdef MP-ALIPAY + let num = e.target.targetDataset.num; + // #endif //不同按键处理逻辑 // -1 代表无效按键,直接返回 if (num == -1) return false; @@ -154,6 +159,7 @@ // this.money = S + num; // } // } + console.log(num) if (this.money.length == 6) { this.$emit('confirmEvent', this.money); //提交参数 return diff --git a/components/payPassword.vue b/components/payPassword.vue index 37531ca..408b4b0 100644 --- a/components/payPassword.vue +++ b/components/payPassword.vue @@ -6,22 +6,22 @@ - + - + - + - + - + - + @@ -67,8 +67,8 @@ * @param {Object} val */ KeyInfo(val) { - - if (val.index >= 6) { + console.log(val) + if (val.index&&val.index >= 6) { return; } // 判断是否输入的是删除键 diff --git a/components/payPasswordtwo.vue b/components/payPasswordtwo.vue index 8eb5a54..03a7b2f 100644 --- a/components/payPasswordtwo.vue +++ b/components/payPasswordtwo.vue @@ -7,22 +7,22 @@ - + - + - + - + - + - + @@ -56,7 +56,7 @@ }, watch: { consumeFee(newVal, oldVal) { - + console.log(this.consumeFee) } }, methods: { diff --git a/framework/0-conf.js b/framework/0-conf.js index 62446e1..44b09ed 100644 --- a/framework/0-conf.js +++ b/framework/0-conf.js @@ -6,8 +6,10 @@ const proxyApi = "/api" // const proxyApi = 'http://192.168.1.15:9888/cashierService' // 王伟 // const proxyApi = 'http://192.168.1.27:9888/cashierService' // 帆哥 // const proxyApiwws = 'ws://192.168.1.15:9888/netty' // 测试 -const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试 -const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试 +// const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试 +// const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试 +const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 线上 +const proxyApiwws = 'wss://cashier.sxczgkj.cn/netty' // 线上 // #endif // #ifdef H5 diff --git a/pages/index/components/diamond.vue b/pages/index/components/diamond.vue index 106878f..e920283 100644 --- a/pages/index/components/diamond.vue +++ b/pages/index/components/diamond.vue @@ -1,6 +1,6 @@ @@ -109,7 +123,7 @@ payPassword }, onLoad(e) { - this.$store.dispatch("set_shopid"); //获取shapid + // this.$store.dispatch("set_shopid"); //获取shapid this.getInfo(e.id) this.orderIds = e.id this.amount = uni.cache.get('userInfo').amount @@ -143,6 +157,12 @@ // 余额支付 async accountPayevent(pwd) { this.ispws = false + if ( this.amountVIP.isVip == 0 ) { + uni.pro.navigateTo('/pages/member/index', { + shopId: this.info.shopId, + }) + return; + } let res = await this.api.payOrderPay({ orderId: this.listinfoid.id, payType: "deposit", @@ -207,7 +227,7 @@ let isVip = uni.cache.get('userInfo').isPwd if (isVip == 0) { uni.pro.navigateTo('/pages/user/repairpassword', { - shopId_id: uni.cache.get('shopId') + shopId_id: this.info.shopId }) } else { this.ispws = true @@ -221,12 +241,19 @@ }, async payEvent(id) { let res = await this.api.payOrderPay({ + // #ifdef MP-WEIXIN payType: 'wechatPay', + // #endif + // #ifdef MP-ALIPAY + payType: 'aliPay', + // #endif orderId: id, orderType: 'group' }) if (res) { + // 微信支付还是余额支付 uni.requestPayment({ + // #ifdef MP-WEIXIN provider: 'wxpay', //支付类型-固定值 partnerid: res.data.appId, // 微信支付商户号 timeStamp: res.data.timeStamp, // 时间戳(单位:秒) @@ -234,22 +261,32 @@ package: res.data.package, // 固定值 signType: res.data.signType, //固定值 paySign: res.data.paySign, //签名 + // #endif + // #ifdef MP-ALIPAY + provider: 'alipay', //支付类型-固定值 + orderInfo: res.data.tradeNo, // 支付宝支付商户号 + // #endif success: (res) => { + let _this = this uni.showToast({ title: "支付成功" }) uni.navigateBack() }, - fail: (err) => { - setTimeout(res => { - uni.showToast({ - icon: 'none', - title: '支付失败' - }) - uni.hideLoading() - }, 2000) + fail: async (err) => { + console.log(err) + let res = await this.api.cancelOrderPay({ + orderId: this.listinfoid.id, + }) + + uni.showToast({ + icon: 'none', + title: '支付失败' + }) + uni.hideLoading() } }); + } }, diff --git a/pages/user/coupon.vue b/pages/user/coupon.vue index 775e73e..b2c5fec 100644 --- a/pages/user/coupon.vue +++ b/pages/user/coupon.vue @@ -115,7 +115,7 @@ */ async getCouponList() { try { - let res = await this.api.conponList({ + let res = await this.api.getUserConpons({ userId: uni.cache.get('userInfo').id, shopId: uni.cache.get('shopId'), status: this.status diff --git a/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue b/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue index 204a8fc..ce0f531 100644 --- a/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue +++ b/uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue @@ -90,6 +90,7 @@ * @param {Number} index */ onKeyList(item, index) { + console.log(item) let KeyInfo = item; // 删除键 if (KeyInfo.keyCode === 8 && this.keyIndex > -1) {