| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <template>
- <view class="main">
- <view class="top-title flex align-center justify-between">
- <view class="">请{{ disable ? '确认' : '填写'}}提现银行卡信息:</view>
- <view v-if="!disable" class="top-cancel" @click="cancel">清除</view>
- </view>
- <view class="input-container">
- <view class="bankCardInfo round">
- <view class="infoLeft">
- 用户姓名:
- </view>
- <view class="infoRight">
- <input :disabled="disable" type="text" v-model="from.card_user_name" placeholder="请输入姓名" class="input-item"/>
- </view>
- </view>
- </view>
- <view class="input-container">
- <view class="bankCardInfo round">
- <view class="infoLeft">
- 开户行:
- </view>
- <view class="infoRight">
- <!-- <picker value="index" @change="bindPickerChange" :range="array">
- <view class="uni-input">{{array[index]}}</view>
- </picker> -->
- <input :disabled="disable" type="text" v-model="from.bank_name" placeholder="请输入开户行" class="input-item"/>
- </view>
- </view>
- </view>
- <view class="input-container">
- <view class="bankCardInfo round">
- <view class="infoLeft">
- 银行卡号:
- </view>
- <view class="infoRight">
- <input :disabled="disable" type="text" v-model="from.bank_card_no" placeholder="请输入银行卡号" class="input-item"/>
- </view>
- </view>
- </view>
- <view class="input-container">
- <view class="bankCardInfo round">
- <view class="infoLeft">
- 预留手机:
- </view>
- <view class="infoRight">
- <input :disabled="disable" type="text" v-model="from.card_phone" placeholder="请输入预留手机号" class="input-item"/>
- </view>
- </view>
- </view>
- <view class="input-container">
- <view v-if="disable" class="submit-btn round" @click="tixian">
- 立即提交
- </view>
- <view v-else class="submit-btn round" @click="submit">
- 保存
- </view>
- </view>
- <!-- <view class="bank-btn">
- <view class="sub" @click="submit">
- 提交
- </view>
- <view class="quxiao" @click="cancel">
- 清除
- </view>
- </view> -->
- <view class="aboutUsBottom">
- <view class="aboutUsNav">
- <navigator open-type="redirect" url="/pages/mine/aboutUsService" class="bottomNotice">服务协议</navigator>
- <text style="margin: 0 10rpx;">|</text>
- <navigator open-type="redirect" url="/pages/mine/aboutUsprivacy" class="bottomNotice">隐私政策</navigator>
- </view>
- <view class="aboutUsCopy">
- <view>Copyright @ 2011-2020 JULIANCHENG CREDIT</view>
- <view>ALL Rights Reserved</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- disable: false,
- amount: 0,
- from:{
- card_user_name: '',
- bank_name: '',
- bank_card_no: '',
- card_phone: ''
- },
- index: 0,
- // array: ['请选择开户行','中国银行', '建设银行', '邮政银行', '农村银行'],
- array: ['中国银行', '建设银行', '邮政银行', '农村银行'],
- }
- },
- onLoad(option) {
- this.amount = option.amount;
- },
- mounted(){
- this.cardData()
- },
- methods: {
- cardData: async function(){
- let res = await this.$request.post('/api/userPromote/promoteInfo',{});
- console.log(res.data)
- if(res.code == 200){
- this.from = {
- card_user_name : res.data.card_user_name,
- bank_name : res.data.bank_name,
- bank_card_no : res.data.bank_card_no,
- card_phone : res.data.card_phone
- }
- if(res.data.bank_card_no){
- this.disable = true
- } else {
- this.disable = false
- }
- }else {
- uni.showToast({
- icon: 'none',
- title: res.message
- });
- }
- },
- async submit(){
- let res = await this.$request.post('/api/userPromote/saveBankCard',this.from);
- if(res.code == 200){
- uni.showToast({
- icon: 'success',
- title:'提交成功'
- });
- setTimeout(function() {
- uni.navigateBack()
- }, 2000);
- }else {
- uni.showToast({
- icon: 'none',
- title: res.message
- });
- }
- },
- tixian:async function(){
- let res = await this.$request.post('/api/userPromote/applyWithdrawal',{amount:this.amount});
- if(res.code == 200){
- uni.showToast({
- icon: 'success',
- title: '提交成功'
- });
- setTimeout(function() {
- uni.redirectTo({
- url: "/pages/tuijian/cash"
- })
- }, 2000);
- }else {
- uni.showToast({
- icon: 'none',
- title: res.message
- });
- }
- },
- cancel(){
- console.log("清除按钮")
- this.from = {
- card_user_name: '',
- bank_name: '',
- bank_card_no: '',
- card_phone: ''
- }
- },
- bindPickerChange(e) {
- console.log('picker发送选择改变,携带值为', e.target.value)
- this.index = e.target.value
- },
- }
- }
- </script>
- <style>
- .main{
- width: 100%;
- height: 100vh;
- background-color: #F1F1F1;
- position: relative;
- }
- .main>.top-title{
- font-size: 32rpx;
- width: 100%;
- padding: 120rpx 60rpx;
- }
- .top-cancel{
- color: #F6C459;
- }
- .main .input-container{
- width: 100%;
- padding: 0 30rpx;
- margin: 15px 0;
- }
- .main .bankCardInfo{
- /* display: flex;
- justify-content: space-between;
- width: 100%;
- height: 110rpx;
- line-height: 110rpx;
- border-bottom: 1px solid #eee;
- background: #fff;
- display: flex;
- justify-content: space-between;
- align-items: center; */
- width: 100%;
- height: 90rpx;
- padding: 0 30rpx 0 40rpx;
- background: #fff;
- display: flex;
- align-items: center;
- }
- .main .bankCardInfo .infoLeft{
- width: 33%;
- height: 50rpx;
- line-height:50rpx;
- font-size: 32rpx;
- font-weight:normal;
- padding-left: 10px;
- font-family: PingFangSC-Regular, sans-serif;
- /* color: #555864; */
- color: #000;
- }
- .main .bankCardInfo .infoRight{
- width: 67%;
- height: 50rpx;
- line-height:50rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- picker{
- margin-right: auto;
- }
- .main .bankCardInfo .infoRight .input-item{
- width: 100%;
- height: 100%;
- font-size: 30rpx;
- font-family: PingFangSC-Regular, sans-serif;
- font-weight: 300;
- color: rgba(143,143,144,1);
- }
- .bank-btn{
- height: 60px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .quxiao,.sub{
- /* width: auto; */
- width: 100%;
- height: 40px;
- line-height: 40px;
- text-align: center;
- padding: 0 20px;
- border-radius: 5px;
- margin-top: 10px;
- margin-right: 20px;
- }
- .sub{
- background: #F5CC57;
- color: #fff;
- }
- .submit-btn{
- width: 80%;
- height: 40px;
- line-height: 40px;
- text-align: center;
- margin: 120rpx auto;
- padding: 0 20px;
- color: #FFFFFF;
- background-color: #F6C459;
- }
- .quxiao{
- border: 1px solid #979797;
- color: #979797;
- }
- .aboutUsBottom{
- width: 100%;
- position: fixed;
- bottom: 0;
- left: 0;
- }
- .aboutUsNav{
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .aboutUsCopy{
- margin: 0 auto;
- padding-bottom: 30rpx;
- width: 500rpx;
- font-size: 10rpx;
- text-align: center;
- }
- .bottomNotice{
- color: #3180D5;
- }
- </style>
|