1.调整绑定卡号流程

yj-dev
杨杰 3 years ago
parent bcbaedda2b
commit d000d47f64
  1. 54
      pages/user/bindingCard/bindingCard.vue

@ -1,8 +1,14 @@
<template>
<view>
<view class="form re" style="top: 100rpx;">
<view class="flex1">
<picker mode="selector" :range="UserCard" range-key="cardNo"
@change="bindUserCard">
<view class="date text1 margle10">{{carNo}}</view>
</picker>
</view>
<view class="username">
<input style="width: 100%;" :disabled="disStute" placeholder="请输入卡号" v-model="cardNoNumber"
<input style="width: 100%;" :disabled="disStute" maxlength="19" placeholder="请输入卡号" v-model="cardNoNumber"
placeholder-style="color: #333333;"/>
</view>
<view class="username" v-if="phoneNumber">
@ -12,7 +18,6 @@
<view class="code" v-if="phoneNumber">
<input placeholder="请输入验证码" v-model="code" placeholder-style="color: #333333;" />
</view>
<view class="btn mart50" @tap="bindHuiLianTongCard" v-if="phoneNumber">绑定卡号</view>
<view class="btn mart50" @tap="doCardNonum" v-else>获取预留手机号</view>
</view>
@ -28,7 +33,8 @@
import {
sendSmsCode,
getHuiLianTongCardByCardNo,
bindHuiLianTongCard
bindHuiLianTongCard,
getUserCardList
} from '../../../Utils/Api.js';
let app = getApp();
export default {
@ -40,12 +46,34 @@
getCodeText: '获取验证码',
getCodeBtnColor: "#0083f5",
getCodeisWaiting: false,
disStute: false
disStute: false,
UserCard:'',
carNo:''
}
},
onLoad(options) {},
onLoad(options) {
this.getUserCardList();
},
methods: {
Timer() {},
//
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;
return;
}
this.UserCard = '';
});
},
//
bindUserCard(e) {
this.carNo = this.UserCard[e.target.value].cardNo;
},
getCode() {
uni.hideKeyboard()
if (this.getCodeisWaiting) {
@ -103,6 +131,13 @@
});
return false;
}
if (this.cardNoNumber.length != 19) {
uni.showToast({
title: '请填写正确的19位卡号',
icon: "none"
});
return false;
}
uni.showLoading({
title: '查询中...'
})
@ -189,11 +224,18 @@
<style lang="scss">
@import "../../../static/css/login.scss";
.wximg {
width: 50px;
height: 50px;
margin-left: 40%;
margin-top: 250upx;
}
.flex1 {
flex: 1;
text-align: right;
width: 70%;
padding-right: 25rpx;
color: #999999;
font-size: 32rpx;
}
</style>

Loading…
Cancel
Save