diff --git a/pages.json b/pages.json index d29b0cc..4bf1fd6 100644 --- a/pages.json +++ b/pages.json @@ -1,33 +1,33 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - { - "path": "pages/tabBar/home/home", - "style": { - "navigationBarTextStyle": "white", - "navigationBarTitleText": "首页", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", - "onReachBottomDistance": 50, - "app-plus": { - "titleNView": false, //禁用原生导航栏 - "softinputNavBar": "none", - "subNVues": [{ - "id": "homeTitleNvue", // 唯一标识 - "path": "pages/tabBar/home/subNvue/homeTitleNvue", // 页面路径 - "type": "navigationBar" - }] - } - } - },{ - "path": "pages/qianZhuPay/union-pay/union-pay", - "style": { - "navigationBarTextStyle": "white", - "navigationBarTitleText": "选择方式", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", - "enablePullDownRefresh": false - } - + { + "path": "pages/tabBar/home/home", + "style": { + "navigationBarTextStyle": "white", + "navigationBarTitleText": "首页", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "onReachBottomDistance": 50, + "app-plus": { + "titleNView": false, //禁用原生导航栏 + "softinputNavBar": "none", + "subNVues": [{ + "id": "homeTitleNvue", // 唯一标识 + "path": "pages/tabBar/home/subNvue/homeTitleNvue", // 页面路径 + "type": "navigationBar" + }] + } + } + }, { + "path": "pages/qianZhuPay/union-pay/union-pay", + "style": { + "navigationBarTextStyle": "white", + "navigationBarTitleText": "选择方式", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "enablePullDownRefresh": false + } + }, { "path": "pages/user/bindingCardList/bindingCardList", "style": { @@ -632,10 +632,20 @@ }, { "path": "trade-union-recharge/trade-union-recharge", "style": { - "navigationBarTitleText": "工会卡充值", - "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", + "navigationBarTitleText": "工会卡充值", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "navigationBarTextStyle": "white" + } + + }, { + "path": "union-card-success/union-card-success", + "style": { + "navigationBarTitleText": "充值成功", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", "navigationBarTextStyle": "white" } diff --git a/pages/user/cardDes/cardDes.vue b/pages/user/cardDes/cardDes.vue index 0bacf1e..e692650 100644 --- a/pages/user/cardDes/cardDes.vue +++ b/pages/user/cardDes/cardDes.vue @@ -104,7 +104,7 @@ unionCardPay() { uni.navigateTo({ url: '../../../subPages/trade-union-recharge/trade-union-recharge?cardId=' + this.user - .hltCardNo.cardNo + .hltCardNo.cardNo + '&RechargeType=1' }) } } diff --git a/subPages/static/union5.jpg b/subPages/static/union5.jpg new file mode 100644 index 0000000..9150905 Binary files /dev/null and b/subPages/static/union5.jpg differ diff --git a/subPages/static/upay3.jpg b/subPages/static/upay3.jpg index bccefe0..1303ac9 100644 Binary files a/subPages/static/upay3.jpg and b/subPages/static/upay3.jpg differ diff --git a/subPages/trade-union-recharge/trade-union-recharge.vue b/subPages/trade-union-recharge/trade-union-recharge.vue index 7946f14..dd56537 100644 --- a/subPages/trade-union-recharge/trade-union-recharge.vue +++ b/subPages/trade-union-recharge/trade-union-recharge.vue @@ -83,11 +83,13 @@ imagewxUrl: app.globalData.imageWxImg, imgadres: 'wxpay.png', tongCardPrice: 0, - cardId: '' //工会卡号 + cardId: '', //工会卡号 + typevas: '' }; }, onLoad(options) { this.cardId = options.cardId; + this.typevas = options.RechargeType; }, onShow() { this.user = app.globalData.userInfo; @@ -136,7 +138,7 @@ // duration: 2000 // }); // return; - // } + // } uni.showLoading({ title: '正在提交订单...' }) @@ -150,6 +152,7 @@ "goodsPrice": this.inputAmount }] } + let that = this; addOrder(datas).then(res => { uni.hideLoading(); if (res.return_code == '000000') { @@ -180,7 +183,15 @@ duration: 2000, success() { setTimeout(() => { - uni.navigateBack({}) + if (that.typevas == 'Hlt') { + uni.navigateTo({ + url: '../union-card-success/union-card-success?price=' + + that + .inputAmount + }) + } else { + uni.navigateBack({}) + } }, 1000) } }); diff --git a/subPages/union-card-success/union-card-success.vue b/subPages/union-card-success/union-card-success.vue new file mode 100644 index 0000000..1d8d3a5 --- /dev/null +++ b/subPages/union-card-success/union-card-success.vue @@ -0,0 +1,34 @@ + + + + + diff --git a/subPages/unionComfirmation/unionComfirmation.vue b/subPages/unionComfirmation/unionComfirmation.vue index 38767c1..f720296 100644 --- a/subPages/unionComfirmation/unionComfirmation.vue +++ b/subPages/unionComfirmation/unionComfirmation.vue @@ -80,7 +80,8 @@ - + + @@ -429,7 +430,22 @@ }) } }) - } else if (that.paytype == 'jinbi') { + } else if (that.paytype == 'jinbi') { + if (that.user.gold < that.payPrice * 100) { + uni.showToast({ + icon: 'none', + title: '积分不足', + duration: 2000, + success() { + setTimeout(() => { + uni.navigateTo({ + url: '../../pages/user/deposit/deposit' + }) + }, 1000) + } + }); + return; + } if (!that.user.isSetPayPwd) { uni.navigateTo({ url: '../../pages/login/updatePas/updatePas' @@ -437,7 +453,15 @@ return; } that.$refs.paymentPassword.modalFun('show'); - } else if (that.paytype == 'gonghuika') { + } else if (that.paytype == 'gonghuika') { + if (that.tongCardPrice < that.payPrice) { + uni.showToast({ + icon: 'none', + title: '工会卡余额不足', + duration: 2000, + }); + return; + } if (!that.user.isSetPayPwd) { uni.navigateTo({ url: '../../pages/login/updatePas/updatePas' @@ -518,13 +542,19 @@ } hltUnionCardPayUnion(params).then(res => { uni.hideLoading(); - if (res.return_code == '000000') { - uni.showToast({ - title: '支付成功' - }) - uni.switchTab({ - url: '../../pages/tabBar/user/user' - }) + if (res.return_code == '000000') { + uni.showToast({ + icon: 'none', + title: '支付成功', + duration: 2000, + success() { + setTimeout(() => { + uni.switchTab({ + url: '../../pages/tabBar/user/user' + }) + }, 1000) + } + }); return; } if (res.return_code == '102130') { @@ -535,7 +565,8 @@ } uni.showToast({ title: res.return_msg, - icon: 'none' + icon: 'none', + duration:2000 }) })