DESKTOP-NC155IP\vm
2022-11-15 83c81464327e274acb9d0694536a88d9aa74be30
src/page/bankCard/index.vue
@@ -7,11 +7,11 @@
        </div>
      </div>
      <div class="titles">
        <span>{{ addBank ? '绑定银行卡' : '银行卡信息' }}</span>
        <span>{{ addBank ? $t('hj211') : $t('hj212') }}</span>
      </div>
      <div class="bank_name">
        <div class="lefts">
          <span>{{ '银行名称:' }}</span>
          <span>{{ $t('hj213') }}</span>
        </div>
        <div class="rights">
          <input type="text" v-model="bankName" :disabled="!addBank" />
@@ -19,7 +19,7 @@
      </div>
      <div class="bank_name">
        <div class="lefts">
          <span>{{ '开户支行:' }}</span>
          <span>{{ $t('hj214') }}</span>
        </div>
        <div class="rights">
          <input type="text" v-model="bankAddress" :disabled="!addBank" />
@@ -27,14 +27,14 @@
      </div>
      <div class="bank_name">
        <div class="lefts">
          <span>{{ '银行卡号:' }}</span>
          <span>{{ $t('hj215') }}</span>
        </div>
        <div class="rights">
          <input type="text" v-model="bankNo" :disabled="!addBank" />
        </div>
      </div>
      <div class="bank_name bind" @click="toSure" v-if="addBank">
        <span>{{ '确认绑定' }}</span>
        <span>{{ $t('hj216') }}</span>
      </div>
      <div class="bank_hck"></div>
      <div class="bank_code"></div>
@@ -64,11 +64,11 @@
    async toSure() {
      // 添加银行卡
      if (isNull(this.bankNo) || !bankNoReg(this.bankNo)) {
        Toast("请输入银行卡号");
        Toast(this.$t("hj217"));
      } else if (isNull(this.bankName) || !isName(this.bankName)) {
        Toast("请输入银行名称");
        Toast(this.$t("hj218"));
      } else if (isNull(this.bankAddress) || !isName(this.bankAddress)) {
        Toast("请输入开户支行");
        Toast(this.$t("hj219"));
      } else {
        let opts = {
          bankName: this.bankName,
@@ -76,19 +76,19 @@
          bankAddress: this.bankAddress
        };
        let data = await api.addBankCard(opts);
          if (data.status === 0) {
            Toast("添加成功!");
            this.$router.push("/newUser");
          } else {
            Toast(data.msg);
          }
        if (data.status === 0) {
          Toast(this.$t("hj220"));
          this.$router.push("/newUser");
        } else {
          Toast(data.msg);
        }
      }
    },
    async getCardDetail () {
    async getCardDetail() {
      // 获取银行卡信息
      let data = await api.getBankCard()
      if (data.status === 0) {
        const {bankAddress, bankName, bankNo} = data.data;
        const { bankAddress, bankName, bankNo } = data.data;
        this.bankAddress = bankAddress;
        this.bankName = bankName;
        this.bankNo = bankNo;
@@ -106,34 +106,41 @@
  width: 100%;
  height: 100%;
  background: #fff;
  .content {
    width: 100%;
    height: 100%;
    padding: 0 0.6rem;
    .top_back {
      width: 100%;
      height: 2rem;
      > div {
      >div {
        width: 10%;
        height: 100%;
        display: flex;
        align-items: center;
      }
      img {
        width: 0.6rem;
        height: 0.6rem;
      }
    }
    .titles {
      width: 100%;
      height: 1.5rem;
      font-size: 0.641rem;
      margin-top: 1rem;
      span {
        font-weight: 600;
      }
    }
  }
  .bank_name {
    width: 100%;
    height: 1.5rem;
@@ -142,22 +149,26 @@
    background: rgb(247, 247, 247);
    border-radius: 0.2rem;
    margin-top: 0.3rem;
    .lefts {
      width: 25%;
      height: 100%;
      display: flex;
      align-items: center;
      font-size: 0.3846rem;
      span {
        font-weight: 600;
      }
    }
    .rights {
      width: 75%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      input {
        width: 100%;
        height: 100%;
@@ -165,6 +176,7 @@
    }
  }
}
.bank_name.bind {
  display: flex;
  align-items: center;
@@ -172,6 +184,7 @@
  background: #2d6ae9;
  font-size: 0.4103rem;
  color: #fff;
  span {
    font-weight: 600;
  }