diff --git a/high-unionPay/App.vue b/high-unionPay/App.vue index 0ded058..b9d974e 100644 --- a/high-unionPay/App.vue +++ b/high-unionPay/App.vue @@ -5,15 +5,15 @@ // brestUrl: 'http://192.168.3.4:9302/brest', // imgUrl: 'https://192.168.3.4:9301/filesystem/', //正式 - // url: 'https://hsg.dctpay.com/crest', - // imgUrl: 'https://hsg.dctpay.com/filesystem/', - // brestUrl : 'https://hsg.dctpay.com/brest', - // imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', + url: 'https://hsg.dctpay.com/crest', + imgUrl: 'https://hsg.dctpay.com/filesystem/', + brestUrl : 'https://hsg.dctpay.com/brest', + imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', //测试 - url: 'https://hsgcs.dctpay.com/crest', - brestUrl : 'https://hsgcs.dctpay.com/brest', - imgUrl: 'https://hsgcs.dctpay.com/filesystem/', - imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', + // url: 'https://hsgcs.dctpay.com/crest', + // brestUrl : 'https://hsgcs.dctpay.com/brest', + // imgUrl: 'https://hsgcs.dctpay.com/filesystem/', + // imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', userInfo: "", brestUserInfo : '', openId: '', diff --git a/high-unionPay/Utils/Api.js b/high-unionPay/Utils/Api.js index 8b3ed67..01c77f8 100644 --- a/high-unionPay/Utils/Api.js +++ b/high-unionPay/Utils/Api.js @@ -326,3 +326,8 @@ export const getAgentSalesPriceCount = params => { export const sendUserPass = params => { return POSTBREST('POST', `${brestBase}/secUser/sendUserPass`, params).then(res => res.data); } + +//话费列表 +export const getUserOrderListhuafei = params => { + return POST('GET', `${base}/outRechargeOrder/getUserOrderList`, params).then(res => res.data); +} \ No newline at end of file diff --git a/high-unionPay/pages.json b/high-unionPay/pages.json index 482a890..9c300be 100644 --- a/high-unionPay/pages.json +++ b/high-unionPay/pages.json @@ -1,6 +1,17 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages { + "path" : "pages/unionPay/unionPay-entrance/unionPay-entrance", + "style" : + { + "navigationBarTitleText": "嗨加油", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "enablePullDownRefresh": false + } + + },{ "path" : "pages/unionPay/unionPay", "style" : { @@ -486,18 +497,7 @@ } } - ,{ - "path" : "pages/unionPay/unionPay-entrance/unionPay-entrance", - "style" : - { - "navigationBarTitleText": "嗨加油", - "navigationBarTextStyle": "white", - "navigationBarBackgroundColor": "#0083f5", - "backgroundColorTop": "#0083f5", - "enablePullDownRefresh": false - } - - } + ,{ "path" : "pages/unionPay/recharge-centre/recharge-centre", "style" : @@ -510,6 +510,7 @@ } } + ], "subpackages": [{ "root": "subPages", @@ -524,6 +525,17 @@ "navigationBarTextStyle": "white" } + },{ + "path": "unionPay-orderList/unionPay-orderList", + "style": { + "enablePullDownRefresh": false, + "navigationBarTitleText": "话费订单", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#0083f5", + "backgroundColorTop": "#0083f5", + "navigationBarTextStyle": "white" + } + }] }], "globalStyle": { diff --git a/high-unionPay/pages/goods/goods-list/goods-list.vue b/high-unionPay/pages/goods/goods-list/goods-list.vue index d062775..e06335b 100644 --- a/high-unionPay/pages/goods/goods-list/goods-list.vue +++ b/high-unionPay/pages/goods/goods-list/goods-list.vue @@ -110,7 +110,7 @@ //获取弹出或者弹窗 getCmsContent() { let params = { - regionId: '500000', + regionId: app.globalData.cityId, categoryCode: 'CMS_WX_APPLETS_GOODS_LIST' } getCmsContent(params).then(res => { @@ -134,7 +134,7 @@ } let pagenum = this.pageNum; let params = { - regionId: '500000', + regionId: app.globalData.cityId, pageNum: pagenum, pageSize: this.pageSize, displayArea: this.typeId, diff --git a/high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue b/high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue index dfdc36f..4b97417 100644 --- a/high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue +++ b/high-unionPay/pages/goods/refuel-confirm/refuel-confirm.vue @@ -36,20 +36,10 @@ 支付方式 - - 微信支付 + 银联支付 @@ -59,7 +49,7 @@ - 汇联通工会卡余额: {{tongCardPrice}}元 + 积分(积分:{{user.gold}}) @@ -89,14 +79,10 @@ import { getOrderById, orderToPay, - getHuiLianTongCardBalance, hltUnionCardPay } from '../../../Utils/Api.js'; import ssPaymentPassword from '../../../components/sanshui-payment-password/index.vue'; let app = getApp(); - // #ifdef H5 - var jweixin = require('jweixin-module'); - // #endif export default { components: { ssPaymentPassword @@ -125,7 +111,6 @@ let that = this; that.paytype = ''; that.user = app.globalData.userInfo; - that.getHuiLianTongCardBalance(); }, methods: { //密码支付完成 @@ -204,18 +189,7 @@ } }) }, - //查询工会卡余额 - getHuiLianTongCardBalance() { - let params = { - cardNo: this.user.hltCardNo.cardNo - } - getHuiLianTongCardBalance(params).then(res => { - if (res.return_code == '000000') { - this.tongCardPrice = res.return_data.balance; - } - - }); - }, + //获取订单数据 orderToPay() { let that = this; @@ -300,65 +274,7 @@ } that.$refs.paymentPassword.modalFun('show'); } - }, - payRequest: function(self) { - let that = this; - uni.showLoading({ - title: '支付中...' - }) - jweixin.config({ - // debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 - appId: self.return_data.appId, // 必填,公众号的唯一标识 - timestamp: self.return_data.timeStamp, // 必填,生成签名的时间戳 - nonceStr: self.return_data.nonceStr, // 必填,生成签名的随机串 - signature: self.return_data.sign, // 必填,签名,见附录1 - jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 - }); - uni.hideLoading(); - jweixin.ready(function() { - jweixin.checkJsApi({ - jsApiList: ['chooseWXPay'], // 需要检测的JS接口列表,所有JS接口列表见附录2, - success: function(res) {}, - fail: function(res) {} - }); - jweixin.chooseWXPay({ - appId: self.return_data.appId, - timestamp: self.return_data - .timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 - nonceStr: self.return_data.nonceStr, // 支付签名随机串,不长于 32 位 - package: self.return_data - .package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***) - signType: 'MD5', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' - paySign: self.return_data.sign, // 支付签名 - success: function(res) { - // 支付成功后的回调函数 - uni.showToast({ - title: '支付成功' - }) - uni.reLaunch({ - url: '/pages/goods/refuel-succes/refuel-succes?id=' + - that.orderNo - }); - }, - cancel: function(r) {}, - fail: function(res) {}, - complete: function(res) { - - } - }); - }); - - jweixin.error(function(res) { - uni.showToast({ - icon: 'none', - title: '支付失败了', - duration: 4000 - }); - // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。 - /*alert("config信息验证失败");*/ - }); - }, - + } } } diff --git a/high-unionPay/pages/goods/refuel-details/refuel-details.vue b/high-unionPay/pages/goods/refuel-details/refuel-details.vue index 4ce4a27..5d010e3 100644 --- a/high-unionPay/pages/goods/refuel-details/refuel-details.vue +++ b/high-unionPay/pages/goods/refuel-details/refuel-details.vue @@ -207,6 +207,8 @@ }) let params = { storeKey: this.store_key, + // latitude: '30.83876', + // longitude: '106.129505', latitude: app.globalData.latitude, longitude: app.globalData.longitude } diff --git a/high-unionPay/pages/goods/refuel/refuel.vue b/high-unionPay/pages/goods/refuel/refuel.vue index bb806d4..9361f73 100644 --- a/high-unionPay/pages/goods/refuel/refuel.vue +++ b/high-unionPay/pages/goods/refuel/refuel.vue @@ -7,7 +7,6 @@ - {{distance}} @@ -17,7 +16,6 @@ {{onilName}} - @@ -304,21 +302,11 @@ ] } ], - onilName: '92#', - latitudeful:'', - longitudeful:'' + onilName: '92#' } }, onLoad() { - let that = this; - uni.getLocation({ - type: 'wgs84', - success: function(res) { - that.latitudeful = res.latitude; - that.longitudeful = res.longitude; - that.getGasStoreList(); - } - }) + this.getGasStoreList(); }, onReachBottom() { this.getGasStoreList(); @@ -391,10 +379,13 @@ let params = { storeName: this.searname, distance: this.distanceNum, - regionId: '500000', + regionId: app.globalData.cityId, + // regionId: '510000', oilNoName: this.onilName, - latitude: this.latitudeful, - longitude: this.longitudeful, + latitude: app.globalData.latitude, + longitude: app.globalData.longitude, + // latitude: '30.83876', + // longitude: '106.129505', pageNum: pagenum, pageSize: this.pageSize } diff --git a/high-unionPay/pages/pay/payment/payment.vue b/high-unionPay/pages/pay/payment/payment.vue index 494bab3..25b60a5 100644 --- a/high-unionPay/pages/pay/payment/payment.vue +++ b/high-unionPay/pages/pay/payment/payment.vue @@ -76,9 +76,6 @@ } from '../../../Utils/Api.js' import ssPaymentPassword from '../../../components/sanshui-payment-password' let app = getApp(); - // #ifdef H5 - var jweixin = require('jweixin-module'); - // #endif export default { components: { ssPaymentPassword @@ -249,66 +246,7 @@ icon: 'none' }) }) - }, - payRequest: function(self) { - uni.showLoading({ - title: '支付中...' - }) - jweixin.config({ - // debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 - appId: self.return_data.appId, // 必填,公众号的唯一标识 - timestamp: self.return_data.timeStamp, // 必填,生成签名的时间戳 - nonceStr: self.return_data.nonceStr, // 必填,生成签名的随机串 - signature: self.return_data.sign, // 必填,签名,见附录1 - jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 - }); - uni.hideLoading(); - jweixin.ready(function() { - jweixin.checkJsApi({ - jsApiList: ['chooseWXPay'], // 需要检测的JS接口列表,所有JS接口列表见附录2, - success: function(res) {}, - fail: function(res) {} - }); - jweixin.chooseWXPay({ - appId: self.return_data.appId, - timestamp: self.return_data - .timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 - nonceStr: self.return_data.nonceStr, // 支付签名随机串,不长于 32 位 - package: self.return_data - .package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***) - signType: 'MD5', // 签名方式,默认为'SHA1',使用新版支付需传入'MD5' - paySign: self.return_data.sign, // 支付签名 - success: function(res) { - // 支付成功后的回调函数 - uni.showToast({ - title: '支付成功' - }) - if (that.jumpType == 4) { - uni.reLaunch({ - url: '/pages/tabBar/user/user' - }); - return; - } - uni.reLaunch({ - url: '../success/success?id=' + that.couponId - }); - }, - cancel: function(r) {}, - fail: function(res) {} - }); - }); - - jweixin.error(function(res) { - uni.showToast({ - icon: 'none', - title: '支付失败了', - duration: 4000 - }); - // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。 - /*alert("config信息验证失败");*/ - }); - }, - + } } } diff --git a/high-unionPay/pages/tabBar/user/user.vue b/high-unionPay/pages/tabBar/user/user.vue index 2984c9e..a1891b9 100644 --- a/high-unionPay/pages/tabBar/user/user.vue +++ b/high-unionPay/pages/tabBar/user/user.vue @@ -54,6 +54,20 @@ + + + + + 话费充值 + + + + + + {{row.text}} + + + 卡券中心 @@ -163,6 +177,26 @@ icon: "pingjia" } ], + huafeiList:[ + { + text: '待支付', + icon: "fukuan" + }, + { + text: '已支付', + icon: "fahuo" + }, + { + text: '已完成', + icon: "shouhuo" + }, { + text: '已取消', + icon: "pingjia" + }, { + text: '已退款', + icon: "tuihuo" + } + ], // 工具栏列表 mytoolbarList: [ // { @@ -339,6 +373,12 @@ }); }, + //话费充值 + toOrdehuafeirList(index) { + uni.navigateTo({ + url: '../../../subPages/unionPay-orderList/unionPay-orderList?tbIndex=' + index + }) + }, //消息列表 toMsg() { uni.showToast({ diff --git a/high-unionPay/pages/unionPay/unionPay-entrance/unionPay-entrance.vue b/high-unionPay/pages/unionPay/unionPay-entrance/unionPay-entrance.vue index 27a8724..5b642f5 100644 --- a/high-unionPay/pages/unionPay/unionPay-entrance/unionPay-entrance.vue +++ b/high-unionPay/pages/unionPay/unionPay-entrance/unionPay-entrance.vue @@ -12,18 +12,75 @@ + +