Merge branch 'master' of http://124.156.157.155:8060/r/gp/cakuns_st_app
| | |
| | | return post("/user/buyFutures.do", options); |
| | | } |
| | | |
| | | // 黄金下单 |
| | | export function goldCrudeOilbuy(options) { |
| | | return post("/user/goldCrudeOilbuy.do", options); |
| | | } |
| | | |
| | | // 挂单 |
| | | export function guadan(options) { |
| | | return post("/user/addOrder.do", options); |
| | |
| | | {{ $t("hj315") }} |
| | | </div> |
| | | </van-col> |
| | | <van-col span="6" v-if="active == 'ST'"> |
| | | <van-popover |
| | | theme="dark" |
| | | v-model="showPopover" |
| | | trigger="click" |
| | | :actions="actions" |
| | | @select="onSelect" |
| | | > |
| | | <template #reference> |
| | | <van-button type="primary">الترتيب</van-button> |
| | | </template> |
| | | </van-popover> |
| | | </van-col> |
| | | </van-row> |
| | | </div> |
| | | <van-pull-refresh |
| | |
| | | :key="item.indexCode" |
| | | > |
| | | <van-row type="flex" align="center" gutter="20"> |
| | | <van-col span="8" style="padding-right: 0 !important;"> |
| | | <van-col span="8"> |
| | | <div> |
| | | <div class="tp"> |
| | | <div class="collection" @click="optionszx(item)"> |
| | |
| | | <div |
| | | class="title_color" |
| | | style=" |
| | | font-size: 14px; |
| | | width: 100%; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | " |
| | | > |
| | | {{ item.name || item.stockName }} |
| | | {{ item.st_name || item.stockName }} |
| | | </div> |
| | | </div> |
| | | <div class="bt"> |
| | |
| | | <div style="text-align: right"> |
| | | <div |
| | | class="tp right_bs" |
| | | :class="`${item.hcrate > 0 ? 'green' : 'red'}`" |
| | | :class="`${item.hcrateP.charAt(0) == '+' ? 'green' : 'red'}`" |
| | | > |
| | | <span class="price_color">{{ item.hcrateP }}</span> |
| | | </div> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | showPopover: false, |
| | | loadings: false, |
| | | finished: false, |
| | | listArr: [], |
| | | pageNumVal: 1, |
| | | getInterval: null, |
| | | num: 1, |
| | | orderBy: '', |
| | | refreshing: false, |
| | | actions:[ |
| | | { text: 'ترتيب', zh: '升序', val: 'asc' }, |
| | | { text: 'التخفيض',zh:'降序' , val: 'desc'}, |
| | | { text: 'طبيعي' ,zh: '正常', val: ''}, |
| | | ] |
| | | refreshing: false |
| | | }; |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | // }, 5000); |
| | | }, |
| | | methods: { |
| | | onSelect(action) { |
| | | this.orderBy = (action.val); |
| | | this.getStock(this.active, this.zxactive, 1); |
| | | }, |
| | | filterSH(val) { |
| | | if (val === "sh") { |
| | | return 1; |
| | |
| | | // 点击进入详情 |
| | | const obj = { |
| | | pid: item.code || "", |
| | | type: item.stock_type || "" |
| | | type: item.stock_type || "", |
| | | name: item.name || "" |
| | | }; |
| | | window.localStorage.setItem("kLine", JSON.stringify(obj)); |
| | | // return; |
| | |
| | | var ifZhishu = "0"; |
| | | var ifUs = |
| | | item.stock_type === "us" ? "1" : item.stock_type === "hk" ? "2" : ""; |
| | | console.log("td_item:", item); |
| | | this.$router.push({ |
| | | path: "/kline", |
| | | query: { |
| | |
| | | stockPlate: "", |
| | | keyWords: this.sousuo, |
| | | stockType: stockType, |
| | | orderBy: this.orderBy |
| | | orderBy: "" |
| | | }; |
| | | |
| | | // console.log(); |
| | |
| | | } else if (a == "HJ") { |
| | | data = await api.getGoldCrudeOil(); |
| | | |
| | | data.data.list = Object.entries(data.data).map( |
| | | ([name, nowPrice]) => ({ |
| | | data.data.list = Object.entries(data.data).map(([name, nowPrice]) => { |
| | | let nowPriceArr = Object.entries(nowPrice); |
| | | return { |
| | | name, |
| | | nowPrice, |
| | | st_name: nowPriceArr[0][0], |
| | | nowPrice: nowPriceArr[0][1], |
| | | stock_type: "HJ" |
| | | }) |
| | | ); |
| | | }; |
| | | }); |
| | | } else { |
| | | //大宗 |
| | | opt.stockType = ""; |
| | |
| | | this.listArr = data.data.list; |
| | | this.loadings = false; |
| | | // this.finished = true; |
| | | console.log("listArr", this.listArr); |
| | | if (this.listArr.length % 20) { |
| | | this.finished = true; |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | <!-- {{ getMoneyList }} --> |
| | | <div class="center_card"> |
| | | <div class="keyon"> |
| | | <!-- <div class="center_card"> --> |
| | | <!-- <div class="keyon"> |
| | | <span>{{ $t("hj49") }}</span> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <!-- <div class="num_price" v-if="userInfo.length == 0"> --> |
| | | <div class="num_price">{{ getMoneyList.totalMoney }}﷼</div> |
| | | <!-- <div class="num_price">{{ getMoneyList.totalMoney }}﷼</div> --> |
| | | |
| | | <!-- <div class="num_price" v-if="userInfo.length != 0"> |
| | | <p |
| | |
| | | }} |
| | | </p> |
| | | </div> --> |
| | | <div style="text-align: center;"> |
| | | <!-- <div style="text-align: center;"> |
| | | Phone: {{ this.$store.state.userInfo.phone }} |
| | | </div> |
| | | </div> --> |
| | | |
| | | <div class="yk es"> |
| | | <!-- <div class="yk es"> |
| | | <div> |
| | | <span>{{ $t("hj55") }}</span> |
| | | </div> |
| | |
| | | <div> |
| | | <span>{{ $t("hj48") }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="yk as"> |
| | | <div> |
| | | </div> --> |
| | | <!-- <div class="yk as"> --> |
| | | <!-- <div> --> |
| | | <!-- <span class="orenge" |
| | | >﷼ |
| | | {{ |
| | |
| | | : getMoneyList.freezeMoney |
| | | }}</span |
| | | > --> |
| | | <span class="orenge">﷼ {{ getMoneyList.freezeMoney }}</span> |
| | | </div> |
| | | <!-- <span class="orenge">﷼ {{ getMoneyList.freezeMoney }}</span> --> |
| | | <!-- </div> --> |
| | | <!-- <div v-if="userInfo.length == 0"> |
| | | <span v-if="!selectUserFlag"> |
| | | <span>{{ "﷼ 0" }}</span> |
| | |
| | | </span> |
| | | </div> --> |
| | | |
| | | <div v-if="userInfo.length == 0"> |
| | | <!-- <div v-if="userInfo.length == 0"> |
| | | <span class="bzz" v-if="!selectUserFlag">{{ "﷼ 0" }}</span> |
| | | <span class="bzz" v-else |
| | | >{{ getMoneyList.availableBalance }}﷼ |
| | | </span> |
| | | </div> |
| | | </div> --> |
| | | <!-- <div v-if="userInfo.length != 0"> |
| | | <span class="bzz" v-if="!selectUserFlag">{{ |
| | | "﷼ " + $store.state.userInfo.enableIndexAmt |
| | |
| | | " " + regexNum($store.state.userInfo.enableAmt) |
| | | }}</span> |
| | | </div> --> |
| | | </div> |
| | | <!-- </div> --> |
| | | <!-- <div class="btns" @click="handleZh()" :class="selectUserFlag ? '' : 'active'"> |
| | | <span>{{ selectUserFlag ? $t('hj142') : $t('hj143') }}</span> |
| | | </div> --> |
| | | </div> |
| | | <!-- </div> --> |
| | | |
| | | <div class="jy" @click="goWall()"> |
| | | <div class="left_gn"> |
| | |
| | | </div> |
| | | <div class="right_title"> |
| | | <div class="t_t" style="white-space: nowrap"> |
| | | <span>{{ name }}({{ gid }})</span> |
| | | <span v-if="KLine.type == 'HJ'">{{ name }}</span> |
| | | <span v-else>{{ name }}({{ gid }})</span> |
| | | </div> |
| | | <div class="b_t"> |
| | | <span>{{ spell }}</span> |
| | |
| | | </div> |
| | | <div class="rights"> |
| | | <div class="ese"> |
| | | <div class="mc" @click="handleTradingClick(0)" :class="tabsCurrentIndex === 0 ? 'actives' : ''"> |
| | | <div |
| | | class="mc" |
| | | @click="handleTradingClick(0)" |
| | | :class="tabsCurrentIndex === 0 ? 'actives' : ''" |
| | | > |
| | | <span>Short</span> |
| | | </div> |
| | | |
| | | <div class="mr" @click="handleTradingClick(1)" :class="tabsCurrentIndex === 1 ? 'active' : ''"> |
| | | <div |
| | | class="mr" |
| | | @click="handleTradingClick(1)" |
| | | :class="tabsCurrentIndex === 1 ? 'active' : ''" |
| | | > |
| | | <span>Long</span> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <div class="price_tabs"> |
| | | <div class="tabs"> |
| | | <div class="tab_item" v-for="(item, index) in priceTabs" :key="index" @click="handleTabsClick(item, index)" |
| | | :class="priceTabsCurrentIndex === index ? 'active' : ''"> |
| | | <div |
| | | class="tab_item" |
| | | v-for="(item, index) in priceTabs" |
| | | :key="index" |
| | | @click="handleTabsClick(item, index)" |
| | | :class="priceTabsCurrentIndex === index ? 'active' : ''" |
| | | > |
| | | <span>{{ item }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | <img src="@/assets/img/ic_number_jian.png" alt /> |
| | | </div> |
| | | <div class="addorj"></div> |
| | | <div class="addorj" @click=" |
| | | <div |
| | | class="addorj" |
| | | @click=" |
| | | typeof nums == 'string' |
| | | ? (nums = Number(Number(nums) + 1).toFixed(2)) |
| | | : (nums = (Number(nums) + 1).toFixed(2)) |
| | | "> |
| | | " |
| | | > |
| | | <img src="@/assets/img/ic_number_add.png" /> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="tr_es flexJy"> |
| | | <div class="top_input"> |
| | | <input type="number" onkeyup="value=value.replace(/[^\d]/g,'')" v-model="num" @input="numInput" /> |
| | | <input |
| | | type="number" |
| | | onkeyup="value=value.replace(/[^\d]/g,'')" |
| | | v-model="num" |
| | | @input="numInput" |
| | | /> |
| | | </div> |
| | | <div class="right_sw flexJy" style="width: auto"> |
| | | <div class="addorj" @click="jyslJian"> |
| | |
| | | <div class="tr_rs gg" @click="showGg = true"> |
| | | <div class="top_bzz"> |
| | | <span>{{ $t("hj101") }}</span> |
| | | <span>{{ selectCycle }}</span> |
| | | <span>{{ |
| | | KLine.type === "HJ" |
| | | ? selectCycle.replace("X", "") * 100 + "X" |
| | | : selectCycle |
| | | }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="tr_rs"> |
| | | <div class="top_bzz" style="padding-bottom: 0.2rem"> |
| | | <span style="text-align: left"> |
| | | {{ $t("交易总额") }}(₹) |
| | | </span> |
| | | <span style="text-align: right"> |
| | | {{ $t("hj103") }}(₹) |
| | | </span> |
| | | <span style="text-align: left"> {{ $t("交易总额") }}(₹) </span> |
| | | <span style="text-align: right"> {{ $t("hj103") }}(₹) </span> |
| | | </div> |
| | | |
| | | <div class="bottom_bzz"> |
| | | <span> |
| | | ₹{{ |
| | | ((nowPrice * selectCycle.replace("X", "")) * num) |
| | | (nowPrice * selectCycle.replace("X", "") * num) |
| | | | _toLocaleString |
| | | }} |
| | | </span> |
| | |
| | | </div> |
| | | <div class="tr_rs"> |
| | | <div class="top_bzz" style="padding-bottom: 0.2rem"> |
| | | <span style="text-align: left"> |
| | | {{ $t("hj44") }}(₹) |
| | | </span> |
| | | <span style="text-align: right"> |
| | | </span> |
| | | <span style="text-align: left"> {{ $t("hj44") }}(₹) </span> |
| | | <span style="text-align: right"> </span> |
| | | </div> |
| | | |
| | | <div class="bottom_bzz"> |
| | | <span> |
| | | ₹{{( |
| | | ((nowPrice * selectCycle.replace("X", "")) * num)*sxf).toFixed(2)}} |
| | | ₹{{ |
| | | (nowPrice * selectCycle.replace("X", "") * num * sxf).toFixed( |
| | | 2 |
| | | ) |
| | | }} |
| | | </span> |
| | | <span style="white-space: nowarp"> |
| | | </span> |
| | | <span style="white-space: nowarp"> </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <van-action-sheet v-model="showGg" :actions="siteLeverList" :cancel-text="$t('hj106')" :description="$t('hj107')" |
| | | close-on-click-action @select="onSelect" /> |
| | | <van-action-sheet |
| | | v-model="showGg" |
| | | :actions="siteLeverList" |
| | | :cancel-text="$t('hj106')" |
| | | :description="$t('hj107')" |
| | | close-on-click-action |
| | | @select="onSelect" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as api from "@/axios/api"; |
| | | import { |
| | | mapActions |
| | | } from "vuex"; |
| | | import { mapActions } from "vuex"; |
| | | |
| | | export default { |
| | | name: "trBuy", |
| | |
| | | profitTarget: 0, |
| | | if_us: 0, |
| | | bayType: "", |
| | | sxf:'', |
| | | sxf: "", |
| | | id: "", |
| | | actions: [{ |
| | | actions: [ |
| | | { |
| | | name: "100X", |
| | | subname: this.$t("hj102") |
| | | }, |
| | |
| | | { |
| | | name: "300X", |
| | | subname: this.$t("hj102") |
| | | }, |
| | | } |
| | | ], |
| | | profitArr: [{ |
| | | profitArr: [ |
| | | { |
| | | name: this.$t("hj104"), |
| | | checked: false, |
| | | checked: false |
| | | }, |
| | | { |
| | | name: this.$t("hj105"), |
| | | checked: false, |
| | | checked: false |
| | | }, |
| | | { |
| | | name: this.$t("hj110"), |
| | | checked: false, |
| | | }, |
| | | checked: false |
| | | } |
| | | ], |
| | | moneyData: {}, |
| | | gid: "", |
| | | KLine: {} |
| | | }; |
| | | }, |
| | | |
| | | mounted() { |
| | | this.bayType = this.$route.query.bayType; |
| | | this.gid = this.$route.query.gid; |
| | | this.KLine = JSON.parse(window.localStorage.getItem("kLine")); |
| | | if (this.bayType == "in") { |
| | | this.priceTabs = [this.$t("hj108"), this.$t("hj109")]; |
| | | } else if (this.bayType == "qh") { |
| | |
| | | this.setUseInfo(); |
| | | this.getMoneyData(); |
| | | this.getSettingInfo(); |
| | | this.queryStockConfig() |
| | | this.queryStockConfig(); |
| | | }, |
| | | watch: { |
| | | checkedZy(val) { |
| | |
| | | // 支持 |
| | | navigator.vibrate([55]); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | async queryStockConfig(){ |
| | | let data = await api.queryStockConfig(); |
| | | if (data.status === 0) { |
| | | this.sxf=data.data.cValue |
| | | this.sxf = data.data.cValue; |
| | | } |
| | | }, |
| | | zSjian(){ |
| | | var newzishu = (Number(this.zhisun)-1).toFixed(2) |
| | | var newzishu = (Number(this.zhisun) - 1).toFixed(2); |
| | | if(Number(newzishu)<1){ |
| | | |
| | | }else{ |
| | | this.zhisun = newzishu |
| | | this.zhisun = newzishu; |
| | | } |
| | | }, |
| | | ...mapActions(["setUseInfo"]), |
| | |
| | | let data = await api.getMoney(); |
| | | let type = this.bayType === "SZHB" ? "US" : this.bayType; |
| | | if (data.status === 0) { |
| | | const newArr = data.data.filter((item) => item.accectType === type); |
| | | const newArr = data.data.filter(item => item.accectType === type); |
| | | |
| | | this.moneyData = newArr[0] || {}; |
| | | // console.log(this.bayType, newArr); |
| | |
| | | this.nowPrice / |
| | | this.selectCycle.replace("X", "") |
| | | ); |
| | | typeof this.num == "string" ? |
| | | (this.num = Number(Number(this.num) + 1)) : |
| | | (this.num = Number(Number(this.num) + 1)); |
| | | typeof this.num == "string" |
| | | ? (this.num = Number(Number(this.num) + 1)) |
| | | : (this.num = Number(Number(this.num) + 1)); |
| | | |
| | | console.log(this.num, numbs); |
| | | if (this.num >= numbs) { |
| | |
| | | } |
| | | }, |
| | | zYjian() { |
| | | var newzishu = (Number(this.profitTarget)-1).toFixed(2) |
| | | var newzishu = (Number(this.profitTarget) - 1).toFixed(2); |
| | | if(Number(newzishu)<1){ |
| | | |
| | | }else{ |
| | | this.profitTarget = newzishu |
| | | this.profitTarget = newzishu; |
| | | } |
| | | // this.profitTarget = (Number(this.profitTarget) - 1).toFixed(2); |
| | | // if(this.tabsCurrentIndex==0){ |
| | |
| | | // this.profitTarget = (Number(this.profitTarget) - 1).toFixed(2); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | }, |
| | | zSjia() { |
| | | this.zhisun++; |
| | |
| | | }, |
| | | gdOrSetBuy() { |
| | | if (this.priceTabsCurrentIndex == 0) { |
| | | |
| | | this.setBuy(); |
| | | } else { |
| | | |
| | | this.gdBuy(); |
| | | } |
| | | if (navigator.vibrate) { |
| | |
| | | stockId: this.code, |
| | | buyNum: this.num, |
| | | lever: this.selectLever, |
| | | targetPrice: this.nums, |
| | | targetPrice: this.nums |
| | | }; |
| | | console.log(this.selectLever, "this.selectLever "); |
| | | |
| | |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: data.msg, |
| | | elAlertType: "success", |
| | | elAlertType: "success" |
| | | }); |
| | | this.getUserInfo(); |
| | | this.$router.push("/warehouse?index=1&buyType=" + this.bayType); |
| | | } else { |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: data.msg, |
| | | elAlertText: data.msg |
| | | }); |
| | | } |
| | | }, |
| | |
| | | if (this.$store.state.userInfo.isActive !== 2) { |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: this.$t("hj111"), |
| | | elAlertText: this.$t("hj111") |
| | | }); |
| | | this.$router.push("/authentications"); |
| | | return; |
| | |
| | | // stockId: this.detail.id, |
| | | // buyNum: this.selectNumber ? this.selectNumber * 100 : 0, // 单位为手 |
| | | // buyType: this.selectType, |
| | | lever: this.selectCycle ? this.selectCycle : 0, |
| | | // lever: this.selectCycle ? this.selectCycle : 0, |
| | | // subaccountNumber:this.subaccountNumber |
| | | |
| | | // 买入是买涨buyType:0, 卖出是买跌buyType:1,卖出的状态是0,买入的状态是1 |
| | | buyNum: this.num, // 单位为手 |
| | | // buyNum: (this.num.match(/\d+/g))[0] * 100, // 单位为手 |
| | | lever: this.selectLever, |
| | | lever: this.selectLever |
| | | }; |
| | | if (this.KLine.type === "HJ") { |
| | | opts.lever = this.selectLever * 100; |
| | | } |
| | | console.log(this.selectLever, "this.selectLever "); |
| | | if (this.tabsCurrentIndex == 0) { |
| | | opts.buyType = 1; |
| | |
| | | // 股票买入 |
| | | async gpBuy(opts) { |
| | | opts.stockId = this.id; |
| | | let data = await api.buy(opts); |
| | | let data; |
| | | |
| | | console.log("bayType: ", this.KLine); |
| | | |
| | | if (this.KLine.type == "HJ") { |
| | | opts.name = this.KLine.name; |
| | | |
| | | data = await api.goldCrudeOilbuy(opts); |
| | | } else { |
| | | data = await api.buy(opts); |
| | | } |
| | | |
| | | this.buying = false; |
| | | if (data.status === 0) { |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: data.msg, |
| | | elAlertType: "success", |
| | | elAlertType: "success" |
| | | }); |
| | | this.getUserInfo(); |
| | | var buyType = ""; |
| | |
| | | if (data.msg.indexOf("不在交易时段内") > -1) { |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: this.$t("hj113"), |
| | | elAlertText: this.$t("hj113") |
| | | }); |
| | | } else { |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: data.msg, |
| | | elAlertText: data.msg |
| | | }); |
| | | } |
| | | } |
| | |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: data.msg, |
| | | elAlertType: "success", |
| | | elAlertType: "success" |
| | | }); |
| | | this.getUserInfo(); |
| | | this.$router.push("/warehouse?index=1&buyType=" + this.bayType); |
| | | } else { |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: data.msg, |
| | | elAlertText: data.msg |
| | | }); |
| | | } |
| | | }, |
| | |
| | | } else { |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: data.msg, |
| | | elAlertText: data.msg |
| | | }); |
| | | } |
| | | this.$store.state.user = this.user; |
| | |
| | | |
| | | this.siteLeverList = []; |
| | | for ( |
| | | let i = 0; i < this.$store.state.userInfo.siteLever.split("/").length; i++ |
| | | let i = 0; |
| | | i < this.$store.state.userInfo.siteLever.split("/").length; |
| | | i++ |
| | | ) { |
| | | let val = this.$store.state.userInfo.siteLever.split("/")[i]; |
| | | let item = { |
| | |
| | | } else { |
| | | this.$store.commit("elAlertShow", { |
| | | elAlertShow: true, |
| | | elAlertText: data.msg, |
| | | elAlertText: data.msg |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | filters: { |
| | | getName(name) { |
| | |
| | | } else { |
| | | return name; |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | <template> |
| | | <div class="ware"> |
| | | <div style="padding: 0 0.4rem 0.4rem"> |
| | | <van-tabs v-model="active" color="#0066ed"> |
| | | <van-tabs v-model="active" color="#0066ed" @change="handleTabChange"> |
| | | <van-tab :title="$t('hj52')" name="2"></van-tab> |
| | | <van-tab :title="$t('黄金原油')" name="1"></van-tab> |
| | | </van-tabs> |
| | |
| | | laber: "ST", |
| | | symbolCode: "INR", |
| | | symbol: "₹" |
| | | }, |
| | | { |
| | | title: this.$t("黄金原油"), |
| | | assname: this.$t("黄金原油"), |
| | | name: "1", |
| | | bgc: "rgb(12, 175, 226)", |
| | | laber: "USDT", |
| | | symbolCode: "MYR", |
| | | symbol: "RM" |
| | | } |
| | | // { |
| | | // title: this.$t("黄金原油"), |
| | |
| | | if (e.name !== "1") { |
| | | this.$refs.dataListref.getList(e.laber); |
| | | } |
| | | }, |
| | | handleTabChange(name) { |
| | | const arr = this.tabsArr.filter(item => item.name === name); |
| | | if (arr.length > 0) { |
| | | this.activeObj = arr[0]; |
| | | this.$refs.dataListref.getList(this.activeObj.laber); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | |
| | | :loading-text="$t('hj430')" |
| | | @load="onLoad" |
| | | > |
| | | <div v-if="actives === 0" |
| | | <div |
| | | v-if="actives === 0" |
| | | class="sport-content-li" |
| | | :style="actives === 1 ? 'height:5.52rem' : 'height:7.52rem'" |
| | | v-for="(item, index) in dataList" |
| | | :key="index" |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" > |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" |
| | | > |
| | | <div @click.stop="pushRouter(item)"> |
| | | |
| | | <div class="title-box" style="justify-content: space-between;"> |
| | | <div class="span" :style="item.isListed==false?'color:red;':''">{{ item.stockName }}</div> |
| | | <div |
| | | class="span" |
| | | :style="item.isListed == false ? 'color:red;' : ''" |
| | | > |
| | | {{ item.stockName }} |
| | | </div> |
| | | <div |
| | | class="states" |
| | | :class="item.orderDirection === '买跌' ? 'states-red' : ''" |
| | |
| | | <div class="sport-content-title2" > |
| | | {{ $t("盈虧") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | {{ item.profitAndLose }} |
| | | <div |
| | | class="sport-content-text2" |
| | | :style=" |
| | | item.profitAndLoseParent.charAt(0) == '-' |
| | | ? 'color:#cc1b1b;' |
| | | : 'color:#3e9976;' |
| | | " |
| | | > |
| | | ₹{{ item.profitAndLose | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj141") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | <div |
| | | class="sport-content-text2" |
| | | :style=" |
| | | item.profitAndLoseParent.charAt(0) == '-' |
| | | ? 'color:#cc1b1b;' |
| | | : 'color:#3e9976;' |
| | | " |
| | | > |
| | | {{ item.profitAndLoseParent }} |
| | | </div> |
| | | </div> |
| | |
| | | {{ $t("hj40") }}({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.now_price }} |
| | | ₹{{ item.now_price | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("持倉價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.buyOrderPrice }} |
| | | ₹{{ item.buyOrderPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("訂單金額") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.orderTotalPrice }} |
| | | ₹{{ item.orderTotalPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("hj44") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.orderFee }} |
| | | ₹{{ item.orderFee | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("待补金额") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.amountToBeCovered }} |
| | | ₹{{ item.amountToBeCovered | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("止損價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.stopTargetPrice }} |
| | | {{ item.stopTargetPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("止盈價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.profitTargetPrice }} |
| | | {{ item.profitTargetPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> --> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div v-if="actives === 1" |
| | | <div |
| | | v-if="actives === 1" |
| | | class="sport-content-li" |
| | | :style="actives === 1 ? 'height:5.52rem' : 'height:7.52rem'" |
| | | v-for="(item, index) in newdataList" |
| | | :key="index" |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" > |
| | | @click="$router.push(`/Stockdetail?codes=${item.positionSn}`)" |
| | | > |
| | | <div @click.stop="pushRouter(item)"> |
| | | <div class="title-box" style="justify-content: space-between;"> |
| | | <div class="span">{{ item.stockName }}</div> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("盈虧") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | {{ item.profitAndLose }} |
| | | <div |
| | | class="sport-content-text2" |
| | | :style=" |
| | | item.profitAndLoseParent.charAt(0) == '-' |
| | | ? 'color:#cc1b1b;' |
| | | : 'color:#3e9976;' |
| | | " |
| | | > |
| | | ₹{{ item.profitAndLose | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | <div class="sport-content-title2"> |
| | | {{ $t("hj141") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2" :style="item.profitAndLoseParent.charAt(0)=='-'?'color:#cc1b1b;':'color:#3e9976;'"> |
| | | <div |
| | | class="sport-content-text2" |
| | | :style=" |
| | | item.profitAndLoseParent.charAt(0) == '-' |
| | | ? 'color:#cc1b1b;' |
| | | : 'color:#3e9976;' |
| | | " |
| | | > |
| | | {{ item.profitAndLoseParent }} |
| | | </div> |
| | | </div> |
| | |
| | | {{ $t("hj40") }}({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.now_price }} |
| | | ₹{{ item.now_price | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("持倉價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.buyOrderPrice }} |
| | | ₹{{ item.buyOrderPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("訂單金額") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.orderTotalPrice }} |
| | | ₹{{ item.orderTotalPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("hj44") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.orderFee }} |
| | | ₹{{ item.orderFee | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("止損價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.stopTargetPrice }} |
| | | {{ item.stopTargetPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> |
| | |
| | | {{ $t("止盈價") }} ({{ activeObj.symbolCode }}) |
| | | </div> |
| | | <div class="sport-content-text2"> |
| | | {{ item.profitTargetPrice }} |
| | | {{ item.profitTargetPrice | _toLocaleString }} |
| | | </div> |
| | | </div> |
| | | </van-col> --> |
| | |
| | | <!-- <div class="right" style="color: rgb(3, 173, 143)"> |
| | | {{ closeSell.orderNum }} |
| | | </div> --> |
| | | <input class="input_box" type="number" :max="closeSell.orderNum" :placeholder="$t('hj262')" v-model="ordernum" /> |
| | | <input |
| | | class="input_box" |
| | | type="number" |
| | | :max="closeSell.orderNum" |
| | | :placeholder="$t('hj262')" |
| | | v-model="ordernum" |
| | | /> |
| | | </div> |
| | | <div class="hang"> |
| | | <div class="left">{{ $t("類型") }}</div> |
| | |
| | | props: { |
| | | activeObj: { |
| | | type: Object, |
| | | default: {}, |
| | | }, |
| | | default: {} |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getList(); |
| | |
| | | closeSell: {}, |
| | | show: false, |
| | | actives: 0, |
| | | ordernum:'', |
| | | ordernum: "", |
| | | dataList: [], |
| | | newdataList:[], |
| | | timer: null, |
| | | tabsList: [ |
| | | { |
| | | title: this.$t("持倉"), |
| | | key: 0, |
| | | key: 0 |
| | | }, |
| | | |
| | | { |
| | | title: this.$t("平倉"), |
| | | key: 1, |
| | | }, |
| | | ], |
| | | key: 1 |
| | | } |
| | | ] |
| | | }; |
| | | }, |
| | | created(){ |
| | | this.dsq() |
| | | this.dsq(); |
| | | }, |
| | | beforeDestroy() { |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | |
| | | methods: { |
| | | dsq(){ |
| | | // this.dataList = []; |
| | | // this.timer = setInterval(() => { |
| | | this.timer = setInterval(() => { |
| | | this.getList(); |
| | | // }, 1000); |
| | | }, 1000); |
| | | }, |
| | | pushRouter(item) { |
| | | const obj = { |
| | | pid: item.stockCode || "", |
| | | type: item.stockGid || "", |
| | | type: item.stockGid || "" |
| | | }; |
| | | window.localStorage.setItem("kLine", JSON.stringify(obj)); |
| | | // return; |
| | |
| | | if_us: "", |
| | | if_zhishu: 0, |
| | | sok: "", |
| | | type: item.stockGid, |
| | | }, |
| | | type: item.stockGid |
| | | } |
| | | }); |
| | | }, |
| | | onLoad() { |
| | |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | } |
| | | const res = await getchicang({ |
| | | const _laber = laber || this.activeObj.laber; |
| | | let opt = { |
| | | state: this.actives, |
| | | stockType: laber || this.activeObj.laber, |
| | | stockType: _laber, |
| | | pageNum: 1, |
| | | pageSize: 30, |
| | | }); |
| | | pageSize: 30 |
| | | }; |
| | | if (_laber === "USDT") { |
| | | opt.stockCode = "HJYY"; |
| | | } |
| | | |
| | | const res = await getchicang(opt); |
| | | |
| | | this.loading = false; |
| | | if (res.status === 0) { |
| | |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | } |
| | | const res = await getchicang({ |
| | | const _laber = laber || this.activeObj.laber; |
| | | let opt = { |
| | | state: this.actives, |
| | | stockType: laber || this.activeObj.laber, |
| | | stockType: _laber, |
| | | pageNum: 1, |
| | | pageSize: 30, |
| | | }); |
| | | pageSize: 30 |
| | | }; |
| | | if (_laber === "USDT") { |
| | | opt.stockCode = "HJYY"; |
| | | } |
| | | const res = await getchicang(opt); |
| | | |
| | | this.loading = false; |
| | | if (res.status === 0) { |
| | | this.dataList = [] |
| | | this.dataList = []; |
| | | this.dataList = res.data.list; |
| | | this.finished = true; |
| | | } else { |
| | |
| | | close(item) { |
| | | this.closeSell = item; |
| | | this.$refs.closeDialog.show = true; |
| | | this.ordernum = '' |
| | | this.ordernum = ""; |
| | | }, |
| | | |
| | | clickTabs(e) { |
| | | this.pageNum = 1; |
| | | this.finished = false; |
| | | this.actives = e.key; |
| | | this.newdataList = [] |
| | | this.dataList = [] |
| | | this.newdataList = []; |
| | | this.dataList = []; |
| | | |
| | | if(e.key==1){ |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | |
| | | // setTimeout(()=>{ |
| | | // clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | // },3000) |
| | | this.getLists() |
| | | this.getLists(); |
| | | // this.startPolling(); |
| | | // this.dsq() |
| | | }else{ |
| | | clearInterval(this.timer); // 在组件销毁前清除定时器 |
| | | this.dsq() |
| | | this.dsq(); |
| | | } |
| | | this.$forceUpdate(); // 强制Vue重新渲染 |
| | | |
| | | // this.getList() |
| | | // if(e.key !=this.actives){ |
| | | |
| | | |
| | | // }else{ |
| | | // this.actives = e.key; |
| | | // this.dsq() |
| | | // } |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |