| | |
| | | |
| | | <script> |
| | | import * as api from "@/axios/api"; |
| | | import { Toast } from "mint-ui"; |
| | | import { Notify } from "vant"; |
| | | |
| | | export default { |
| | | components: {}, |
| | |
| | | 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); |
| | | } |
| | |
| | | }, |
| | | async tosubmit(id, money) { |
| | | if (!this.isInteger(money)) { |
| | | Toast("请输入整数"); |
| | | Notify({ type: "warning", message: this.$t("regpInt") }); |
| | | return; |
| | | } |
| | | // 融资转指数 |
| | |
| | | money: money, |
| | | }; |
| | | let data1 = await api.BuyYeb(opt); |
| | | |
| | | console.log(data1, "===="); |
| | | if (data1.status === 0) { |
| | | Toast(data1.data); |
| | | Notify({ type: "success", message: data1.data }); |
| | | this.$router.push("/yebs"); |
| | | } else { |
| | | Toast(data1.data); |
| | | Notify({ type: "warning", message: data1.data }); |
| | | } |
| | | }, |
| | | async getUserInfo() { |
| | |
| | | if (data.status === 0) { |
| | | this.$store.state.userInfo = data.data; |
| | | } else { |
| | | Toast(data.msg); |
| | | Notify({ type: "warning", message: data.data }); |
| | | } |
| | | }, |
| | | async getYebInfo() { |
| | |
| | | this.yebinfo = data.data; |
| | | this.$store.state.yebinfo = data.data; |
| | | } else { |
| | | Toast(data.msg); |
| | | Notify({ type: "warning", message: data.data }); |
| | | } |
| | | }, |
| | | }, |