1.修改工会卡绑定流程

yj-dev
杨杰 3 years ago
parent 429124c769
commit bcbaedda2b
  1. 16
      App.vue
  2. 13
      pages.json
  3. 5
      pages/tabBar/user/user.vue
  4. 13
      pages/user/bindingCard/bindingCard.vue
  5. 119
      pages/user/cardDes/cardDes.vue
  6. 62
      pages/user/unionCard/unionCard.vue
  7. BIN
      static/img/cards.jpg

@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest', // brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/', // imgUrl: 'https://192.168.3.4:9301/filesystem/',
// //
url: 'https://hsg.dctpay.com/crest', // url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/', // imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl : 'https://hsg.dctpay.com/brest', // brestUrl : 'https://hsg.dctpay.com/brest',
imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/', // imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
// //
// url: 'https://hsgcs.dctpay.com/crest', url: 'https://hsgcs.dctpay.com/crest',
// brestUrl : 'https://hsgcs.dctpay.com/brest', brestUrl : 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/', imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "", userInfo: "",
brestUserInfo : '', brestUserInfo : '',
openId: '', openId: '',

@ -526,6 +526,19 @@
} }
} }
,{
"path" : "pages/user/cardDes/cardDes",
"style" :
{
"enablePullDownRefresh": false,
"navigationBarTitleText": "绑定卡号",
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white"
}
}
], ],
"globalStyle": { "globalStyle": {

@ -247,7 +247,7 @@
if (!app.globalData.userInfo.isSetPayPwd) { if (!app.globalData.userInfo.isSetPayPwd) {
this.czList = [{ this.czList = [{
url: '../../user/unionCard/unionCard', url: '../../user/cardDes/cardDes',
text: '工会卡', text: '工会卡',
img: '../../../static/img/ghkpay.png' img: '../../../static/img/ghkpay.png'
}, },
@ -259,8 +259,9 @@
] ]
return; return;
} }
// '../../user/unionCard/unionCard'
this.czList = [{ this.czList = [{
url: '../../user/unionCard/unionCard', url: '../../user/cardDes/cardDes',
text: '工会卡', text: '工会卡',
img: '../../../static/img/ghkpay.png' img: '../../../static/img/ghkpay.png'
}, },

@ -16,7 +16,10 @@
<view class="btn mart50" @tap="bindHuiLianTongCard" v-if="phoneNumber">绑定卡号</view> <view class="btn mart50" @tap="bindHuiLianTongCard" v-if="phoneNumber">绑定卡号</view>
<view class="btn mart50" @tap="doCardNonum" v-else>获取预留手机号</view> <view class="btn mart50" @tap="doCardNonum" v-else>获取预留手机号</view>
</view> </view>
<view class="width90 mart20 height120 backcorfff fotct" style="position: absolute;top: 390px;">
<view class="fontlet font20 fcor666 fontwig6 height45l " style="border-bottom: 1px solid #F4F4F4;">温馨提示</view>
<view class="fontlet font20 fcor666 fontwig6 height45l paddtop10">1元可抵扣100积分</view>
</view>
</view> </view>
</template> </template>
@ -109,8 +112,8 @@
getHuiLianTongCardByCardNo(params).then(res => { getHuiLianTongCardByCardNo(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.phoneNumber = res.return_data.userMobile; // this.phoneNumber = res.return_data.userMobile;
// this.phoneNumber = 15583658692; this.phoneNumber = 15583658692;
this.disStute = true this.disStute = true
} else { } else {
uni.showToast({ uni.showToast({
@ -165,7 +168,9 @@
duration: 2000, duration: 2000,
success() { success() {
setTimeout(() => { setTimeout(() => {
uni.navigateBack({}) uni.navigateBack({
delta: 2
})
}, 1000) }, 1000)
} }
}); });

@ -0,0 +1,119 @@
<template>
<view>
<view class="width90 backcorfff mart20 fotct" v-if="user.hltCardNo.cardNo">
<image src="../../../static/img/cards.jpg" mode="widthFix" class="cardImg"></image>
<view class="cardlabel font18 fcorfff fontwig6" style="top: 50px;">卡号 : {{user.hltCardNo.cardNo}}</view>
<view class="cardlabel font18 fcorfff fontwig6" style="top: 80px;">余额 : {{tongCardPrice}}</view>
</view>
<view class="btnw50 font20 fontlet" @click="selectCards()">查询明细</view>
<view class="btnw50 font20 fontlet" @click="delUserCard()" v-if="user.hltCardNo">解绑</view>
</view>
</template>
<script>
import {
delUserCard,
getHuiLianTongCardBalance
} from '../../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
user: '',
tongCardPrice:0
}
},
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.getHuiLianTongCardBalance();
},
methods: {
//
selectCards() {
uni.navigateTo({
url: '../unionCard/unionCard'
})
},
//
delUserCard() {
let that = this;
uni.showModal({
content: '是否确定解除当前绑定卡号?',
success: (res) => {
if (res.confirm) {
let params = {
cardNo: that.user.hltCardNo.cardNo
}
delUserCard(params).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title: '解除成功',
duration: 2000,
icon: 'success',
success() {
setTimeout(() => {
uni.navigateBack({})
}, 1000)
}
})
} else {
uni.showToast({
title: res.return_msg,
duration: 2000,
icon: 'none'
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
//
getHuiLianTongCardBalance() {
let params = {
cardNo: this.user.hltCardNo.cardNo
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
this.tongCardPrice = res.return_data.balance;
}
});
},
}
}
</script>
<style lang="scss">
page {
background-color: #f8f8f8;
}
.cardImg {
position: relative;
margin-top: 5px;
margin-bottom: 5px;
}
.cardlabel {
position: absolute;
left: 40px;
}
</style>

@ -48,11 +48,11 @@
<view class="width100 backcorfff mart10"> <view class="width100 backcorfff mart10">
<view class="width100 height70 bor-botm1 paddleft5 paddtright5" v-for="(cardInfp,i) in cardConsumeList" :key="i"> <view class="width100 height70 bor-botm1 paddleft5 paddtright5" v-for="(cardInfp,i) in cardConsumeList" :key="i">
<view class="width100 paddtop10 height30"> <view class="width100 paddtop10 height30">
<view class="width60 flleft fcor333 font15 fontwig6 text1">{{cardInfp.orderNo}}</view> <view class="width70 flleft fcor333 font15 fontwig6 text1">订单编号:{{cardInfp.orderNo}}</view>
<view class="width35 flright fcoreb5 font15 fontwig6 fotct">-{{cardInfp.tranAmount}}</view> <view class="width30 flright fcoreb5 font15 fontwig6 fotct">-{{cardInfp.tranAmount}}</view>
</view> </view>
<view class="width100 height30"> <view class="width100 height30">
<view class="flleft fcor333 font14 fontwig6 text1">消费时间:{{cardInfp.tranTime}}</view> <view class="flleft fcor333 font14 fontwig6 text1">{{cardInfp.tranTime}}</view>
</view> </view>
</view> </view>
@ -91,7 +91,6 @@
], ],
titleValue:'sinopec_oil_code', titleValue:'sinopec_oil_code',
titleName:'中石化加油券', titleName:'中石化加油券',
tongCardInfo : '',
tongCardPrice:0, tongCardPrice:0,
cardConsumeList : [], cardConsumeList : [],
pageNum: 1, pageNum: 1,
@ -104,23 +103,6 @@
}, },
onShow() { 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();
}, },
// //
@ -183,43 +165,6 @@
this.UserCard = ''; this.UserCard = '';
}); });
}, },
//
delUserCard() {
let that = this;
uni.showModal({
content: '是否确定解除当前绑定卡号?',
success: (res) => {
if (res.confirm) {
let params = {
cardNo: that.user.hltCardNo.cardNo
}
delUserCard(params).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title:'解除成功',
duration:2000,
icon:'success',
success() {
setTimeout(() => {
uni.navigateBack({
})
}, 1000)
}
})
}else{
uni.showToast({
title: res.return_msg,
duration:2000,
icon:'none'
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
// //
getHuiLianTongCardBalance() { getHuiLianTongCardBalance() {
let params = { let params = {
@ -227,7 +172,6 @@
} }
getHuiLianTongCardBalance(params).then(res => { getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.tongCardInfo = res.return_data;
this.tongCardPrice = res.return_data.balance; this.tongCardPrice = res.return_data.balance;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Loading…
Cancel
Save