20210831修复bug

yj-dev
杨杰 3 years ago
parent 5c8d27ff06
commit 67680d41ca
  1. 16
      App.vue
  2. 34
      Utils/Api.js
  3. 9
      pages.json
  4. 14
      pages/order/confirmation.vue
  5. 224
      pages/user/bindingCard/bindingCard.vue
  6. 176
      pages/user/unionCard/unionCard.vue
  7. 5
      uni.scss

@ -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: '',

@ -157,6 +157,40 @@ export const getCmsContent = params => {
return POST('GET', `${base}/cmsContent/getCmsContent`, params).then(res => res.data);
}
/**
* 工会卡
*/
// 获取用户卡号列表
export const getUserCardList = params => {
return POST('GET', `${base}/highUserCard/getUserCardList`, params).then(res => res.data);
}
// 根据手机号获取汇联通工会卡列表
export const getHuiLianTongCardByPhone = params => {
return POST('POST', `${base}/highUserCard/getHuiLianTongCardByPhone`, params).then(res => res.data);
}
// 删除用户卡号
export const delUserCard = params => {
return POST('POST', `${base}/highUserCard/delUserCard`, params).then(res => res.data);
}
// 查询汇联通工会卡详情
export const getHuiLianTongCardBalance = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardBalance?`, params).then(res => res.data);
}
// 查询汇联通工会卡消费记录
export const getHuiLianTongCardConsume = params => {
return POST('GET', `${base}/highUserCard/getHuiLianTongCardConsume`, params).then(res => res.data);
}
// 汇联通工会卡支付
export const hltUnionCardPay = params => {
return POST('POST', `${base}/order/hltUnionCardPay`, params).then(res => res.data);
}
export const bindHuiLianTongCard = params => {
return POST('POST', `${base}/highUserCard/bindHuiLianTongCard`, params).then(res => res.data);
}
/**
* 工会卡
*/
/**
* 肯德基地址

@ -489,6 +489,15 @@
}
}
,{
"path" : "pages/user/bindingCard/bindingCard",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {

@ -78,10 +78,10 @@
<view class="width94 line1 mart5 marb5"></view>
<view class="height50 width100 backcorfff" v-if="couponList.payType == 2 || couponList.payType==3 "
@tap="paytype='jinbi'">
<view class="width60 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
<view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;">
积分支付<text class="font14 fcor666 margle">可用积分: {{user.gold}}</text>
</view>
<view class="width30 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
<radio :checked="paytype=='jinbi'" color="#0083f5" />
</view>
@ -98,15 +98,15 @@
</view>
</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="width50 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
工会卡支付
<view class="height50 width100 backcorfff" @tap="paytype='gonghuika'">
<view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;">
工会卡支付<text class="font14 fcor666 margle">可用余额: </text>
</view>
<view class="width40 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
<radio :checked="paytype=='gonghuika'" color="#0083f5" />
</view>
</view> -->
</view>
</view>
<view class="width94 comorder mart10">

File diff suppressed because one or more lines are too long

@ -2,6 +2,24 @@
<view>
<view class="leave_cont">
<view class="ul">
<view class="li">
<text class="font15 fcor333">选择卡号</text>
<view class="flex1">
<picker mode="selector" :range="UserCard" range-key="cardNo"
@change="bindUserCard">
<view class="date text1 margle10">{{carNo}}</view>
</picker>
</view>
</view>
<view class="li">
<text class="font15 fcor333">业务类型</text>
<view class="flex1">
<picker mode="selector" :range="title_list" range-key="name"
@change="bindtitleList">
<view class="date text1 margle10">{{titleName}}</view>
</picker>
</view>
</view>
<view class="li">
<text class="font15 fcor333">开始时间</text>
<view class="flex1">
@ -19,34 +37,24 @@
</view>
</view>
</view>
<view class="btnw94">立即查询</view>
<view class="height30 backcorfff width100"></view>
<view class="btnw94" @click="getHuiLianTongCardConsumeOpen()">立即查询</view>
<view class="mart15 marb10 font14 fontwig6 fcor333 fontwig6 fotct" @click="goBingCard()">添加工会卡</view>
<view class="height22 backcorfff width100"></view>
</view>
<view class="width100 backcorfff mart10">
<view class="font13 fotct fcor666 paddtop15">账号余额()</view>
<view class="mart15 font16 fcor089 fotct "><text class="font28">444.96</text></view>
<view class="font13 fotct fcor666 paddtop5 paddbotm10">31964698964646646646</view>
<view class="mart15 font16 fcor089 fotct paddbotm10"><text class="font28">{{tongCardPrice}}</text></view>
</view>
<view class="width100 backcorfff mart10">
<view class="width100 height50 bor-botm1 paddleft5 paddtright5">
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view>
<view class="width35 flright fcoreb5 font14 fotct">+102.54</view>
</view>
<view class="width100 height50 bor-botm1 paddleft5 paddtright5">
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view>
<view class="width35 flright fcoreb5 font14 fotct">+102.54</view>
</view>
<view class="width100 height50 bor-botm1 paddleft5 paddtright5">
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view>
<view class="width35 flright fcoreb5 font14 fotct">+102.54</view>
</view>
<view class="width100 height50 bor-botm1 paddleft5 paddtright5">
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view>
<view class="width35 flright fcoreb5 font14 fotct">+102.54</view>
</view>
<view class="width100 height50 bor-botm1 paddleft5 paddtright5">
<view class="width60 flleft fcor333 font14 text1">个人账户规帐(2020-09-1)</view>
<view class="width35 flright fcoreb5 font14 fotct">+102.54</view>
<view class="width100 height70 bor-botm1 paddleft5 paddtright5" v-for="(cardInfp,i) in cardConsumeList" :key="i">
<view class="width100 paddtop10 height30">
<view class="width60 flleft fcor333 font15 fontwig6 text1">{{cardInfp.orderNo}}</view>
<view class="width35 flright fcoreb5 font15 fontwig6 fotct">-{{cardInfp.tranAmount}}</view>
</view>
<view class="width100 height30">
<view class="flleft fcor333 font14 fontwig6 text1">消费时间:{{cardInfp.tranTime}}</view>
</view>
</view>
</view>
<view class="height25 width100"></view>
@ -54,6 +62,11 @@
</template>
<script>
import {
getUserCardList,
getHuiLianTongCardBalance,
getHuiLianTongCardConsume
} from '../../../Utils/Api.js';
export default {
data() {
const currentDate = this.getDate({
@ -62,18 +75,48 @@
return {
start_date: currentDate,
end_date: currentDate,
other: '请输入'
other: '请输入',
UserCard: '',
carNo: '',
title_list: [{
name: '中石化加油券',
value: 'sinopec_oil_code'
},
{
name: '其他商品或服务',
value: 'hisen_consume'
}
],
titleValue:'sinopec_oil_code',
titleName:'中石化加油券',
tongCardInfo : '',
tongCardPrice:0,
cardConsumeList : [],
pageNum: 1,
pageSize: 10,
isNoMoreData: false
}
},
onLoad() {
this.getUserCardList();
},
methods: {
//
bindDateChange: function(e) {
this.start_date = e.target.value
},
bindDateChange2: function(e) {
this.end_date = e.target.value;
},
//
bindUserCard(e) {
this.carNo = this.UserCard[e.target.value].cardNo;
},
//
bindtitleList(e){
this.titleName = this.title_list[e.target.value].name;
this.titleValue = this.title_list[e.target.value].value;
},
//
getDate(type) {
const date = new Date();
@ -86,10 +129,90 @@
} else if (type === 'end') {
year = year + 2;
}
month = month > 9 ? month : '0' + month;;
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
//
getUserCardList() {
uni.showLoading();
getUserCardList().then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.UserCard = res.return_data;
this.carNo = res.return_data[0].cardNo;
this.getHuiLianTongCardBalance();
this.getHuiLianTongCardConsume();
return;
}
this.UserCard = '';
});
},
//
getHuiLianTongCardBalance() {
let params = {
cardNo: this.carNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardInfo = res.return_data;
this.tongCardPrice = res.return_data.balance;
}
});
},
//
getHuiLianTongCardConsumeOpen(){
this.isNoMoreData = false;
this.cardConsumeList = [];
this.getHuiLianTongCardConsume();
this.getHuiLianTongCardBalance();
},
//
goBingCard(){
uni.navigateTo({
url:'../bindingCard/bindingCard'
})
},
//
getHuiLianTongCardConsume() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
return false;
}
let pagenum = this.pageNum;
let Time1 = new Date(this.start_date);
let timestemp1 = Time1.getTime();
let Time2 = new Date(this.end_date);
let timestemp2 = Time2.getTime();
let params = {
businessType :this.titleValue,
cardNo : this.carNo,
sdate : timestemp1,
edate: timestemp2,
pageNum: pagenum,
pageSize: this.pageSize
}
getHuiLianTongCardConsume(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000' && res.return_data.records != '') {
this.isNoMoreData = res.return_data.records.length == this.pageSize ? false : true;
this.cardConsumeList = this.cardConsumeList.concat(res.return_data.records);
this.pageNum = res.return_data.records.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.cardConsumeList = [];
uni.hideLoading();
uni.showToast({
title:res.return_msg,
icon:'none',
duration: 2000
})
this.isNoMoreData = true;
}
});
},
}
}
</script>
@ -120,6 +243,7 @@
.leave_cont .ul .li .flex1 {
flex: 1;
text-align: right;
width: 70%;
padding-right: 25rpx;
color: #999999;
font-size: 32rpx;

@ -380,6 +380,11 @@ $uni-font-size-paragraph:30upx;
height: 60px;
}
.height70 {
height: 70px;
}
.height80 {
height: 80px;
}

Loading…
Cancel
Save