jhzh
2025-08-04 ef341b7695a62249399fe63fb77bbb887ab71734
src/page/user/yeb.vue
@@ -42,6 +42,7 @@
      :confirmButtonText="$t('qr')"
      :cancelButtonText="$t('qx')"
      @confirm="tosubmit(1, form.account1)"
      @close="form.account1 = ''"
    >
      <div class="dialog-box">
        <van-field
@@ -56,13 +57,13 @@
          v-model="form.account1"
          type="number"
          name="amt"
          :label="$t('gm') + $t('sl')"
          :placeholder="$t('gm') + $t('sl')"
          :label="$t('gm') + $t('je')"
          :placeholder="$t('gm') + $t('je')"
          :border="false"
        >
          <template #button>
         <!-- <template #button>
            <span @click="selectAll1">{{ $t("hj160") }}</span>
          </template>
          </template> -->
        </van-field>
      </div>
    </van-dialog>
@@ -71,7 +72,7 @@
<script>
import * as api from "@/axios/api";
import { Toast } from "mint-ui";
import { Notify } from "vant";
export default {
  components: {},
@@ -117,6 +118,10 @@
        let obj = res.data.filter((item) => item.accectType == "IN")[0];
        obj.availableBalance = Number(obj.availableBalance).toFixed(2);
        // console.log(Number(obj.availableBalance).toFixed(2));
        obj.availableBalance = this.$toLocaleString(
          obj.availableBalance,
          false
        );
        this.activeObj = obj;
        // console.log(obj, "0000000", this.tabsArr);
      }
@@ -147,6 +152,7 @@
      this.$router.go(-1);
    },
    selectAll1() {
      console.log("====");
      // 选择全部
      this.form.account1 = this.$store.state.userInfo.enableAmt;
    },
@@ -167,7 +173,7 @@
    },
    async tosubmit(id, money) {
      if (!this.isInteger(money)) {
        Toast("请输入整数");
        Notify({ type: "warning", message: this.$t("regpInt") });
        return;
      }
      // 融资转指数
@@ -178,12 +184,13 @@
        money: money,
      };
      let data1 = await api.BuyYeb(opt);
      console.log(data1, "====");
      if (data1.status === 0) {
        Toast(data1.data);
        Notify({ type: "success", message: data1.msg });
        this.form.account1 = ''
        this.$router.push("/yebs");
      } else {
        Toast(data1.data);
        Notify({ type: "warning", message: data1.msg });
      }
    },
    async getUserInfo() {
@@ -192,7 +199,7 @@
      if (data.status === 0) {
        this.$store.state.userInfo = data.data;
      } else {
        Toast(data.msg);
        Notify({ type: "warning", message: data.data });
      }
    },
    async getYebInfo() {
@@ -203,7 +210,7 @@
        this.yebinfo = data.data;
        this.$store.state.yebinfo = data.data;
      } else {
        Toast(data.msg);
        Notify({ type: "warning", message: data.data });
      }
    },
  },