| | |
| | | import agreement from "@/pages/quanyi/components/agreement"; |
| | | |
| | | import textBox from "@/components/textBox/index.vue"; |
| | | |
| | | export default { |
| | | name: "add", |
| | | components: { |
| | |
| | | }, |
| | | created() { |
| | | const _this = this |
| | | |
| | | |
| | | |
| | | uni.request({ |
| | |
| | | }, |
| | | submit() { |
| | | const _this = this; |
| | | if(!this.loginAct){uni.showToast({title: '请阅读并同意相关协议', icon: 'none'});return;} |
| | | if (!this.loginAct) { |
| | | uni.showToast({title: '请阅读并同意相关协议', icon: 'none'}); |
| | | return; |
| | | } |
| | | if(!_this.cardName){ |
| | | uni.showToast({ |
| | | title: "请填写您的姓名", |
| | |
| | | if(_this.getPayBindCardInfo[0].bindStatus) { |
| | | if (!_this.getPayBindCardInfo[1].bindStatus) { |
| | | _this.$refs.codeUi.open() |
| | | if (_this.getPayBindCardInfo[1].bindCardH5Url) { |
| | | _this.$refs.codeUi.class() |
| | | uni.navigateTo({ |
| | | url: `/pages/web/polling?url=${encodeURIComponent(_this.getPayBindCardInfo[1].bindCardH5Url)}&bindCardId=${_this.getPayBindCardInfo[1].bindCardId}`, |
| | | }) |
| | | } |
| | | return; |
| | | } |
| | | |
| | | if (!_this.getPayBindCardInfo[2].bindStatus) { |
| | | _this.$refs.setUi.open() |
| | | _this.$refs.setUi.open(); |
| | | if (_this.getPayBindCardInfo[2].bindCardH5Url) { |
| | | _this.$refs.setUi.class() |
| | | uni.navigateTo({ |
| | | url: `/pages/web/polling?url=${encodeURIComponent(_this.getPayBindCardInfo[2].bindCardH5Url)}&bindCardId=${_this.getPayBindCardInfo[2].bindCardId}`, |
| | | }) |
| | | } |
| | | return; |
| | | |
| | | |
| | |
| | | success:function(res){ |
| | | const ls = res.data.data; |
| | | _this.getPayBindCardInfo = res.data.data; |
| | | if(!ls || !ls.some(item => item.bindStatus == 0)) {_this.kk();return;} |
| | | |
| | | if (!ls || !ls.some(item => item.bindStatus == 0)) { |
| | | _this.kk(); |
| | | return; |
| | | } |
| | | |
| | | |
| | | if(ls.length>1 && !ls[1].bindStatus){ |
| | | _this.$refs.codeUi.open() |
| | | if (_this.getPayBindCardInfo[1].bindCardH5Url) { |
| | | _this.$refs.codeUi.class() |
| | | uni.navigateTo({ |
| | | url: `/pages/web/polling?url=${encodeURIComponent(_this.getPayBindCardInfo[1].bindCardH5Url)}&bindCardId=${_this.getPayBindCardInfo[1].bindCardId}`, |
| | | }) |
| | | } |
| | | _this.isCounting = false; |
| | | _this.countText = ''; |
| | | return; |
| | | } |
| | | if(ls.length>2 && !ls[2].bindStatus){ |
| | | _this.$refs.setUi.open(); |
| | | if (_this.getPayBindCardInfo[2].bindCardH5Url) { |
| | | _this.$refs.setUi.class() |
| | | uni.navigateTo({ |
| | | url: `/pages/web/polling?url=${encodeURIComponent(_this.getPayBindCardInfo[2].bindCardH5Url)}&bindCardId=${_this.getPayBindCardInfo[2].bindCardId}`, |
| | | }) |
| | | } |
| | | _this.isCounting = false; |
| | | _this.countText = ''; |
| | | return; |
| | | } |
| | | if(!ls || !ls.some(item => item.bindStatus == 0)) {_this.kk();return;} |
| | | |
| | | |
| | | |
| | | if (!ls || !ls.some(item => item.bindStatus == 0)) { |
| | | _this.kk(); |
| | | return; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | this.loginAct = !this.loginAct |
| | | }, |
| | | getSmsCode(){ |
| | | const that = this; |
| | | console.log(that.getPayBindCardInfo[0].paymentMethod); |
| | | const _this = this; |
| | | console.log(_this.getPayBindCardInfo[0].paymentMethod); |
| | | if(this.isCounting){ |
| | | return |
| | | } |
| | | if(that.getPayBindCardInfo[0].bindStatus){ |
| | | if(!that.getPayBindCardInfo[1].bindStatus){ |
| | | that.$refs.codeUi.open(); |
| | | if (_this.getPayBindCardInfo[0].bindStatus) { |
| | | if (!_this.getPayBindCardInfo[1].bindStatus) { |
| | | _this.$refs.codeUi.open(); |
| | | if (_this.getPayBindCardInfo[1].bindCardH5Url) { |
| | | _this.$refs.setUi.class() |
| | | uni.navigateTo({ |
| | | url: `/pages/web/polling?url=${encodeURIComponent(_this.getPayBindCardInfo[1].bindCardH5Url)}&bindCardId=${_this.getPayBindCardInfo[1].bindCardId}`, |
| | | }) |
| | | } |
| | | return |
| | | } |
| | | if(!that.getPayBindCardInfo[2].bindStatus){ |
| | | that.$refs.setUi.open(); |
| | | if (!_this.getPayBindCardInfo[2].bindStatus) { |
| | | _this.$refs.setUi.open(); |
| | | if (_this.getPayBindCardInfo[2].bindCardH5Url) { |
| | | _this.$refs.setUi.class() |
| | | uni.navigateTo({ |
| | | url: `/pages/web/polling?url=${encodeURIComponent(_this.getPayBindCardInfo[2].bindCardH5Url)}&bindCardId=${_this.getPayBindCardInfo[2].bindCardId}`, |
| | | }) |
| | | } |
| | | } |
| | | return |
| | | } |
| | | |
| | | if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.cardPhone)) return that.$util.Tips({ |
| | | if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(_this.cardPhone)) return _this.$util.Tips({ |
| | | title: '请输入正确的手机号码' |
| | | }); |
| | | |
| | | |
| | | that.isCounting = true; |
| | | |
| | | _this.isCounting = true; |
| | | |
| | | |
| | | uni.request({ |
| | | url: that.$webHost+'/api/v2/xinheyuan/bankcard/save', |
| | | url: _this.$webHost + '/api/v2/xinheyuan/bankcard/save', |
| | | method:'POST', |
| | | data:{ |
| | | "customerId": uni.getStorageSync('qxgLogin').customerId, |
| | | "nameReal": that.cardName, // 名字 |
| | | "cardNo":that.cardNumber, |
| | | "idCard": that.idCardNo, |
| | | "nameReal": _this.cardName, // 名字 |
| | | "cardNo": _this.cardNumber, |
| | | "idCard": _this.idCardNo, |
| | | |
| | | "bankPhoneNo":that.cardPhone, |
| | | "bankCode": that.bankCode, |
| | | "bankName": that.bankName, |
| | | "phone": that.cardPhone, //手机号 |
| | | "paymentMethod": that.getPayBindCardInfo[0].paymentMethod , |
| | | "bankPhoneNo": _this.cardPhone, |
| | | "bankCode": _this.bankCode, |
| | | "bankName": _this.bankName, |
| | | "phone": _this.cardPhone, //手机号 |
| | | "paymentMethod": _this.getPayBindCardInfo[0].paymentMethod, |
| | | |
| | | |
| | | "preBindType": "prebc", |
| | |
| | | }, |
| | | success(){ |
| | | uni.request({ |
| | | url: that.$webHost+'/api/v2/pay/bindCardToCodes', |
| | | url: _this.$webHost + '/api/v2/pay/bindCardToCodes', |
| | | method:'POST', |
| | | data:{ |
| | | "customerId": uni.getStorageSync('qxgLogin').customerId, |
| | | "cardName": that.cardName, // 名字 |
| | | "cardIdNo": that.idCardNo, |
| | | "cardName": _this.cardName, // 名字 |
| | | "cardIdNo": _this.idCardNo, |
| | | |
| | | "cardNumber":that.cardNumber, |
| | | "bankPhoneNo":that.cardPhone, |
| | | "bankCode": that.bankCode, |
| | | "bankName": that.bankName, |
| | | "cardPhone": that.cardPhone, //手机号 |
| | | "paymentMethod": that.getPayBindCardInfo[0].paymentMethod , |
| | | "cardNumber": _this.cardNumber, |
| | | "bankPhoneNo": _this.cardPhone, |
| | | "bankCode": _this.bankCode, |
| | | "bankName": _this.bankName, |
| | | "cardPhone": _this.cardPhone, //手机号 |
| | | "paymentMethod": _this.getPayBindCardInfo[0].paymentMethod, |
| | | |
| | | |
| | | "preBindType": "prebc", |
| | |
| | | }, |
| | | success(res){ |
| | | if(res.data.code === 401){ |
| | | that.getUserInfo() |
| | | _this.getUserInfo() |
| | | return; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if(res.data.code === 200){ |
| | | that.bindCardId = res.data.data; |
| | | _this.bindCardId = res.data.data; |
| | | } else { |
| | | that.isCounting = false; |
| | | that.countText = ''; |
| | | _this.isCounting = false; |
| | | _this.countText = ''; |
| | | uni.showToast({ |
| | | title: res.data.data, |
| | | icon: 'none' |
| | | }); |
| | | |
| | | if(!that.getPayBindCardInfo[0].bindStatus){ |
| | | if (!_this.getPayBindCardInfo[0].bindStatus) { |
| | | |
| | | return; |
| | | } |
| | | |
| | | |
| | | if(!that.getPayBindCardInfo[1].bindStatus){ |
| | | that.$refs.codeUi.open() |
| | | that.isCounting = false; |
| | | that.countText = ''; |
| | | if (!_this.getPayBindCardInfo[1].bindStatus) { |
| | | _this.$refs.codeUi.open() |
| | | _this.isCounting = false; |
| | | _this.countText = ''; |
| | | return |
| | | } if(!that.getPayBindCardInfo[2].bindStatus){ |
| | | that.isCounting = false; |
| | | that.countText = ''; |
| | | that.$refs.setUi.open() |
| | | } |
| | | if (!_this.getPayBindCardInfo[2].bindStatus) { |
| | | _this.isCounting = false; |
| | | _this.countText = ''; |
| | | _this.$refs.setUi.open() |
| | | return |
| | | } |
| | | } |
| | |
| | | }) |
| | | |
| | | let count = 60; |
| | | that.countText = `${count}s秒后重新获取`; |
| | | _this.countText = `${count}s秒后重新获取`; |
| | | |
| | | |
| | | const timer = setInterval(() => { |
| | | count--; |
| | | that.countText = `${count}s秒后重新获取`; |
| | | _this.countText = `${count}s秒后重新获取`; |
| | | if (count <= 0) { |
| | | clearInterval(timer); |
| | | that.isCounting = false; |
| | | that.countText = ''; |
| | | _this.isCounting = false; |
| | | _this.countText = ''; |
| | | } |
| | | },1000) |
| | | }, |
| | | fail(err){ |
| | | that.isCounting = false; |
| | | that.countText = ''; |
| | | _this.isCounting = false; |
| | | _this.countText = ''; |
| | | uni.showToast({ |
| | | title: err, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }, |
| | |
| | | _this.isCounting_A = false; |
| | | _this.countText_A = ''; |
| | | _this.$refs.codeUi.close() |
| | | _this.$refs.setUi.open() |
| | | _this.$refs.setUi.open(); |
| | | if (_this.getPayBindCardInfo[2].bindCardH5Url) { |
| | | _this.$refs.setUi.class() |
| | | uni.navigateTo({ |
| | | url: `/pages/web/polling?url=${encodeURIComponent(_this.getPayBindCardInfo[2].bindCardH5Url)}&bindCardId=${_this.getPayBindCardInfo[2].bindCardId}`, |
| | | }) |
| | | } |
| | | return; |
| | | } |
| | | |
| | | if(!ls || !ls.some(item => item.bindStatus == 0)) {_this.kk();return;} |
| | | if (!ls || !ls.some(item => item.bindStatus == 0)) { |
| | | _this.kk(); |
| | | return; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | _this.countText_B = ''; |
| | | _this.$refs.setUi.close() |
| | | _this.$refs.codeUi.close() |
| | | if(!ls || !ls.some(item => item.bindStatus == 0)) {_this.kk();return;} |
| | | if (!ls || !ls.some(item => item.bindStatus == 0)) { |
| | | _this.kk(); |
| | | return; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | }, |
| | | |
| | | |
| | | |
| | | getUserInfo() { |
| | | |
| | | |
| | | |
| | | uni.reLaunch({ |
| | |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="clo" style="display: flex"> |
| | | <view class="label"> |
| | | <text>银行卡号</text> |
| | | </view> |
| | | <view class="inp_box"> |
| | | <input maxlength="30" style="width: 400rpx;" @blur="validateAndCacheCardInfo" v-model="cardNumber" class="inp" placeholder="请填写银行卡号" /> |
| | | <image @click="cardNumber=''" v-show="!bindStatus && cardNumber" :src="offIcon" style="width: 40rpx;height: 40rpx;position: absolute;right: -40rpx;top: 0;"></image> |
| | | <input maxlength="30" style="width: 400rpx;" @blur="validateAndCacheCardInfo" v-model="cardNumber" class="inp" |
| | | placeholder="请填写银行卡号"/> |
| | | <image @click="cardNumber=''" v-show="!bindStatus && cardNumber" :src="offIcon" |
| | | style="width: 40rpx;height: 40rpx;position: absolute;right: -40rpx;top: 0;"></image> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | <text>验证码</text> |
| | | </view> |
| | | <view class="inp_box" style="display: flex;flex: 1"> |
| | | <input maxlength="6" v-model="verificationCode" class="inp" type="number" style="width: 200rpx" placeholder="请输入验证码" /> |
| | | <input maxlength="6" v-model="verificationCode" class="inp" type="number" style="width: 200rpx" |
| | | placeholder="请输入验证码"/> |
| | | |
| | | <view class="code" style="flex: 1;text-align: right" @click="getSmsCode"> |
| | | <text :class="isCounting?'code_k':'code_a'">{{ isCounting ? countText : '获取验证码' }}</text> |
| | |
| | | |
| | | <view style=" padding: 0 30rpx;margin-left: 20rpx;"> |
| | | <view style="display: flex;"> |
| | | <image @click="agreeClick" style="width: 50rpx;height: 50rpx;" :src="!loginAct ? '/static/imgs/check.png' : '/static/imgs/checked.png'" ></image> |
| | | <image @click="agreeClick" style="width: 50rpx;height: 50rpx;" |
| | | :src="!loginAct ? '/static/imgs/check.png' : '/static/imgs/checked.png'"></image> |
| | | <text class="protocol-text" style="line-height: 50rpx" > |
| | | 我已阅读并同意<text style="font-size: 24rpx;color: #4766FE" class="link-text" @click="$refs.agreement.open()">《相关协议》</text> |
| | | 我已阅读并同意 |
| | | <text style="font-size: 24rpx;color: #4766FE" class="link-text" @click="$refs.agreement.open()">《相关协议》 |
| | | </text> |
| | | </text> |
| | | |
| | | </view> |
| | |
| | | |
| | | <agreement ref="agreement"></agreement> |
| | | <uni-popup ref="popup" type="bottom" > |
| | | <view style="background: white;border-radius: 40rpx 40rpx 0 0 ;padding: 0 40rpx;padding-top: 48rpx;position: relative;z-index: 99"> |
| | | <view style="text-align: center;color: #252938;font-weight: 600;font-size: 36rpx;margin-bottom: 20rpx;">选择银行</view> |
| | | <view |
| | | style="background: white;border-radius: 40rpx 40rpx 0 0 ;padding: 0 40rpx;padding-top: 48rpx;position: relative;z-index: 99"> |
| | | <view style="text-align: center;color: #252938;font-weight: 600;font-size: 36rpx;margin-bottom: 20rpx;"> |
| | | 选择银行 |
| | | </view> |
| | | <view class="ul" style="max-height: 800rpx;overflow: scroll" v-if="bankList"> |
| | | <view v-for="(i,k) in bankList" :key="i.bankName" class="li" style="padding: 20rpx;border-bottom: 1rpx solid #E7E9ED" @click="setbankName(i.bankName)"> |
| | | <view v-for="(i,k) in bankList" :key="i.bankName" class="li" |
| | | style="padding: 20rpx;border-bottom: 1rpx solid #E7E9ED" @click="setbankName(i.bankName)"> |
| | | <image :src="i.bankLogo" style="width: 50rpx;height: 30rpx;position: relative;top: 10rpx;"></image> |
| | | <text style="color: #333333;font-size: 28rpx;margin-left: 22rpx;">{{ i.bankName }}</text> |
| | | </view> |
| | |
| | | |
| | | <uv-popup mode="center" round="20" ref="codeUi" :closeOnClickOverlay="false" bgColor=""> |
| | | |
| | | <view style="padding: 40rpx;width:calc( 100% - 120rpx);margin: auto;border-radius: 40rpx 40rpx 40rpx 40rpx;background-image: url('/static/imgs/codeUiBACK.png');background-repeat: no-repeat;background-size: 100% 100%;padding-top: 60rpx;"> |
| | | <view |
| | | style="padding: 40rpx;width:calc( 100% - 120rpx);margin: auto;border-radius: 40rpx 40rpx 40rpx 40rpx;background-image: url('/static/imgs/codeUiBACK.png');background-repeat: no-repeat;background-size: 100% 100%;padding-top: 60rpx;"> |
| | | |
| | | <view style=" |
| | | font-weight: bold; |
| | |
| | | position: relative; |
| | | margin-bottom: 12rpx; |
| | | |
| | | ">短信确认</view> |
| | | ">短信确认 |
| | | </view> |
| | | <view style="font-size: 28rpx;color: #666666;">为确保安全到账,需再次对您的收款账户进行短信验证</view> |
| | | |
| | | <view class="content" style="margin-top: 40rpx;"> |
| | |
| | | class="code" |
| | | :class="isCounting_A ? 'ks' : ''" |
| | | @click="getCode" |
| | | >{{ isCounting_A ? countText_A : "获取验证码" }}</text |
| | | >{{ isCounting_A ? countText_A : "获取验证码" }} |
| | | </text |
| | | > |
| | | </template> |
| | | </uv-input> |
| | |
| | | :customStyle="customStyle" |
| | | |
| | | @click="submitPlan" |
| | | >确定</uv-button |
| | | >确定 |
| | | </uv-button |
| | | > |
| | | </view> |
| | | </uv-form-item> |
| | |
| | | </uv-popup> |
| | | <uv-popup mode="center" round="20" ref="setUi" :closeOnClickOverlay="false" bgColor="" z-index="999"> |
| | | |
| | | <view style="padding: 40rpx;width:calc( 100% - 120rpx);margin: auto;border-radius: 40rpx 40rpx 40rpx 40rpx;background-image: url('/static/imgs/codeUiBACK.png');background-repeat: no-repeat;background-size: 100% 100%;padding-top: 60rpx;"> |
| | | <view |
| | | style="padding: 40rpx;width:calc( 100% - 120rpx);margin: auto;border-radius: 40rpx 40rpx 40rpx 40rpx;background-image: url('/static/imgs/codeUiBACK.png');background-repeat: no-repeat;background-size: 100% 100%;padding-top: 60rpx;"> |
| | | |
| | | <view style=" |
| | | font-weight: bold; |
| | |
| | | position: relative; |
| | | margin-bottom: 12rpx; |
| | | |
| | | ">本人提交确认</view> |
| | | <view style="font-size: 28rpx;color: #666666;">根据合规要求我们将进行本人提交意愿确认的短信校验,请注意查看短信验证码</view> |
| | | ">本人提交确认 |
| | | </view> |
| | | <view style="font-size: 28rpx;color: #666666;"> |
| | | 根据合规要求我们将进行本人提交意愿确认的短信校验,请注意查看短信验证码 |
| | | </view> |
| | | |
| | | <view class="content" style="margin-top: 40rpx;"> |
| | | <uv-form |
| | |
| | | class="code" |
| | | :class="isCounting_B ? 'ks' : ''" |
| | | @click="getCode_san" |
| | | >{{ isCounting_B ? countText_B : "获取验证码" }}</text |
| | | >{{ isCounting_B ? countText_B : "获取验证码" }} |
| | | </text |
| | | > |
| | | </template> |
| | | </uv-input> |
| | |
| | | <uv-button |
| | | :customStyle="customStyle" |
| | | @click="submitPlan_san" |
| | | >确定</uv-button |
| | | >确定 |
| | | </uv-button |
| | | > |
| | | </view> |
| | | </uv-form-item> |
| | |
| | | </uv-popup> |
| | | |
| | | <uv-popup mode="bottom" round="20" ref="address" > |
| | | <addAddress :addressDetail="addressDetail" @off="$refs.address.close()" @submit="e => addressDetail = e"></addAddress> |
| | | <addAddress :addressDetail="addressDetail" @off="$refs.address.close()" |
| | | @submit="e => addressDetail = e"></addAddress> |
| | | </uv-popup> |
| | | |
| | | |
| | |
| | | color: #BDBDBE; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .top{ |
| | | background: #FFEBEB; |
| | | font-size: 24rpx; |
| | |
| | | padding: 20rpx 26rpx; |
| | | |
| | | } |
| | | |
| | | .form{ |
| | | background: #FFFFFF; |
| | | padding-top: 40rpx; |
| | | |
| | | .clo{ |
| | | display: flex; |
| | | background: #FBFBFB !important; |
| | |
| | | |
| | | .inp_box{ |
| | | position: relative; |
| | | |
| | | .inp{ |
| | | &::placeholder{ |
| | | color: #999999; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | height: 42rpx; |
| | | |
| | | font-weight: 400; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .code_a{ |
| | | |
| | | font-weight: 400; |
| | |
| | | padding: 16rpx 20rpx; |
| | | |
| | | } |
| | | |
| | | .code_k{ |
| | | font-weight: 400; |
| | | font-size: 30rpx; |
| | |
| | | bottom: 50rpx; |
| | | padding: 0 10rpx; |
| | | margin-top: 50rpx; |
| | | |
| | | .sub_btn{ |
| | | background: #FF1472; |
| | | border-radius: 50rpx 50rpx 50rpx 50rpx; |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | .item{ |
| | | |
| | | background: #FBFBFB; |
| | |
| | | border: 2rpx solid #EEEEEE; |
| | | padding: 0 40rpx; |
| | | } |
| | | |
| | | ::v-deep .uni-checkbox-input{ |
| | | border-radius: 0; |
| | | transform: scale(0.7); |
| | | |
| | | &:before{ |
| | | top: 45% !important; |
| | | |
| | | } |
| | | } |
| | | |
| | | ::v-deep .uni-input-placeholder{ |
| | | color: #BDBDBE; |
| | | } |
| | | |
| | | .protocol-text { |
| | | width: calc( 100% - 44rpx); |
| | | font-size: 24rpx; |
| | | color: #8B8D96; |
| | | line-height: 28rpx; |
| | | } |
| | | |
| | | .link-text { |
| | | color: #207ef5; |
| | | display: inline; |
| | | } |
| | | |
| | | .nots{ |
| | | opacity: 0.5; |
| | | } |
| | | |
| | | .code{ |
| | | color: #FF1472; |
| | | } |