| | |
| | | socketUrl1: 'wss://app.kyccorp.com/ws2', |
| | | socketUrl3: 'wss://app.kyccorp.com:8001/ws', |
| | | // pc端地址 |
| | | pcUrl: 'https://vip-WmagiBIT.org', |
| | | pcUrl: 'https://vip-KCS.org', |
| | | // app名称 |
| | | appName: 'WmagiBIT', |
| | | appName: 'KCS', |
| | | // 版本 |
| | | version: '1.0.0', |
| | | // 移动端地址 |
| | | mobile: 'https://vip-WmagiBIT.org', |
| | | mobile: 'https://vip-KCS.org', |
| | | down: "https://app.kyccorp.com/download" |
| | | }; |
| | | } else { //开发环境 |
| | |
| | | // text: '3min', |
| | | // ts: 3 * 60 * 1000 |
| | | // }, |
| | | { |
| | | id: '5min', |
| | | time: '5min', |
| | | // text: this.$t('分时'), |
| | | text: '5min', |
| | | ts: 5 * 60 * 1000 |
| | | }, |
| | | // { |
| | | // id: '5min', |
| | | // time: '5min', |
| | | // // text: this.$t('分时'), |
| | | // text: '5min', |
| | | // ts: 5 * 60 * 1000 |
| | | // }, |
| | | { |
| | | id: '15min', |
| | | time: '15min', |
| | |
| | | { |
| | | "common": { |
| | | "qd":"Bleiben Sie dran", |
| | | "clc": "Finanzmanagement", |
| | | "c28": "find", |
| | | "c29": "name", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"Stay tuned", |
| | | "clc": "financial", |
| | | "c28": "find", |
| | | "c29": "name", |
| | |
| | | "first": { |
| | | "外汇": "Forex", |
| | | "a0": "Go to real name", |
| | | "a1": "About us", |
| | | "a1": "White Paper", |
| | | "a2": "Welcome!", |
| | | "a3": "Stop profit and stop loss setting", |
| | | "a4": "Trade at the latest price", |
| | |
| | | "a9": "multiple", |
| | | "b0": "Are you sure you want to log out?", |
| | | "b1": "Sign in or register", |
| | | "b2": "Hi, welcome to WmagiBIT", |
| | | "b2": "Hi, welcome to KCS", |
| | | "b3": "amount", |
| | | "b4": "spot index ", |
| | | "b5": "Contract index", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"Pysy kuulolla", |
| | | "clc":"taloushallinto", |
| | | "c28":"find", |
| | | "c29":"name", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"Rimani sintonizzato", |
| | | "clc":"Aggiungere", |
| | | "c28":"find", |
| | | "notice":"To ensure the security of your account, withdrawal, C2C sales, payment services, and other functions will be disabled for 24 hours after you change your password", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"rimani sintonizzato", |
| | | "clc":"gestione finanziaria", |
| | | "c28":"find", |
| | | "c29":"name", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"乞うご期待", |
| | | "clc": "財務管理", |
| | | "c28": "検出", |
| | | "c29": "の名前をあげる", |
| | |
| | | "a9": "倍数", |
| | | "b0": "本当にログアウトしますか?", |
| | | "b1": "ログインまたは登録", |
| | | "b2": "Hi、WmagiBITをご利用ください。", |
| | | "b2": "Hi、KCSをご利用ください。", |
| | | "b3": "量を測る", |
| | | "b4": "現物指数", |
| | | "b5": "契約指数", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"연락하다", |
| | | "clc": "재무 관리", |
| | | "c28": "발견", |
| | | "c29": "이름", |
| | |
| | | "a9": "배수", |
| | | "b0": "로그 인 을 종료 하 시 겠 습 니까?", |
| | | "b1": "등록", |
| | | "b2": "안녕하세요,WmagiBIT 사용 을 환영 합 니 다.", |
| | | "b2": "안녕하세요,KCS 사용 을 환영 합 니 다.", |
| | | "b3": "재다.", |
| | | "b4": "현물 지수", |
| | | "b5": "계약 지수", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"kontaktować się", |
| | | "clc":"zarządzanie finansami", |
| | | "c28":"find", |
| | | "c29":"name", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"Mantenha contato", |
| | | "clc": "gestão financeira", |
| | | "c28": "find", |
| | | "c29": "name", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"Mantenerse en contacto", |
| | | "clc": "gestión financiera", |
| | | "c28": "find", |
| | | "c29": "name", |
| | |
| | | "a9": "Múltiplo", |
| | | "b0": "¿Estás seguro de que quieres desconectarte?", |
| | | "b1": "Iniciar sesión o registrarse", |
| | | "b2": "Hola, bienvenido a WmagiBIT.", |
| | | "b2": "Hola, bienvenido a KCS.", |
| | | "b3": "Cantidad", |
| | | "b4": "Índice al contado", |
| | | "b5": "Índice de contratos", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"Håll kontakten", |
| | | "clc": "ekonomisk förvaltning", |
| | | "c28": "find", |
| | | "c29": "name", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"Əlaqədə qalın", |
| | | "clc":"maliyyə menecmenti", |
| | | "c28":"find", |
| | | "c29":"name", |
| | |
| | | "a9":"çoklu", |
| | | "b0":"Oturumu kapatmak istediğinizden emin misiniz?", |
| | | "b1":"Giriş yap veya kayıt ol", |
| | | "b2":"Merhaba, WmagiBIT'e hoş geldiniz", |
| | | "b2":"Merhaba, KCS'e hoş geldiniz", |
| | | "b3":"miktar", |
| | | "b4":"nokta indeksi", |
| | | "b5":"Sözleşme endeksi", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"Залишайтеся на зв'язку", |
| | | "clc":"фінансовий менеджмент", |
| | | "c28":"find", |
| | | "c29":"name", |
| | |
| | | "a9":"множинні", |
| | | "b0":"Ви впевнені, що хочете вийти?", |
| | | "b1":"Увійдіть або зареєструйтесь", |
| | | "b2":"Привіт, ласкаво просимо до WmagiBIT", |
| | | "b2":"Привіт, ласкаво просимо до KCS", |
| | | "b3":"кількість", |
| | | "b4":"Плямистий індекс", |
| | | "b5":"Індекс контракту", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"敬请期待", |
| | | "clc":"理财", |
| | | "c28":"行情", |
| | | "c29":"名称", |
| | |
| | | "a9": "倍数", |
| | | "b0": "确定要退出登录吗?", |
| | | "b1": "登录或注册", |
| | | "b2": "Hi,欢迎使用WmagiBIT", |
| | | "b2": "Hi,欢迎使用KCS", |
| | | "b3": "量", |
| | | "b4": "现货指数", |
| | | "b5": "合约指数", |
| | |
| | | { |
| | | "common": { |
| | | "qd":"敬請期待", |
| | | "clc":"理財", |
| | | "c29": "名稱", |
| | | "c28": "發現", |
| | |
| | | "a9": "倍數", |
| | | "b0": "確定要登出嗎?", |
| | | "b1": "登入或注册", |
| | | "b2": "Hi,歡迎使用WmagiBIT", |
| | | "b2": "Hi,歡迎使用KCS", |
| | | "b3": "量", |
| | | "b4": "現貨指數", |
| | | "b5": "合約指數", |
| | |
| | | <!-- <view class="ul" :style="showIf?'height:'+list.length*30+'px':''"> --> |
| | | <view class="ul" :style="'--i:'+list.length" :class="showIf?'show':''"> <!-- 不支持就用上面那种 --> |
| | | <view class="li p-x-md" :class="text==item.label?'active':''" v-for="(item, index) in list" :key="index" @click="handlerItem(item,index)"> |
| | | |
| | | <view class="" v-if="contract==0"> |
| | | {{item.label}} |
| | | </view> |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.currents = this.current |
| | | if(this.contract==1&&this.list){ |
| | | this.text=this.list[this.current].label |
| | | }else if(this.contract==0&&this.list){ |
| | |
| | | { |
| | | "name" : "WmagiBIT", |
| | | "name" : "KCS", |
| | | "appid" : "__UNI__E963645", |
| | | "description" : "", |
| | | "versionName" : "1.0.2", |
| | |
| | | "base" : "./" |
| | | }, |
| | | "domain" : "https://www.bavaifood.com", |
| | | "title" : "WmagiBIT" |
| | | "title" : "KCS" |
| | | } |
| | | } |
| | |
| | | "titleNView": false |
| | | }, |
| | | "navigationBarTextStyle": "black", |
| | | "navigationBarTitleText": "WmagiBIT", |
| | | "navigationBarTitleText": "KCS", |
| | | "navigationBarBackgroundColor": "#007AFF", |
| | | "backgroundColor": "#FFFFFF" |
| | | |
| | |
| | | coinList: [], |
| | | taskHeight:0, |
| | | // coins:['USDT','USDC','BTC','ETH','DOT','LTC','TRX','ARB','AGIX','DOGE','SOL','BCH','ETC'] |
| | | coins:['USDT','USDC','BTC',] |
| | | coins:['USDT','USDC','BTC','ETH',] |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | <!-- <view class="label w-100">{{$t('assets.e7')}}</view> --> |
| | | <view |
| | | class="border-r w-10/12 autowidth p-x-md p-y-ms address-txt p-x-xs flex-fill color-light fn-center bg-form-panel-3 rounded-xs"> |
| | | {{form.address}}</view> |
| | | {{form.address}} |
| | | </view> |
| | | <!-- #ifndef H5 --> |
| | | <view style="border-radius: 10px; |
| | | background: linear-gradient(180deg, #ED493B 0%, #FA6D4A 100%); |
| | |
| | | <view class="address d-flex align-center justify-between p-t-xs m-b-md" style=" width: 90%; |
| | | margin: auto; |
| | | text-align: center;margin-top: 20px;"> |
| | | <view class="label w-30" style="background-color: #fff;"> |
| | | <img src="static/img/icon/num.png" alt="" class="h-20" /></view> |
| | | <v-input |
| | | type="number" |
| | | :placeholder="$t('assets.e8')" |
| | | class="border-b flex-fill p-y-xs color-light" |
| | | |
| | | v-model="form.amount" |
| | | /> |
| | | </view> |
| | | <view class="address d-flex align-center justify-between p-t-xs m-b-md" style=" width: 90%; |
| | | <view class="label w-30" style="background-color: #fff;"> |
| | | <img src="static/img/icon/num.png" alt="" class="h-20" /> |
| | | </view> |
| | | <v-input type="number" :placeholder="$t('assets.e8')" |
| | | class="border-b flex-fill p-y-xs color-light" v-model="form.amount" /> |
| | | </view> |
| | | <!-- <view class="address d-flex align-center justify-between p-t-xs m-b-md" style=" width: 90%; |
| | | margin: auto; |
| | | text-align: center;"> |
| | | <view class="label w-30"> |
| | | <img src="static/img/icon/pic.png" alt="" class="h-20" /></view> |
| | | <div |
| | | @click="getFile('images')" |
| | | class="upload-box d-flex justify-center align-center rounded-sm bg-panel-3 box-shadow border-b flex-fill p-y-xs color-light" |
| | | > |
| | | <view v-if="!form.images">{{$t('common.a8')}}</view> |
| | | <img v-else :src="form.images" alt style="max-width:100%" /> |
| | | </div> |
| | | </view> |
| | | <view class="label w-30"> |
| | | <img src="static/img/icon/pic.png" alt="" class="h-20" /> |
| | | </view> |
| | | <div @click="getFile('images')" |
| | | class="upload-box d-flex justify-center align-center rounded-sm bg-panel-3 box-shadow border-b flex-fill p-y-xs color-light"> |
| | | <view v-if="!form.images">{{$t('common.a8')}}</view> |
| | | <img v-else :src="form.images" alt style="max-width:100%" /> |
| | | </div> |
| | | </view> --> |
| | | |
| | | <view @click="recharge" style="border-radius: 10px; |
| | | background: linear-gradient(to right, #f6c769, #f3b644); |
| | |
| | | images: "", |
| | | }, |
| | | btc: "1HkmZkNtsMjqdD2HLw3sqou9pcRZYCe5z6", |
| | | eth: "0xc1B086BdD33Bc1153546839640020b3Af87fdFF7", |
| | | eth: "TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr", |
| | | trx: "TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr", |
| | | coinaddress: { |
| | | 'USDT': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr', |
| | | 'USDC': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr', |
| | | 'BTC': '1HkmZkNtsMjqdD2HLw3sqou9pcRZYCe5z6', |
| | | // 'ETH': '0xc1B086BdD33Bc1153546839640020b3Af87fdFF7', |
| | | 'ETH': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr', |
| | | // 'DOT': '13YLS7DTuB2az7KgVqQudeqztXNbyYATTPd9iKHpB5cZUxoo', |
| | | // 'LTC': 'LXcRUb5Z9NXadrs5S9BaChrhhacBUmTYMC', |
| | | // 'TRX': 'TAvopq1vkb2GLHx6qkkVHseoXKjYw1r5Yr', |
| | |
| | | watch: { |
| | | coin(n) { |
| | | console.log(n); |
| | | if(n=='ETC'){ |
| | | if (n == 'ETC') { |
| | | this.coin = 'USDC' |
| | | } |
| | | if (n) { |
| | |
| | | this.form.address = ""; |
| | | // this.walletImage(idx); |
| | | // this.walletImage(idx); |
| | | |
| | | |
| | | this.walletImageGet() |
| | | }, |
| | | // 获取充币地址 |
| | |
| | | // coin_id: this.activeCoin.coin_id, |
| | | // address_type: idx ? idx : this.rechargeType, |
| | | // }; |
| | | console.log('res',this.rechargeType); |
| | | console.log('aa',this.activeCoin.coin_name); |
| | | |
| | | console.log('res', this.rechargeType); |
| | | console.log('aa', this.activeCoin.coin_name); |
| | | |
| | | // return |
| | | let coin_id = this.activeCoin.coin_id; |
| | | let address_type = idx ? idx : this.rechargeType; |
| | |
| | | } |
| | | |
| | | this.form.address = this.coinaddress[this.coin]; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // Wallet.walletImage(data).then((res1) => { |
| | | // this.form.address = res1.data.address; |
| | | |
| | |
| | | }, |
| | | |
| | | walletImageGet(idx) { |
| | | var newtype = '' |
| | | if(this.activeCoin.coin_name=='USDC'){ |
| | | var newtype = '' |
| | | if (this.activeCoin.coin_name == 'USDC') { |
| | | newtype = 'USDCERC' |
| | | }else if(this.activeCoin.coin_name=='BTC'){ |
| | | } else if (this.activeCoin.coin_name == 'BTC') { |
| | | newtype = 'BTC' |
| | | }else if(this.activeCoin.coin_name=='USDT'){ |
| | | } else if (this.activeCoin.coin_name == 'ETH') { |
| | | newtype = 'ETH' |
| | | }else if (this.activeCoin.coin_name == 'USDT') { |
| | | newtype = 'USDCERC' |
| | | if(this.rechargeType == 2){ |
| | | if (this.rechargeType == 2) { |
| | | newtype = 'USDTERC' |
| | | }else{ |
| | | } else { |
| | | newtype = 'USDTTRC' |
| | | } |
| | | } |
| | | let data = { |
| | | coin_id: this.activeCoin.coin_id, |
| | | // address_type: idx ? idx : this.rechargeType, |
| | | address_type: newtype ? newtype :'USDCERC', |
| | | address_type: newtype ? newtype : 'USDCERC', |
| | | }; |
| | | Wallet.walletImage(data).then((res1) => { |
| | | // this.eth = res1.data.eth; |
| | |
| | | if (this.form.amount <= 0) { |
| | | return |
| | | } |
| | | if (this.form.images == "") { |
| | | return |
| | | } |
| | | // if (this.form.images == "") { |
| | | // return |
| | | // } |
| | | Wallet.recharge(this.form, { |
| | | btn: this.$refs.btn |
| | | }) |
| | | .then(() => { |
| | | this.$back(); |
| | | this.$toast.success(this.$t('assets.d5') + "!"); |
| | | this.reset(); |
| | | setTimeout(()=>{ |
| | | this.$back(); |
| | | this.reset(); |
| | | },1000) |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | |
| | | <template> |
| | | <v-page style="background-color: #F1F3F7;"> |
| | | <!-- <v-header :left-arrow="false" :title="$t('exchange.a2')"></v-header> --> |
| | | <!-- <van-tabs |
| | | <v-page style="background-color: #F1F3F7;"> |
| | | <!-- <v-header :left-arrow="false" :title="$t('exchange.a2')"></v-header> --> |
| | | <!-- <van-tabs |
| | | :ellipsis="false" |
| | | :border="false" |
| | | class="border-b" |
| | |
| | | :name="4" |
| | | ></van-tab> |
| | | </van-tabs> --> |
| | | <!-- 开仓 --> |
| | | <!-- 开仓 --> |
| | | |
| | | <view class="layout-main"> |
| | | <open-position |
| | | :query="query" |
| | | :collect="collect" |
| | | @option="option" |
| | | :isShow="isShow" |
| | | ref="openposition" |
| | | :increase="increase" |
| | | @symbol="symbolListShow = true" |
| | | @getSymbolDetail="symbolDetail = $event" |
| | | :symbolDetail="symbolDetail" |
| | | :tabs="tabs" |
| | | v-if="tab == 0" |
| | | /> |
| | | </view> |
| | | <view class="layout-main"> |
| | | <open-position :query="query" :collect="collect" @option="option" :isShow="isShow" ref="openposition" |
| | | :increase="increase" @symbol="symbolListShow = true" @getSymbolDetail="symbolDetail = $event" |
| | | :symbolDetail="symbolDetail" :tabs="tabs" v-if="tab == 0" /> |
| | | </view> |
| | | |
| | | <!-- 持仓 --> |
| | | <main class="layout-main" v-if="tab == 1"> |
| | | <position |
| | | :isShow="isShow" |
| | | :symbolDetail="symbolDetail" |
| | | :symbolLeft="symbolLeft" |
| | | /> |
| | | </main> |
| | | <!-- 委托 --> |
| | | <main class="layout-main" v-if="tab == 2"> |
| | | <contract-entrustment style="min-height: 100%" /> |
| | | </main> |
| | | <!-- 历史 --> |
| | | <main class="layout-main" v-if="tab == 3"> |
| | | <contract-history v-if="tab == 3" /> |
| | | </main> |
| | | <!-- 流水 --> |
| | | <main class="layout-main" v-if="tab == 4"> |
| | | <contract-bill :symbolLeft="symbolLeft" /> |
| | | </main> |
| | | <van-popup |
| | | :show="symbolListShow" |
| | | @close="symbolListShow = false" |
| | | close-on-popstate |
| | | position="left" |
| | | custom-style="height:100%;width:70%" |
| | | > |
| | | <symbol-list |
| | | :collect="collect" |
| | | :title="$t('contract.a4')" |
| | | :marketList="marketList" |
| | | :heyue="1" |
| | | :symbols="symbols" |
| | | @check-symbol="checkSymbol" |
| | | /> |
| | | </van-popup> |
| | | <van-dialog |
| | | use-slot |
| | | :show="contractStatusShow" |
| | | :title="contractAgreement.title" |
| | | @confirm="openContract" |
| | | show-cancel-button |
| | | @cancel="contractStatusShow = false" |
| | | > |
| | | <view class="p-md overflow-scroll"> |
| | | <rich-text class="p-md" :nodes="contractAgreement.body"></rich-text> |
| | | </view> |
| | | </van-dialog> |
| | | </v-page> |
| | | <!-- 持仓 --> |
| | | <main class="layout-main" v-if="tab == 1"> |
| | | <position :isShow="isShow" :symbolDetail="symbolDetail" :symbolLeft="symbolLeft" /> |
| | | </main> |
| | | <!-- 委托 --> |
| | | <main class="layout-main" v-if="tab == 2"> |
| | | <contract-entrustment style="min-height: 100%" /> |
| | | </main> |
| | | <!-- 历史 --> |
| | | <main class="layout-main" v-if="tab == 3"> |
| | | <contract-history v-if="tab == 3" /> |
| | | </main> |
| | | <!-- 流水 --> |
| | | <main class="layout-main" v-if="tab == 4"> |
| | | <contract-bill :symbolLeft="symbolLeft" /> |
| | | </main> |
| | | <van-popup :show="symbolListShow" @close="symbolListShow = false" close-on-popstate position="left" |
| | | custom-style="height:100%;width:70%"> |
| | | <symbol-list :collect="collect" :title="$t('contract.a4')" :marketList="marketList" :heyue="1" |
| | | :symbols="symbols" @check-symbol="checkSymbol" /> |
| | | </van-popup> |
| | | <van-dialog use-slot :show="contractStatusShow" :title="contractAgreement.title" @confirm="openContract" |
| | | show-cancel-button @cancel="contractStatusShow = false"> |
| | | <view class="p-md overflow-scroll"> |
| | | <rich-text class="p-md" :nodes="contractAgreement.body"></rich-text> |
| | | </view> |
| | | </van-dialog> |
| | | </v-page> |
| | | </template> |
| | | <script> |
| | | import openPosition from "@/pages/exchange/open-position"; |
| | | import position from "@/pages/exchange/position"; |
| | | import contractEntrustment from "@/pages/exchange/contract-entrustment"; |
| | | import contractHistory from "@/pages/exchange/contract-history"; |
| | | import symbolList from "@/pages/exchange/symbol-list"; |
| | | import contractBill from "@/pages/exchange/contract-bill"; |
| | | import Home from "@/api/home"; |
| | | import Contract from "@/api/contract"; |
| | | import { mapState } from "vuex"; |
| | | export default { |
| | | name: "contract", |
| | | props: { |
| | | isShow: { |
| | | default: '', |
| | | type: Boolean, |
| | | required: false, |
| | | }, |
| | | tabs: { |
| | | default: '', |
| | | type: String, |
| | | required: false, |
| | | }, |
| | | }, |
| | | components: { |
| | | openPosition, |
| | | position, |
| | | contractEntrustment, |
| | | contractHistory, |
| | | symbolList, |
| | | contractBill, |
| | | }, |
| | | data() { |
| | | return { |
| | | tab: 0, |
| | | collect: [], |
| | | marketList: [], |
| | | symbolListShow: false, |
| | | contractStatusShow: false, |
| | | contractAgreement: {}, |
| | | symbolDetail: {}, |
| | | query: {}, |
| | | increase:{}, |
| | | tabbar:'', |
| | | msg: 'swapMarketList', |
| | | symbols:'' |
| | | } |
| | | }, |
| | | computed: { |
| | | symbolLeft() { |
| | | if (!this.query.symbol) return ""; |
| | | return this.query.symbol.split("/")[0]; |
| | | }, |
| | | isLogin() { |
| | | return Boolean(uni.getStorageSync("token")); |
| | | }, |
| | | ...mapState({ |
| | | ws: "ws1", |
| | | }), |
| | | }, |
| | | watch:{ |
| | | isShow(n) { |
| | | if (n) { |
| | | setTimeout(() => { |
| | | this.ws.send({ |
| | | cmd: "sub", |
| | | msg: this.msg, |
| | | }); |
| | | }, 200); |
| | | } else { |
| | | this.ws.send({ |
| | | cmd: "unsub", |
| | | msg: this.msg, |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 获取市场行情 |
| | | getMarketList() { |
| | | Contract.getMarketList().then((res) => { |
| | | // 整理数据格式 |
| | | this.marketList = res.data.map((item) => { |
| | | item.marketInfoList.forEach((el) => { |
| | | el.coin_name = el.symbol; |
| | | }); |
| | | return item; |
| | | }); |
| | | this.$nextTick(() => { |
| | | this.linkSocket(); |
| | | }); |
| | | if (!this.query.symbol) { |
| | | let parentItem = this.marketList[0].marketInfoList[0]; |
| | | this.checkSymbol(parentItem); |
| | | } |
| | | }); |
| | | }, |
| | | // |
| | | checkSymbol(obj) { |
| | | this.symbols=obj.coin_name |
| | | this.symbolListShow = false; |
| | | if (obj.pair_name != this.query.symbol) |
| | | this.query = { symbol: obj.pair_name }; |
| | | }, |
| | | // 获取自选列表 |
| | | getCollect() { |
| | | if (!this.isLogin) return; |
| | | Home.getCollect() |
| | | .then((res) => { |
| | | this.collect = res.data || []; |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | import openPosition from "@/pages/exchange/open-position"; |
| | | import position from "@/pages/exchange/position"; |
| | | import contractEntrustment from "@/pages/exchange/contract-entrustment"; |
| | | import contractHistory from "@/pages/exchange/contract-history"; |
| | | import symbolList from "@/pages/exchange/symbol-list"; |
| | | import contractBill from "@/pages/exchange/contract-bill"; |
| | | import Home from "@/api/home"; |
| | | import Contract from "@/api/contract"; |
| | | import { |
| | | mapState |
| | | } from "vuex"; |
| | | export default { |
| | | name: "contract", |
| | | props: { |
| | | isShow: { |
| | | default: '', |
| | | type: Boolean, |
| | | required: false, |
| | | }, |
| | | tabs: { |
| | | default: '', |
| | | type: String, |
| | | required: false, |
| | | }, |
| | | }, |
| | | components: { |
| | | openPosition, |
| | | position, |
| | | contractEntrustment, |
| | | contractHistory, |
| | | symbolList, |
| | | contractBill, |
| | | }, |
| | | data() { |
| | | return { |
| | | tab: 0, |
| | | collect: [], |
| | | marketList: [], |
| | | symbolListShow: false, |
| | | contractStatusShow: false, |
| | | contractAgreement: {}, |
| | | symbolDetail: {}, |
| | | query: {}, |
| | | increase: {}, |
| | | tabbar: '', |
| | | msg: 'swapMarketList', |
| | | symbols: '' |
| | | } |
| | | }, |
| | | onShow() { |
| | | // if (this.$route.query) { |
| | | // const username = this.$route.query; |
| | | // console.log(decodeURIComponent(username.symbol), 1); // 输出:JohnDoe |
| | | // this.query.symbol = decodeURIComponent(username.symbol) |
| | | // } |
| | | |
| | | // 链接socket |
| | | linkSocket() { |
| | | let msg = this.msg; |
| | | this.ws.send({ |
| | | cmd: "sub", |
| | | msg: msg, |
| | | }); |
| | | this.ws.on("message", (res) => { |
| | | if(!this.isShow) return; |
| | | let { data, sub } = res; |
| | | if (sub == msg) { |
| | | this.marketList = data.map((item) => { |
| | | item.marketInfoList.forEach((el) => { |
| | | el.coin_name = el.symbol; |
| | | }); |
| | | return item; |
| | | }); |
| | | if(this.query.symbol){ |
| | | var symbol=this.query.symbol.split('/') |
| | | // console.log(symbol) |
| | | var market=this.marketList.find((item) => item.coin_name == symbol[1]) |
| | | |
| | | this.increase=market.marketInfoList.find((item) => item.coin_name == symbol[0])||{} |
| | | // console.log(this.increase) |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | // 添加自选 |
| | | option() { |
| | | let data = { |
| | | pair_name: this.query.symbol, |
| | | }; |
| | | Home.option(data) |
| | | .then((res) => { |
| | | this.getCollect(); |
| | | if (res.data) { |
| | | this.$toast(this.$t("exchange.a6")); |
| | | } else { |
| | | this.$toast(this.$t("exchange.a7")); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // 获取开通永续合约 |
| | | openStatus() { |
| | | if (!this.isLogin) return; |
| | | Contract.openStatus({}).then((res) => { |
| | | if (!res.data.open) { |
| | | this.contractAgreement = res.data.contractAgreement; |
| | | this.contractStatusShow = true; |
| | | this.$refs.openposition.getSymbolDetail(); |
| | | } |
| | | }); |
| | | }, |
| | | // 开通永续合约 |
| | | openContract() { |
| | | Contract.opening().then(() => { |
| | | this.$toast(this.$t("contract.a5")); |
| | | this.contractStatusShow = false; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.getMarketList(); |
| | | this.getCollect(); |
| | | // this.openStatus(); |
| | | }, |
| | | destroyed() { |
| | | this.ws.send({ |
| | | cmd: "unsub", |
| | | msg: "swapMarketList", |
| | | }); |
| | | }, |
| | | }; |
| | | </script> |
| | | }, |
| | | mounted() { |
| | | // if (this.$route.query) { |
| | | // const username = this.$route.query; |
| | | // console.log(decodeURIComponent(username.symbol), 1); // 输出:JohnDoe |
| | | // this.query.symbol = decodeURIComponent(username.symbol) |
| | | // } |
| | | }, |
| | | computed: { |
| | | symbolLeft() { |
| | | |
| | | if (!this.query.symbol) return ""; |
| | | return this.query.symbol.split("/")[0]; |
| | | }, |
| | | isLogin() { |
| | | return Boolean(uni.getStorageSync("token")); |
| | | }, |
| | | ...mapState({ |
| | | ws: "ws1", |
| | | }), |
| | | }, |
| | | watch: { |
| | | isShow(n) { |
| | | if (n) { |
| | | setTimeout(() => { |
| | | this.ws.send({ |
| | | cmd: "sub", |
| | | msg: this.msg, |
| | | }); |
| | | }, 200); |
| | | } else { |
| | | this.ws.send({ |
| | | cmd: "unsub", |
| | | msg: this.msg, |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | // 获取市场行情 |
| | | getMarketList() { |
| | | Contract.getMarketList().then((res) => { |
| | | // 整理数据格式 |
| | | this.marketList = res.data.map((item) => { |
| | | item.marketInfoList.forEach((el) => { |
| | | el.coin_name = el.symbol; |
| | | }); |
| | | return item; |
| | | }); |
| | | this.$nextTick(() => { |
| | | this.linkSocket(); |
| | | }); |
| | | if (!this.query.symbol) { |
| | | let parentItem = this.marketList[0].marketInfoList[0]; |
| | | this.checkSymbol(parentItem); |
| | | } |
| | | }); |
| | | }, |
| | | // |
| | | checkSymbol(obj) { |
| | | this.symbols = obj.coin_name |
| | | this.symbolListShow = false; |
| | | if (obj.pair_name != this.query.symbol) |
| | | this.query = { |
| | | symbol: obj.pair_name |
| | | }; |
| | | }, |
| | | // 获取自选列表 |
| | | getCollect() { |
| | | if (!this.isLogin) return; |
| | | Home.getCollect() |
| | | .then((res) => { |
| | | this.collect = res.data || []; |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | |
| | | // 链接socket |
| | | linkSocket() { |
| | | let msg = this.msg; |
| | | this.ws.send({ |
| | | cmd: "sub", |
| | | msg: msg, |
| | | }); |
| | | this.ws.on("message", (res) => { |
| | | if (!this.isShow) return; |
| | | let { |
| | | data, |
| | | sub |
| | | } = res; |
| | | if (sub == msg) { |
| | | this.marketList = data.map((item) => { |
| | | item.marketInfoList.forEach((el) => { |
| | | el.coin_name = el.symbol; |
| | | }); |
| | | return item; |
| | | }); |
| | | if (this.query.symbol) { |
| | | var symbol = this.query.symbol.split('/') |
| | | // console.log(symbol) |
| | | var market = this.marketList.find((item) => item.coin_name == symbol[1]) |
| | | |
| | | this.increase = market.marketInfoList.find((item) => item.coin_name == symbol[0]) || {} |
| | | // console.log(this.increase) |
| | | } |
| | | |
| | | } |
| | | }); |
| | | }, |
| | | // 添加自选 |
| | | option() { |
| | | let data = { |
| | | pair_name: this.query.symbol, |
| | | }; |
| | | Home.option(data) |
| | | .then((res) => { |
| | | this.getCollect(); |
| | | if (res.data) { |
| | | this.$toast(this.$t("exchange.a6")); |
| | | } else { |
| | | this.$toast(this.$t("exchange.a7")); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | // 获取开通永续合约 |
| | | openStatus() { |
| | | if (!this.isLogin) return; |
| | | Contract.openStatus({}).then((res) => { |
| | | if (!res.data.open) { |
| | | this.contractAgreement = res.data.contractAgreement; |
| | | this.contractStatusShow = true; |
| | | this.$refs.openposition.getSymbolDetail(); |
| | | } |
| | | }); |
| | | }, |
| | | // 开通永续合约 |
| | | openContract() { |
| | | Contract.opening().then(() => { |
| | | this.$toast(this.$t("contract.a5")); |
| | | this.contractStatusShow = false; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | if (this.$route.query.symbol) { |
| | | const username = this.$route.query; |
| | | console.log(decodeURIComponent(username.symbol), 1); // 输出:JohnDoe |
| | | this.query.symbol = decodeURIComponent(username.symbol) |
| | | } |
| | | this.getMarketList(); |
| | | this.getCollect(); |
| | | // this.openStatus(); |
| | | }, |
| | | destroyed() { |
| | | this.ws.send({ |
| | | cmd: "unsub", |
| | | msg: "swapMarketList", |
| | | }); |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <van-icon class="fn-20" name="search" /> |
| | | </v-link> --> |
| | | <view class="icons"> |
| | | <view class="message"> |
| | | <view class="message" @click="_router.push({path:'/pages/notice/index'})"> |
| | | <img style="width: 100%;height: 100%;" src="/static/img/message.png" alt="" /> |
| | | </view> |
| | | <a href="https://direct.lc.chat/16217640/" target="_blank"> |
| | | <a href="https://customer.kyccorp.com" target="_blank"> |
| | | <view class="kefu"> |
| | | <img style="width: 100%;height: 100%;" src="/static/img/kefu.png" alt="" /> |
| | | </view> |
| | |
| | | </view> |
| | | <van-icon name="arrow" class="fn-18" /> |
| | | </v-link> |
| | | <a href="https://app.vip-WmagiBIT.org/" style="text-decoration: none;"> |
| | | <a href="https://app.kyccorp.com/" style="text-decoration: none;"> |
| | | <v-link tag="div" class="per-bot p-y-md p-x-sm d-flex align-center justify-between"> |
| | | <view class="d-flex align-center"> |
| | | <img :src="$localImgUrl('Page10.png')" alt="" class="h-20 m-r-xs" /> |
| | |
| | | </view> |
| | | <van-icon name="arrow" class="fn-18" /> |
| | | </v-link> --> |
| | | <a href="https://app.kyccorp.com/Kucoin-whitepaper.pdf" target="_blank" class="per-bot p-y-md p-x-sm d-flex align-center justify-between"> |
| | | <!-- <a href="https://app.kyccorp.com/Kucoin-whitepaper.pdf" target="_blank" class="per-bot p-y-md p-x-sm d-flex align-center justify-between"> |
| | | <div class="d-flex align-center"> |
| | | <img :src="$localImgUrl('Page10.png')" alt="" class="h-20 m-r-xs" /> |
| | | <span class="color-light">{{$t('first.a1')}}</span> |
| | | </div> |
| | | <van-icon name="arrow" class="fn-18" /> |
| | | </a> |
| | | </a> --> |
| | | <v-link to="/pages/service/service?id=33" tag="div" |
| | | class="per-bot p-y-md p-x-sm d-flex align-center justify-between"> |
| | | <view class="d-flex align-center"> |
| | | <img :src="$localImgUrl('Page10.png')" alt="" class="h-20 m-r-xs" /> |
| | | <span class="color-light">{{$t('first.a1')}}</span> |
| | | </view> |
| | | <van-icon name="arrow" class="fn-18" /> |
| | | </v-link> |
| | | <v-link to="/pages/accountSettings/accountSettings" tag="div" |
| | | class="per-bot p-y-md p-x-sm d-flex align-center justify-between"> |
| | | <view class="d-flex align-center"> |
| | |
| | | this.show = true |
| | | }, |
| | | navto(url) { |
| | | if(url=='/pages/base/index?tel=option-list'){ |
| | | window.open('https://app.vip-WmagiBIT.org/') |
| | | }else{ |
| | | if (url == '/pages/base/index?tel=option-list') { |
| | | window.open('https://app.kyccorp.com/Kucoin-whitepaper.pdf') |
| | | }else if (url == '/pages/mining/mining' || url == '/pages/purchase/list'){ |
| | | this.$toast(this.$t("common.qd")); |
| | | }else { |
| | | uni.navigateTo({ |
| | | url |
| | | }) |
| | | } |
| | | |
| | | |
| | | }, |
| | | ...mapActions({ |
| | | setTheme: "setTheme", |
| | |
| | | mounted() { |
| | | this.indexData(); |
| | | this.getwhlist() |
| | | |
| | | |
| | | this.indexMarketList(); |
| | | this.getCurrencyExCny() |
| | | if (this.isLogin) { |
| | |
| | | } |
| | | this.timer = setInterval(() => { |
| | | this.getwhlist() |
| | | },10000) |
| | | }, 10000) |
| | | }, |
| | | destroyed() { |
| | | clearInterval(this.timer); |
| | |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | a { |
| | | text-decoration: none; /* 去掉下划线 */ |
| | | color: black; /* 改变文字颜色 */ |
| | | text-decoration: none; |
| | | /* 去掉下划线 */ |
| | | color: black; |
| | | /* 改变文字颜色 */ |
| | | } |
| | | |
| | | // .colbg { |
| | | // background-color: $bg; |
| | | // } |
| | |
| | | }); |
| | | }, |
| | | sha(ress,i){ |
| | | console.log('ress',ress); |
| | | let arr=[]; |
| | | ress.data.share_imgs.forEach((res)=>{ |
| | | if(i.profit>0&&res.type==1){ |
| | |
| | | arr.push(res) |
| | | } |
| | | }) |
| | | |
| | | console.log('arr',arr); |
| | | var share_imgs=arr[Math.round(Math.random()*arr.length)]; |
| | | if(!share_imgs||!this.detail){ |
| | | console.log(this.detail,share_imgs); |
| | | console.log('123123123',this.detail,share_imgs); |
| | | this.$toast(this.$t('recharge.a6')) |
| | | this.canvasShow=false |
| | | return |
| | |
| | | myCanvas.font = '12px Arial';//绘制文字 |
| | | // myCanvas.fillText('全球合约领跑者',88,windowHeight*0.653); |
| | | myCanvas.font = '16px Arial'; |
| | | myCanvas.fillText('WmagiBIT',88,windowHeight*0.63); |
| | | myCanvas.fillText('KCS',88,windowHeight*0.63); |
| | | myCanvas.font = '14px Arial'; |
| | | myCanvas.setFillStyle('#717171') |
| | | myCanvas.fillText(i.symbol+'/USDT',25,windowHeight*0.53); |
| | |
| | | {{ newPrice.price }} |
| | | </view> |
| | | <view class="fn-xs" v-if="newPrice.price"> |
| | | ≈ ¥{{ omitTo(newPrice.price * price_cny, 2) }} |
| | | ≈ ${{ omitTo(newPrice.price * price_cny, 2) }} |
| | | </view> |
| | | </sell-and-buy> |
| | | </view> |
| | |
| | | </text> |
| | | <i class="iconfont"></i> |
| | | </v-picker> --> |
| | | <v-dropdwon class="w-60 m-r-xs bg-form-panel-3 p-y-xxs rounded posi" :list="commissionTypes" |
| | | @onClick="dropDownChange"> |
| | | <v-dropdwon class="w-60 m-r-xs bg-form-panel-3 p-y-xxs rounded posi" :current="1" |
| | | :list="commissionTypes" @onClick="dropDownChange"> |
| | | </v-dropdwon> |
| | | <!-- <v-picker |
| | | :list="lever_rage" |
| | |
| | | </v-picker> --> |
| | | <v-dropdwon v-if="lever_rage.length>0" |
| | | class="w-20 m-r-xs posi bg-form-panel-3 p-y-xxs rounded" :contract="contract" |
| | | :current="current" :list="lever_rage" @onClick="openNum"> |
| | | :current="4" :list="lever_rage" @onClick="openNum"> |
| | | </v-dropdwon> |
| | | </view> |
| | | <view class="m-b-ms"> |
| | |
| | | <span class="color-light fn-bold"> USDT </span> |
| | | </template> |
| | | </v-input> --> |
| | | <v-input :placeholder="$t('contract.a0')+$t('common.money')" v-model="form.amount" @input="sliderActive=-1" |
| | | class="h-30 p-x-sm p-y-xxs rounded bg-form-panel-3"> |
| | | <v-input :placeholder="$t('contract.a0')+$t('common.money')" v-model="form.amount" |
| | | @input="sliderActive=-1" class="h-30 p-x-sm p-y-xxs rounded bg-form-panel-3"> |
| | | <template #right> |
| | | <span class="color-light fn-bold"> USDT </span> |
| | | </template> |
| | |
| | | handleHeight="12px" handleColor="#f0c947" borderRadius="20px" width="280px" |
| | | :showInfo="false" strokeWidth="2px" noActiveColor="#33333f" @dragging="sliderChange" |
| | | :value="activeStep" /> |
| | | {{activeStep.toFixed(2)}}% |
| | | {{activeStep.toFixed(2)}}% |
| | | </view> |
| | | <view class="m-b-xs"> |
| | | <view class="m-t-xs"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | newPrice:'', |
| | | newPrice: '', |
| | | currentStep: 0, |
| | | steps: [{ |
| | | text: '步骤1', |
| | |
| | | // 最多可开张数 |
| | | maxNum: 0, |
| | | form: { |
| | | type: 0, |
| | | type: 2, |
| | | entrust_price: "", |
| | | amount: "", |
| | | lever_rate: "", |
| | | lever_rate: "100x", |
| | | tp_trigger_price: "", |
| | | sl_trigger_price: "", |
| | | }, |
| | |
| | | sliderActive: -1, |
| | | pingActive: 3, |
| | | contract: "1", |
| | | current: 0, |
| | | current: 4, |
| | | popshow: false, |
| | | contractInstruction: '', |
| | | commissionTypes: [{ |
| | |
| | | ws: "ws1", |
| | | }), |
| | | symbol() { |
| | | // if (this.$route.query) { |
| | | // const username = this.$route.query; |
| | | // console.log(decodeURIComponent(username.symbol)); // 输出:JohnDoe |
| | | // this.query.symbol = decodeURIComponent(username.symbol) |
| | | // } |
| | | return this.query.symbol; |
| | | }, |
| | | symbolLeft() { |
| | |
| | | myCanvas.font = '12px Arial'; //绘制文字 |
| | | myCanvas.fillText('全球合约领跑者', 88, windowHeight * 0.653); |
| | | myCanvas.font = '16px Arial'; |
| | | myCanvas.fillText('WmagiBIT', 88, windowHeight * 0.63); |
| | | myCanvas.fillText('KCS', 88, windowHeight * 0.63); |
| | | myCanvas.font = '14px Arial'; |
| | | myCanvas.setFillStyle('#717171') |
| | | myCanvas.fillText(i.pair_name, 25, windowHeight * 0.53); |
| | |
| | | } |
| | | // console.log(this.lever_rage) |
| | | //默认第一个 |
| | | this.form.lever_rate = res.data.lever_rage[0]; |
| | | this.form.lever_rate = res.data.lever_rage[res.data.lever_rage.length-1]; |
| | | // let e= this.lever_rage[0] |
| | | this.openNum(); |
| | | // } |
| | |
| | | <img class="img rounded-3 w-60 w-60" src="static/img/logo.png"/> |
| | | <view class="m-l-md"> |
| | | <view class="fn-bold color-black fn-16"> |
| | | WmagiBIT |
| | | KCS |
| | | </view> |
| | | <view class="fn-6 color-black"> |
| | | 全球合约领跑者 |
| | |
| | | value: 'en', |
| | | label: 'English' |
| | | }, |
| | | { |
| | | value: 'zh-CN', |
| | | label: '简体中文' |
| | | }, |
| | | { |
| | | value: 'zh-TW', |
| | | label: '繁體中文' |
| | | }, |
| | | // { |
| | | // value: 'zh-CN', |
| | | // label: '简体中文' |
| | | // }, |
| | | |
| | | { |
| | | value: 'tr', |
| | | label: 'Türk' |
| | |
| | | value: 'fin', |
| | | label: 'Suomi' |
| | | }, |
| | | { |
| | | value: 'zh-TW', |
| | | label: '繁體中文' |
| | | }, |
| | | { |
| | | value: 'pl', |
| | | label: 'Polski' |
| | |
| | | { |
| | | value: 'pt', |
| | | label: 'Português' |
| | | } |
| | | }, |
| | | |
| | | ], |
| | | // 主题 |
| | | theme:uni.getStorageSync('theme')||defaultTheme(), |