1.对接接口

yj-dev
杨杰 3 years ago
parent e8754ab4e8
commit a8652867b7
  1. 4
      App.vue
  2. 24
      pages.json
  3. 7
      pages/tabBar/user/user.vue
  4. 4
      pages/user/bindingCard/bindingCard.vue
  5. 78
      pages/user/bindingCardList/bindingCardList.vue
  6. 8
      pages/user/unionCard/unionCard.vue

@ -23,7 +23,9 @@
cityId: '', cityId: '',
cityName:'', cityName:'',
longitude : '', longitude : '',
latitude : '' latitude : '',
balancePrice : '',
balanceCardNo:''
}, },
onLaunch: function() { onLaunch: function() {
}, },

@ -1,6 +1,17 @@
{ {
"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",
@ -487,23 +498,12 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{
"path" : "pages/user/bindingCardList/bindingCardList",
"style" :
{
"navigationBarTitleText": "卡列表",
"navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5",
"navigationBarTextStyle": "white",
"enablePullDownRefresh": false
}
},{ },{
"path" : "pages/user/unionCard/unionCard", "path" : "pages/user/unionCard/unionCard",
"style" : "style" :
{ {
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTitleText": "工会卡", "navigationBarTitleText": "卡记录",
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#0083f5", "navigationBarBackgroundColor": "#0083f5",
"backgroundColorTop": "#0083f5", "backgroundColorTop": "#0083f5",

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

@ -109,8 +109,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({

@ -1,25 +1,97 @@
<template> <template>
<view> <view>
<view class="height80 cardListcs width90"></view> <view class="mart15 marb10 font14 fontwig6 fcor333 fontwig6 fotct addCardBtn" @click="goBingCard()">添加工会卡</view>
<view class="height70 cardListcs width90 mart15" v-for="cards in userCardList" :key="cards" @click="getHuiLianTongCardBalance(cards.cardNo)">
<!-- <view class="cardBtn">已选择</view> -->
<view class="fcor666 fontwig6 font15 paddtop10 paddleft10">工会卡类型:<text class="fcor333" v-if="cards.type == 1">汇联通工会卡</text>
</view>
<view class="fcor666 fontwig6 font15 paddtop10 paddleft10">工会卡卡号:<text
class="fcor333">{{cards.cardNo}}</text></view>
</view>
</view> </view>
</template> </template>
<script> <script>
import {
getUserCardList,
getHuiLianTongCardBalance
} from '../../../Utils/Api.js';
let app = getApp();
export default { export default {
data() { data() {
return { return {
userCardList:''
} }
}, },
onLoad() {
this.getUserCardList();
},
methods: { methods: {
//
goBingCard() {
uni.navigateTo({
url: '../bindingCard/bindingCard'
})
},
//
getUserCardList() {
uni.showLoading();
getUserCardList().then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.userCardList = res.return_data;
return;
}
this.UserCard = '';
});
},
//
getHuiLianTongCardBalance(item) {
app.globalData.balanceCardNo = item;
let params = {
cardNo: item
}
getHuiLianTongCardBalance(params).then(res => {
if (res.return_code == '000000') {
app.globalData.balancePrice = res.return_data.balance;
}
});
},
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.addCardBtn{
width: 60%;
margin-left: 20%;
height: 75rpx;
line-height: 75rpx;
background-color: #0083f5;
color: #FFFFFF;
font-size: 25rpx;
margin-top: 40rpx;
margin-bottom: 40px;
border-radius: 25px;
}
.cardBtn {
position: absolute;
right: 5%;
height: 50rpx;
line-height: 50rpx;
text-align: center;
width: 120rpx;
font-size: 14px;
background-color: #0083f5;
color: #FFFFFF;
border-radius: 0px 16rpx 0 0;
}
.cardListcs { .cardListcs {
box-shadow: 0px 1px 7px 1px rgba(0, 0, 0, 0.14); box-shadow: 0px 1px 7px 1px rgba(0, 0, 0, 0.14);
border-radius: 16rpx; border-radius: 16rpx;
border: 1px solid #f6f6f6;
} }
</style> </style>

@ -38,7 +38,6 @@
</view> </view>
</view> </view>
<view class="btnw94" @click="getHuiLianTongCardConsumeOpen()">立即查询</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 class="height22 backcorfff width100"></view>
</view> </view>
<view class="width100 backcorfff mart10"> <view class="width100 backcorfff mart10">
@ -168,12 +167,7 @@
this.getHuiLianTongCardConsume(); this.getHuiLianTongCardConsume();
this.getHuiLianTongCardBalance(); this.getHuiLianTongCardBalance();
}, },
//
goBingCard(){
uni.navigateTo({
url:'../bindingCard/bindingCard'
})
},
// //
getHuiLianTongCardConsume() { getHuiLianTongCardConsume() {
uni.showLoading({ uni.showLoading({

Loading…
Cancel
Save