| | |
| | | "当前委托": "Current Commission", |
| | | "撤销挂单": "Cancel pending order", |
| | | "立即购买": "Buy it now", |
| | | "秘钥": "Secret key" |
| | | "秘钥": "Secret key", |
| | | "购买申请成功": "Purchase application successful" |
| | | } |
| | |
| | | "当前委托": "अभी का ऑर्डर", |
| | | "撤销挂单": "लंबित आदेश रद्द करें", |
| | | "立即购买": "इसे अभी खरीदें", |
| | | "秘钥": "गुप्त कुंजी" |
| | | "秘钥": "गुप्त कुंजी", |
| | | "购买申请成功": "खरीदारी आवेदन सफल" |
| | | } |
| | |
| | | "当前委托": "当前委托", |
| | | "撤销挂单": "撤销挂单", |
| | | "立即购买": "立即购买", |
| | | "秘钥": "秘钥" |
| | | "秘钥": "秘钥", |
| | | "购买申请成功": "购买申请成功" |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { ActionSheet } from "vant"; |
| | | import * as api from "@/axios/api"; |
| | | import { mapActions } from "vuex"; |
| | | import { Notify } from "vant"; |
| | | |
| | | export default { |
| | | name: "trBuy", |
| | |
| | | }, |
| | | async checkcheckStockVip() { |
| | | // this.$refs.closeDialog.show = true; |
| | | let data = await api.checkStockVip({ stockCode: this.code }); |
| | | const opts = { |
| | | stockId: this.id, |
| | | buyNum: this.num, |
| | | lever: this.selectLever, |
| | | } |
| | | if (this.checkedZs) { |
| | | opts.stopLoss = this.zhisun; |
| | | } |
| | | if (this.checkedZy) { |
| | | opts.profitTarget = this.profitTarget; |
| | | } |
| | | if (this.tabsCurrentIndex == 0) { |
| | | opts.buyType = 1; |
| | | } else { |
| | | opts.buyType = 0; |
| | | } |
| | | let data = await api.checkStockVip(opts); |
| | | console.log(data, "data"); |
| | | if (!data.data) { |
| | | if (data.data == 0) { |
| | | this.password = ""; |
| | | this.setBuy(); |
| | | } else if (data.data == 1) { |
| | | this.password = ""; |
| | | Notify({ type: "success", message: this.$t("购买申请成功") }); |
| | | this.$router.push("/warehouse?index=1&buyType=" + this.bayType); |
| | | } else { |
| | | this.show = true; |
| | | } |
| | |
| | | } |
| | | }, |
| | | }, |
| | | components: { ActionSheet, [Notify.Component.name]: Notify.Component }, |
| | | }; |
| | | </script> |
| | | |