1.对接工会卡支付

yj-dev
杨杰 4 years ago
parent a8652867b7
commit da1cca7a66
  1. 46
      pages.json
  2. 133
      pages/order/confirmation.vue
  3. 140
      pages/pay/payment/payment.vue
  4. 10
      pages/tabBar/user/user.vue
  5. 4
      pages/user/bindingCard/bindingCard.vue
  6. 3
      pages/user/order_details/order_details.vue
  7. 49
      pages/user/unionCard/unionCard.vue

@ -1,17 +1,6 @@
{ {
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages "pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{ {
"path" : "pages/user/bindingCardList/bindingCardList",
"style" :
{
"navigationBarTitleText": "卡列表",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
},{
"path": "pages/tabBar/home/home", "path": "pages/tabBar/home/home",
"style": { "style": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
@ -30,6 +19,17 @@
} }
} }
},{ },{
"path" : "pages/user/bindingCardList/bindingCardList",
"style" :
{
"navigationBarTitleText": "卡列表",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
},{
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
@ -289,26 +289,32 @@
}, { }, {
"path": "pages/user/deposit/deposit", "path": "pages/user/deposit/deposit",
"style": { "style": {
"navigationBarBackgroundColor": "#ffffff", "enablePullDownRefresh": false,
"navigationBarTitleText": "充值", "navigationBarTitleText": "充值",
"backgroundColorTop": "#ffffff", "backgroundTextStyle": "light",
"backgroundColorBottom": "#ffffff" "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white"
} }
}, { }, {
"path": "pages/pay/payment/payment", "path": "pages/pay/payment/payment",
"style": { "style": {
"navigationBarBackgroundColor": "#ffffff", "enablePullDownRefresh": false,
"navigationBarTitleText": "订单支付", "navigationBarTitleText": "订单支付",
"backgroundColorTop": "#ffffff", "backgroundTextStyle": "light",
"backgroundColorBottom": "#ffffff" "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white"
} }
}, { }, {
"path": "pages/pay/success/success", "path": "pages/pay/success/success",
"style": { "style": {
"navigationBarBackgroundColor": "#ffffff", "enablePullDownRefresh": false,
"navigationBarTitleText": "支付成功", "navigationBarTitleText": "支付成功",
"backgroundColorTop": "#ffffff", "backgroundTextStyle": "light",
"backgroundColorBottom": "#ffffff" "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white"
} }
}, },
{ {

@ -10,16 +10,14 @@
<view class="price-number mart10"> <view class="price-number mart10">
<view class="price font16" v-if="couponList.payType == 1">{{couponList.discountPrice}}</view> <view class="price font16" v-if="couponList.payType == 1">{{couponList.discountPrice}}</view>
<view class="price font16" v-else> <view class="price font16" v-else>
<image style="width: 15px;height: 15px;" <image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
src="../../static/img/jfx.png">
</image>{{couponList.discountPrice*100}} </image>{{couponList.discountPrice*100}}
</view> </view>
<view class="number fcor666 font13 margle" v-if="couponList.payType == 1"> <view class="number fcor666 font13 margle" v-if="couponList.payType == 1">
{{couponList.salesPrice}} {{couponList.salesPrice}}
</view> </view>
<view class="number fcor666 font13 margle" v-else> <view class="number fcor666 font13 margle" v-else>
<image style="width: 15px;height: 15px;" <image style="width: 15px;height: 15px;" src="../../static/img/jfh.png">
src="../../static/img/jfh.png">
</image>{{couponList.salesPrice*100}} </image>{{couponList.salesPrice*100}}
</view> </view>
<view class="flright fotrt paddleft10">x1</view> <view class="flright fotrt paddleft10">x1</view>
@ -35,8 +33,7 @@
{{couponList.discountPrice}} {{couponList.discountPrice}}
</view> </view>
<view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem" v-else> <view class="width40 flright alijun paddtright10 font15 fontwig6 fcor666 aliitem" v-else>
<image style="width: 15px;height: 15px;" <image style="width: 15px;height: 15px;" src="../../static/img/jfx.png">
src="../../static/img/jfx.png">
</image>{{couponList.discountPrice*100}} </image>{{couponList.discountPrice*100}}
</view> </view>
</view> </view>
@ -98,13 +95,13 @@
</view> </view>
</view> </view>
<view class="width94 line1 mart5 marb5" v-if="couponList.payType == 1 || couponList.payType==3 "></view> <view class="width94 line1 mart5 marb5" v-if="couponList.payType == 1 || couponList.payType==3 "></view>
<view class="height50 width100 backcorfff" @tap="paytype='gonghuika'"> <view class="height50 width100 backcorfff" @tap="paytype='gonghuika'">
<view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;"> <view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;">
工会卡支付<text class="font14 fcor666 margle">可用余额: </text> 工会卡支付<text class="font14 fcor666 margle">可用余额: {{tongCardPrice}}</text>
</view> </view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun" <view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;"> style="align-items: center;">
<radio :checked="paytype=='gonghuika'" color="#0083f5" /> <radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
</view> </view>
</view> </view>
</view> </view>
@ -125,8 +122,7 @@
<view class="settlement"> <view class="settlement">
<view class="sum">实付:<view class="money" v-if="couponList.payType == 1">{{paytheprice}}</view> <view class="sum">实付:<view class="money" v-if="couponList.payType == 1">{{paytheprice}}</view>
<view class="money aliitem" v-else> <view class="money aliitem" v-else>
<image style="width: 15px;height: 15px;vertical-align: sub;" <image style="width: 15px;height: 15px;vertical-align: sub;" src="../../static/img/jfx.png">
src="../../static/img/jfx.png">
</image>{{paytheprice*100}} </image>{{paytheprice*100}}
</view> </view>
</view> </view>
@ -171,7 +167,9 @@
bindUserPhone, bindUserPhone,
orderToPay, orderToPay,
orderToGoldPay, orderToGoldPay,
findUser findUser,
hltUnionCardPay,
getHuiLianTongCardBalance
} from '../../Utils/Api.js'; } from '../../Utils/Api.js';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue'; import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import ssPaymentPassword from '../../components/sanshui-payment-password' import ssPaymentPassword from '../../components/sanshui-payment-password'
@ -206,18 +204,29 @@
PaymentPassword: '', PaymentPassword: '',
isture: true, isture: true,
orderId: '', orderId: '',
jumpType:'' jumpType: '',
tongCardPrice: 0,
balanceCardNo : ''
}; };
}, },
onLoad(option) { onLoad(option) {
this.couponId = option.id; this.couponId = option.id;
this.getCouponById(); this.getCouponById();
this.getUserNormalDiscountList();
}, },
onShow() { onShow() {
this.user = app.globalData.userInfo; let that =this;
this.findUser(); that.paytype = '';
that.user = app.globalData.userInfo;
that.findUser();
uni.getStorage({
key: 'balanceCardNo',
success(e) {
that.balanceCardNo = e.data;
that.getHuiLianTongCardBalance();
}
})
}, },
onHide() { onHide() {
@ -254,7 +263,7 @@
if (res.return_code == '000000') { if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data; app.globalData.userInfo = res.return_data;
this.user = res.return_data; this.user = res.return_data;
uni.setStorage({ uni.setStorage({
key: "user", key: "user",
data: res.return_data data: res.return_data
}) })
@ -329,6 +338,19 @@
} }
}) })
}, },
//
//
getHuiLianTongCardBalance() {
let params = {
cardNo: this.balanceCardNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
}
});
},
// H5 // H5
jumpH5Bding() { jumpH5Bding() {
uni.navigateTo({ uni.navigateTo({
@ -400,7 +422,24 @@
} }
}) })
}, },
//
changeRiado() {
if (!this.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
},
// //
orderToPay(item) { orderToPay(item) {
let that = this; let that = this;
@ -453,7 +492,7 @@
} }
}) })
} else if (that.paytype == 'jinbi') { } else if (that.paytype == 'jinbi') {
if(!that.user.isSetPayPwd){ if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../login/updatePas/updatePas' url: '../login/updatePas/updatePas'
}) })
@ -461,6 +500,24 @@
} }
that.isture = false; that.isture = false;
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'gonghuika') {
if (!that.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
that.isture = false;
that.$refs.paymentPassword.modalFun('show');
} else { } else {
uni.showToast({ uni.showToast({
title: '请选择支付方式', title: '请选择支付方式',
@ -475,18 +532,49 @@
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
}) })
if (this.paytype == 'jinbi') {
let params = {
"orderId": this.orderId,
"password": this.PaymentPassword
}
orderToGoldPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId
});
return;
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
let params = { let params = {
"orderId": this.orderId, "orderId": this.orderId,
"cardNo": this.balanceCardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
orderToGoldPay(params).then(res => { hltUnionCardPay(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.reLaunch({ uni.reLaunch({
url:'../pay/success/success?id=' + this.couponId url: '../pay/success/success?id=' + this.couponId
}); });
return; return;
} }
@ -500,8 +588,9 @@
title: res.return_msg, title: res.return_msg,
icon: 'none' icon: 'none'
}) })
}) })
}, },
payRequest: function(self) { payRequest: function(self) {
uni.showLoading({ uni.showLoading({

@ -6,8 +6,8 @@
<view class="row"> <view class="row">
<view class="nominal">订单金额:</view> <view class="nominal">订单金额:</view>
<view class="text" v-if="pryType == 1">{{amount}} </view> <view class="text" v-if="pryType == 1">{{amount}} </view>
<view class="text" v-if="pryType == 2">{{amount*100}} 个积分 (当前积分:{{user.gold}})</view> <view class="text" v-if="pryType == 2">{{amount*100}} 个积分</view>
<view class="text" v-if="pryType == 3">{{amount}}(当前积分:{{user.gold}})</view> <view class="text" v-if="pryType == 3">{{amount}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -25,12 +25,25 @@
</image> </image>
</view> </view>
<view class="center"> <view class="center">
积分支付 积分支付(积分:{{user.gold}})
</view> </view>
<view class="right"> <view class="right">
<radio :checked="paytype=='jinbi'" color="#0083f5" /> <radio :checked="paytype=='jinbi'" color="#0083f5" />
</view> </view>
</view> </view>
<view class="row" @tap="paytype='gonghuika'">
<view class="left">
<image
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNjE2ODUyMjc2NDc1IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjI0MDMiIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHN0eWxlIHR5cGU9InRleHQvY3NzIj48L3N0eWxlPjwvZGVmcz48cGF0aCBkPSJNNTEyIDUwOS4xbS00NDQuNCAwYTQ0NC40IDQ0NC40IDAgMSAwIDg4OC44IDAgNDQ0LjQgNDQ0LjQgMCAxIDAtODg4LjggMFoiIGZpbGw9IiNGQUIwMDEiIHAtaWQ9IjI0MDQiPjwvcGF0aD48cGF0aCBkPSJNODg3LjcgNDU5LjFjMC0xMzIuNS01OC0yNTEuMy0xNTAtMzMyLjdDNjcxLjYgODcuMiA1OTQuNCA2NC43IDUxMiA2NC43Yy0yNDUuNCAwLTQ0NC40IDE5OS00NDQuNCA0NDQuNCAwIDEzMi41IDU4IDI1MS4zIDE1MCAzMzIuNyA2Ni4yIDM5LjEgMTQzLjMgNjEuNyAyMjUuOCA2MS43IDI0NS40IDAgNDQ0LjMtMTk5IDQ0NC4zLTQ0NC40eiIgZmlsbD0iI0Y5RTQ4QSIgcC1pZD0iMjQwNSI+PC9wYXRoPjxwYXRoIGQ9Ik01NjggMTAyLjVjLTI0NS40IDAtNDQ0LjQgMTk5LTQ0NC40IDQ0NC40IDAgMTIyLjUgNDkuNyAyMzMuNCAxMzAgMzEzLjggNTcuNiAyNy4zIDEyMS44IDQyLjggMTg5LjggNDIuOCAyNDUuNCAwIDQ0NC40LTE5OSA0NDQuNC00NDQuNCAwLTEyMi41LTQ5LjctMjMzLjQtMTMwLTMxMy44LTU3LjYtMjcuMy0xMjEuOS00Mi44LTE4OS44LTQyLjh6IiBmaWxsPSIjRkVDRTBBIiBwLWlkPSIyNDA2Ij48L3BhdGg+PHBhdGggZD0iTTcwNC40IDYxNi40YzAgMjguNi00LjkgNDQuNi0yNS4yIDU0LjMtMTUuNCA3LjMtMzUgOS40LTYwLjIgMTAtMTEuOCAwLjMtMjIuMS03LjctMjUuNC0xOS0wLjQtMS41LTAuOS0zLjEtMS40LTQuNi01LjMtMTYuNyA3LjMtMzMuNiAyNC44LTMzLjYgOCAwIDE0LjMtMC4xIDE3LjEtMC4zIDcuOCAwIDkuNy0xLjkgOS43LTguMlY1MTQuM2MwLTE0LjMtMTEuNi0yNS45LTI1LjktMjUuOWgtMzYuNGMtMTQuMyAwLTI1LjkgMTEuNi0yNS45IDI1Ljl2MTk1LjVjMCAxNC4zLTExLjYgMjUuOS0yNS45IDI1LjlINTIxYy0xNC4zIDAtMjUuOS0xMS42LTI1LjktMjUuOVY1MTQuM2MwLTE0LjMtMTEuNi0yNS45LTI1LjktMjUuOWgtMzNjLTE0LjMgMC0yNS45IDExLjYtMjUuOSAyNS45djE0MS42YzAgMTQuMy0xMS42IDI1LjktMjUuOSAyNS45aC03LjNjLTE0LjMgMC0yNS45LTExLjYtMjUuOS0yNS45VjQ1OGMwLTE0LjMgMTEuNi0yNS45IDI1LjktMjUuOWg5Mi4yYzE0LjMgMCAyNS45LTExLjYgMjUuOS0yNS45di0xMC45YzAtMTQuOC0xMi40LTI2LjYtMjcuMi0yNS45LTM4LjggMS43LTc3LjUgMi43LTExNC42IDMtMTIuMSAwLjEtMjIuOS04LjMtMjUuNC0yMC4xIDAtMC4yLTAuMS0wLjQtMC4xLTAuNi0zLjQtMTYuMSA4LjMtMzEuNCAyNC44LTMxLjggMTE4LTIuNyAyNDUuOS0xMC42IDMzOC4zLTIyLjggMTEuNi0xLjUgMjIuNyA0LjkgMjcuMiAxNS43bDEuMSAyLjZjNi42IDE1LjgtMy40IDMzLjYtMjAuNCAzNS44LTM2LjkgNC45LTc3LjIgOC43LTExOS4zIDExLjktMTMuNSAxLTIzLjkgMTIuMy0yMy45IDI1Ljl2MTcuM2MwIDE0LjMgMTEuNiAyNS45IDI1LjkgMjUuOWg5N2MxNC4zIDAgMjUuOSAxMS42IDI1LjkgMjUuOXYxNTguM3oiIGZpbGw9IiNGRkZGRkYiIHAtaWQ9IjI0MDciPjwvcGF0aD48L3N2Zz4=">
</image>
</view>
<view class="center">
工会卡支付(余额:{{tongCardPrice}})
</view>
<view class="right">
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
<view class="row" @tap="paytype='wxpay'" v-if="pryType == 1 || pryType==3 "> <view class="row" @tap="paytype='wxpay'" v-if="pryType == 1 || pryType==3 ">
<view class="left"> <view class="left">
<image :src="imagewxUrl+imgadres"></image> <image :src="imagewxUrl+imgadres"></image>
@ -61,7 +74,9 @@
<script> <script>
import { import {
orderToPay, orderToPay,
orderToGoldPay orderToGoldPay,
getHuiLianTongCardBalance,
hltUnionCardPay
} from '../../../Utils/Api.js' } from '../../../Utils/Api.js'
import ssPaymentPassword from '../../../components/sanshui-payment-password' import ssPaymentPassword from '../../../components/sanshui-payment-password'
let app = getApp(); let app = getApp();
@ -83,7 +98,9 @@
user: '', user: '',
couponId: '', couponId: '',
jumpType: '', jumpType: '',
PaymentPassword: '' PaymentPassword: '',
balanceCardNo: '',
tongCardPrice: 0
}; };
}, },
onLoad(e) { onLoad(e) {
@ -101,7 +118,48 @@
} }
this.amount = parseFloat(e.amount).toFixed(2); this.amount = parseFloat(e.amount).toFixed(2);
}, },
onShow() {
let that = this;
uni.getStorage({
key: 'balanceCardNo',
success(e) {
that.balanceCardNo = e.data;
that.getHuiLianTongCardBalance();
}
})
},
methods: { methods: {
//
changeRiado() {
if (!this.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
},
//
//
getHuiLianTongCardBalance() {
let params = {
cardNo: this.balanceCardNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
}
});
},
// //
orderToPay() { orderToPay() {
let that = this; let that = this;
@ -160,13 +218,30 @@
} }
}) })
} else if (that.paytype == 'jinbi') { } else if (that.paytype == 'jinbi') {
if(!that.user.isSetPayPwd){ if (!that.user.isSetPayPwd) {
uni.navigateTo({ uni.navigateTo({
url: '../../login/updatePas/updatePas' url: '../../login/updatePas/updatePas'
}) })
return; return;
} }
that.$refs.paymentPassword.modalFun('show'); that.$refs.paymentPassword.modalFun('show');
} else if (that.paytype == 'gonghuika') {
if (!that.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../../user/bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
that.$refs.paymentPassword.modalFun('show');
} else { } else {
uni.showToast({ uni.showToast({
title: '请选择支付方式', title: '请选择支付方式',
@ -180,26 +255,57 @@
uni.showLoading({ uni.showLoading({
title: '支付中...' title: '支付中...'
}) })
if (this.paytype == 'jinbi') {
let params = {
"orderId": this.orderNo,
"password": this.PaymentPassword
}
orderToGoldPay(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.showToast({
title: '支付成功'
})
if (this.jumpType == 4) {
uni.reLaunch({
url: '/pages/tabBar/user/user'
});
return;
}
uni.reLaunch({
url: '../success/success?id=' + this.couponId
});
}
if (res.return_code == '102130') {
uni.navigateTo({
url: '../../login/updatePas/updatePas'
})
return;
}
uni.showToast({
title: res.return_msg,
icon: 'none'
})
})
return;
}
let params = { let params = {
"orderId": this.orderNo, "orderId": this.orderNo,
"cardNo": this.balanceCardNo,
"password": this.PaymentPassword "password": this.PaymentPassword
} }
orderToGoldPay(params).then(res => { hltUnionCardPay(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
if (this.jumpType == 4) {
uni.reLaunch({
url: '/pages/tabBar/user/user'
});
return;
}
uni.reLaunch({ uni.reLaunch({
url: '../success/success?id=' + this.couponId url: '../success/success?id=' + this.couponId
}); });
return;
} }
if (res.return_code == '102130') { if (res.return_code == '102130') {
uni.navigateTo({ uni.navigateTo({
@ -207,12 +313,10 @@
}) })
return; return;
} }
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
icon: 'none' icon: 'none'
}) })
}) })
}, },
payRequest: function(self) { payRequest: function(self) {
@ -237,10 +341,10 @@
jweixin.chooseWXPay({ jweixin.chooseWXPay({
appId: self.return_data.appId, appId: self.return_data.appId,
timestamp: self.return_data timestamp: self.return_data
.timeStamp, // jssdk使timestamp使timeStampS .timeStamp, // jssdk使timestamp使timeStampS
nonceStr: self.return_data.nonceStr, // 32 nonceStr: self.return_data.nonceStr, // 32
package: self.return_data package: self.return_data
.package, // prepay_idprepay_id=*** .package, // prepay_idprepay_id=***
signType: 'MD5', // 'SHA1'使'MD5' signType: 'MD5', // 'SHA1'使'MD5'
paySign: self.return_data.sign, // paySign: self.return_data.sign, //
success: function(res) { success: function(res) {

@ -210,11 +210,11 @@
], ],
// //
czList: [ czList: [
{ // {
url: '../../user/bindingCardList/bindingCardList', // url: '../../user/bindingCardList/bindingCardList',
text: '卡列表', // text: '',
img: '../../../static/img/pas.png' // img: '../../../static/img/pas.png'
}, // },
{ {
url: '../../user/unionCard/unionCard', url: '../../user/unionCard/unionCard',
text: '卡记录', text: '卡记录',

@ -149,6 +149,10 @@
bindHuiLianTongCard(params).then(res => { bindHuiLianTongCard(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.setStorage({
key: "balanceCardNo",
data: this.cardNoNumber
})
uni.showToast({ uni.showToast({
title: '绑定成功', title: '绑定成功',
icon: "success", icon: "success",

@ -89,6 +89,9 @@
<view class="right" v-if="recinfo.payType == 3"> <view class="right" v-if="recinfo.payType == 3">
积分 积分
</view> </view>
<view class="right" v-if="recinfo.payType == 4">
工会卡
</view>
</view> </view>
<view class="row" v-if="recinfo.totalPrice"> <view class="row" v-if="recinfo.totalPrice">
<view class="left"> <view class="left">

@ -23,7 +23,7 @@
<view class="li"> <view class="li">
<text class="font15 fcor333">开始时间</text> <text class="font15 fcor333">开始时间</text>
<view class="flex1"> <view class="flex1">
<picker mode="date" :value="start_date" :start="start_date" @change="bindDateChange"> <picker mode="date" :value="start_date" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="date">{{start_date}}</view> <view class="date">{{start_date}}</view>
</picker> </picker>
</view> </view>
@ -31,7 +31,7 @@
<view class="li"> <view class="li">
<text class="font15 fcor333">结束时间</text> <text class="font15 fcor333">结束时间</text>
<view class="flex1"> <view class="flex1">
<picker mode="date" :value="end_date" :start="end_date" @change="bindDateChange2"> <picker mode="date" :value="end_date" :start="startDate" :end="endDate" @change="bindDateChange2">
<view class="date">{{end_date}}</view> <view class="date">{{end_date}}</view>
</picker> </picker>
</view> </view>
@ -66,6 +66,7 @@
getHuiLianTongCardBalance, getHuiLianTongCardBalance,
getHuiLianTongCardConsume getHuiLianTongCardConsume
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
let app = getApp();
export default { export default {
data() { data() {
const currentDate = this.getDate({ const currentDate = this.getDate({
@ -93,12 +94,45 @@
cardConsumeList : [], cardConsumeList : [],
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
isNoMoreData: false isNoMoreData: false,
user: ''
} }
}, },
onLoad() { onLoad() {
},
onShow() {
this.user = app.globalData.userInfo;
if (!this.user.isSetHltCard) {
uni.showToast({
icon: 'none',
title: '当前账号还未绑定,前往绑定',
duration: 2000,
success() {
setTimeout(() => {
uni.navigateTo({
url: '../bindingCard/bindingCard'
})
}, 1000)
}
});
return;
}
this.getUserCardList(); this.getUserCardList();
}, },
//
onReachBottom() {
this.getHuiLianTongCardConsume();
},
computed: {
startDate() {
return this.getDate('start');
},
endDate() {
return this.getDate('end');
}
},
methods: { methods: {
// //
bindDateChange: function(e) { bindDateChange: function(e) {
@ -162,6 +196,7 @@
}, },
// //
getHuiLianTongCardConsumeOpen(){ getHuiLianTongCardConsumeOpen(){
this.pageNum = 1;
this.isNoMoreData = false; this.isNoMoreData = false;
this.cardConsumeList = []; this.cardConsumeList = [];
this.getHuiLianTongCardConsume(); this.getHuiLianTongCardConsume();
@ -170,12 +205,12 @@
// //
getHuiLianTongCardConsume() { getHuiLianTongCardConsume() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) { if (this.isNoMoreData) {
return false; return false;
} }
uni.showLoading({
title: '加载中...'
})
let pagenum = this.pageNum; let pagenum = this.pageNum;
let Time1 = new Date(this.start_date); let Time1 = new Date(this.start_date);
let timestemp1 = Time1.getTime(); let timestemp1 = Time1.getTime();
@ -199,7 +234,7 @@
this.cardConsumeList = []; this.cardConsumeList = [];
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title:res.return_msg, title:'请求超时稍后重试!',
icon:'none', icon:'none',
duration: 2000 duration: 2000
}) })

Loading…
Cancel
Save