| | |
| | | <div class="top_buy" @click="goBuy(0)"> |
| | | <span>{{ $t("hj84") }}</span> |
| | | </div> |
| | | <div class="bottom_buy"> |
| | | <!-- <div class="bottom_buy"> |
| | | <span>₹{{ singDetails.nowPrice }}</span> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | <div class="sell_btn" @click="goBuy(1)"> |
| | | <div class="top_sell"> |
| | | <span>{{ $t("hj85") }}</span> |
| | | </div> |
| | | <div class="bottom_sell"> |
| | | <!-- <div class="bottom_sell"> |
| | | <span>₹{{ singDetails.nowPrice }}</span> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | newsdetailList: [], |
| | | bayType: "", |
| | | timer: null, |
| | | key:0, |
| | | key: 0 |
| | | }; |
| | | }, |
| | | components: { |
| | | Kline, |
| | | Kline |
| | | }, |
| | | |
| | | created() { |
| | |
| | | // }, |
| | | methods: { |
| | | async getHknews() { |
| | | await api.queryIndexNews().then((res) => { |
| | | await api.queryIndexNews().then(res => { |
| | | if (res.status === 0) { |
| | | this.newsdetailList = res.data.data; |
| | | } |
| | |
| | | this.optionBtn = false; |
| | | this.$message({ |
| | | message: this.$t("hj97"), |
| | | type: "success", |
| | | type: "success" |
| | | }); |
| | | } else { |
| | | this.optionBtn = false; |
| | | this.$message({ |
| | | message: data.msg, |
| | | type: "warning", |
| | | type: "warning" |
| | | }); |
| | | } |
| | | } else { |
| | |
| | | this.optionBtn = false; |
| | | this.$message({ |
| | | message: this.$t("hj96"), |
| | | type: "success", |
| | | type: "success" |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | | message: data.msg, |
| | | type: "warning", |
| | | type: "warning" |
| | | }); |
| | | this.optionBtn = false; |
| | | } |
| | |
| | | }, |
| | | async getOpation() { |
| | | let opts = { |
| | | code: this.$route.query.code, |
| | | code: this.$route.query.code |
| | | }; |
| | | let data = await api.isOption(opts); |
| | | if (data.status === 0) { |
| | |
| | | async getSingDetails() { |
| | | let opts = { |
| | | code: this.kLineDetails.code, |
| | | stockType: this.kLineDetails.type, |
| | | stockType: this.kLineDetails.type |
| | | }; |
| | | await api.getSingleStock(opts).then((res) => { |
| | | await api.getSingleStock(opts).then(res => { |
| | | if (res.status === 0) { |
| | | this.singDetails = res.data.stock; |
| | | this.bayType = res.data.stock.type; |
| | |
| | | } |
| | | const obj = { |
| | | pid: res.data.stock.code, |
| | | type: res.data.stock.type, |
| | | type: res.data.stock.type |
| | | }; |
| | | window.localStorage.setItem("kLine", JSON.stringify(obj)); |
| | | // console.log(this.singDetails) |
| | |
| | | async getSingDetailUs() { |
| | | let opts = { |
| | | code: this.kLineDetails.code, |
| | | stockType: this.kLineDetails.type, |
| | | stockType: this.kLineDetails.type |
| | | }; |
| | | await api.getUsDetail(opts).then((res) => { |
| | | await api.getUsDetail(opts).then(res => { |
| | | // console.log(res,1111123); |
| | | // var that = this |
| | | // if(!res){ |
| | |
| | | this.$router.push({ |
| | | path: "/newPage", |
| | | query: { |
| | | listid: item.id, |
| | | }, |
| | | listid: item.id |
| | | } |
| | | }); |
| | | }, |
| | | goBuy(index) { |
| | | clearInterval(this.timer); |
| | | // 最高价:singDetails.today_max |
| | | // 最低价:singDetails.today_min |
| | | // 名字:singDetails.name |
| | | // 当前涨幅:singDetails.nowPrice - singDetails.preclose_px |
| | | // 涨幅百分比:singDetails.hcrate |
| | | this.$router.push({ |
| | | path: "/TradingBuy", |
| | | query: { |
| | |
| | | if_us: this.kLineDetails.if_us, |
| | | bayType: this.bayType, |
| | | gid: this.singDetails.gid, |
| | | }, |
| | | |
| | | max: this.singDetails.today_max, |
| | | min: this.singDetails.today_min, |
| | | cname: this.singDetails.name, |
| | | up: ( |
| | | this.singDetails.nowPrice - this.singDetails.preclose_px |
| | | ).toFixed(2), |
| | | upPercent: this.singDetails.hcrate |
| | | } |
| | | }); |
| | | if (navigator.vibrate) { |
| | | // 支持 |
| | | navigator.vibrate([55]); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | filters: { |
| | | getName(spell) { |
| | |
| | | .replace(/年|月/g, "-") |
| | | .replace(/日/g, " "); |
| | | return beijingDatetime; // 2017-03-31 16:02:06 |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | .buy_btn { |
| | | width: 45%; |
| | | height: 100%; |
| | | background: rgb(225, 59, 69); |
| | | background: #0062ac; |
| | | color: #fff; |
| | | |
| | | .top_buy { |
| | | width: 100%; |
| | | height: 45%; |
| | | // height: 45%; |
| | | height: 64%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: flex-end; |
| | |
| | | .sell_btn { |
| | | width: 45%; |
| | | height: 100%; |
| | | background: rgb(68, 155, 84); |
| | | background: #fc4f30; |
| | | color: #fff; |
| | | |
| | | .top_sell { |
| | | width: 100%; |
| | | height: 45%; |
| | | // height: 45%; |
| | | height: 64%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: flex-end; |