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. 80
      pages/user/bindingCardList/bindingCardList.vue
  6. 8
      pages/user/unionCard/unionCard.vue

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

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

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

@ -109,8 +109,8 @@
getHuiLianTongCardByCardNo(params).then(res => {
uni.hideLoading()
if (res.return_code == '000000') {
// this.phoneNumber = res.return_data.userMobile;
this.phoneNumber = 15583658692;
this.phoneNumber = res.return_data.userMobile;
// this.phoneNumber = 15583658692;
this.disStute = true
} else {
uni.showToast({

@ -1,25 +1,97 @@
<template>
<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>
</template>
<script>
import {
getUserCardList,
getHuiLianTongCardBalance
} from '../../../Utils/Api.js';
let app = getApp();
export default {
data() {
return {
userCardList:''
}
},
onLoad() {
this.getUserCardList();
},
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>
<style lang="scss">
.cardListcs{
box-shadow: 0px 1px 7px 1px rgba(0, 0, 0, 0.14);
.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 {
box-shadow: 0px 1px 7px 1px rgba(0, 0, 0, 0.14);
border-radius: 16rpx;
border: 1px solid #f6f6f6;
}
</style>

@ -38,7 +38,6 @@
</view>
</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">
@ -168,12 +167,7 @@
this.getHuiLianTongCardConsume();
this.getHuiLianTongCardBalance();
},
//
goBingCard(){
uni.navigateTo({
url:'../bindingCard/bindingCard'
})
},
//
getHuiLianTongCardConsume() {
uni.showLoading({

Loading…
Cancel
Save