1.调整绑定卡号流程

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

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

Loading…
Cancel
Save