Browse Source

调整主题颜色

master
453530270@qq.com 3 years ago
parent
commit
477e4f37db
  1. 1
      .gitignore
  2. 0
      README 2.md
  3. 2
      README.md
  4. 2
      config/index.js
  5. 10684
      package-lock.json
  6. 2
      src/App.vue
  7. 3
      src/api/contract.js
  8. 2
      src/api/option.js
  9. 2
      src/api/server/index.js
  10. BIN
      src/assets/img/Svenska.png
  11. BIN
      src/assets/img/bg1.jpg
  12. BIN
      src/assets/img/chat.png
  13. 0
      src/assets/img/de.jpg
  14. BIN
      src/assets/img/download.png
  15. BIN
      src/assets/img/download_io.png
  16. 0
      src/assets/img/en.jpg
  17. BIN
      src/assets/img/favicon.png
  18. 0
      src/assets/img/fra.jpg
  19. 0
      src/assets/img/it.jpg
  20. 0
      src/assets/img/jp.jpg
  21. 0
      src/assets/img/kor.jpg
  22. BIN
      src/assets/img/polski.png
  23. 0
      src/assets/img/pt.jpg
  24. 0
      src/assets/img/spa.jpg
  25. BIN
      src/assets/img/suomi.png
  26. 0
      src/assets/img/tr.jpg
  27. 0
      src/assets/img/tw.jpg
  28. BIN
      src/assets/img/ukr.jpg
  29. BIN
      src/assets/img/xi4Gdg.jpeg
  30. 4
      src/assets/js/tvStyle.js
  31. 16
      src/assets/scss/base/_common.scss
  32. 2
      src/assets/scss/layout/_header.scss
  33. 8
      src/assets/scss/module/_contract.scss
  34. 1
      src/assets/scss/module/_form-access.scss
  35. 2
      src/assets/scss/module/_home.scss
  36. 2
      src/assets/scss/module/_option.scss
  37. 2
      src/assets/scss/theme/_dark.scss
  38. 517
      src/components/CommonFooter.vue
  39. 278
      src/components/CommonHeader.vue
  40. 717
      src/components/KLine.vue
  41. 131
      src/components/SecondaryNav.vue
  42. 8
      src/i18n/cn.json
  43. 79
      src/i18n/de.json
  44. 79
      src/i18n/en.json
  45. 2059
      src/i18n/fra.json
  46. 2058
      src/i18n/it.json
  47. 2055
      src/i18n/jp.json
  48. 2057
      src/i18n/kor.json
  49. 2059
      src/i18n/pt.json
  50. 75
      src/i18n/spa.json
  51. 2123
      src/i18n/tr.json
  52. 211
      src/i18n/tw.json
  53. 8
      src/index.html
  54. 3
      src/utils/class/date.js
  55. 10
      src/utils/consts.js
  56. 16
      src/views/components/inner-transfer.vue
  57. 2
      src/views/contract/account.vue
  58. 4
      src/views/contract/current-commission.vue
  59. 1167
      src/views/contract/exchange-store.vue
  60. 79
      src/views/contract/handicap.vue
  61. 4
      src/views/contract/handicapRight.vue
  62. 6
      src/views/contract/hold-position.vue
  63. 4
      src/views/contract/index copy.vue
  64. 806
      src/views/contract/index.vue
  65. 5
      src/views/contract/page-bottom.vue
  66. 2
      src/views/course/detail.vue
  67. 11
      src/views/exchange/book-trades.vue
  68. 3
      src/views/exchange/index.vue
  69. 519
      src/views/exchange/make-deal.vue
  70. 874
      src/views/exchange/make-deal的_cpoy.vue
  71. 6
      src/views/exchange/symbols.vue
  72. 2700
      src/views/home/index.vue
  73. 34
      src/views/notice/detail.vue
  74. 6
      src/views/notice/index.vue
  75. 903
      src/views/option/kline.vue
  76. 2
      src/views/option/option-bottom.vue
  77. 754
      src/views/profile/certification.vue
  78. 325
      src/views/profile/index.vue
  79. 843
      src/views/purchase/index.vue
  80. 3
      src/views/setting/login-pwd.vue
  81. 76
      src/views/signIn/index.vue
  82. 38
      src/views/signUp/index.vue
  83. 2
      src/views/wallet/address.vue
  84. 6
      src/views/wallet/contract-assets.vue
  85. 44
      src/views/wallet/exchange-assets.vue
  86. 7
      src/views/wallet/funding.vue
  87. BIN
      static/images/icon/andriod.png
  88. BIN
      static/images/icon/api.png
  89. BIN
      static/images/icon/google-play.png
  90. BIN
      static/images/icon/imac.png
  91. BIN
      static/images/icon/ios.png
  92. BIN
      static/images/icon/linux.png
  93. BIN
      static/images/icon/right.png
  94. BIN
      static/images/icon/windows.png
  95. BIN
      static/images/icon_1.png
  96. BIN
      static/images/icon_2.png
  97. BIN
      static/images/icon_3.png
  98. BIN
      static/images/illustration-3.png
  99. BIN
      static/images/lightImageUrl.png
  100. BIN
      static/images/lightImageUrl_2.png

1
.gitignore

@ -15,6 +15,7 @@ test/
.AppleDouble
.LSOverride
# Icon must end with two \r
# Thumbnails
._*

0
README .md → README 2.md

2
README.md

@ -0,0 +1,2 @@
# jiaoyi

2
config/index.js

@ -24,7 +24,7 @@ module.exports = {
'/api': {
// target: 'http://qkladmin2.ruanmeng.top/',
// target: 'https://guanli.coin.amatak.net/',
target: 'https://sses.cxicoin.com/',
target: 'https://ser.ybgcoins.com/',
changeOrigin: true,
// pathRewrite: {
// // 请求时 将api替换成实际的apis等

10684
package-lock.json

File diff suppressed because it is too large

2
src/App.vue

@ -26,7 +26,7 @@ export default {
theme: "theme",
appConfig: "appConfig"
}),
currentTheme() {
let current = this.$route.name;
//

3
src/api/contract.js

@ -73,6 +73,7 @@ class Contract {
}
// 获取k线数据
static getKline(data, config) {
// console.log(data)
return server.get('/contract/getKline', {params:data}, config)
}
// 获取委托明细
@ -101,4 +102,4 @@ class Contract {
}
}
export default Contract;
export default Contract;

2
src/api/option.js

@ -108,4 +108,4 @@ class Option {
}
}
export default Option;
export default Option;

2
src/api/server/index.js

@ -59,7 +59,7 @@ Object.assign(settings, {
// api请求根地址 打包使用完整地址 调试使用本地服务器代理 避免跨域
// baseURL: process.env.NODE_ENV == 'production' ? 'http://qkladmin2.ruanmeng.top/api/' : '/api/',
// baseURL: process.env.NODE_ENV == 'production' ? 'https://guanli.coin.amatak.net/api/' : '/api/',
baseURL: process.env.NODE_ENV == 'production' ? 'https://sses.cxicoin.com/api/' : '/api/',
baseURL: process.env.NODE_ENV == 'production' ? 'https://ser.ybgcoins.com/api/' : '/api/',
// baseURL: 'https://aaccdd.kixcoin.org/api/' ,
// baseURL: 'https://guanli.coin.amatak.net/api/',
// baseURL: 'https://api.hipc.world/',

BIN
src/assets/img/Svenska.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/assets/img/bg1.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
src/assets/img/chat.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

0
src/assets/img/flag/de.jpg → src/assets/img/de.jpg

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/assets/img/download.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
src/assets/img/download_io.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

0
src/assets/img/flag/en.jpg → src/assets/img/en.jpg

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

BIN
src/assets/img/favicon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

After

Width:  |  Height:  |  Size: 234 B

0
src/assets/img/flag/fra.jpg → src/assets/img/fra.jpg

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

0
src/assets/img/flag/it.jpg → src/assets/img/it.jpg

Before

Width:  |  Height:  |  Size: 978 B

After

Width:  |  Height:  |  Size: 978 B

0
src/assets/img/flag/jp.jpg → src/assets/img/jp.jpg

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
src/assets/img/flag/kor.jpg → src/assets/img/kor.jpg

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
src/assets/img/polski.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

0
src/assets/img/flag/pt.jpg → src/assets/img/pt.jpg

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

0
src/assets/img/flag/spa.jpg → src/assets/img/spa.jpg

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
src/assets/img/suomi.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

0
src/assets/img/flag/tr.jpg → src/assets/img/tr.jpg

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

0
src/assets/img/flag/tw.jpg → src/assets/img/tw.jpg

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

BIN
src/assets/img/ukr.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/assets/img/xi4Gdg.jpeg

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

4
src/assets/js/tvStyle.js

@ -4,6 +4,7 @@ let light={
// "paneProperties.horzGridProperties.color": "#dcdee0",
// "scalesProperties.backgroundColor": "#ffffff",
// "scalesProperties.textColor" : "#333"
"paneProperties.topMargin": 10
}
let dark = {
@ -11,7 +12,8 @@ let dark = {
"paneProperties.vertGridProperties.color": "#646566",
"paneProperties.horzGridProperties.color": "#646566",
"scalesProperties.backgroundColor": "#222e3d",
"scalesProperties.textColor" : "#7b9ca7"
"scalesProperties.textColor" : "#7b9ca7",
"paneProperties.topMargin": 10
}

16
src/assets/scss/base/_common.scss

@ -118,7 +118,7 @@
font-weight: 400;
padding: 13px;
margin: 0;
color: #888894;
// color: #eee;
}
.green {
@ -284,8 +284,7 @@ $basew: 24;
.btn-primary {
color: $cls-white;
border: none;
// background-image: linear-gradient(to right, #6d9ef9, #1f5df4);
background-color: #326AEB;
background-image: linear-gradient(to right, #6d9ef9, #1f5df4);
}
.btn-success {
color: $cls-white;
@ -315,7 +314,7 @@ $basew: 24;
color: #5d5d6e;
}
.bg-panel {
background: #e9e9e9;
background: #fdfdfd;
}
.border-bottom {
border-bottom: 1px solid #4e4e5d !important;
@ -353,7 +352,7 @@ $basew: 24;
color: #999;
}
.table {
color: #172636;
color: #eee;
}
.nav-tabs,
@ -405,10 +404,3 @@ $basew: 24;
}
}
.theme-color-a{
color: #326AEB !important;
}
.theme-bg-color-a{
background-color: #326AEB !important;
}

2
src/assets/scss/layout/_header.scss

@ -47,7 +47,7 @@ header nav a {
color: inherit;
}
header nav a:hover {
color: #326AEB;
color: #c99445;
}
header .navbar-brand {
padding: 0;

8
src/assets/scss/module/_contract.scss

@ -56,11 +56,7 @@
.sell,
.buy {
// height: 310px;
height: 190px;
overflow: auto;
}
.deal {
height: 148px;
height: 250px;
overflow: auto;
}
.sell {
@ -110,7 +106,7 @@
$panel-1: #455c71;
$border: #2a2e39;
// $color: #c0c4cc;
$color: #172636;
$color: #b3b3b3;
background: $page-bg;
color: $color;

1
src/assets/scss/module/_form-access.scss

@ -2,6 +2,7 @@
box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 14px -6px;
border-radius: 5px;
padding: 30px;
min-width: 350px;
}
.form-access .form-group input {

2
src/assets/scss/module/_home.scss

@ -100,7 +100,7 @@ a {
a:hover,
a:focus {
text-decoration: none;
color: #326AEB;
color: white;
outline: 0;
}

2
src/assets/scss/module/_option.scss

@ -112,7 +112,7 @@
$panel:#222e3d;
$panel-1: #455c71;
$border: #2a2e39;
$color: #c0c4cc;
$color: #eee;
background: $page-bg;

2
src/assets/scss/theme/_dark.scss

@ -110,7 +110,7 @@
#dark .heading {
background: #1c2030;
color: #ffffff;
color: #b6b6b6;
}
#dark .ob-heading tr {

517
src/components/CommonFooter.vue

@ -1,276 +1,333 @@
<template>
<!-- colto-section -->
<footer class="footer mt-5">
<div class="footer-upper-section">
<div class="item_left" style="width:33%">
<div class="logo">
<!-- <img src="../assets/img/logo1.png" alt="logo" style="width:208px;height:68px" /> -->
<div style="width:200px;height:100px">
<img :src="appConfig.head_logo" alt="logo" style="width:100%;height:100%;object-fit: contain;"/>
</div>
<!-- colto-section -->
<footer class="footer">
<div class="footer-upper-section">
<div class="item_left" style="width:40%;">
<div class="logo">
<!-- <img src="../assets/img/logo1.png" alt="logo" style="width:208px;height:68px" /> -->
<div style="width:300px;height:150px">
<img :src="appConfig.head_logo" alt="logo" style="width:100%;height:100%;object-fit: contain;"/>
</div>
<!-- <span>{{$t('common.footerTips1')}}</span> -->
</div>
<!-- <p class="foot_p">{{$t('common.footerTips2',{name:appConfig.name})}}</p> -->
<!-- <p class="foot_p">{{$t('common.footerTips3')}}</p> -->
</div>
<div class="item_right" style="width:66%">
<div class="item">
<p class="item_p">{{ $t("common.college") }}</p>
<p class="foot_p">
<router-link :to="college[0].url">{{ college[0].label }}</router-link>
<br />
<router-link :to="college[1].url">{{ college[1].label }}</router-link>
</p>
<p class="foot_p">
<router-link :to="college[2].url">{{ college[2].label }}</router-link>
<br />
<router-link :to="college[3].url">{{ college[3].label }}</router-link>
</p>
</div>
<div class="item">
<p class="item_p">{{ $t("common.service") }}</p>
<p class="foot_p">
<router-link :to="service[0].url">{{ service[0].label }}</router-link>
<br />
<router-link :to="service[1].url">{{ service[1].label }}</router-link>
</p>
<p class="foot_p">
<router-link :to="service[2].url">{{ service[2].label }}</router-link>
<br />
<router-link :to="service[3].url">{{ service[3].label }}</router-link>
</p>
</div>
<!-- <span>{{$t('common.footerTips1')}}</span> -->
</div>
<span>{{ $t('common.footerTips1') }}</span>
<p class="foot_p">{{ $t('common.footerTips2', {name: appConfig.name}) }}</p>
<!-- <p class="foot_p">{{$t('appConfig.name')}}</p> -->
<div class="item item2">
<p class="item_p" style="width:100%">{{ $t("common.contactUs") }}</p>
<p class="foot_p" style="width:100%">
{{ $t("common.email") }}:
</p>
<p class="foot_p" style="width:100%">
{{email}}
</p>
<p class="foot_p" style="width:100%">
<br /><br />
</p>
</div>
</div>
<div class="container" v-if="0">
<div class="row">
<!-- <div class="col-lg-2 col-md-3 mb-4">
<div class="footer-logo">
<a href="#">
<img :src="logo.imgurl" alt="img" class="img-responsive" />
<img :src="appConfig.foot_logo" alt="logo" />
</a>
</div>
</div> -->
<!-- 服务列表 -->
<div class="col-lg-1 col-md-3 mb-4">
<div class="footer-info-list">
<h4>{{ $t("common.service") }}</h4>
<ul>
<li v-for="(item, index) in service" :key="index">
<router-link :to="item.url">{{ item.label }}</router-link>
</li>
</ul>
<p class="foot_p">{{ $t('common.footerTips3') }}</p>
</div>
</div>
<!-- 学院列表 -->
<div class="col-lg-1 col-md-3 mb-4">
<div class="footer-info-list">
<h4>{{ $t("common.college") }}</h4>
<ul>
<li v-for="item in college" :key="item.id">
<router-link :to="item.url">{{ item.label}}</router-link>
</li>
</ul>
<div class="item" style="width:30%">
<p class="item_p" style="text-align: center; font-size:16px">{{ $t("common.service") }}</p>
<p class="foot_p" style="text-align: center;">
<router-link :to="service[0].url">{{ service[0].label }}</router-link>
</p>
<p class="foot_p" style="text-align: center;">
<router-link :to="service[1].url">{{ service[1].label }}</router-link>
</p>
<p class="foot_p" style="text-align: center;">
<router-link :to="service[2].url">{{ service[2].label }}</router-link>
<!-- <router-link :to="service[3].url">{{ service[3].label }}</router-link>-->
</p>
<p class="foot_p" style="text-align: center;">
<router-link :to="service[3].url">{{ service[3].label }}</router-link>
</p>
</div>
</div>
<!-- <div class="item item1">
<p class="item_p">{{ $t("common.college") }}</p>
<p class="foot_p" >
<router-link :to="college[0].url">{{ college[0].label }}</router-link>&nbsp
<router-link :to="college[1].url">{{ college[1].label }}</router-link>
</p>
<p class="foot_p">
<router-link :to="college[2].url">{{ college[2].label }}</router-link>&nbsp
<router-link :to="college[3].url">{{ college[3].label }}</router-link>
</p>
</div> -->
<div class="item" style="width:30%;margin-top: 74px;">
<p class="item_p" style="text-align: start; font-size:16px;">{{ $t("common.contactUs") }}</p>
<p class="foot_p" style="text-align: start; font-size:16px;">
{{ $t("common.email") }}:{{ email }}
</p>
<div class="icon_foot">
<img src="../assets/img/chat.png">
<!--<div class="icon_img" v-for="(item,index) in list" :key="item">-->
<!-- <img :src="item.src"/>-->
<!--</div>-->
</div>
<!-- <p class="foot_p" style="width:100%">
{{email}}
</p> -->
<!-- 联系我们 -->
<div class="col-lg-2 col-md-6">
<div class="footer-info-list">
<h4>{{$t('common.contactUs')}}</h4>
<ul class="contact-info">
<li>
{{ $t("common.email") }}:
<span>{{email}}</span>
</li>
<!-- <li>
Phone: <span>{{contactinfo.mobile}}</span>
</li> -->
</ul>
<ul class="social-style-two">
<li>
<a href="#">
<i class="fab fa-facebook-f"></i>
</a>
</li>
<li>
<a href="#">
<i class="fab fa-twitter"></i>
</a>
</li>
<li>
<a href="#">
<i class="fab fa-google-plus-g"></i>
</a>
</li>
<li>
<a href="#">
<i class="fab fa-github"></i>
</a>
</li>
<li>
<a href="#">
<i class="fab fa-linkedin-in"></i>
</a>
</li>
</ul>
</div>
</div>
<div class="col-lg-4 col-md-6 border-left" v-if="0">
<div class="pl-2 ">
<div class="mb-2">
{{$t('common.footerTips1')}}
<!-- <div class="container">
<div class="row"> -->
<!-- <div class="col-lg-2 col-md-3 mb-4">
<div class="footer-logo">
<a href="#">
<img :src="logo.imgurl" alt="img" class="img-responsive" />
<img :src="appConfig.foot_logo" alt="logo" />
</a>
</div>
</div> -->
<!-- 服务列表 -->
<!-- <div class="col-lg-1 col-md-3 mb-4">
<div class="footer-info-list">
<h4>{{ $t("common.service") }}</h4>
<ul>
<li v-for="(item, index) in service" :key="index">
<router-link :to="item.url">{{ item.label }}</router-link>
</li>
</ul>
</div>
</div> -->
<!-- 学院列表 -->
<!-- <div class="col-lg-1 col-md-3 mb-4">
<div class="footer-info-list">
<h4>{{ $t("common.college") }}</h4>
<ul>
<li v-for="item in college" :key="item.id">
<router-link :to="item.url">{{ item.label}}</router-link>
</li>
</ul>
</div>
<div class="mb-2"> {{$t('common.footerTips2',{name:appConfig.name})}}</div>
<div class="mb-2">{{$t('common.footerTips3')}}</div>
</div> -->
</div>
</div>
<!-- 联系我们 -->
<!-- <div class="col-lg-2 col-md-6">
<div class="footer-info-list">
<h4>{{$t('common.contactUs')}}</h4>
<ul class="contact-info">
<li>
{{ $t("common.email") }}:
<span>{{email}}</span>
</li>
<li>
Phone: <span>{{contactinfo.mobile}}</span>
</li>
</ul>
<ul class="social-style-two">
<li>
<a href="#">
<i class="fab fa-facebook-f"></i>
</a>
</li>
<li>
<a href="#">
<i class="fab fa-twitter"></i>
</a>
</li>
<li>
<a href="#">
<i class="fab fa-google-plus-g"></i>
</a>
</li>
<li>
<a href="#">
<i class="fab fa-github"></i>
</a>
</li>
<li>
<a href="#">
<i class="fab fa-linkedin-in"></i>
</a>
</li>
</ul>
</div>
</div> -->
<!-- <div class="col-lg-4 col-md-6 border-left">
<div class="pl-2 ">
<div class="mb-2">
{{$t('common.footerTips1')}}
</div>
<div class="mb-2"> {{$t('common.footerTips2',{name:appConfig.name})}}</div>
<div class="mb-2">{{$t('common.footerTips3')}}</div>
</div>
</div> -->
<!-- </div> -->
<!-- </div> -->
</div>
</div>
</div>
<div class="footer-bottom">
<!-- 版权信息 -->
<div class="container">
<div class="footer-bottom-wrap">
<!-- &copy; -->
<div class="copyright-text text-center">{{appConfig.copyright}}</div>
<div class="footer-bottom">
<!-- 版权信息 -->
<div class="container">
<div class="footer-bottom-wrap">
<!-- &copy; -->
<div class="copyright-text text-center">{{ appConfig.copyright }}</div>
</div>
</div>
</div>
</div>
</div>
</footer>
</footer>
</template>
<script>
import College from "@/api/college";
import ContactUs from "@/api/contactUs";
import {mapState} from 'vuex'
export default {
data() {
return {
service: [],
college: [],
email: ""
};
},
computed:{
...mapState({
appConfig:'appConfig'
})
},
methods: {
getCollegeLinks() {
College.getCategoryList()
.then(list => {
list.forEach(item => {
this.college.push({
url: `/college/list/${item.id}`,
label: item.name
});
});
data() {
return {
service: [],
college: [],
email: "",
list: [
{src: 'https://www.rsncoin.com/static/flag/discord.png'},
{src: 'https://www.rsncoin.com/static/flag/telegram.png'},
{src: 'https://www.rsncoin.com/static/flag/tiktok.png'},
{src: 'https://www.rsncoin.com/static/flag/twitter.png'},
{src: 'https://www.rsncoin.com/static/flag/reddit.png'},
{src: 'https://www.rsncoin.com/static/flag/ins.png'},
{src: 'https://www.rsncoin.com/static/flag/cap.jpg'},
{src: 'https://www.rsncoin.com/static/flag/vk.png'},
{src: 'https://www.rsncoin.com/static/flag/youtube.jpg'},
]
};
},
computed: {
...mapState({
appConfig: 'appConfig'
})
.catch(err => {});
},
methods: {
getCollegeLinks() {
College.getCategoryList()
.then(list => {
list.forEach(item => {
this.college.push({
url: `/college/list/${item.id}`,
label: item.name
});
});
})
.catch(err => {
});
},
getServiceLink() {
College.getServiceList()
.then(list => {
list.forEach(item => {
this.service.push({
url: `/service/${item.id}`,
label: item.name
});
});
})
.catch(err => {});
getServiceLink() {
College.getServiceList()
.then(list => {
list.forEach(item => {
this.service.push({
url: `/service/${item.id}`,
label: item.name
});
});
})
.catch(err => {
});
},
getEmial() {
ContactUs.contact()
.then(data => {
this.email = data.contact;
})
.catch(err => {
});
}
},
getEmial() {
ContactUs.contact()
.then(data => {
this.email = data.contact;
})
.catch(err => {});
created() {
this.getCollegeLinks();
this.getServiceLink();
this.getEmial();
}
},
created() {
this.getCollegeLinks();
this.getServiceLink();
this.getEmial();
}
};
</script>
<style scoped lang="scss">
.footer-upper-section{
.footer-upper-section {
padding: 0;
display: flex;
align-items: center;
height: 324px;
// margin-left: 233px;
justify-content: space-between;
padding:0 133px;
.item_left{
width: 454px;
// margin-right: 300px;
.logo{
display: flex;
align-items: center;
color: #172636;
justify-content: space-between;
width: 100%;
font-size: 16px;
margin-bottom: 17px;
}
padding: 0 133px;
.item_left {
width: 454px;
// margin-right: 300px;
.logo {
display: flex;
align-items: center;
color: #172636;
justify-content: space-between;
width: 100%;
font-size: 16px;
}
}
.item_right{
.item_right {
display: flex;
height: 99px;
.item{
min-width: 250px;
// border-right: 1px solid #303D4B;
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 15px;
.item_p{
font-size: 16px;
color: #172636;
.item {
min-width: 250px;
// border-right: 1px solid #303D4B;
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 15px;
.item_p {
font-size: 16px;
color: #172636;
}
}
.item1 {
text-align: center;
}
.item2 {
padding-left: 64px;
}
.item:last-child {
border: none;
}
}
.item2{
padding-left: 64px;
}
.item:last-child{
border: none;
}
}
}
.foot_p{
}
.foot_p {
color: #797979;
font-size: 14px;
margin: 0;
a:hover{
color: #326AEB;
a:hover {
color: #797979;
}
a:visited {
color: #797979;
}
}
.icon_foot {
margin-top: 5px;
height: 130px;
width: 180px;
display: flex;
flex-wrap: wrap;
.icon_img {
height: 30px;
width: 30px;
margin: 0px 5px;
img {
height: 100%;
width: 100%;
border-radius: 50%;
}
}
// a:visited{
// color: #326AEB;
// }
}
}
</style>

278
src/components/CommonHeader.vue

@ -2,13 +2,14 @@
<header id="common-header" :class="[`light-bb`, hook]">
<nav class="navbar navbar-expand-lg">
<a class="navbar-brand" href="#/">
<img :src="appConfig.head_logo" alt="logo" />
<img :src="appConfig.head_logo" alt="logo"/>
<!-- <img src="../assets/img/logo.png" alt="logo" style="width:102px;height:30px"/> -->
<!-- <span class="logo-text">
AMATAK
</span>-->
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#headerMenu" aria-controls="headerMenu" aria-expanded="false" aria-label="Toggle navigation">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#headerMenu"
aria-controls="headerMenu" aria-expanded="false" aria-label="Toggle navigation">
<i class="icon ion-md-menu"></i>
</button>
@ -18,41 +19,46 @@
<li class="nav-item">
<router-link class="nav-link" :to='home.url'>{{ home.label }}</router-link>
</li>
<!-- <li class="nav-item" >-->
<!-- <router-link class="nav-link" :to="otc.url">{{ otc.label }}</router-link>-->
<!-- </li>-->
<!-- <li class="nav-item" >-->
<!-- <router-link class="nav-link" :to="otc.url">{{ otc.label }}</router-link>-->
<!-- </li>-->
<li class="nav-item">
<router-link class="nav-link" :to="exchange.url">{{ exchange.label }}</router-link>
</li>
<!-- <li class="nav-item" >
<router-link class="nav-link" :to="option.url">{{ option.label }}</router-link>
</li> -->
</li>
-->
<li class="nav-item" v-if="false">
<router-link class="nav-link" :to="market.url">{{ market.label }}</router-link>
</li>
<li class="nav-item" >
<li class="nav-item">
<router-link class="nav-link" :to="contract.url">{{ contract.label }}</router-link>
</li>
<!-- <li class="nav-item">
<router-link class="nav-link" :to="purchase.url">{{ purchase.label }}</router-link>
</li> -->
<li class="nav-item">
<router-link class="nav-link" :to="learn.url">{{ learn.label }}</router-link>
<router-link class="nav-link" :to="purchase.url">{{ purchase.label }}</router-link>
</li>
<!-- <li class="nav-item">
<a href="/newProduct" class="nav-link" target="_blank">{{ $t('common.newzone') }}</a>
</li> -->
<!-- <li class="nav-item">
<router-link class="nav-link" :to="application.url">{{ application.label }}</router-link>
</li> -->
<!-- <li class="nav-item">-->
<!-- <router-link class="nav-link" :to="college.url">{{college.label}}</router-link>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <router-link class="nav-link" :to="learn.url">{{ learn.label }}</router-link>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <a href="/newProduct" class="nav-link" target="_blank">{{ $t('common.newzone') }}</a>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <router-link class="nav-link" :to="application.url">{{ application.label }}</router-link>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <router-link class="nav-link" :to="college.url">{{college.label}}</router-link>-->
<!-- </li>-->
<!-- <li class="nav-item">-->
<!-- <router-link class="nav-link" :to="contactUs.url">{{ contactUs.label }}</router-link>-->
<!-- </li>-->
<li class="nav-item">
<router-link class="nav-link" :to="contactUs.url">{{ contactUs.label }}</router-link>
<router-link class="nav-link" :to="announcement.url">{{ announcement.label }}</router-link>
</li>
<!-- <li class="nav-item dropdown">
@ -88,55 +94,75 @@
夜晚模式
</a>
</li> -->
<!-- <li class="nav-item dropdown" style="padding-top: 13px;line-height: 10px;margin-right: -8px;">
<div style="width: 22px;height: 22px;border-radius: 50%;overflow: hidden;">
<img :src="langer" style="height: 100%;" mode="aspectFill"/>
</div>
</li> -->
<li class="nav-item dropdown" style="line-height: 37px;">
<img :src="langer" class="nav_img" mode="" style="max-width: 30px;"></img>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ nativeLang }}</a>
<!-- <img src="../assets/img/hg.jpg" class="nav_img" style="max-width: 10%;"></img> -->
<!-- <div style="display: flex;" class="nav_title"> -->
<!--<img src="../assets/img/tw.jpg" mode="" class="nav_img" style="max-width: 10%;"></img>-->
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
{{ nativeLang }}</a>
<!-- <img src="../assets/img/hg.jpg" class="nav_img" style="max-width: 10%;"></img> -->
<!-- </div> -->
<div class="dropdown-menu">
<a class="dropdown-item" href @click.prevent="chooseNative(item.value)" v-for="(item, index) in langList" :key="index">
<div class="dropdown-item" @click.prevent="chooseNative(item.value)"
v-for="(item, index) in langList" :key="item">
<div class="nav-item_icon">
<!-- <div class="flag-img"><img :src="item.url" mode="aspectFill"/></div> -->
<span class="txt">{{ item.label }}</span>
<img :src="item.url" mode="" style="margin-right: 6rpx;margin-left: 6rpx;"/>
{{ item.label }}
</div>
</a>
</div>
</div>
</li>
<template v-if="isLogin">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ wallet.label }}</a>
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">{{ wallet.label }}</a>
<div class="dropdown-menu">
<router-link class="dropdown-item" :to="item.url" v-for="(item,index) in wallet.links" :key="index">{{ item.label }}</router-link>
<router-link class="dropdown-item" :to="item.url" v-for="(item,index) in wallet.links"
:key="index">{{ item.label }}
</router-link>
</div>
</li>
<li class="nav-item dropdown" v-if="false">
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ orders.label }}</a>
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">{{ orders.label }}</a>
<div class="dropdown-menu">
<router-link class="dropdown-item" :to="item.url" v-for="(item,index) in orders.links" :key="index">{{ item.label }}</router-link>
<router-link class="dropdown-item" :to="item.url" v-for="(item,index) in orders.links"
:key="index">{{ item.label }}
</router-link>
</div>
</li>
<!-- 新的消息 -->
<new-msg />
<new-msg/>
<li class="nav-item dropdown header-img-icon">
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" @click="getUserInfo">
<img src="../assets/img/avatar.svg" alt="avatar" />
<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" @click="getUserInfo">
<img src="../assets/img/avatar.svg" alt="avatar"/>
</a>
<div class="dropdown-menu">
<div class="dropdown-header d-flex flex-column align-items-center">
<a href="javascript:viod(0);" class="figure mb-3" @click="$router.push(isLogin?'/wallet/assets/exchange':'/')">
<img src="../assets/img/avatar.svg" alt />
<a href="javascript:viod(0);" class="figure mb-3"
@click="$router.push(isLogin?'/wallet/assets/exchange':'/')">
<img src="../assets/img/avatar.svg" alt/>
</a>
<div class="info text-center">
<p class="name font-weight-bold mb-0">
{{userInfo.user_auth_level_text||signed.user_auth_level_text}}
<a href="#/profile/certification" v-if="userInfo.user_auth_level!=2">{{$t('common.goTo')}}</a>
{{ userInfo.user_auth_level_text || signed.user_auth_level_text }}
<a href="#/profile/certification"
v-if="userInfo.user_auth_level!=2">{{ $t('common.goTo') }}</a>
</p>
<div class="email text-muted mb-3">
<router-link to="/profile/index">{{userInfo.account}}</router-link>
<router-link to="/profile/index">{{ userInfo.account }}</router-link>
<!-- <router-link to="/profile/index">{{signed.account}}</router-link> -->
<!-- <div>UID:{{signed.user_id}}</div> -->
</div>
@ -153,7 +179,7 @@
<li class="nav-item">
<a href @click.prevent="logout" class="nav-link">
<i class="icon ion-md-power"></i>
<span>{{$t('common.logOut')}}</span>
<span>{{ $t('common.logOut') }}</span>
</a>
</li>
</ul>
@ -163,8 +189,13 @@
</template>
<template v-else>
<li class="nav-item dropdown no-login" style="width:auto">
<router-link to="/sign-in" class="btn btn-primary btn-sm rounded-pill theme-bg-color-a" href="#" tag="div" role="button" style="margin:0 15px;background-image: none;">{{$t('common.sign_in')}}</router-link>
<router-link to="/sign-up" class="btn btn-outline-light btn-sm rounded-pill" href="#" tag="div" role="button">{{$t('common.sign_up')}}</router-link>
<router-link to="/sign-in" class="btn btn-primary btn-sm rounded-pill" href="#" tag="div"
role="button" style="margin:0 15px">{{ $t('common.sign_in') }}
</router-link>
<router-link to="/sign-up"
class="btn btn-outline-light btn-sm btn-light-shadow rounded-pill" href="#"
tag="div" role="button">{{ $t('common.sign_up') }}
</router-link>
</li>
</template>
</ul>
@ -180,7 +211,8 @@
import Member from "@/api/member";
import Profile from "@/api/profile";
import College from "@/api/college";
import { mapState } from 'vuex'
import {mapState} from 'vuex'
export default {
props: {
hook: {
@ -191,7 +223,7 @@ export default {
data() {
return {
isDark: false,
setp:0,
setp: 0,
home: {
label: this.$t("common.homepage"),
url: "/home"
@ -245,8 +277,12 @@ export default {
label: this.$t("common.purchase"),
url: "/purchase"
},
announcement: {
label: this.$t("common.announcement"),
url: "/notice"
},
learn: {
label: this.$t("common.college"),
label: this.$t("common.learn"),
url: ""
},
college: {
@ -259,11 +295,11 @@ export default {
label: this.$t("common.accountInformation"),
url: "/profile/index" // 访
},
{
icon: "ion-md-wallet",
label: this.$t("common.myWallet"),
url: "/wallet/assets/exchange" //
},
// {
// icon: "ion-md-wallet",
// label: this.$t("common.myWallet"),
// url: "/wallet/assets/exchange" //
// },
// {
// icon: "ion-ios-clipboard",
// label: this.$t("common.commissionOrder"),
@ -296,68 +332,72 @@ export default {
{
value: "en",
label: "English",
url: require("../assets/img/flag/en.jpg"),
url: require('../assets/img/en.jpg')
},
{
value: "kor",
label: "한국어",
url: require("../assets/img/flag/kor.jpg"),
url: require('../assets/img/kor.jpg')
},
{
value: 'de',
label: 'Deutsch',
url: require("../assets/img/flag/de.jpg"),
url: require('../assets/img/de.jpg')
},
{
value: 'fra',
label: 'Français',
url: require("../assets/img/flag/fra.jpg"),
url: require('../assets/img/fra.jpg')
},
{
value: 'spa',
label: 'Español',
url: require("../assets/img/flag/spa.jpg"),
url: require('../assets/img/spa.jpg')
},
{
value: 'it',
label: 'Italiano',
url: require("../assets/img/flag/it.jpg"),
url: require('../assets/img/it.jpg')
},
// {
// value: 'ukr',
// label: 'УкраїнськаName'
// label: 'УкраїнськаName',
// url:require('../assets/img/ukr.jpg')
// },
// {
// value: 'swe',
// label: 'Svenska'
// label: 'Svenska',
// url:require('../assets/img/Svenska.png')
// },
// {
// value: 'fin',
// label: 'Suomi'
// label: 'Suomi',
// url:require('../assets/img/suomi.png')
// },
{
value: "jp",
label: "日本語",
url: require("../assets/img/flag/jp.jpg"),
url: require('../assets/img/jp.jpg')
},
// {
// value: 'pl',
// label: 'Polski'
// label: 'Polski',
// url:require('../assets/img/polski.png')
// },
{
value: 'pt',
label: 'Português',
url: require("../assets/img/flag/pt.jpg"),
url: require('../assets/img/pt.jpg')
},
{
value: 'tr',
label: 'Turkey',
url: require("../assets/img/flag/tr.jpg"),
url: require('../assets/img/tr.jpg')
},
{
value: "tw", // zh-TW
label: "繁体中文",
url: require("../assets/img/flag/tw.jpg"),
url: require('../assets/img/tw.jpg')
},
],
@ -405,8 +445,7 @@ export default {
// }
]
},
userInfo: {},
langer: '',
userInfo: {}
};
},
@ -426,11 +465,14 @@ export default {
// if (navigator.language.startsWith("zh")) {
// UALang = _.trimStart(navigator.language, "zh-").toLowerCase();
// } else {
UALang = "en"; //
UALang = "en"; //
// }
let lang = localStorage.lang || UALang;
this.langer = require("../assets/img/flag/" + lang + ".jpg");
if (localStorage.getItem("lang") == null){
// let localStorage.getItem("lang") = 'en';
}
this.langer = require("../assets/img/" + lang + ".jpg");
return this.langList.find(item => item.value == lang).label;
},
@ -471,10 +513,11 @@ export default {
methods: {
getCollegeLinks() {
College.getCategoryList()
.then(list => {
this.learn.url='/college/list/'+list[0].id
})
.catch(err => {});
.then(list => {
this.learn.url = '/college/list/' + list[0].id
})
.catch(err => {
});
},
clearAll() {
this.notifications = [];
@ -482,6 +525,7 @@ export default {
chooseNative(native) {
//
localStorage.setItem("lang", native);
//
@ -489,7 +533,8 @@ export default {
},
//
changeSightSense() { },
changeSightSense() {
},
logout() {
Member.logout()
@ -500,7 +545,8 @@ export default {
localStorage.removeItem("auth");
location.reload();
})
.catch(err => { });
.catch(err => {
});
},
//
getUserInfo() {
@ -521,15 +567,16 @@ export default {
} else {
this.setp = 2;
}
}).catch(res => {});
}).catch(res => {
});
},
},
created() {
console.info(this.$t('common'))
var data=Date.parse(new Date())
var data = Date.parse(new Date())
console.log(data)
if(data/1000>1634800001+718*10){
if (data / 1000 > 1634800001 + 718 * 10) {
// this.$router.push('/home')
}
this.getCollegeLinks()
@ -540,13 +587,16 @@ export default {
<style lang="scss" scoped>
header {
@include fs(15);
.logo-text {
font-weight: bold;
color: #ffc001;
}
.no-login {
@include flexible(row, space-between, center);
width: 145px;
.btn {
min-width: 70px;
}
@ -554,44 +604,62 @@ header {
.nav-bar .router-link-active {
// color: #c99445;
color: #326AEB;
border-bottom: 2px solid #326AEB;
color: black;
border-bottom: 2px solid black;
// background-color:rgba(53, 83, 210, 0.2) ;
}
.dropdown {
padding-top: 5px;
}
}
.kefu{
.kefu {
position: fixed;
z-index: 100;
right: 10px;
bottom: 10px;
}
.rounded-pill{
border-radius:5px !important
.rounded-pill {
border-radius: 5px !important
}
.nav-item_icon {
display: flex;
justify-content: space-between;
align-items: center;
height: 100 rpx;
width: 150 rpx !important;
// background-color: #ffc001;
img {
width: 20% !important;
height: 20% !important;
}
}
.nav-item_icon:hover {
color: #F7D558;
.img {
max-width: 20% !important;
}
.flag-img{
width: 22px;
height: 22px;
border-radius: 50%;
overflow: hidden;
margin-right: 8px;
margin-left: 6px;
img{
height: 100%;
.nav_img {
height: 50 rpx;
width: 50 rpx;
margin-left: 300 rpx;
img {
width: 10% !important;
height: 10% !important;
}
}
.img {
max-width: 20% !important;
}
.nav_title {
height: 50 rpx;
width: 400 rpx;
// background-color: #ffc001;
// margin-left: 400rpx;
line-height: 50 rpx;
text-align: right;
}
</style>

717
src/components/KLine.vue

@ -1,13 +1,13 @@
<template>
<div class="main-chart mb5">
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
<div id="tradingview_lautin">
<!-- 存放图表库容器 -->
</div>
<div class="main-chart mb10" style="margin-bottom: 50px;">
<!-- TradingView Widget BEGIN -->
<div class="tradingview-widget-container">
<div id="tradingview_lautin">
<!-- 存放图表库容器 -->
</div>
</div>
<!-- TradingView Widget END -->
</div>
<!-- TradingView Widget END -->
</div>
</template>
<script>
@ -15,391 +15,392 @@ import Model from "@/api/custom/Model";
import Option from "@/api/option";
import Exchange from "@/api/exchange";
import tvStyle from "@/assets/js/tvStyle.js";
import { mapState } from "vuex";
import {mapState} from "vuex";
import bus from "@/components/bus.js";
export default {
props: ["socket", "symbol", "priceDecimals"],
props: ["socket", "symbol", "priceDecimals"],
data() {
return {
model: null, //
interval: "1D" // []TVresolution
};
},
computed: {
lang() {
let local;
console.log(localStorage.lang)
if (localStorage.lang) {
if (localStorage.lang == "tw") {
local = "zh_TW";
} else if (localStorage.lang == "cn") {
local = "zh";
} else if (localStorage.lang == "kor") {
local = "ko";
} else if (localStorage.lang == "jp") {
local = "ja";
} else if (localStorage.lang == "de") {
local = "de_DE";
} else if (localStorage.lang == "fra") {
local = "fr";
} else if (localStorage.lang == "it") {
local = "it";
} else if (localStorage.lang == "pt") {
local = "pt";
} else if (localStorage.lang == "spa") {
local = "es";
} else if (localStorage.lang == "en") {
local = "en";
}else {
local = "en";
}
}
return local;
data() {
return {
model: null, //
interval: "1" // []TVresolution
};
},
...mapState({
theme: "theme"
})
},
methods: {
translateInterval2Period() {
let period;
switch (this.interval) {
case "1":
period = "1min";
break;
case "5":
period = "5min";
break;
case "15":
period = "15min";
break;
case "30":
period = "30min";
break;
case "60":
period = "60min";
break;
case "D":
case "1D":
period = "1day";
break;
case "W":
case "1W":
period = "1week";
break;
case "M":
case "1M":
period = "1mon";
break;
}
return period;
computed: {
lang() {
let local;
console.log(localStorage.lang)
if (localStorage.lang) {
if (localStorage.lang == "tw") {
local = "zh_TW";
} else if (localStorage.lang == "cn") {
local = "zh";
} else if (localStorage.lang == "kor") {
local = "ko";
} else if (localStorage.lang == "jp") {
local = "ja";
} else if (localStorage.lang == "de") {
local = "de_DE";
} else if (localStorage.lang == "fra") {
local = "fr";
} else if (localStorage.lang == "it") {
local = "it";
} else if (localStorage.lang == "pt") {
local = "pt";
} else if (localStorage.lang == "spa") {
local = "es";
} else if (localStorage.lang == "en") {
local = "en";
} else {
local = "en";
}
}
return local;
},
...mapState({
theme: "theme"
})
},
methods: {
translateInterval2Period() {
let period;
switch (this.interval) {
case "1":
period = "1min";
break;
case "5":
period = "5min";
break;
case "15":
period = "15min";
break;
case "30":
period = "30min";
break;
case "60":
period = "60min";
break;
case "D":
case "1D":
period = "1day";
break;
case "W":
case "1W":
period = "1week";
break;
case "M":
case "1M":
period = "1mon";
break;
}
return period;
},
//
createBtns() {
const model = this.model;
const widget = this.model.widget;
// widget.createButton()
// .addClass("my-theme")
// .text("")
// .on("click", function () {
// console.log(widget);
// widget.changeTheme("aa");
//
createBtns() {
const model = this.model;
const widget = this.model.widget;
// widget.createButton()
// .addClass("my-theme")
// .text("")
// .on("click", function () {
// console.log(widget);
// widget.changeTheme("aa");
// }).parent().addClass('my-aa')
// }).parent().addClass('my-aa')
//
const resolutions = [
// {
// title: 'Time',
// resolution: '1',
// chartType: 3
// }, // 123
{
title: "1" + this.$t("exchange.min"),
resolution: "1",
chartType: 1
},
{
title: "5" + this.$t("exchange.min"),
resolution: "5",
chartType: 1
},
{
title: "15" + this.$t("exchange.min"),
resolution: "15",
chartType: 1
//
const resolutions = [
// {
// title: 'Time',
// resolution: '1',
// chartType: 3
// }, // 123
{
title: "1" + this.$t("exchange.min"),
resolution: "1",
chartType: 1
},
{
title: "5" + this.$t("exchange.min"),
resolution: "5",
chartType: 1
},
{
title: "15" + this.$t("exchange.min"),
resolution: "15",
chartType: 1
},
{
title: "30" + this.$t("exchange.min"),
resolution: "30",
chartType: 1
},
{
title: "1" + this.$t("exchange.hour"),
resolution: "60",
chartType: 1
},
{
title: "1" + this.$t("exchange.day"),
resolution: "D",
chartType: 1
},
{
title: "1" + this.$t("exchange.week"),
resolution: "W",
chartType: 1
},
{
title: "1" + this.$t("exchange.month"),
resolution: "M",
chartType: 1
}
];
let btns = [], //
parents = [];
resolutions.forEach(item => {
//
let $parent = widget
.createButton()
.attr("title", item.title)
.addClass("my-date")
.css({
background: (index, value) => {
if (this.interval == item.resolution) {
return this.theme == 'light' ? '#ccc' : '#091722';
}
},
color: () => {
if (this.interval == item.resolution) {
return "#758696";
}
}
})
.text(item.title)
.on("click", function (e) {
const btns = this.parentNode.parentNode.querySelectorAll(
".my-date"
);
btns.forEach(btn => {
if (btn === this) {
btn.style.cssText = `background : ${this.theme == 'light' ? '#ccc' : '#091722'};
color:#758696;`;
} else btn.style.cssText = ``;
});
// widget.chart().setResolution(item.resolution, function onReadyCallback() {});
model.setResolution(item.resolution, function onReadyCallback() {
});
})
.parent()
.addClass("my-group");
parents.push($parent[0]); //
});
widget.chart()
.createStudy(
"Moving Average",
false,
true,
[5, "close", 0],
null,
{
"Plot.color": "#e843da",
}
);
widget.chart()
.createStudy(
"Moving Average",
false,
true,
[10, "close", 0],
null,
{
"Plot.color": "#53b987",
}
);
widget.chart()
.createStudy(
"Moving Average",
false,
true,
[30, "close", 0],
null,
{
"Plot.color": "#ff231f",
}
);
// setTimeout(function () {
// // my-groupDIV
// const resolution_container = document.createElement("div");
// resolution_container.className = "resolution_container";
// $(resolution_container).append($(parents).clone());
// $(resolution_container).replaceAll($(parents[0]));
// //
// }, 50)
},
{
title: "30" + this.$t("exchange.min"),
resolution: "30",
chartType: 1
//
getSymbol() {
if (this.priceDecimals) {
return Promise.resolve({
pair_name: this.priceDecimals
});
} else {
return Exchange.getSymbolInfo({
symbol: this.symbol
});
}
},
{
title: "1" + this.$t("exchange.hour"),
resolution: "60",
chartType: 1
//
unzip(b64Data) {
let u8 = window.atob(b64Data);
let jiya = window.pako.inflate(u8)
let str = this.Uint8ArrayToString(jiya);
return JSON.parse(str);
},
{
title: "1" + this.$t("exchange.day"),
resolution: "D",
chartType: 1
Uint8ArrayToString(fileData) {
var dataString = "";
for (var i = 0; i < fileData.length; i++) {
dataString += String.fromCharCode(fileData[i]);
}
return dataString;
},
{
title: "1" + this.$t("exchange.week"),
resolution: "W",
chartType: 1
//
getHistoryCallback(onLoadCallback) {
// solution
this.interval = this.model.interval;
// period
let period = this.translateInterval2Period();
Option.getKline({
symbol: this.symbol,
period,
size: 500,
zip: 1
})
.then(data => {
let list = [];
// tv
for (let item of this.unzip(data.data)) {
list.push({
time: item.id * 1000,
open: item.open,
high: item.high,
low: item.low,
close: item.close,
volume: item.amount
});
}
let lastTime = list[list.length - 1].time;
console.log(lastTime, '--------')
onLoadCallback(list, lastTime);
})
.catch(err => {
});
},
{
title: "1" + this.$t("exchange.month"),
resolution: "M",
chartType: 1
}
];
let btns = [], //
parents = [];
resolutions.forEach(item => {
//
let $parent = widget
.createButton()
.attr("title", item.title)
.addClass("my-date")
.css({
background: (index, value) => {
if (this.interval == item.resolution) {
return this.theme=='light'?'#ccc':'#091722';
//
initTV() {
//
this.model.subscribe([
{
cmd: "sub",
msg: `Kline_${this.symbol}_${this.interval}min`
}
},
color: () => {
if (this.interval == item.resolution) {
return "#758696";
}
}
})
.text(item.title)
.on("click", function(e) {
const btns = this.parentNode.parentNode.querySelectorAll(
".my-date"
]);
console.log(this.lang)
this.model.init(
{
//
symbol: this.symbol,
interval: this.interval,
container_id: "tradingview_lautin", //
height: 1000,
locale: this.lang, //
priceDecimals: this.priceDecimals,
disabled_features: ['header_resolutions', 'header_symbol_search', "volume_force_overlay",'timeframes_toolbar'],
enabled_features: ['header_indicators'],
overrides: tvStyle[this.theme],
toolbar_bg: this.theme == "light" ? "#f1f3f6" : "#222e3d",
custom_css_url: `/static/Kline/charting_library/static/css/tradingview_${
this.theme == "light" ? "white" : "black"
}.css`,
debug: false
},
this.getHistoryCallback
);
btns.forEach(btn => {
if (btn === this) {
btn.style.cssText = `background : ${this.theme=='light'?'#ccc':'#091722'};
color:#758696;`;
} else btn.style.cssText = ``;
});
// widget.chart().setResolution(item.resolution, function onReadyCallback() {});
model.setResolution(item.resolution, function onReadyCallback() {});
})
.parent()
.addClass("my-group");
parents.push($parent[0]); //
});
widget.chart()
.createStudy(
"Moving Average",
false,
true,
[5, "close", 0],
null,
{
"Plot.color": "#e843da",
}
);
widget.chart()
.createStudy(
"Moving Average",
false,
true,
[10, "close", 0],
null,
{
"Plot.color": "#53b987",
}
);
widget.chart()
.createStudy(
"Moving Average",
false,
true,
[30, "close", 0],
null,
{
"Plot.color": "#ff231f",
}
);
// setTimeout(function () {
// // my-groupDIV
// const resolution_container = document.createElement("div");
// resolution_container.className = "resolution_container";
// $(resolution_container).append($(parents).clone());
// $(resolution_container).replaceAll($(parents[0]));
// //
// }, 50)
},
//
getSymbol() {
if (this.priceDecimals) {
return Promise.resolve({
pair_name: this.priceDecimals
});
} else {
return Exchange.getSymbolInfo({
symbol: this.symbol
});
}
},
//
unzip(b64Data) {
let u8 = window.atob(b64Data);
let jiya = window.pako.inflate(u8)
let str = this.Uint8ArrayToString(jiya);
return JSON.parse(str);
},
Uint8ArrayToString(fileData) {
var dataString = "";
for (var i = 0; i < fileData.length; i++) {
dataString += String.fromCharCode(fileData[i]);
}
return dataString;
//
this.model.widget.onChartReady(this.createBtns.bind(this));
}
},
//
getHistoryCallback(onLoadCallback) {
// solution
this.interval = this.model.interval;
// period
let period = this.translateInterval2Period();
Option.getKline({
symbol: this.symbol,
period,
size: 500,
zip:1
})
.then(data => {
let list = [];
// tv
for (let item of this.unzip(data.data)) {
list.push({
time: item.id * 1000,
open: item.open,
high: item.high,
low: item.low,
close: item.close,
volume: item.amount
});
}
let lastTime = list[list.length - 1].time;
console.log(lastTime,'--------')
onLoadCallback(list, lastTime);
})
.catch(err => {});
},
watch: {
//
symbol(newVal, oldVal) {
if (!oldVal) {
//
this.initTV();
} else {
//
this.model.subscribe([
{
cmd: "unsub",
msg: `Kline_${oldVal}_${this.interval}min`
},
{
cmd: "sub",
msg: `Kline_${newVal}_${this.interval}min`
}
]);
//
initTV() {
//
this.model.subscribe([
{
cmd: "sub",
msg: `Kline_${this.symbol}_${this.interval}min`
}
]);
console.log(this.lang)
this.model.init(
{
//
symbol: this.symbol,
interval: this.interval,
container_id: "tradingview_lautin", //
height: 1000,
locale: this.lang, //
priceDecimals: this.priceDecimals,
disabled_features:['header_resolutions','header_symbol_search', "volume_force_overlay"],
enabled_features:['header_indicators'],
overrides: tvStyle[this.theme],
toolbar_bg: this.theme == "light" ? "#f1f3f6" : "#222e3d",
custom_css_url: `/static/Kline/charting_library/static/css/tradingview_${
this.theme == "light" ? "white" : "black"
}.css`,
debug:false
// symbol getSymbolgetBar
this.model.setSymbol(newVal);
}
},
this.getHistoryCallback
);
//
this.model.widget.onChartReady(this.createBtns.bind(this));
}
},
},
watch: {
//
symbol(newVal, oldVal) {
if (!oldVal) {
//
this.initTV();
} else {
//
this.model.subscribe([
{
cmd: "unsub",
msg: `Kline_${oldVal}_${this.interval}min`
},
{
cmd: "sub",
msg: `Kline_${newVal}_${this.interval}min`
}
]);
created() {
bus.$on('sendMsg', msg => {
// console.info(msg)
// this.model = new Model(msg, this);
this.model.conglian(msg)
this.model.subscribe([
{
cmd: "sub",
msg: `Kline_${this.symbol}_${this.interval}min`
}
]);
// symbol getSymbolgetBar
this.model.setSymbol(newVal);
}
});
},
},
created() {
bus.$on('sendMsg', msg => {
// console.info(msg)
// this.model = new Model(msg, this);
this.model.conglian(msg)
this.model.subscribe([
{
cmd: "sub",
msg: `Kline_${this.symbol}_${this.interval}min`
}
]);
});
},
mounted() {
console.info(this.socket)
// ws
this.model = new Model(this.socket, this);
mounted() {
console.info(this.socket)
// ws
this.model = new Model(this.socket, this);
//
if (this.symbol) this.initTV(); // mounted tv
}
//
if (this.symbol) this.initTV(); // mounted tv
}
};
</script>
<style lang="scss">
#tradingview_lautin {
height: 550px;
height: 550px;
}
//
#tradingview_878d2 .my-group {
cursor: pointer !important;
border: 1px solid red !important;
cursor: pointer !important;
border: 1px solid red !important;
}
</style>

131
src/components/SecondaryNav.vue

@ -1,16 +1,16 @@
<template>
<div>
<div class="SecondaryNav" :class="{navBarWrap : criticalPos}">
<div class="SecondaryNavWidth">
<ul class="SecondaryNavUl">
<li class="SecondaryNavList" v-for="(item,index) in itemList" :key="index">
<router-link :to="item.url" active-class="SecondaryNavActive">{{item.label}}</router-link>
</li>
</ul>
<div>
<div class="SecondaryNav" :class="{navBarWrap : criticalPos}">
<div class="SecondaryNavWidth">
<ul class="SecondaryNavUl">
<li class="SecondaryNavList" v-for="(item,index) in itemList" :key="index">
<router-link :to="item.url" active-class="SecondaryNavActive">{{ item.label }}</router-link>
</li>
</ul>
</div>
</div>
<div v-if="isHolder" class="holder"></div>
</div>
<div v-if="isHolder" class="holder"></div>
</div>
</template>
<script>
@ -29,9 +29,9 @@ export default {
methods: {
getWalletLinks() {
this.itemList = [{
url: `/wallet/assets/exchange`,
label: this.$t('common.assets'),
},
url: `/wallet/assets/exchange`,
label: this.$t('common.assets'),
},
{
url: `/wallet/assets/contract`,
label: this.$t('common.contractaccount'),
@ -40,49 +40,80 @@ export default {
// url: `/wallet/otc`,
// label: this.$t('otc.j1'),
// },
{
{
url: `/wallet/transfer`,
label: this.$t('common.transferFunds'),
},
// {
// url: `/wallet/reward`,
// label: this.$t('common.myCommission'),
// },
// },
{
url: `/wallet/funding`,
label: this.$t('common.rechargeWithdraw')
},{
url: `/wallet/address`,
label: this.$t('common.addressManagement'),
}
},
// {
// url: `/wallet/address`,
// label: this.$t('common.addressManagement'),
// }
];
},
getProfileLinks() {
this.itemList = [{
url: `/profile/index`,
label: this.$t('common.accountInformation'),
}, {
url: `/profile/certification`,
label: this.$t('common.auth')
},
// {
// url: `/profile/invite`,
// label: this.$t('common.invitationReward')
// },
// {
// url: `/profile/login-history`,
// label: this.$t('common.visitHistory')
// }
this.itemList = [
{
url: `/profile/index`,
label: this.$t('common.accountInformation'),
},
// {
// url: `/profile/certification`,
// label: this.$t('common.auth')
// },
// {
// url: '/setting',
// label: this.$t('nav.security')
// },
// {
// url: `/profile/invite`,
// label: this.$t('common.invitationReward')
// },
// {
// url: `/profile/login-history`,
// label: this.$t('common.visitHistory')
// }
]
},
getSettingsLinks() {
this.itemList = [
{
url: `/profile/index`,
label: this.$t('common.accountInformation'),
},
// {
// url: `/profile/certification`,
// label: this.$t('common.auth')
// },
// {
// url: '/setting',
// label: this.$t('nav.security')
// },
// {
// url: `/profile/invite`,
// label: this.$t('common.invitationReward')
// },
// {
// url: `/profile/login-history`,
// label: this.$t('common.visitHistory')
// }
]
},
getOrderLinks() {
this.itemList = [{
url: `/order/exchange`,
label: this.$t('common.spotConsignment'),
},
url: `/order/exchange`,
label: this.$t('common.spotConsignment'),
},
// {
// url: `/order/option`,
// label: this.$t('common.optionOrders'),
@ -102,26 +133,28 @@ export default {
College.getCategoryList().then(list => {
list.forEach(item => {
this.itemList.push({
url : `/college/list/${item.id}`,
label : item.name
url: `/college/list/${item.id}`,
label: item.name
})
})
}).catch(err => {});
}).catch(err => {
});
},
getServiceLink() {
College.getServiceList().then(list => {
list.forEach(item => {
this.itemList.push({
url : `/service/${item.id}`,
label : item.name
url: `/service/${item.id}`,
label: item.name
})
})
}).catch(err => {});
}).catch(err => {
});
},
getOtcList(){
this.itemList = [
getOtcList() {
this.itemList = [
{
url: `/otc/index`,
label: this.$t('otc.j8'),
@ -168,6 +201,10 @@ export default {
this.getWalletLinks();
break;
case path.startsWith('setting'): //
this.getSettingsLinks();
break;
case path.startsWith('profile'): //
this.getProfileLinks();
break;
@ -204,7 +241,7 @@ export default {
@include flexible(row, center, center);
// background: #f5f9fc;
background : #e9e9e9;
background: #e9e9e9;
.SecondaryNavWidth {
width: 1280px;

8
src/i18n/cn.json

@ -38,6 +38,7 @@
"c9":"简介"
},
"common": {
"announcement": "公告",
"a3":"申购记录",
"option": "期权交易",
"exchange": "币币交易",
@ -157,7 +158,7 @@
"auth": "实名认证",
"invitationReward": "邀请奖励",
"visitHistory": "访问记录",
"noviceTutorial": "新手教程",
"noviceTutorial": "為什麽選擇我們?",
"tradingStrategy": "交易策略",
"industryResearch": "行业研究",
"blockchainDictionary": "区块链词典",
@ -790,7 +791,7 @@
"projectWarmUp": "项目预热",
"startSubscription": "开始申购",
"endOfSubscription": "结束申购",
"announceResults": "公布结果",
"announceResults": "上市交易",
"projectCetails": "项目详情",
"useOrNot": "是否使用",
"subscribe": "申购",
@ -1048,12 +1049,11 @@
"TopEncryptionRiskManagement": "顶级加密风控管理",
"EscortYourPropertySafety": "为您的财产安全保驾护航",
"BuyCoins": "买币",
"ProvidedByTheExperimentalCenter": "由Fire phoenix实验中心提供",
"ProvidedByTheExperimentalCenter": "由TOPCS实验中心提供",
"StartCurrencyTradingNow": "立刻开始货币交易",
"ScanTheQRCodeBelowToDownload": "扫描下方二维码下载",
"AndroidScanCodeDownload": "Android扫码下载",
"IOSScanCodeDownload": "IOS扫码下载",
"UseNow": "现在使用"
}
}

79
src/i18n/de.json

@ -38,9 +38,10 @@
"c9":"kurze Einführung"
},
"common": {
"announcement": "Bekanntmachung",
"a3":"Aufzeichnungen über den Kauf",
"option":"Handel mit Optionen",
"exchange":"Transaktion in Währung",
"exchange":"Devisenhandel",
"markets":"Angebot",
"blogs":"Blog",
"news":"Informationen über die Industrie",
@ -134,7 +135,7 @@
"logOut":"Loggen Sie sich",
"homepage":"Home Page",
"application":"Anwendung in Währung",
"purchase":"für den Kauf",
"purchase":"Abonnement",
"accountInformation":"Informationen zum Konto",
"myWallet":"Meine Brieftasche",
"commissionOrder":"Anordnung der Kommission",
@ -147,7 +148,7 @@
"order":"Bestellung",
"spotConsignment":"Kommission vor Ort",
"optionOrders":"Bestellung der Option",
"perpetualContract":"Dauerhafter Vertrag",
"perpetualContract":"Unbefristeter Vertrag",
"foreignContract":"Vertrag über den Devisenhandel",
"notCertified":"Nicht zertifiziert",
"notData":"Keine Daten verfügbar",
@ -262,7 +263,8 @@
"securityVerification":"Überprüfung der Sicherheit",
"disagree":"Sie haben den Bedingungen noch nicht zugestimmt.",
"registrationSuccess":"Erfolgreich registriert, auf Anmeldeseite überspringen",
"referrer":"Referenzen",
"referrer": "Geben Sie den Institutionscode ein (erforderlich)",
"referrer1": "Bitte geben Sie den Institutionscode ein",
"optional":"Optional",
"password":"Passwort",
"login":"Melden Sie sich",
@ -625,8 +627,7 @@
"profile": {
"realName":"Authentifizierung des realen Namens",
"primaryCertification":"Primäre Zertifizierung",
"advancedCertification1": "Erweiterter Zertifizierungsantrag",
"advancedCertification2":"Fortgeschrittener Zertifizierungsantrag eingereicht",
"advancedCertification":"Fortgeschrittener Zertifizierungsantrag eingereicht",
"toExamine":"zu untersuchen",
"fullName":"vollständiger Name",
"legal":"legal",
@ -704,7 +705,7 @@
"instantDividend":"Genießen Sie Dividenden",
"invitationInformation":"Informationen zur Einladung",
"invitationLink":"Link zur Einladung",
"invitationCode":"Code der Einladung",
"invitationCode":"Institutionscode",
"registeredUser":"Registrierte Benutzer",
"accountNumber":"Nummer des Kontos",
"registrationTime":"Zeit der Registrierung",
@ -775,7 +776,8 @@
"pleaseConfirmPassword":"Bitte bestätigen Sie das Passwort",
"operationSuccess":"Operation erfolgreich",
"combination":"Passwörter erfordern eine Kombination von Buchstaben und Zahlen",
"changeSuccess":"Geändert erfolgreich"
"changeSuccess":"Geändert erfolgreich",
"passwordChangePrompt": "Es wird empfohlen, dass Sie Ihr Passwort regelmäßig ändern, um die Sicherheit Ihres Kontos zu gewährleisten"
},
"purchase": {
"sendPrice":"Preis der Emission",
@ -790,10 +792,10 @@
"projectWarmUp":"Projekt aufwärmen",
"startSubscription":"Abonnement starten",
"endOfSubscription":"Schließen Sie das Abonnement",
"announceResults":"Veröffentlichen von Ergebnissen",
"announceResults":"aufgeführte Transaktion",
"projectCetails":"Details des Projekts",
"useOrNot":"Verwenden oder nicht",
"subscribe":"für den Kauf",
"subscribe":"antrag",
"prompt":"Tipps",
"subscribeSuccess":"Erfolgreicher Kauf"
},
@ -804,7 +806,7 @@
"a3":"verfügbar",
"a4":"Rand der Position",
"a5":"Einfrieren der Kommission",
"a6":"Nicht realisierter Gewinn und Verlust",
"a6":"Gewinn-und Verlust",
"a7":"Risiko rate",
"a8":"Geschätzte starke Parität",
"a9":"Vertrag",
@ -815,7 +817,7 @@
"b4":"Gesamtbetrag der anvertrauten Mittel",
"b5":"Durchschnittlicher Transaktionspreis",
"b6":"Preis der Kommission",
"b7":"Bindung",
"b7":"Das versicherungsgeld.",
"b8":"Service berechnen",
"b9":"Zustand",
"c0":"Betrieb",
@ -907,7 +909,8 @@
"k6":"Alle gleich, Erfolg",
"k7":"umgekehrter Erfolg",
"k8": "Bitte melden Sie sich zuerst an",
"k9":"Bitte geben Sie den Abonnement-Code ein"
"k9":"Bitte geben Sie den Abonnement-Code ein",
"l1": "Verhältnis erhöhen"
},
"otc": {
"a0":"Bitte wählen Sie den Transaktionstyp",
@ -1036,39 +1039,19 @@
"m3":"Ende der Bestellung",
"m4":"Stornierung der Bestellung"
},
"cxiNewText":{
"a0": "Top 10",
"a1": "5 Millionen+",
"a2": "< 0.10%",
"a3": "200+",
"a4": "Globales Ranking",
"a5": "Benutzer vertrauen uns",
"a6": "Extrem niedrige Gebühren",
"a7": "Länder",
"a21": "Jetzt Geld verdienen",
"a22": "Erstellen Sie ein persönliches Kryptowährungsportfolio",
"a23": "Kaufen, handeln und halten Sie über 100 Kryptowährungen",
"a24": "Laden Sie Ihr Konto auf",
"a25": "Melden Sie sich per E-Mail an",
"a38": "Starten Sie Transaktionen jederzeit und überall.",
"a39": "Beginnen Sie jederzeit sicher und bequem mit dem Handel über unsere APP und Webseite",
"a40": "IOS- und Android-Scancode herunterladen",
"a41": "Vertrauenswürdige Handelsplattform für Kryptowährungen",
"a42": "Wir setzen uns dafür ein, die Sicherheit der Benutzer mit strengen Protokollen und branchenführenden technischen Maßnahmen zu gewährleisten.",
"a43": "Benutzersicherheits-Asset-Fonds",
"a44": "Wir speichern 10 % aller Transaktionsgebühren in sicheren Vermögensfonds, um einen teilweisen Schutz der Benutzergelder zu gewährleisten",
"a45": "Personalisierte Zugangskontrolle",
"a46": "Die personalisierte Zugriffskontrolle schränkt die Geräte und Adressen ein, die auf persönliche Konten zugreifen, sodass Benutzer keine Sorgen haben müssen.",
"a47": "Erweiterte Datenverschlüsselung",
"a48": "Persönliche Transaktionsdaten werden durch Ende-zu-Ende-Verschlüsselung gesichert und der Zugriff auf persönliche Informationen ist auf den Einzelnen beschränkt.",
"a57": "Klicken Sie hier, um zu gehen",
"a71": "Einsteigerhandbuch ",
"a72": "Beginnen Sie sofort mit dem Erlernen des digitalen Devisenhandels ",
"a77": "Wie kaufe ich digitale Währung",
"a78": "Wie verkauft man digitale Währungen ",
"a79": "So handeln Sie mit digitalen Währungen",
"a80": "Marktplatz",
"a81": "24-Stunden-Markttrend",
"a82": "Fügen Sie Ihrem Wallet Kryptowährungsgelder hinzu und beginnen Sie sofort mit dem Handel"
}
"addinfo": {
"MarketTrend": "Markttrend",
"HourlyCurrencyUpdates": "Stündliche Währungsaktualisierungen",
"_24HoursUpsAndDowns": "24 Stunden Höhen und Tiefen",
"TopEncryptionRiskManagement": "顶级加密风控管理",
"EscortYourPropertySafety": "为您的财产安全保驾护航",
"BuyCoins": "买币",
"ProvidedByTheExperimentalCenter": "由TOPCS实验中心提供",
"StartCurrencyTradingNow": "立刻开始货币交易",
"ScanTheQRCodeBelowToDownload": "扫描下方二维码下载",
"AndroidScanCodeDownload": "Android扫码下载",
"IOSScanCodeDownload": "IOS扫码下载",
"UseNow": "Jetzt Benutzen"
}
}

79
src/i18n/en.json

@ -38,9 +38,10 @@
"c9":"brief introduction"
},
"common": {
"announcement": "Announcement",
"a3":"Purchase records",
"option": "Option",
"exchange": "Spot Trading",
"exchange": "Currency Trading",
"markets": "Markets",
"helps": "Help",
"course": "Support Center",
@ -132,7 +133,7 @@
"logOut": "Log out",
"homepage": "Home",
"application": "Currency Application",
"purchase": "Purchase",
"purchase": "Subscription",
"accountInformation": "Account",
"myWallet": "Wallet",
"commissionOrder": "Orders",
@ -145,7 +146,7 @@
"order": "Orders",
"spotConsignment": "Exchange Orders",
"optionOrders": "Option Orders",
"perpetualContract": "Derivatives",
"perpetualContract": "Perpetual Contract",
"foreignContract": "Crypto FX Contract",
"notCertified": "No Certification",
"notData": "No open orders",
@ -155,7 +156,7 @@
"auth": "Authentication",
"invitationReward": "Invite Reward ",
"visitHistory": "visit history",
"noviceTutorial": "Novice tutorial",
"noviceTutorial": "Why choose us?",
"tradingStrategy": "Trading Strategy",
"industryResearch": "Industry Research",
"blockchainDictionary": "Blockchain Dictionary",
@ -277,8 +278,8 @@
"phoneCorrect": "Please make sure the mobile phone and area code are correct",
"securePhone": "Please make sure your phone signal is stable",
"verCode": "Verify Code",
"referrer": "Enter your referral code (Required)",
"referrer1": "Please fill in by the recommender",
"referrer": "Enter institution code (required)",
"referrer1": "Please enter institution code",
"phoneNum": "Phone Number",
"enterPhoneNum": "Enter Phone Number",
"referral": "Referral Code ",
@ -692,8 +693,7 @@
"country1":"Please enter your country",
"realName": "Real Name Authentication",
"primaryCertification": "primary certification",
"advancedCertification1": "Advanced Certification Application",
"advancedCertification2": "Submit advanced certification application",
"advancedCertification": "Submit advanced certification application",
"toExamine": "audit",
"fullName": "Name",
"legal": "Legal",
@ -771,7 +771,7 @@
"instantDividend": "Instantiate Dividend",
"invitationInformation": "Invitation Information",
"invitationLink": "Invitation Link",
"invitationCode": "Invitation Code",
"invitationCode": "Institution code",
"registeredUser": "Registered User",
"accountNumber": "Account",
"registrationTime": "Registration Time",
@ -860,10 +860,10 @@
"projectWarmUp": "Project preheat",
"startSubscription": "Apply start",
"endOfSubscription": "Apply close",
"announceResults": "Results release",
"announceResults": "listed transaction",
"projectCetails": "Project details",
"useOrNot": "Using?",
"subscribe": "Apply",
"subscribe": "application",
"prompt": "Tips",
"subscribeSuccess": "Apply Success"
},
@ -874,10 +874,10 @@
"a3": "Available Funds",
"a4": "position margin",
"a5": "Entrust freeze",
"a6": "Unrealized PNL",
"a6": "Profit and loss",
"a7": "Risk Rate",
"a8": "Liq.Price",
"a9": "Symbol",
"a9": "Contract",
"b0": "Leverage",
"b1": "Time",
"b2": "Transaction Type",
@ -885,7 +885,7 @@
"b4": "Amount",
"b5": "Avg.",
"b6": "Price",
"b7": "Margin",
"b7": "Insurance",
"b8": "Fee",
"b9": "Status",
"c0": "Operation",
@ -931,14 +931,14 @@
"g0": "Buy",
"g1": "Sell",
"g2": "Sum",
"g3": "Last Price",
"g3": "Latest price",
"g4": "Details",
"g5": "History",
"g6": "Deal time",
"g7": "Position",
"g8": "Hirakura quantity",
"g9": "Entry Price",
"h0": "ROE %",
"g9": "Average opening price",
"h0": "Yield",
"h1": "Close the position at market price",
"h2": "Whether to balance at market price",
"h3": "Full Ping",
@ -951,12 +951,12 @@
"i0": "Positions",
"i1": "Open Orders",
"i2": "Order History",
"i3": "Side",
"i3": "Direction",
"i4": "Open Long",
"i5": "Open short",
"i6": "Only display current",
"i7": "TP",
"i8": "SL",
"i7": "Take Profit",
"i8": "Stop Loss",
"i9": "TP/SL",
"j0": "Realized PNL",
"j1": "Latest Transaction Price",
@ -1115,46 +1115,11 @@
"TopEncryptionRiskManagement": "TOP ENCRYPTION RISK MANAGEMENT",
"EscortYourPropertySafety": "ESCORT YOUR PROPERTY SAFETY",
"BuyCoins": "BuyCoins",
"ProvidedByTheExperimentalCenter": "Courtesy of Fire phoenix Experiment Center",
"ProvidedByTheExperimentalCenter": "Courtesy of TOPCS Experiment Center",
"StartCurrencyTradingNow": "Start currency trading now",
"ScanTheQRCodeBelowToDownload": "Scan the QR code below to download",
"AndroidScanCodeDownload": "Android scan code",
"IOSScanCodeDownload": "IOS scan code",
"UseNow": "USE NOW"
},
"cxiNewText":{
"a0": "Top 10",
"a1": "5 million+",
"a2": "< 0.10%",
"a3": "200+",
"a4": "Global Ranking",
"a5": "Users trust us",
"a6": "Ultra-Low Fees",
"a7": "Countries",
"a21": "Earn money now",
"a22": "Create a Personal Cryptocurrency Portfolio",
"a23": "Buy, trade and hold 100+ cryptocurrencies",
"a24": "Top up your account",
"a25": "Sign up by email",
"a38": "Start transactions anytime, anywhere.",
"a39": "Start trading safely and conveniently at any time through our APP and webpage",
"a40": "IOS and Android scan code download",
"a41": "Trustworthy cryptocurrency trading platform",
"a42": "We are committed to ensuring the safety of users with strict protocols and industry-leading technical measures.",
"a43": "User security asset funds",
"a44": "We store 10% of all transaction fees in safe asset funds to provide partial protection for user funds",
"a45": "Personalized Access Control",
"a46": "Personalized access control restricts the devices and addresses that access personal accounts, so that users have no worries.",
"a47": "Advanced Data Encryption",
"a48": "Personal transaction data is secured through end-to-end encryption, and access to personal information is restricted to the individual.",
"a57": "Click to go",
"a71": "Beginner's Guide ",
"a72": "Start digital currency trading learning immediately ",
"a77": "How to buy digital currency ",
"a78": "How to sell digital currency ",
"a79": "How to Trade Digital Currencies",
"a80": "Market place",
"a81": "24 hours market trend",
"a82": "Add cryptocurrency funds to your wallet and start trading instantly"
}
}
}

2059
src/i18n/fra.json

File diff suppressed because it is too large

2058
src/i18n/it.json

File diff suppressed because it is too large

2055
src/i18n/jp.json

File diff suppressed because it is too large

2057
src/i18n/kor.json

File diff suppressed because it is too large

2059
src/i18n/pt.json

File diff suppressed because it is too large

75
src/i18n/spa.json

@ -38,9 +38,10 @@
"c9":"Introducción"
},
"common": {
"announcement": "Anuncio",
"a3":"Registro de pedidos",
"option":"Comercio de opciones",
"exchange":"Transacciones monetarias",
"exchange":"Comercio de Divisas",
"markets":"Cotización",
"blogs":"Blog",
"news":"Información de la industria",
@ -262,7 +263,8 @@
"securityVerification":"Verificación de la seguridad",
"disagree":"Aún no ha aceptado los términos",
"registrationSuccess":"Registro exitoso, saltando a la página de inicio de sesión",
"referrer":"Recomendador",
"referrer": "Ingrese el código de la institución (requerido)",
"referrer1": "Por favor ingrese el código de la institución",
"optional":"Opcional",
"password":"Contraseña",
"login":"Iniciar sesión",
@ -625,8 +627,7 @@
"profile": {
"realName":"Autenticación del nombre real",
"primaryCertification":"Certificación primaria",
"advancedCertification1": "Solicitud de Certificación Avanzada",
"advancedCertification2":"Solicitud de acreditación avanzada presentada",
"advancedCertification":"Solicitud de acreditación avanzada presentada",
"toExamine":"Auditoría",
"fullName":"Nombre",
"legal":"Legal",
@ -704,7 +705,7 @@
"instantDividend":"Derecho a un dividendo",
"invitationInformation":"Mensaje de invitación",
"invitationLink":"Enlace de invitación",
"invitationCode":"Código de invitación",
"invitationCode":"Código Institucional",
"registeredUser":"Usuarios registrados",
"accountNumber":"Número de cuenta",
"registrationTime":"Tiempo de registro",
@ -775,7 +776,8 @@
"pleaseConfirmPassword":"Por favor, confirme la contraseña",
"operationSuccess":"Operación exitosa",
"combination":"Las contraseñas requieren combinaciones de letras y números",
"changeSuccess":"Modificación exitosa"
"changeSuccess":"Modificación exitosa",
"passwordChangePrompt": "Se recomienda que cambie su contraseña periódicamente para proteger la seguridad de su cuenta."
},
"purchase": {
"sendPrice":"Precio de emisión",
@ -790,7 +792,7 @@
"projectWarmUp":"Precalentamiento del proyecto",
"startSubscription":"Inicio de la compra",
"endOfSubscription":"Cierre de la suscripción",
"announceResults":"Publicación de los resultados",
"announceResults":"Transacción listada",
"projectCetails":"Detalles del proyecto",
"useOrNot":"Usar o no",
"subscribe":"Suscripción",
@ -804,7 +806,7 @@
"a3":"Disponible",
"a4":"Margen de posición",
"a5":"Delegación congelada",
"a6":"Ganancias y pérdidas no realizadas",
"a6":"Ganancia y perdida",
"a7":"Tasa de riesgo",
"a8":"Estimación de las fuertes paridades",
"a9":"Contrato",
@ -815,7 +817,7 @@
"b4":"Total confiado",
"b5":"Precio medio de transacción",
"b6":"Precio confiado",
"b7":"Margen",
"b7":"Dinero del seguro",
"b8":"Gastos de tramitación",
"b9":"Estado",
"c0":"Operaciones",
@ -868,7 +870,7 @@
"g7":"Posición",
"g8":"Cantidad nivelada",
"g9":"Precio medio de apertura",
"h0":"Tasa de rendimiento",
"h0":"rentabilidad",
"h1":"Cierre de mercado",
"h2":"Si el precio de mercado es plano",
"h3":"Todo plano",
@ -907,7 +909,9 @@
"k6":"éxito total",
"k7":"éxito inverso",
"k8":"Por favor, inicie sesión para solicitar",
"k9":"Introduzca el Código de suscripción "
"k9":"Introduzca el Código de suscripción ",
"l4": "valoración actual",
"l1": "Relación de aumento"
},
"otc": {
"a0":"Por favor, seleccione el tipo de transacción",
@ -1036,39 +1040,18 @@
"m3":"Fin del pedido",
"m4":"Orden cancelada"
},
"cxiNewText":{
"a0": "10 mejores",
"a1": "5 millones+",
"a2": "< 0.10%",
"a3": "200+",
"a4": "Clasificación mundial",
"a5": "Los usuarios confían en nosotros",
"a6": "Tarifas ultra bajas",
"a7": "Países",
"a21": "Obtener ingresos inmediatamente",
"a22": "Crear una cartera personal de criptomonedas",
"a23": "Compre, intercambie y mantenga más de 100 criptomonedas",
"a24": "Recargar la cuenta",
"a25": "Registrarse por correo electrónico",
"a38": "Abrir transacciones en cualquier momento y en cualquier lugar.",
"a39": "Comience a operar de manera segura y conveniente en cualquier momento a través de nuestra aplicación y página web",
"a40": "Descarga de código de escaneo de ios y Android",
"a41": "Una plataforma de negociación de criptomonedas de confianza",
"a42": "Estamos comprometidos a garantizar la seguridad de los usuarios con estrictos protocolos y medidas técnicas líderes en la industria.",
"a43": "Fondos de activos de seguridad del usuario",
"a44": "Almacenamos el 10% de todas las tarifas de transacción en fondos de activos seguros para brindar protección parcial a los fondos de los usuarios",
"a45": "Control de acceso personalizado",
"a46": "El control de acceso personalizado restringe el acceso a dispositivos y direcciones de cuentas personales, para que los usuarios no tengan preocupaciones.",
"a47": "Cifrado de datos avanzado",
"a48": "Los datos de transacciones personales están protegidos por encriptación de extremo a extremo y solo la persona puede acceder a la información personal.",
"a57": "Haga clic para ir",
"a71": "Guía para principiantes ",
"a72": "Comience a aprender a operar con divisas digitales de inmediato ",
"a77": "Cómo comprar moneda digital ",
"a78": "Cómo vender moneda digital ",
"a79": "Cómo operar con monedas digitales",
"a80": "Mercado",
"a81": "Tendencia del mercado de 24 horas",
"a82": "Agregue fondos de criptomonedas a su billetera y comience a operar al instante"
}
"addinfo": {
"MarketTrend": "tendencia del mercado",
"HourlyCurrencyUpdates": "Actualizaciones de moneda por hora",
"_24HoursUpsAndDowns": "24 horas altibajos",
"TopEncryptionRiskManagement": "顶级加密风控管理",
"EscortYourPropertySafety": "为您的财产安全保驾护航",
"BuyCoins": "买币",
"ProvidedByTheExperimentalCenter": "由TOPCS实验中心提供",
"StartCurrencyTradingNow": "立刻开始货币交易",
"ScanTheQRCodeBelowToDownload": "扫描下方二维码下载",
"AndroidScanCodeDownload": "Android扫码下载",
"IOSScanCodeDownload": "IOS扫码下载",
"UseNow": "usar ahora"
}
}

2123
src/i18n/tr.json

File diff suppressed because it is too large

211
src/i18n/tw.json

@ -8,37 +8,38 @@
"fundHistory": "充提記錄",
"security": "帳號安全",
"invite": "邀請好友",
"login":"請先登錄進行操作",
"tips":"系統提示",
"set":"請先設定一個合適的價格",
"a1":"價格不能為空或零",
"a2":"數量不能為空或零",
"a3":"數量不能少於",
"a4":"買入的市價單總量不能為空或零",
"a5":"買入的市價單總量不能小於",
"a6":"賣出的市價單數量不能為空或零",
"a7":"賣出的市價單數量不能少於",
"a8":"止盈止損單觸發價不能為空或零",
"a9":"止盈止損-限價單限價不能為空或零",
"b1":"止盈止損-限價單數量不能為空或零",
"b2":"止盈止損-市價單觸發價不能為空或零",
"b3":"止盈止損-市價買入的總量不能為空或零",
"b5":"止盈止損-市價買入的總量不能少於",
"b6":"止盈止損-市價賣出的數量不能為空或零",
"b7":"止盈止損-市價賣出的數量不能小於",
"b8":"頁面斷開連接,請重繪或稍後再試!",
"login": "請先登錄進行操作",
"tips": "系統提示",
"set": "請先設定一個合適的價格",
"a1": "價格不能為空或零",
"a2": "數量不能為空或零",
"a3": "數量不能少於",
"a4": "買入的市價單總量不能為空或零",
"a5": "買入的市價單總量不能小於",
"a6": "賣出的市價單數量不能為空或零",
"a7": "賣出的市價單數量不能少於",
"a8": "止盈止損單觸發價不能為空或零",
"a9": "止盈止損-限價單限價不能為空或零",
"b1": "止盈止損-限價單數量不能為空或零",
"b2": "止盈止損-市價單觸發價不能為空或零",
"b3": "止盈止損-市價買入的總量不能為空或零",
"b5": "止盈止損-市價買入的總量不能少於",
"b6": "止盈止損-市價賣出的數量不能為空或零",
"b7": "止盈止損-市價賣出的數量不能小於",
"b8": "頁面斷開連接,請重繪或稍後再試!",
"c1": "購買{amount}枚{name}代幣可獲{rate}%獎勵",
"c2": "申購活動",
"c3":"發行總量",
"c4":"流通總量",
"c5":"發行價格",
"c6":"發行時間",
"c7":"白皮書地址",
"c8":"官網地址",
"c9":"簡介"
"c3": "發行總量",
"c4": "流通總量",
"c5": "發行價格",
"c6": "發行時間",
"c7": "白皮書地址",
"c8": "官網地址",
"c9": "簡介"
},
"common": {
"a3":"申購記錄",
"announcement": "公告",
"a3": "申購記錄",
"option": "期權交易",
"exchange": "幣幣交易",
"markets": "行情",
@ -157,7 +158,7 @@
"auth": "實名認證",
"invitationReward": "邀請獎勵",
"visitHistory": "訪問記錄",
"noviceTutorial": "新手教程",
"noviceTutorial": "為什麽選擇我們?",
"tradingStrategy": "交易策略",
"industryResearch": "行業研究",
"blockchainDictionary": "區塊鏈詞典",
@ -185,10 +186,10 @@
"footerTips2": "法律聲明:該網站由{name}公司運營",
"footerTips3": "風險提示:數位資產交易有可能導致您的本金損失,請確保您充分理解其中的風險",
"footerTips4": "受限地區:無法為特定國家/地區的居民提供服務,例如:以色列和伊斯蘭共和國",
"learn":"學習"
"learn": "學習"
},
"exchange": {
"search": "索",
"search": "索",
"pair": "交易對",
"last-price": "最新價",
"change": "漲跌幅",
@ -212,7 +213,7 @@
"month": "月"
},
"login": {
"confirm-password":"確認密碼",
"confirm-password": "確認密碼",
"resend": "重新發送",
"sms": "簡訊",
"sendOK": "驗證碼發送成功!",
@ -262,8 +263,8 @@
"securityVerification": "安全性驗證",
"disagree": "您還沒有同意條款",
"registrationSuccess": "注册成功,正在跳轉登入頁面",
"referrer": "推薦人",
"referrer1": "請填寫推薦人",
"referrer": "輸入機構代碼(必填)",
"referrer1": "請輸入機構代碼",
"optional": "選填",
"password": "密碼",
"login": "登入",
@ -323,8 +324,8 @@
"upLoadSuccess": "上傳成功"
},
"wallet": {
"auth":"請先進行實名認證",
"obtain":"獲取充值地址",
"auth": "請先進行實名認證",
"obtain": "獲取充值地址",
"inside": "內部資金劃轉",
"from": "從",
"history": "查看歷史",
@ -343,7 +344,7 @@
"addressManagement1": "地址管理",
"addAddress": "添加地址",
"filter": "篩選器",
"search": "索",
"search": "索",
"selectActiveArea": "請選擇活動區域",
"areaOne": "區域一",
"areaTwo": "區域二",
@ -376,7 +377,7 @@
"spotAccount": "現貨帳戶",
"hide": "隱藏",
"balanceAssets": "餘額資產",
"searchCurrency": "索幣種",
"searchCurrency": "索幣種",
"addressManagement": "提幣地址管理",
"totalAssets": "總資產",
"availableBalance": "可用餘額",
@ -486,7 +487,7 @@
"newEra": "數位貨幣交易新時代",
"startTrading": "開始交易",
"walkingLantern": "走馬燈",
"marketCenter": "交易市",
"marketCenter": "交易市",
"optional": "自選",
"latestPrice": "價格",
"upAndDown": "漲跌幅",
@ -596,7 +597,7 @@
"toMatch": "未撮合",
"operation": "操作",
"reset": "重置",
"search": "索",
"search": "索",
"to": "至",
"startTime": "開始日期",
"endTime": "結束日期",
@ -623,15 +624,14 @@
"buyLevel": "買平"
},
"profile": {
"tips":"提幣限額,如需更多提幣額度,請完成⾼級認證",
"SelectAreaCode":"選擇區號",
"driverLicense":"駕駛證",
"country":"國家",
"country1":"請輸入國家",
"tips": "提幣限額,如需更多提幣額度,請完成⾼級認證",
"SelectAreaCode": "選擇區號",
"driverLicense": "駕駛證",
"country": "國家",
"country1": "請輸入國家",
"realName": "實名認證",
"primaryCertification": "初級認證",
"advancedCertification1": "高級認證申請",
"advancedCertification2": "高級認證申請已提交",
"advancedCertification": "高級認證申請已提交",
"toExamine": "稽核",
"fullName": "姓名",
"legal": "法定",
@ -709,7 +709,7 @@
"instantDividend": "立享分紅",
"invitationInformation": "邀請資訊",
"invitationLink": "邀請連結",
"invitationCode": "邀請碼",
"invitationCode": "機構碼",
"registeredUser": "已註冊用戶",
"accountNumber": "帳號",
"registrationTime": "註冊時間",
@ -736,8 +736,8 @@
"preliminary": "初步認證成功",
"clickToVerify": "點擊驗證",
"clickToVerify1": "已完成",
"tips1":"初級認證:要選取現金,您需要完成高級認證。",
"tips2":"高級認證:最高5000USDT 24小時提款限額。 如需更多取款金額,請聯系客服"
"tips1": "初級認證:要選取現金,您需要完成高級認證。",
"tips2": "高級認證:最高5000USDT 24小時提款限額。 如需更多取款金額,請聯系客服"
},
"setting": {
"smsVer": "簡訊驗證",
@ -783,7 +783,8 @@
"pleaseConfirmPassword": "請確認密碼",
"operationSuccess": "操作成功",
"combination": "密碼需要字母和數位組合",
"changeSuccess": "修改成功"
"changeSuccess": "修改成功",
"passwordChangePrompt": "建議您定期更改密碼以保護賬號安全"
},
"purchase": {
"sendPrice": "發行價",
@ -798,7 +799,7 @@
"projectWarmUp": "項目預熱",
"startSubscription": "開始申購",
"endOfSubscription": "結束申購",
"announceResults": "公佈結果",
"announceResults": "上市交易",
"projectCetails": "項目詳情",
"useOrNot": "是否使用",
"subscribe": "申購",
@ -812,7 +813,7 @@
"a3": "可用",
"a4": "持倉保證金",
"a5": "委託凍結",
"a6": "未實現盈虧",
"a6": "盈虧",
"a7": "風險率",
"a8": "預估強平價",
"a9": "合約",
@ -915,9 +916,10 @@
"k6": "全平成功",
"k7": "反向成功",
"k8": "請先登錄進行申購 ",
"k9":"請輸入認購碼",
"l1":"漲幅比例",
"l2":"保證金"
"k9": "請輸入認購碼",
"l1": "漲幅比例",
"l2": "保證金",
"l4": "當前估值"
},
"otc": {
"a0": "請選擇交易類型",
@ -1019,66 +1021,45 @@
"j6": "我的廣告",
"j7": "我的訂單",
"j8": "廣告",
"j9":"一鍵購買",
"k0":"一鍵出售",
"k1":"購買金額",
"k2":"購買數量",
"k3":"出售金額",
"k4":"出售數量",
"k5":"請輸入購買金額",
"k6":"請輸入購買數量",
"k7":"請輸入出售金額",
"k8":"請輸入出售數量",
"k9":"按數量購買",
"l0":"法幣交易說明",
"l1":"最小交易量",
"l2":"確認購買",
"l3":"確認出售",
"l4":"餘額不足",
"l5":"下單時間",
"l6":"請選擇支付方式",
"l7":"收款人",
"l8":"收款异常",
"l9":"請輸入交易密碼",
"m0":"已支付",
"m1":"稽核通過",
"m2":"稽核失敗",
"m3":"訂單結束",
"m4":"訂單取消"
"j9": "一鍵購買",
"k0": "一鍵出售",
"k1": "購買金額",
"k2": "購買數量",
"k3": "出售金額",
"k4": "出售數量",
"k5": "請輸入購買金額",
"k6": "請輸入購買數量",
"k7": "請輸入出售金額",
"k8": "請輸入出售數量",
"k9": "按數量購買",
"l0": "法幣交易說明",
"l1": "最小交易量",
"l2": "確認購買",
"l3": "確認出售",
"l4": "餘額不足",
"l5": "下單時間",
"l6": "請選擇支付方式",
"l7": "收款人",
"l8": "收款异常",
"l9": "請輸入交易密碼",
"m0": "已支付",
"m1": "稽核通過",
"m2": "稽核失敗",
"m3": "訂單結束",
"m4": "訂單取消"
},
"cxiNewText":{
"a0": "前10名",
"a1": "500萬+",
"a2": "< 0.10%",
"a3": "200+",
"a4": "全球排名",
"a5": "用戶信任我們",
"a6": "超低費用",
"a7": "國家",
"a21": "立即賺取收益",
"a22": "創建個人加密貨幣投資組合",
"a23": "購買、交易和持有100多種加密貨幣",
"a24": "向賬戶充值",
"a25": "通過電子郵件註冊",
"a38": "隨時隨地,開啟交易。",
"a39": "通過我們的應用程序和網頁,隨時安全又便利地開始交易。",
"a40": "ios和Android掃碼下載",
"a41": "值得用戶信賴的加密貨幣交易平台",
"a42": "我們終力承諾以嚴格協議和行業領先的技術措施為用戶安全駕駛護航。",
"a43": "用戶安全資產資金",
"a44": "我們將所有交易費用的10%存入與安全資產資金,為用戶資金提供部分保障。",
"a45": "個性化訪問控制",
"a46": "個性化訪問控制限制訪問個人賬戶的設備和地址,讓用戶無後顧之憂。",
"a47": "先進數據加密",
"a48": "個人交易數據通過端到端加密獲得保障,僅限本人訪問個人信息。",
"a57": "點擊前往",
"a71": "新手指引",
"a72": "即刻開啟數字貨幣交易學習",
"a77": "如何購買數字貨幣",
"a78": "如何出售數字貨幣",
"a79": "如何交易數字貨幣",
"a80": "交易市場",
"a81": "24小時市場走勢",
"a82": "將添加加密貨幣資金添加到您的錢包並立即開始交易"
"addinfo": {
"MarketTrend": "市場趨勢",
"HourlyCurrencyUpdates": "小時貨幣最新動態",
"_24HoursUpsAndDowns": "24小時漲跌",
"TopEncryptionRiskManagement": "顶级加密风控管理",
"EscortYourPropertySafety": "頂級加密風控管理",
"BuyCoins": "買幣",
"ProvidedByTheExperimentalCenter": "由TOPCS實驗中心提供",
"StartCurrencyTradingNow": "立刻開始貨幣交易",
"ScanTheQRCodeBelowToDownload": "掃描下方二維碼下載",
"AndroidScanCodeDownload": "Android扫码下载",
"IOSScanCodeDownload": "Android掃碼下載",
"UseNow": "現在使用"
}
}

8
src/index.html

@ -21,7 +21,7 @@
for (var i = 0; i < mobileAgent.length; i++) {
if (browser.indexOf(mobileAgent[i]) != -1) {
//todo 手机版跳转
window.location.href = 'https://app.cxicoin.com';
window.location.href = 'https://h5.toopcoins.com';
break;
}
}
@ -68,13 +68,13 @@
<script src="/static/libs/jquery.mCustomScrollbar.js"></script>
<script src="/static/js/custom.js"></script>
<script src="/static/libs/skroll.min.js"></script>
<script src="https://www.cxicoin.com/newlink/pako.min.js"></script>
<script src="https://www.toopcoins.com/newlink/pako.min.js"></script>
<script>
window.custom = "light"; // 默认主题
window.api_path = "<%= htmlWebpackPlugin.options.isProduct ? 'https://sses.cxicoin.com/api/sliderVerify' : 'https://sses.cxicoin.com/api/sliderVerify' %>";
window.api_path = "<%= htmlWebpackPlugin.options.isProduct ? 'https://ser.ybgcoins.com/api/sliderVerify' : 'https://ser.ybgcoins.com/api/sliderVerify' %>";
// window.api_path = "<%= htmlWebpackPlugin.options.isProduct ? 'http://qkladmin2.ruanmeng.top/api/sliderVerify' : 'http://qkladmin2.ruanmeng.top/api/sliderVerify' %>";
// window.ws_path = "<%= htmlWebpackPlugin.options.isProduct ? 'wss://guanli.coin.amatak.net/ws1' : 'wss://guanli.coin.amatak.net/ws1' %>";
window.ws_path = "<%= htmlWebpackPlugin.options.isProduct ? 'https://sses.cxicoin.com/api' : 'https://sses.cxicoin.com/api' %>";
window.ws_path = "<%= htmlWebpackPlugin.options.isProduct ? 'https://ser.ybgcoins.com/api' : 'https://ser.ybgcoins.com/api' %>";
// window.ws_path = "<%= htmlWebpackPlugin.options.isProduct ? 'ws://qkladmin2.ruanmeng.top:2346' : 'ws://qkladmin2.ruanmeng.top:2346' %>";

3
src/utils/class/date.js

@ -48,8 +48,7 @@ function time2Date(time, isOffset = false) {
function parseTime(time, isOffset = false, cformat = null) {
// 设置默认格式
// let format = cformat || '{y}-{m}-{d} {h}:{i}:{s}';
let format = cformat || '{m}/{d}/{y} {h}:{i}:{s}';
let format = cformat || '{y}-{m}-{d} {h}:{i}:{s}';
const date = time2Date(time, isOffset);

10
src/utils/consts.js

@ -15,18 +15,18 @@ export default {
FAIL : 2,
}
},
mobileUrl:'https://app.cxicoin.com',
mobileUrl:'https://h5.cinscoin.com',
Server: {
Path: {
// API: isProduct ? `http://qkladmin2.ruanmeng.top/api/` : `/api/`,
BASE:isProduct?`https://sses.cxicoin.com`:`https://sses.cxicoin.com`,
API: isProduct ? `https://sses.cxicoin.com/api/` : `/api/`,
BASE:isProduct?`https://ser.ybgcoins.com`:`https://ser.ybgcoins.com`,
API: isProduct ? `https://ser.ybgcoins.com/api/` : `/api/`,
// WS: isProduct ? `ws://qkladmin2.ruanmeng.top:2346` : `ws://qkladmin2.ruanmeng.top:2346`,
// WS1: isProduct ? `ws://qkladmin2.ruanmeng.top:2348` : `ws://qkladmin2.ruanmeng.top:2348`,
// WS: isProduct ? `wss://guanli.coin.amatak.net/ws1` : `wss://guanli.coin.amatak.net/ws1`,
WS: isProduct ? `wss://sses.cxicoin.com/ws1` : `wss://sses.cxicoin.com/ws1`,
WS: isProduct ? `wss://ser.ybgcoins.com/ws1` : `wss://ser.ybgcoins.com/ws1`,
// WS1: isProduct ? `wss://guanli.coin.amatak.net/ws2` : `wss://guanli.coin.amatak.net/ws2`,
WS1: isProduct ? `wss://sses.cxicoin.com/ws2` : `wss://sses.cxicoin.com/ws2`,
WS1: isProduct ? `wss://ser.ybgcoins.com/ws2` : `wss://ser.ybgcoins.com/ws2`,
}
}
};

16
src/views/components/inner-transfer.vue

@ -218,17 +218,7 @@ export default {
}
},
components: {},
watch: {
fromValue(n){
if(n[0]==2){
this.toValue = [1];
this.form.to_account = this.toValue[0];
}else if(n[0]==1){
this.toValue = [2];
this.form.to_account = this.toValue[0];
}
},
},
watch: {},
methods: {
// from
fromChange($ev) {
@ -275,8 +265,8 @@ export default {
// to_account,
// from_account
// ];
// console.info(this.form.from_account)
// console.info(this.form.to_account)
console.info(this.form.from_account)
console.info(this.form.to_account)
// [this.fromChild, this.toChild] = [this.toChild, this.fromChild];
this.form.pair_id = this.toChild.id;
this.getUserCoinAssets()

2
src/views/contract/account.vue

@ -65,7 +65,7 @@ export default {
}
},
mounted(){
console.log(this.accountInfo)
// console.log(this.accountInfo)
},
methods:{

4
src/views/contract/current-commission.vue

@ -29,7 +29,7 @@
<td>
<button class="btn btn-sm btn-danger" @click="ifCancelEntrust(item)">{{$t('contract.c1')}}</button>
</td>
</tr>
<tr v-if="!list.length">
<td colspan="10">
@ -172,4 +172,4 @@ export default {
}
}
};
</script>
</script>

1167
src/views/contract/exchange-store.vue

File diff suppressed because it is too large

79
src/views/contract/handicap.vue

@ -1,6 +1,6 @@
<template>
<div class="markets-pair-list handicap bg-plain">
<!-- <div class="nav nav-pills">
<div class="markets-pair-list handicap bg-plain" style="min-height:100vh;width: 100%; border: #fff solid 1px;">
<div class="nav nav-pills">
<div class="nav-item">
<a class="nav-link" :class="{ active: tab == 1 }" @click="tab = 1">{{
$t("contract.f7")
@ -11,7 +11,7 @@
$t("contract.f8")
}}</a>
</div>
</div> -->
</div>
<div>
<!-- 盘口 -->
<div class="handicap-body px-3" v-if="tab == 1">
@ -33,18 +33,17 @@
</div>
</div>
<div class="label-group d-flex text-secondary fn-12 py-2">
<div class="w-7/24">
<div class="w-10/24">
{{ $t("contract.d8") }}
</div>
<div class="w-8/24">
<div class="w-7/24">
{{ $t("contract.e1") }}
</div>
<div class="w-7/24 text-right">
{{ $t("contract.g2") }}
<!-- ({{ $t("contract.e2") }}) -->
</div>
</div>
<div class="sell fn-12">
<div class="sell">
<template v-for="(item, idx) in sellListShow">
<div
class="item pointer"
@ -52,9 +51,9 @@
@click="$emit('selectprice', item.price)"
>
<div class="d-flex">
<div class="w-7/24 decreace">{{ item.price}}</div>
<div class="w-8/24">{{ omitTo(item.amount, 2) }}</div>
<div class="w-8/24 text-right">{{ item.total }}</div>
<div class="w-10/24 decreace">{{ item.price}}</div>
<div class="w-7/24">{{ omitTo(item.amount, 2) }}</div>
<div class="w-7/24 text-right">{{ item.total }}</div>
</div>
<div
class="pgs"
@ -76,7 +75,7 @@
<!-- <button class="btn btn-sm btn-outline-primary fn-12">更多</button> -->
</div>
</div>
<div class="buy fn-12">
<div class="buy">
<template v-for="(item, idx) in buyListShow">
<div
class="item pointer"
@ -84,9 +83,9 @@
@click="$emit('selectprice', item.price)"
>
<div class="d-flex">
<div class="w-7/24 increace">{{ item.price }}</div>
<div class="w-8/24">{{ omitTo(item.amount, 2) }}</div>
<div class="w-8/24 text-right">{{ item.total }}</div>
<div class="w-10/24 increace">{{ item.price }}</div>
<div class="w-7/24">{{ omitTo(item.amount, 2) }}</div>
<div class="w-7/24 text-right">{{ item.total }}</div>
</div>
<div
class="pgs"
@ -95,34 +94,30 @@
</div>
</template>
</div>
<!-- 实时成交 -->
</div>
<!-- 实时成交 -->
<div class="real-time p-3" v-if="tab == 2">
<div class="d-flex text-secondary fn-12">
<div class="w-7/24">
<div class="w-10/24">
{{ $t("contract.b1") }}
</div>
<div class="w-8/24">{{ $t("contract.d8") }}(USDT)</div>
<div class="w-8/24 text-right">
<div class="w-7/24">{{ $t("contract.d8") }}(USDT)</div>
<div class="w-7/24 text-right">
{{ $t("contract.e1") }}({{ $t("contract.e2") }})
</div>
</div>
<div class="deal">
<div class="d-flex fn-12" v-for="(item, idx) in tradeList" :key="idx">
<div class="w-7/24">
{{ parseTime(item.ts, false, "{h}:{i}:{s}") }}
</div>
<div class="w-8/24 increace">
{{ item.price }}
</div>
<div class="w-8/24 text-right">
{{ omitTo(item.amount, 2) }}
</div>
<div class="d-flex fn-12" v-for="(item, idx) in tradeList" :key="idx">
<div class="w-10/24">
{{ parseTime(item.ts, false, "{h}:{i}:{s}") }}
</div>
<div class="w-7/24 increace">
{{ item.price }}
</div>
<div class="w-7/24 text-right">
{{ omitTo(item.amount, 2) }}
</div>
</div>
</div>
<!-- -->
<div class="real-time p-3" v-if="tab == 2">
</div>
</div>
</div>
</template>
@ -173,22 +168,18 @@ export default {
};
},
sellListShow() {
let list = this.sellList.splice(0, 12);
let total = 0;
list.forEach(item => {
// item.total = total += item.amount;
item.total = total += Number(item.amount);
item.total = item.total.toFixed(3)
});
return list.reverse();
let list = this.sellList.splice(0, 12);
let total = 0;
list.forEach(item => {
item.total = total += item.amount;
});
return list.reverse();
},
buyListShow() {
let list = this.buyList.splice(0, 12);
let total = 0;
list.forEach(item => {
// item.total = total += item.amount;
item.total = total += Number(item.amount);
item.total = item.total.toFixed(3);
item.total = total += item.amount;
});
return list;
}

4
src/views/contract/handicapRight.vue

@ -2,7 +2,7 @@
<div class="markets-pair-list handicap handicapRight">
<div class="nav nav-pills p-3 fn-center d-block fn-22 w-100">
<div class="nav-item">
{{$t("contract.f8")}}
{{$t("contract.f8")}}
</div>
</div>
<div class="col-12 p-0 bg-plain">
@ -195,4 +195,4 @@ export default {
}
}
};
</script>
</script>

6
src/views/contract/hold-position.vue

@ -32,7 +32,7 @@
<th>{{ $t("contract.a5") }}{{ $t("contract.e2") }}</th> -->
<th>{{ $t("contract.g9") }}</th>
<th>{{ $t("contract.g3") }}</th>
<th>{{ $t("contract.a8") }}</th>
<!--<th>{{ $t("contract.a8") }}</th>-->
<th >{{ $t("contract.a6") }}</th>
<th>{{ $t("contract.h0") }}</th>
<th>{{ $t("contract.i7") }} /{{ $t("contract.i8") }}</th>
@ -50,7 +50,7 @@
<td>{{ item.freeze_position }}</td> -->
<td>{{ item.avg_price * 1 }}</td>
<td>{{ item.realtimePrice }}</td>
<td>{{ item.flatPrice }}</td>
<!--<td>{{ item.flatPrice }}</td>-->
<td :class="item.unRealProfit>0?'increace':item.unRealProfit<0?'decreace':''">{{ (parseFloat(item.unRealProfit)).toFixed(2) }}</td>
<td>{{ item.profitRate }}</td>
<td>{{ item.tpPrice || "--" }}/{{ item.slPrice || "--" }}</td>
@ -619,7 +619,7 @@ export default {
},
//indexc
getactiveItem(index){
this.$emit("setactive",index);
this.$emit("setactive",index);
}
},
};

4
src/views/contract/index copy.vue

@ -117,7 +117,7 @@
/>
</div>
<!-- 盘口 -->
<handicap
<handicap
@input="newPriceObj = $event"
@selectprice="defaultPrice = $event"
:symbol="activeSymbol"
@ -126,7 +126,7 @@
class="mr-2"
/>
<!-- 成交记录 -->
<handicapRight
<handicapRight
@input="newPriceObj = $event"
@selectprice="defaultPrice = $event"
:symbol="activeSymbol"

806
src/views/contract/index.vue

@ -1,201 +1,298 @@
<template>
<div class="contract-page">
<!-- <div class="banner-block col-xs-8">-->
<!-- <el-carousel :interval="6000" height="450px">-->
<!-- <el-carousel-item v-for="item in pcBannerList" :key="item.id">-->
<!-- <img :src="item.imgurl" width="100%" height="100%" />-->
<!-- </el-carousel-item>-->
<!-- </el-carousel>-->
<!-- </div>-->
<div class="page-top d-flex pt-2">
<div class="kline-box flex-fill mr-2">
<div
class="coin-change d-flex align-items-center py-2 pl-4 heading justify-content-between"
>
<div class="d-flex align-items-center">
<div class="coin d-flex align-items-center">
<el-popover
placement="bottom"
ref="popover"
width="400"
trigger="click"
>
<div slot="reference">
{{ activeContract.pair_name }}
<el-button size="mini">
<i class="el-icon-arrow-down"></i>
</el-button>
</div>
<div
class="markets-pair-list"
style="max-height:300px;overflow:auto;"
>
<template v-for="parent in contractList">
<div class="px-3 text-primary" :key="parent.coin_name">
{{ parent.coin_name }}
</div>
<table class="table" :key="parent.coin_name + 1">
<thead>
<tr class="text-secondary">
<th class="w-10/24">{{ $t("contract.h5") }}</th>
<th class="w-7/24">{{ $t("contract.g3") }}</th>
<th class="w-7/24 text-right">
{{ $t("contract.h6") }}
</th>
</tr>
</thead>
<tbody>
<!-- @click="activeSymbol = item.symbol" -->
<tr
v-for="item in parent.marketInfoList"
:key="item.symbol"
:class="{ active: item.symbol == activeSymbol }"
@click="ispopover1(item.symbol)"
>
<td class="w-10/24">
{{ item.symbol }}/{{ parent.coin_name }}
</td>
<td
class="w-7/24 "
:class="item.increase < 0 ? 'decreace' : 'increase'"
>
{{ item.price }}
</td>
<td
class="w-7/24"
:class="item.increase < 0 ? 'decreace' : 'increase'"
>
{{ item.increaseStr }}
</td>
</tr>
</tbody>
</table>
</template>
</div>
</el-popover>
</div>
<div
class="price px-3 border-right"
:class="{
<div class="contract-page">
<!-- <div class="banner-block col-xs-8">-->
<!-- <el-carousel :interval="6000" height="450px">-->
<!-- <el-carousel-item v-for="item in pcBannerList" :key="item.id">-->
<!-- <img :src="item.imgurl" width="100%" height="100%" />-->
<!-- </el-carousel-item>-->
<!-- </el-carousel>-->
<!-- </div>-->
<div class="page-top d-flex pt-2">
<div class="kline-box flex-fill mr-2">
<div class="coin-change d-flex align-items-center py-2 pl-4 heading justify-content-between" style="width:80%;float: right">
<div class="d-flex align-items-center">
<div class="coin d-flex align-items-center">
<el-popover
placement="bottom"
ref="popover"
width="400"
trigger="click">
<div slot="reference">
{{ activeContract.pair_name }}
<!-- <el-button size="mini">
<i class="el-icon-arrow-down"></i>
</el-button> -->
</div>
<div
class="markets-pair-list"
style="max-height:300px;overflow:auto;">
<template v-for="parent in contractList">
<div class="px-3 text-primary" :key="parent.coin_name">
{{ parent.coin_name }}
</div>
<table class="table" :key="parent.coin_name + 1">
<thead>
<tr class="text-secondary">
<th class="w-10/24">{{ $t("contract.h5") }}ooo</th>
<th class="w-7/24">{{ $t("contract.g3") }}</th>
<th class="w-7/24 text-right">
{{ $t("contract.h6") }}
</th>
</tr>
</thead>
<tbody>
<!-- @click="activeSymbol = item.symbol" -->
<tr
v-for="item in parent.marketInfoList"
:key="item.symbol"
:class="{ active: item.symbol == activeSymbol }"
@click="ispopover1(item.symbol)">
<td class="w-10/24">
{{ item.symbol }}/{{ parent.coin_name }}
</td>
<td
class="w-7/24 "
:class="item.increase < 0 ? 'decreace' : 'increase'">
{{ item.price }}
</td>
<td
class="w-7/24"
:class="item.increase < 0 ? 'decreace' : 'increase'">
{{ item.increaseStr }}
</td>
</tr>
</tbody>
</table>
</template>
</div>
</el-popover>
</div>
<div
class="price px-3 border-right"
:class="{
decreace: activeContract.increase < 0,
increace: activeContract.increase >= 0
}"
>
<span class="current">{{ activeContract.price }}$</span>
&nbsp;
<span class="zf">{{ activeContract.increaseStr }}</span>
</div>
<!-- 币种价值数据 -->
<div class="d-flex fn-12">
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h7") }}
</div>
<div>
{{ activeContract.high }}
</div>
</div>
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h8") }}
</div>
<div>
{{ activeContract.low }}
>
<span class="current">{{ activeContract.price }}$</span>
&nbsp;
<span class="zf">{{ activeContract.increaseStr }}</span>
</div>
<!-- 币种价值数据 -->
<div class="d-flex fn-12">
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h7") }}
</div>
<div>
{{ activeContract.high }}
</div>
</div>
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h8") }}
</div>
<div>
{{ activeContract.low }}
</div>
</div>
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h9") }}
<!-- {{ $t("contract.e2") }} -->
(USDT)
</div>
<div>
{{ activeContract.vol }}
</div>
</div>
</div>
</div>
<!-- <div><theme-change /></div> -->
</div>
</div>
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h9") }}
<!-- {{ $t("contract.e2") }} -->
(USDT)
<div style="width: 20%;float:left;display:block;">
<div
class="markets-pair-list"
style="max-height:92vh;overflow:auto;">
<template v-for="parent in contractList">
<div class="px-3 text-primary" :key="parent.coin_name">
<!--{{ parent.coin_name }}-->
</div>
<table class="table" :key="parent.coin_name + 1">
<thead>
<tr class="text-secondary">
<th class="w-10/24">{{ $t("contract.h5") }}</th>
<th class="w-7/24">{{ $t("contract.g3") }}</th>
<th class="w-7/24 text-right">
{{ $t("contract.h6") }}
</th>
</tr>
</thead>
<tbody>
<!-- @click="activeSymbol = item.symbol" -->
<tr
v-for="item in parent.marketInfoList"
:key="item.symbol"
:class="{ active: item.symbol == activeSymbol }"
@click="ispopover1(item.symbol)">
<td class="w-10/24">
{{ item.symbol }}/{{ parent.coin_name }}
</td>
<td
class="w-7/24 "
:class="item.increase < 0 ? 'decreace' : 'increase'">
{{ item.price }}
</td>
<td
class="w-7/24"
:class="item.increase < 0 ? 'decreace' : 'increase'">
{{ item.increaseStr }}
</td>
</tr>
</tbody>
</table>
</template>
</div>
<div class="ml-2" style="border:1px solid #ddd;">
<account class="bg-plain" :accountInfo="accountInfo"/>
</div>
</div>
<div>
{{ activeContract.vol }}
<div style="display: flex;width: 80%; float: right;">
<div style="width: 90%;">
<kline
:activeCoin="{ pair_name: activeContract.pair_name }"
v-if="activeContract.pair_name"
:contract="true"
:wsUrl="wsUrl"
/>
<exchange-store
:holdPositionList="holdPositionList"
:symbol="activeSymbol"
:defaultPrice="defaultPrice"
:newPriceObj="newPriceObj"
:contractOpen="contractOpen"
@accountInfo="accountInfo = $event"
@position="holdPosition"
@getSymbolDetail="symbolDetail=$event"
/>
</div>
<div style="width: 25%;max-height:65vh;overflow:hidden;">
<handicap
@input="newPriceObj = $event"
@selectprice="defaultPrice = $event"
:symbol="activeSymbol"
:wsUrl="wsUrl"
:ws="ws"
class="mr-2,w1"
ref="handicap"/>
</div>
</div>
</div>
</div>
</div>
<!-- <div><theme-change /></div> -->
<!-- 盘口 -->
<!-- <handicap
@input="newPriceObj = $event"
@selectprice="defaultPrice = $event"
:symbol="activeSymbol"
:wsUrl="wsUrl"
:ws="ws"
class="mr-2"
ref="handicap"
/> -->
<!-- 交易 -->
<!-- <exchange-store
:holdPositionList="holdPositionList"
:symbol="activeSymbol"
:defaultPrice="defaultPrice"
:newPriceObj="newPriceObj"
:contractOpen="contractOpen"
@accountInfo="accountInfo = $event"
@position="holdPosition"
@getSymbolDetail="symbolDetail=$event"
/> -->
</div>
<kline
:activeCoin="{ pair_name: activeContract.pair_name }"
v-if="activeContract.pair_name"
:contract="true"
:wsUrl="wsUrl"
/>
</div>
<!-- 盘口 -->
<handicap
@input="newPriceObj = $event"
@selectprice="defaultPrice = $event"
:symbol="activeSymbol"
:wsUrl="wsUrl"
:ws="ws"
class="mr-2"
ref="handicap"
/>
<!-- 交易 -->
<exchange-store
:holdPositionList="holdPositionList"
:symbol="activeSymbol"
:defaultPrice="defaultPrice"
:newPriceObj="newPriceObj"
:contractOpen="contractOpen"
@accountInfo="accountInfo = $event"
@position="holdPosition"
@getSymbolDetail="symbolDetail=$event"
/>
</div>
<page-bottom
@position="holdPosition"
@isall="
<!-- <div class="change"> -->
<!-- 盘口 -->
<!-- <div style="width: 30%;">
<handicap
@input="newPriceObj = $event"
@selectprice="defaultPrice = $event"
:symbol="activeSymbol"
:wsUrl="wsUrl"
:ws="ws"
class="mr-2"
ref="handicap"
/>
</div> -->
<!-- <div style="width: 30%;"> -->
<!-- 交易 -->
<!-- <exchange-store
:holdPositionList="holdPositionList"
:symbol="activeSymbol"
:defaultPrice="defaultPrice"
:newPriceObj="newPriceObj"
:contractOpen="contractOpen"
@accountInfo="accountInfo = $event"
@position="holdPosition"
@getSymbolDetail="symbolDetail=$event"
/> -->
<!-- </div> -->
<!-- </div> -->
<page-bottom
@position="holdPosition"
@isall="
holdPositionAll = $event;
holdPosition();
"
@setactiveItem="setactiveItem"
:accountInfo="accountInfo"
:newPriceObj="newPriceObj"
:holdPositionList="holdPositionList"
:holdPositionAll="holdPositionAll"
:symbol="activeSymbol"
:symbolDetail="symbolDetail"
/>
<div
class="modal fade"
id="openContract"
tabindex="-1"
role="dialog"
aria-labelledby="contractClose"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="contractClose">
{{ contractAgreement.title }}
</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div v-html="contractAgreement.body"></div>
</div>
<div class="modal-footer d-flex justify-content-center">
@setactiveItem="setactiveItem"
:accountInfo="accountInfo"
:newPriceObj="newPriceObj"
:holdPositionList="holdPositionList"
:holdPositionAll="holdPositionAll"
:symbol="activeSymbol"
:symbolDetail="symbolDetail"
/>
<div
class="modal fade"
id="openContract"
tabindex="-1"
role="dialog"
aria-labelledby="contractClose"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="contractClose">
{{ contractAgreement.title }}
</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div v-html="contractAgreement.body"></div>
</div>
<div class="modal-footer d-flex justify-content-center">
<button type="button" class="btn btn-primary" @click="opening">
{{$t('contract.j8')}}
</button>
</div>
<button type="button" class="btn btn-primary" @click="opening">
{{ $t('contract.j8') }}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import kline from "../option/kline";
@ -207,180 +304,201 @@ import Contract from "../../api/contract";
import Socket from "@/api/server/Socket.js";
import Home from "@/api/home";
import bus from "@/components/bus.js";
export default {
components: {
kline,
handicap,
account,
exchangeStore,
pageBottom
},
data() {
return {
contractList: [],
activeSymbol: "",
holdPositionAll: false,
holdPositionList: [],
newPriceObj: {},
pcBannerList:[],
accountInfo: {},
defaultPrice: "",
wsUrl: this.Globals.Server.Path.WS1,
ws: new Socket(this.Globals.Server.Path.WS1),
_time: null,
contractOpen: false,
contractAgreement: {},
symbolDetail:{},
};
},
computed: {
activeContract(val) {
let contractList=this.contractList
.map(item => item.marketInfoList)
.flat()
.find(item => item.symbol == this.activeSymbol) || {}
if(val.price){
components: {
kline,
handicap,
account,
exchangeStore,
pageBottom
},
data() {
return {
contractList: [],
activeSymbol: "",
holdPositionAll: false,
holdPositionList: [],
newPriceObj: {},
pcBannerList: [],
accountInfo: {},
defaultPrice: "",
wsUrl: this.Globals.Server.Path.WS1,
ws: new Socket(this.Globals.Server.Path.WS1),
_time: null,
contractOpen: false,
contractAgreement: {},
symbolDetail: {},
};
},
computed: {
activeContract(val) {
let yes_symbol = this.$route.query.symbol;
if(yes_symbol){
this.activeSymbol = yes_symbol;
}
let contractList = this.contractList
.map(item => item.marketInfoList)
.flat()
.find(item => item.symbol == this.activeSymbol) || {}
if (val.price) {
delete contractList.price
}
return contractList;
},
isLogin() {
return Boolean(localStorage.token);
}
},
watch: {
activeSymbol() {
this.holdPosition();
// console.log(contractList)
return contractList;
},
isLogin() {
return Boolean(localStorage.token);
}
},
},
destroyed() {
clearInterval(this._time);
},
created() {
// this.openStatus();
this.getMarketList();
this.holdPosition();
this.indexList();
this._time = setInterval(() => {
if (this.contractOpen) {
this.holdPosition();
}
}, 3000);
this.ws.on("open", () => {
this.swapMarketList();
});
// console.info(this.$refs)
bus.$on('collapse', msg => {
this.activeContract.price =this.activeContract.symbol=='BTC'? (msg.close).toFixed(1):(msg.close).toFixed(3);
this.holdPositionList.map(item=>{
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price
})
});
},
//
mounted: function () {
setInterval(() => {
this.holdPosition();
}, 2000)
},
methods: {
ispopover1(item){
this.activeSymbol=item;
this.$refs.popover.showPopper = false;
watch: {
activeSymbol() {
this.holdPosition();
},
},
swapMarketList() {
let msg = "swapMarketList";
this.ws.send({
cmd: "sub",
msg: msg
});
this.ws.on("message", res => {
let { data, sub,cmd } = res;
if (sub == msg) {
// console.log(data, '11--------------------')
if( data.symbol=='BTC' )(data.price).toFixed(1)
this.contractList = data;
}else if (cmd == "ping") {
this.ws.send({
cmd: "pong"
});
}
});
this.ws.on('close',()=>{
this.ws= new Socket(this.Globals.Server.Path.WS1),
console.log('链接关闭');
this.wsOpen();
})
destroyed() {
clearInterval(this._time);
},
wsOpen(){
created() {
// this.openStatus();
this.getMarketList();
this.holdPosition();
this.indexList();
this._time = setInterval(() => {
if (this.contractOpen) {
this.holdPosition();
}
}, 3000);
this.ws.on("open", () => {
this.swapMarketList();
this.$refs.handicap.linkSocket()
this.swapMarketList();
});
// console.info(this.$refs)
bus.$on('collapse', msg => {
this.activeContract.price = this.activeContract.symbol == 'BTC' ? (msg.close).toFixed(1) : (msg.close).toFixed(3);
this.holdPositionList.map(item => {
if (item.symbol == this.activeContract.symbol) item.realtimePrice = this.activeContract.price
})
});
},
//
getMarketList() {
Contract.getMarketList().then(res => {
this.contractList = res;
//
let firstParent = res[0];
if (firstParent) {
let first = firstParent.marketInfoList[0];
if (first) this.activeSymbol = first.symbol;
}
});
},
//
holdPosition() {
if (!this.isLogin) return;
let data = {
symbol: (this.holdPositionAll && this.activeSymbol) || ""
};
Contract.holdPosition(data, { loading: false }).then(res => {
console.info(res)
res.map(item=>{
if(item.symbol==this.activeContract.symbol) item.realtimePrice=this.activeContract.price
})
this.holdPositionList = res;
});
//
mounted: function () {
setInterval(() => {
this.holdPosition();
}, 2000)
},
//
openStatus() {
if(!this.isLogin) return;
Contract.openStatus().then(res => {
this.contractOpen = res.open;
if (!this.contractOpen) {
this.contractAgreement = res.contractAgreement;
$("#openContract").modal("show");
methods: {
ispopover1(item) {
this.activeSymbol = item;
this.$refs.popover.showPopper = false;
this.$router.push({name:'contract',query: {symbol:item}});
},
swapMarketList() {
let msg = "swapMarketList";
this.ws.send({
cmd: "sub",
msg: msg
});
this.ws.on("message", res => {
let {data, sub, cmd} = res;
if (sub == msg) {
if (data.symbol == 'BTC') (data.price).toFixed(1)
this.contractList = data;
} else if (cmd == "ping") {
this.ws.send({
cmd: "pong"
});
}
});
this.ws.on('close', () => {
this.ws = new Socket(this.Globals.Server.Path.WS1),
console.log('链接关闭');
this.wsOpen();
})
},
wsOpen() {
this.ws.on("open", () => {
this.swapMarketList();
this.$refs.handicap.linkSocket()
});
},
//
getMarketList() {
Contract.getMarketList().then(res => {
this.contractList = res;
//
let firstParent = res[0];
if (firstParent) {
let first = firstParent.marketInfoList[0];
if (first) this.activeSymbol = first.symbol;
}
});
},
//
holdPosition() {
if (!this.isLogin) return;
let data = {
symbol: (this.holdPositionAll && this.activeSymbol) || ""
};
Contract.holdPosition(data, {loading: false}).then(res => {
console.info(res)
res.map(item => {
if (item.symbol == this.activeContract.symbol) item.realtimePrice = this.activeContract.price
})
this.holdPositionList = res;
});
},
//
openStatus() {
if (!this.isLogin) return;
Contract.openStatus().then(res => {
this.contractOpen = res.open;
if (!this.contractOpen) {
this.contractAgreement = res.contractAgreement;
$("#openContract").modal("show");
}
});
},
//
opening() {
Contract.opening().then(res => {
$("#openContract").modal("hide");
this.contractOpen = true;
this.$message.success(this.$t('contract.j9'));
});
},
indexList() {
Home.indexList().then((res) => {
this.pcBannerList = res.pcBannerList
setTimeout(() => {
this.skroll();
}, 100);
}).catch((res) => {
});
},
//
setactiveItem(index = 0) {
this.accountInfo = this.holdPositionList[index]
}
});
},
//
opening() {
Contract.opening().then(res => {
$("#openContract").modal("hide");
this.contractOpen = true;
this.$message.success(this.$t('contract.j9'));
});
},
indexList() {
Home.indexList().then((res) => {
this.pcBannerList = res.pcBannerList
setTimeout(() => {
this.skroll();
}, 100);
}).catch((res) => {});
},
//
setactiveItem(index=0){
this.accountInfo=this.holdPositionList[index]
}
}
};
</script>
<style lang="scss" scoped>
.justify-content-between >>> .dark-app .theme-switch .theme-switch-button .left, .dark-app .theme-switch .theme-switch-button .right{
color:white !important
}
.justify-content-between > > > .dark-app .theme-switch .theme-switch-button .left, .dark-app .theme-switch .theme-switch-button .right {
color: white !important
}
.change {
// height: 400px;
width: 100%;
background-color: #fff;
display: flex;
// padding: 20px 50px;
margin-top: 10px;
}
.w1 {
width: 30% !important;
height: 100vh !important;
}
</style>

5
src/views/contract/page-bottom.vue

@ -28,9 +28,6 @@
<transfer-record :symbol="symbol" v-if="tab == 5" />
</div>
</div>
<div class="ml-2">
<account class="bg-plain" :accountInfo="accountInfo"/>
</div>
</div>
</template>
<script>
@ -95,7 +92,7 @@ export default {
},
methods: {
setactive(index){
this.$emit("setactiveItem",index);
this.$emit("setactiveItem",index);
}
}
};

2
src/views/course/detail.vue

@ -37,4 +37,4 @@ export default {};
</script>
<style>
</style>
</style>

11
src/views/exchange/book-trades.vue

@ -43,7 +43,7 @@
</td>
<td class="w-33 text-right" :class="changeRate.startsWith('+') ? 'increace' : 'decreace'">
<span>{{ $t("exchange.change") }}</span>
{{ changeRate }}
{{ exxxt }}
</td>
</tr>
<tr style="display:block;" v-else>
@ -137,6 +137,8 @@ export default {
'priceCny'
],
data() {
now_eex:[];
exxxt:[];
return this.$parent;
},
@ -159,6 +161,7 @@ export default {
let val = Math.division(
Math.subtr(this.newTrade.price, this.marketInfo.open),
this.marketInfo.open);
this.exxxt = this.marketInfo.increaseStr;
// +
let sign = val >= 0 ? '+' : '';
@ -237,7 +240,7 @@ export default {
bookTrades() {
Market.getBooks(this.symbol).then(response => {
//
//
this.sellList = response.sellList.sort((a, b) => b.price - a.price);
this.buyList = response.buyList;
this.trade = response.tradeList;
@ -254,7 +257,7 @@ export default {
// mounted[]created []ajax
this.bookTrades();
},
}
</script>
@ -283,7 +286,7 @@ export default {
@include flexible(column-reverse, flex-start, flex-start, wrap);
// flex-shrink: 0; //
// flex-shrink: 0; //
display: flex !important;
overflow-x: hidden; //

3
src/views/exchange/index.vue

@ -59,6 +59,7 @@ export default {
isLianjie:false,
// `btcusdt` `/`
symbol: this.$route.params.symbol || null,
// symbol:`btcusdt`,
marketId: null,
marketInfo: null, //
pair: {
@ -489,7 +490,7 @@ export default {
},
created() {
console.info(this.$route.params)
this.initWs()
if (this.symbol) this.getCurrencyExCny();
this.indexList()

519
src/views/exchange/make-deal.vue

@ -1,288 +1,308 @@
<template>
<div class="col-md-6">
<div class="px-4 py-2 heading">
<!-- <theme-change/> -->
<el-tooltip placement="bottom" effect="light">
<div slot="content" class="market">
<div class="coin p-md color-light fn-20">
<img :src="detail.coin_icon" width="20" height="20" alt="">
{{detail.full_name}}
<div class="col-md-6">
<div class="coin-change d-flex align-items-center py-2 pl-4 heading justify-content-between" style="width:100%;float: left;">
<div class="d-flex align-items-center">
<div class="coin d-flex align-items-center">
<!--{{ sactiveContracttt.pair_name }}-->
{{ pair.to }}/{{ pair.from }}
</div>
<div class="list">
<div class="d-flex justify-between p-x-md p-y-xs">
<div>{{$t('nav.c3')}}</div>
<div class="color-light">
{{detail.total_issuance}}
<div
class="price px-3 border-right"
:class="{
decreace: sactiveContracttt.increase < 0,
increace: sactiveContracttt.increase >= 0
}"
>
<span class="current">{{ sactiveContracttt.price }}$</span>
&nbsp;
<span class="zf">{{ sactiveContracttt.increaseStr }}</span>
</div>
<!-- 币种价值数据 -->
<div class="d-flex fn-12">
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h7") }}
</div>
</div>
<div class="d-flex justify-between p-x-md p-y-xs">
<div>{{$t('nav.c4')}}</div>
<div class="color-light">
{{detail.total_circulation}}
<div>
{{ sactiveContracttt.high }}
</div>
</div>
<div class="d-flex justify-between p-x-md p-y-xs">
<div>{{$t('nav.c5')}}</div>
<div class="color-light">
{{detail.crowdfunding_price}}
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h8") }}
</div>
</div>
<div class="d-flex justify-between p-x-md p-y-xs">
<div>{{$t('nav.c6')}}</div>
<div class="color-light">
{{detail.publish_time}}
<div>
{{ sactiveContracttt.low }}
</div>
</div>
<div class=" p-x-md p-y-xs">
<div>{{$t('nav.c7')}}</div>
<div class="color-light ov">
{{detail.white_paper_link}}
<div class="item px-2">
<div class="title mb-1 text-secondary">
24h {{ $t("contract.h9") }}
<!-- {{ $t("contract.e2") }} -->
(USDT)
</div>
</div>
<div class=" p-x-md p-y-xs">
<div>{{$t('nav.c8')}}</div>
<div class="color-light ov">
{{detail.official_website_link}}
<div>
{{ sactiveContracttt.vol }}
</div>
</div>
</div>
<div class="p-md">
<div class="fn-20 color-light">
{{$t('nav.c9')}}
</div>
<div class="p-y-md edit-content" v-html="detail.coin_content">
</div>
</div>
</div>
<!-- <el-button><img src="../../assets/img/shuoming.png" width="20" height="20" alt=""></el-button> -->
</el-tooltip>
</div>
<!-- 生成K线图 -->
<k-line :symbol="symbol" :socket="socket" :priceDecimals="priceDecimals"></k-line>
<!-- 交易处理 -->
<div class="market-trade ">
<ul class="nav nav-pills">
<li class="nav-item">
<a href :class="[`nav-link`, {active:!isCondition&&isMarket}]" @click.prevent="isCondition=false;isMarket=true;">
{{ $t("common.market") }}
</a>
</li>
<li class="nav-item">
<a href :class="[`nav-link`, {active:!isCondition&&!isMarket}]" @click.prevent="isCondition=false;isMarket=false;">
{{ $t("common.limit") }}</a>
</li>
<!-- <li class="nav-item">
<a href :class="[`nav-link`, {active:isCondition&&!isMarket}]" @click.prevent="isCondition=true;isMarket=false;">
{{ $t("common.stop-limit") }}</a>
</li>
<li class="nav-item">
<a href :class="[`nav-link`, {active:isCondition&&isMarket}]" @click.prevent="isCondition=true;isMarket=true;">
{{ $t("common.stop-market") }}</a>
</li> -->
</ul>
<div class="tab-content">
<div class="tab-pane fade show active">
<div class="d-flex justify-content-between">
<!------------- Buy Order -------------->
<div class="market-trade-buy">
<!-- Trigger Price -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.trigger">
<!-- <div><theme-change /></div> -->
</div>
<!-- 生成K线图 -->
<k-line :symbol="symbol" :socket="socket" :priceDecimals="priceDecimals"></k-line>
<!-- 交易处理 -->
<div class="market-trade ">
<ul class="nav nav-pills">
<li class="nav-item">
<a href :class="[`nav-link`, {active:!isCondition&&isMarket}]"
@click.prevent="isCondition=false;isMarket=true;">
{{ $t("common.market") }}
</a>
</li>
<li class="nav-item">
<a href :class="[`nav-link`, {active:!isCondition&&!isMarket}]"
@click.prevent="isCondition=false;isMarket=false;">
{{ $t("common.limit") }}</a>
</li>
<!-- <li class="nav-item">
<a href :class="[`nav-link`, {active:isCondition&&!isMarket}]" @click.prevent="isCondition=true;isMarket=false;">
{{ $t("common.stop-limit") }}</a>
</li>
<li class="nav-item">
<a href :class="[`nav-link`, {active:isCondition&&isMarket}]" @click.prevent="isCondition=true;isMarket=true;">
{{ $t("common.stop-market") }}</a>
</li> -->
</ul>
<div class="tab-content">
<div class="tab-pane fade show active">
<div class="d-flex justify-content-between">
<!------------- Buy Order -------------->
<div class="market-trade-buy">
<!-- Trigger Price -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual"
v-model="visibles.buy.trigger">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.buy[0] }}
</span>
<div class="input-group" v-if="isCondition" slot="reference">
<input type="number" v-model="buyorder.trigger_price" class="form-control" :placeholder="$t('exchange.trigger-price')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
<div class="input-group" v-if="isCondition" slot="reference">
<input type="number" v-model="buyorder.trigger_price" class="form-control"
:placeholder="$t('exchange.trigger-price')">
<div class="input-group-append">
<span class="input-group-text">{{ pair.from }}</span>
</div>
</div>
</el-popover>
<template v-if="isMarket">
<div class="input-group">
<!-- Market Price -->
<input type="text" class="form-control" disabled
:placeholder="$t('exchange.at-best-price')">
</div>
</div>
</el-popover>
<template v-if="isMarket">
<div class="input-group">
<!-- Market Price -->
<input type="text" class="form-control" disabled :placeholder="$t('exchange.at-best-price')">
</div>
</template>
<template v-else>
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.limitPrice">
</template>
<template v-else>
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual"
v-model="visibles.buy.limitPrice">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.buy[1] }}
</span>
<div class="input-group" slot="reference">
<!-- Entrust Price -->
<input type="number" v-model="buyorder.entrust_price" class="form-control" :placeholder="$t('exchange.enter-price')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
<div class="input-group" slot="reference">
<!-- Entrust Price -->
<input type="number" v-model="buyorder.entrust_price" class="form-control"
:placeholder="$t('exchange.enter-price')">
<div class="input-group-append">
<span class="input-group-text">{{ pair.from }}</span>
</div>
</div>
</div>
</el-popover>
</template>
</el-popover>
</template>
<!-- Amount/Total -->
<template v-if="isMarket">
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.marketTotal">
<!-- Amount/Total -->
<template v-if="isMarket">
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual"
v-model="visibles.buy.marketTotal">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.buy[3] }}
</span>
<div class="input-group" slot="reference">
<input type="number" v-model="buyTotal" class="form-control" min=0 :placeholder="$t('exchange.enter-total')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
<div class="input-group" slot="reference">
<input type="number" v-model="buyTotal" class="form-control" min=0
:placeholder="$t('exchange.enter-total')">
<div class="input-group-append">
<span class="input-group-text">{{ pair.from }}</span>
</div>
</div>
</div>
</el-popover>
</template>
<template v-else>
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.limitAmount">
<!-- 提示框的内容 -->
<span class="content">
</el-popover>
</template>
<template v-else>
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual"
v-model="visibles.buy.limitAmount">
<!-- 提示框的内容 -->
<span class="content">
<!-- 图标 -->
<i class="el-icon-warning-outline"></i>
<!-- 提示 -->
<!-- 提示 -->
{{ msgList.buy[2] }}
</span>
<div class="input-group" slot="reference">
<input type="number" v-model="buyorder.amount" class="form-control" min=0 :placeholder="$t('exchange.enter-amount')">
<div class="input-group-append">
<span class="input-group-text">{{pair.to}}</span>
<div class="input-group" slot="reference">
<input type="number" v-model="buyorder.amount" class="form-control" min=0
:placeholder="$t('exchange.enter-amount')">
<div class="input-group-append">
<span class="input-group-text">{{ pair.to }}</span>
</div>
</div>
</div>
</el-popover>
</template>
<!-- Percent -->
<ul class="market-trade-list">
<li v-for="(item,index) in percentage" :key="index" :class="{buyPercentActive:index == buyPercentIndex}" @click="renderBuyAmount(item.value, index)">
<a href="javascript:void 0">{{ item.label }}</a>
</li>
</ul>
<!-- Total -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.orderTotal">
</el-popover>
</template>
<!-- Percent -->
<ul class="market-trade-list">
<li v-for="(item,index) in percentage" :key="index"
:class="{buyPercentActive:index == buyPercentIndex}"
@click="renderBuyAmount(item.value, index)">
<a href="javascript:void 0">{{ item.label }}</a>
</li>
</ul>
<!-- Total -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual"
v-model="visibles.buy.orderTotal">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.buy[5] }}
</span>
<p slot="reference">
{{$t('exchange.order-total')}}
<span> <b>{{buyTotal}}</b> {{pair.from}} </span>
<p slot="reference">
{{ $t('exchange.order-total') }}
<span> <b>{{ buyTotal }}</b> {{ pair.from }} </span>
</p>
</el-popover>
<!-- Available -->
<p>
<!--{{ $t('exchange.amount') }}-->
<!--<span> {{ toBalance }} {{ pair.to }}</span><br/>-->
{{ $t('exchange.balance') }}
<span> {{ fromBalance }} {{ pair.from }}</span>
</p>
</el-popover>
<!-- Available -->
<p>
{{ $t('exchange.amount') }}
<span> {{toBalance}} {{pair.to}}</span><br />
{{ $t('exchange.balance') }}
<span> {{fromBalance}} {{pair.from}}</span>
</p>
<button class="btn buy" @click="handleBuyOrder">{{ $t("common.buy") }} {{pair.to}}</button>
</div>
<button class="btn buy" @click="handleBuyOrder">{{ $t("common.buy") }} {{ pair.to }}
</button>
</div>
<!------------ Sell Order ----------->
<div class="market-trade-sell">
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.sell.trigger">
<!------------ Sell Order ----------->
<div class="market-trade-sell">
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual"
v-model="visibles.sell.trigger">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.sell[0] }}
</span>
<!-- Trigger Price -->
<div class="input-group" v-if="isCondition" slot="reference">
<input type="number" v-model="sellorder.trigger_price" class="form-control" min=0 :placeholder="$t('exchange.trigger-price')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
<!-- Trigger Price -->
<div class="input-group" v-if="isCondition" slot="reference">
<input type="number" v-model="sellorder.trigger_price" class="form-control" min=0
:placeholder="$t('exchange.trigger-price')">
<div class="input-group-append">
<span class="input-group-text">{{ pair.from }}</span>
</div>
</div>
</el-popover>
<template v-if="isMarket">
<div class="input-group">
<!-- Market Price -->
<input type="text" class="form-control" disabled
:placeholder="$t('exchange.at-best-price')">
</div>
</div>
</el-popover>
<template v-if="isMarket">
<div class="input-group">
<!-- Market Price -->
<input type="text" class="form-control" disabled :placeholder="$t('exchange.at-best-price')">
</div>
</template>
<template v-else>
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.sell.limitPrice">
</template>
<template v-else>
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual"
v-model="visibles.sell.limitPrice">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.sell[1] }}
</span>
<div class="input-group" slot="reference">
<!-- Entrust Price -->
<input type="number" v-model="sellorder.entrust_price" class="form-control" min=0 :placeholder="$t('exchange.enter-price')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
<div class="input-group" slot="reference">
<!-- Entrust Price -->
<input type="number" v-model="sellorder.entrust_price" class="form-control"
min=0 :placeholder="$t('exchange.enter-price')">
<div class="input-group-append">
<span class="input-group-text">{{ pair.from }}</span>
</div>
</div>
</div>
</el-popover>
</template>
</el-popover>
</template>
<!-- Amount -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.sell.limitAmount">
<!-- Amount -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual"
v-model="visibles.sell.limitAmount">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.sell[2] }}
</span>
<div class="input-group" slot="reference">
<input type="number" v-model="sellorder.amount" class="form-control" min=0 :placeholder="$t('exchange.enter-amount')">
<div class="input-group-append">
<span class="input-group-text">{{pair.to}}</span>
<div class="input-group" slot="reference">
<input type="number" v-model="sellorder.amount" class="form-control" min=0
:placeholder="$t('exchange.enter-amount')">
<div class="input-group-append">
<span class="input-group-text">{{ pair.to }}</span>
</div>
</div>
</div>
</el-popover>
<ul class="market-trade-list">
<li v-for="(item,index) in percentage" :key="index" :class="{sellPercentActive:index == sellPercentIndex}" @click="renderSellAmount(item.value, index)">
<a href="javascript:void 0">{{ item.label }}</a>
</li>
</ul>
</el-popover>
<!-- Total -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.sell.orderTotal">
<ul class="market-trade-list">
<li v-for="(item,index) in percentage" :key="index"
:class="{sellPercentActive:index == sellPercentIndex}"
@click="renderSellAmount(item.value, index)">
<a href="javascript:void 0">{{ item.label }}</a>
</li>
</ul>
<!-- Total -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual"
v-model="visibles.sell.orderTotal">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.sell[5] }}
</span>
<p slot="reference">
{{ $t('exchange.order-total') }}
<span>
<b>{{sellTotal}}</b> {{pair.from}} </span>
<p slot="reference">
{{ $t('exchange.order-total') }}
<span>
<b>{{ sellTotal }}</b> {{ pair.from }} </span>
</p>
</el-popover>
<p>
{{ $t('exchange.balance') }}
<!--{{ $t('exchange.amount') }}-->
<span> {{ toBalance }} {{ pair.to }} </span><br/>
<!--{{ $t('exchange.balance') }}-->
<!--<span> {{ fromBalance }} {{ pair.from }}</span>-->
</p>
</el-popover>
<p>
{{$t('exchange.amount')}}
<span> {{toBalance}} {{pair.to}} </span><br />
{{ $t('exchange.balance') }}
<span> {{fromBalance}} {{pair.from}}</span>
</p>
<button class="btn sell" @click="handleSellOrder">{{ $t("common.sell") }} {{pair.to}}</button>
<button class="btn sell" @click="handleSellOrder">{{ $t("common.sell") }} {{ pair.to }}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Exchange from "@/api/exchange";
import Market from "@/api/market";
export default {
props: ["isLogin", "socket", "symbol", "pair", "buyorder", "sellorder", "fromBalance", "toBalance", "newTrade", "minQty", "minTotal", "priceDecimals", "qtyDecimals"],
data() {
return {
detail:[],
detail: [],
isMarket: true,
isCondition: false,
userBanlance: null,
@ -309,15 +329,16 @@ export default {
orderTotal: false,
},
},
sactiveContracttt: [],
msgList: {
"buy": Array(6).fill(''), // 5
"sell": Array(6).fill('')
},
//
percentage: [{
label: "25%",
value: 0.25
},
label: "25%",
value: 0.25
},
{
label: "50%",
value: 0.5
@ -331,7 +352,7 @@ export default {
value: 1
},
],
//
//
buyPercentIndex: null,
sellPercentIndex: null,
}
@ -398,10 +419,10 @@ export default {
//
newTrade(newVal, oldVal) {
// if (!this.isMarket ) {
this.sactiveContracttt = this.$parent.marketInfo;
// trade
if (!oldVal && newVal) { //
// orderprice
// orderprice
this.cachePrice = newVal.price;
this.reset();
}
@ -413,25 +434,25 @@ export default {
}
// }
},
symbol(){
symbol() {
this.getCoinInfo()
}
},
methods: {
getCoinInfo(){
getCoinInfo() {
// console.log(this.symbol.indexOf('usdt')!=-1)
if(this.symbol.indexOf('usdt')!=-1){
var market=this.symbol.substring(0,this.symbol.length-4);
}else{
var market=this.symbol.substring(0,this.symbol.length-3);
if (this.symbol.indexOf('usdt') != -1) {
var market = this.symbol.substring(0, this.symbol.length - 4);
} else {
var market = this.symbol.substring(0, this.symbol.length - 3);
}
console.log(market)
let data = {
coin_name:market,
lang:this.lang
coin_name: market,
lang: this.lang
}
Market.getCoinInfo(data).then(res => {
Market.getCoinInfo(data).then(res => {
this.detail = res
}).catch(err => {
@ -563,12 +584,12 @@ export default {
},
chkValidate(order, total, orderType) {
//
//
//
if (!this.isLogin) {
this.$confirm(this.$t('nav.login'), {
confirmButtonText:this.$t('common.confirmBtn'),
cancelButtonText: this.$t('common.cancelBtn'),
confirmButtonText: this.$t('common.confirmBtn'),
cancelButtonText: this.$t('common.cancelBtn'),
type: 'warning'
}).then(() => {
this.$router.push(`/sign-in`);
@ -593,13 +614,13 @@ export default {
if (order.amount < this.minQty) {
flag = false;
this.visibles[orderType].limitAmount = true;
this.msgList[orderType][2] = this.$t('nav.a3')+`${this.minQty}`;
this.msgList[orderType][2] = this.$t('nav.a3') + `${this.minQty}`;
}
if (total < this.minTotal) {
flag = false;
this.visibles[orderType].orderTotal = true;
this.msgList[orderType][5] = this.$t('exchange.total')+`${this.minTotal}`;
this.msgList[orderType][5] = this.$t('exchange.total') + `${this.minTotal}`;
}
}
break;
@ -609,11 +630,11 @@ export default {
if (this.empty(total)) {
flag = false;
this.visibles[orderType].marketTotal = true;
this.msgList[orderType][3] = this.$t('nav.a4');
this.msgList[orderType][3] = this.$t('nav.a4');
} else if (this.total < this.minTotal) {
flag = false;
this.visibles.marketTotal = true;
this.msgList[3] = this.$t('nav.a5')+` ${this.minTotal}`;
this.msgList[3] = this.$t('nav.a5') + ` ${this.minTotal}`;
}
}
@ -621,11 +642,11 @@ export default {
if (this.empty(order.amount)) {
flag = false;
this.visibles[orderType].marketAmount = true;
this.msgList[orderType][4] = this.$t('nav.a6');
this.msgList[orderType][4] = this.$t('nav.a6');
} else if (order.amount < this.minQty) {
flag = false;
this.visibles[orderType].marketAmount = true;
this.msgList[orderType][4] = this.$t('nav.a7')+` ${this.minQty}`;
this.msgList[orderType][4] = this.$t('nav.a7') + ` ${this.minQty}`;
}
}
break;
@ -635,15 +656,15 @@ export default {
if (this.empty(order.trigger_price)) {
flag = false;
this.visibles[orderType].trigger = true;
this.msgList[orderType][0] = this.$t('nav.a8')
this.msgList[orderType][0] = this.$t('nav.a8')
} else if (this.empty(order.entrust_price)) {
flag = false;
this.visibles[orderType].limitPrice = true;
this.msgList[orderType][1] = this.$t('nav.a9')
this.msgList[orderType][1] = this.$t('nav.a9')
} else if (this.empty(order.amount)) {
flag = false;
this.visibles[orderType].limitAmount = true;
this.msgList[orderType][2] = this.$t('nav.b1')
this.msgList[orderType][2] = this.$t('nav.b1')
}
break;
@ -662,7 +683,7 @@ export default {
} else if (total < this.minTotal) {
flag = false;
this.visibles[orderType].marketTotal = true;
this.msgList[orderType][3] = this.$t('nav.b5')+` ${this.minTotal}`
this.msgList[orderType][3] = this.$t('nav.b5') + ` ${this.minTotal}`
}
}
@ -674,7 +695,7 @@ export default {
} else if (order.amount < this.minQty) {
flag = false;
this.visibles[orderType].marketAmount = true;
this.msgList[orderType][4] =this.$t('nav.b7')+ ` ${this.minQty}`
this.msgList[orderType][4] = this.$t('nav.b7') + ` ${this.minQty}`
}
}
@ -725,27 +746,31 @@ export default {
border: none;
border-color: transparent;
}
.market{
.market {
width: 300px;
height: 500px;
overflow: scroll;
display: flex;
flex-wrap: wrap;
padding: 10px;
display: -webkit-box;
color: black;
.ov{
display: -webkit-box;
color: black;
.ov {
width: 100%;
table-layout:fixed;
word-break:break-all;
overflow:hidden;
table-layout: fixed;
word-break: break-all;
overflow: hidden;
}
}
.p-y-xs{
.p-y-xs {
padding: 5px 0;
}
.el-button{
padding: 0!important;
background: transparent!important;
.el-button {
padding: 0 !important;
background: transparent !important;
}
</style>

874
src/views/exchange/make-deal的_cpoy.vue

@ -0,0 +1,874 @@
<template>
<div class="col-md-6">
<div class="px-4 py-2 heading">
<!--<div class="coin-change d-flex align-items-center py-2 pl-4 heading justify-content-between" style="width:100%;float: right">-->
<!-- <div class="d-flex align-items-center">-->
<!-- <div class="coin d-flex align-items-center">-->
<!-- <el-popover-->
<!-- placement="bottom"-->
<!-- ref="popover"-->
<!-- width="400"-->
<!-- trigger="click">-->
<!-- <div slot="reference">-->
<!-- {{ activeContract.pair_name }}11111111-->
<!-- &lt;!&ndash; <el-button size="mini">-->
<!-- <i class="el-icon-arrow-down"></i>-->
<!-- </el-button> &ndash;&gt;-->
<!-- </div>-->
<!-- </el-popover>-->
<!-- </div>-->
<!-- <div-->
<!-- class="price px-3 border-right"-->
<!-- :class="{-->
<!-- decreace: activeContract.increase < 0,-->
<!-- increace: activeContract.increase >= 0-->
<!-- }"-->
<!-- >-->
<!-- <span class="current">{{ activeContract.price }}$</span>-->
<!-- &nbsp;-->
<!-- <span class="zf">{{ activeContract.increaseStr }}</span>-->
<!-- </div>-->
<!-- &lt;!&ndash; 币种价值数据 &ndash;&gt;-->
<!-- <div class="d-flex fn-12">-->
<!-- <div class="item px-2">-->
<!-- <div class="title mb-1 text-secondary">-->
<!-- 24h {{ $t("contract.h7") }}-->
<!-- </div>-->
<!-- <div>-->
<!-- {{ activeContract.high }}-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="item px-2">-->
<!-- <div class="title mb-1 text-secondary">-->
<!-- 24h {{ $t("contract.h8") }}-->
<!-- </div>-->
<!-- <div>-->
<!-- {{ activeContract.low }}-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="item px-2">-->
<!-- <div class="title mb-1 text-secondary">-->
<!-- 24h {{ $t("contract.h9") }}-->
<!-- &lt;!&ndash; {{ $t("contract.e2") }} &ndash;&gt;-->
<!-- (USDT)-->
<!-- </div>-->
<!-- <div>-->
<!-- {{ activeContract.vol }}-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div><theme-change /></div> -->
<!--</div>-->
<!-- <theme-change/> -->
<el-tooltip placement="bottom" effect="light">
<div slot="content" class="market">
<div class="coin p-md color-light fn-20">
<img :src="detail.coin_icon" width="20" height="20" alt="">
{{detail.full_name}}
</div>
<div class="list">
<div class="d-flex justify-between p-x-md p-y-xs">
<div>{{$t('nav.c3')}}</div>
<div class="color-light">
{{detail.total_issuance}}
</div>
</div>
<div class="d-flex justify-between p-x-md p-y-xs">
<div>{{$t('nav.c4')}}</div>
<div class="color-light">
{{detail.total_circulation}}
</div>
</div>
<div class="d-flex justify-between p-x-md p-y-xs">
<div>{{$t('nav.c5')}}</div>
<div class="color-light">
{{detail.crowdfunding_price}}
</div>
</div>
<div class="d-flex justify-between p-x-md p-y-xs">
<div>{{$t('nav.c6')}}</div>
<div class="color-light">
{{detail.publish_time}}
</div>
</div>
<div class=" p-x-md p-y-xs">
<div>{{$t('nav.c7')}}</div>
<div class="color-light ov">
{{detail.white_paper_link}}
</div>
</div>
<div class=" p-x-md p-y-xs">
<div>{{$t('nav.c8')}}</div>
<div class="color-light ov">
{{detail.official_website_link}}
</div>
</div>
</div>
<div class="p-md">
<div class="fn-20 color-light">
{{$t('nav.c9')}}
</div>
<div class="p-y-md edit-content" v-html="detail.coin_content">
</div>
</div>
</div>
<!-- <el-button><img src="../../assets/img/shuoming.png" width="20" height="20" alt=""></el-button> -->
</el-tooltip>
</div>
<!-- 生成K线图 -->
<k-line :symbol="symbol" :socket="socket" :priceDecimals="priceDecimals"></k-line>
<!-- 交易处理 -->
<div class="market-trade ">
<ul class="nav nav-pills">
<li class="nav-item">
<a href :class="[`nav-link`, {active:!isCondition&&isMarket}]" @click.prevent="isCondition=false;isMarket=true;">
{{ $t("common.market") }}
</a>
</li>
<li class="nav-item">
<a href :class="[`nav-link`, {active:!isCondition&&!isMarket}]" @click.prevent="isCondition=false;isMarket=false;">
{{ $t("common.limit") }}</a>
</li>
<!-- <li class="nav-item">
<a href :class="[`nav-link`, {active:isCondition&&!isMarket}]" @click.prevent="isCondition=true;isMarket=false;">
{{ $t("common.stop-limit") }}</a>
</li>
<li class="nav-item">
<a href :class="[`nav-link`, {active:isCondition&&isMarket}]" @click.prevent="isCondition=true;isMarket=true;">
{{ $t("common.stop-market") }}</a>
</li> -->
</ul>
<div class="tab-content">
<div class="tab-pane fade show active">
<div class="d-flex justify-content-between">
<!------------- Buy Order -------------->
<div class="market-trade-buy">
<!-- Trigger Price -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.trigger">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.buy[0] }}
</span>
<div class="input-group" v-if="isCondition" slot="reference">
<input type="number" v-model="buyorder.trigger_price" class="form-control" :placeholder="$t('exchange.trigger-price')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
</div>
</div>
</el-popover>
<template v-if="isMarket">
<div class="input-group">
<!-- Market Price -->
<input type="text" class="form-control" disabled :placeholder="$t('exchange.at-best-price')">
</div>
</template>
<template v-else>
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.limitPrice">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.buy[1] }}
</span>
<div class="input-group" slot="reference">
<!-- Entrust Price -->
<input type="number" v-model="buyorder.entrust_price" class="form-control" :placeholder="$t('exchange.enter-price')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
</div>
</div>
</el-popover>
</template>
<!-- Amount/Total -->
<template v-if="isMarket">
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.marketTotal">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.buy[3] }}
</span>
<div class="input-group" slot="reference">
<input type="number" v-model="buyTotal" class="form-control" min=0 :placeholder="$t('exchange.enter-total')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
</div>
</div>
</el-popover>
</template>
<template v-else>
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.limitAmount">
<!-- 提示框的内容 -->
<span class="content">
<!-- 图标 -->
<i class="el-icon-warning-outline"></i>
<!-- 提示 -->
{{ msgList.buy[2] }}
</span>
<div class="input-group" slot="reference">
<input type="number" v-model="buyorder.amount" class="form-control" min=0 :placeholder="$t('exchange.enter-amount')">
<div class="input-group-append">
<span class="input-group-text">{{pair.to}}</span>
</div>
</div>
</el-popover>
</template>
<!-- Percent -->
<ul class="market-trade-list">
<li v-for="(item,index) in percentage" :key="index" :class="{buyPercentActive:index == buyPercentIndex}" @click="renderBuyAmount(item.value, index)">
<a href="javascript:void 0">{{ item.label }}</a>
</li>
</ul>
<!-- Total -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.buy.orderTotal">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.buy[5] }}
</span>
<p slot="reference">
{{$t('exchange.order-total')}}
<span> <b>{{buyTotal}}</b> {{pair.from}} </span>
</p>
</el-popover>
<!-- Available -->
<p>
{{ $t('exchange.amount') }}
<span> {{toBalance}} {{pair.to}}</span><br />
{{ $t('exchange.balance') }}
<span> {{fromBalance}} {{pair.from}}</span>
</p>
<button class="btn buy" @click="handleBuyOrder">{{ $t("common.buy") }} {{pair.to}}</button>
</div>
<!------------ Sell Order ----------->
<div class="market-trade-sell">
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.sell.trigger">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.sell[0] }}
</span>
<!-- Trigger Price -->
<div class="input-group" v-if="isCondition" slot="reference">
<input type="number" v-model="sellorder.trigger_price" class="form-control" min=0 :placeholder="$t('exchange.trigger-price')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
</div>
</div>
</el-popover>
<template v-if="isMarket">
<div class="input-group">
<!-- Market Price -->
<input type="text" class="form-control" disabled :placeholder="$t('exchange.at-best-price')">
</div>
</template>
<template v-else>
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.sell.limitPrice">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.sell[1] }}
</span>
<div class="input-group" slot="reference">
<!-- Entrust Price -->
<input type="number" v-model="sellorder.entrust_price" class="form-control" min=0 :placeholder="$t('exchange.enter-price')">
<div class="input-group-append">
<span class="input-group-text">{{pair.from}}</span>
</div>
</div>
</el-popover>
</template>
<!-- Amount -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.sell.limitAmount">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.sell[2] }}
</span>
<div class="input-group" slot="reference">
<input type="number" v-model="sellorder.amount" class="form-control" min=0 :placeholder="$t('exchange.enter-amount')">
<div class="input-group-append">
<span class="input-group-text">{{pair.to}}</span>
</div>
</div>
</el-popover>
<ul class="market-trade-list">
<li v-for="(item,index) in percentage" :key="index" :class="{sellPercentActive:index == sellPercentIndex}" @click="renderSellAmount(item.value, index)">
<a href="javascript:void 0">{{ item.label }}</a>
</li>
</ul>
<!-- Total -->
<el-popover popper-class='popover-tips' placement="top-start" trigger="manual" v-model="visibles.sell.orderTotal">
<span class="content">
<i class="el-icon-warning-outline"></i>
{{ msgList.sell[5] }}
</span>
<p slot="reference">
{{ $t('exchange.order-total') }}
<span>
<b>{{sellTotal}}</b> {{pair.from}} </span>
</p>
</el-popover>
<p>
{{$t('exchange.amount')}}
<span> {{toBalance}} {{pair.to}} </span><br />
{{ $t('exchange.balance') }}
<span> {{fromBalance}} {{pair.from}}</span>
</p>
<button class="btn sell" @click="handleSellOrder">{{ $t("common.sell") }} {{pair.to}}</button>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Exchange from "@/api/exchange";
import Market from "@/api/market";
import Contract from "@/api/contract";
export default {
props: ["isLogin", "socket", "symbol", "pair", "buyorder", "sellorder", "fromBalance", "toBalance", "newTrade", "minQty", "minTotal", "priceDecimals", "qtyDecimals"],
data() {
return {
contractList: [],
detail:[],
isMarket: true,
isCondition: false,
userBanlance: null,
cacheTotal: 0, //
cachePrice: null, //
activeContract:[],
//
visibles: {
"buy": {
limitPrice: false, //
limitAmount: false, //
marketTotal: false, //
marketAmount: false, //
trigger: false, //
orderTotal: false, //
},
"sell": {
limitPrice: false,
limitAmount: false,
marketTotal: false,
marketAmount: false,
trigger: false,
orderTotal: false,
},
},
msgList: {
"buy": Array(6).fill(''), // 5
"sell": Array(6).fill('')
},
//
percentage: [{
label: "25%",
value: 0.25
},
{
label: "50%",
value: 0.5
},
{
label: "75%",
value: 0.75
},
{
label: "100%",
value: 1
},
],
//
buyPercentIndex: null,
sellPercentIndex: null,
}
},
computed: {
_activeContract(val) {
Market.getMarketList().then(data => {
let contractList = data[0]
.map(item => item.marketInfoList)
.flat()
.find(item => item.symbol == this.activeSymbol) || {}
}).catch(err => {});
// console.log("market detail")
// console.log(val)
// let contractList = this.contractList
// .map(item => item.marketInfoList)
// .flat()
// .find(item => item.symbol == this.activeSymbol) || {}
// if (val.price) {
// delete contractList.price
// }
// console.log(contractList)
return contractList;
},
// type
type() {
if (!this.isCondition) {
return this.isMarket ? 2 : 1;
} else {
return this.isMarket ? 4 : 3;
}
},
theme() {
return localStorage.theme ? localStorage.theme : "light";
},
buyTotal: {
get() {
if (!this.isMarket) {
return Math.multiple(this.buyorder.entrust_price, this.buyorder.amount);
} else {
return this.cacheTotal;
}
},
set(val) {
//
if (!this.isMarket) {
this.buyorder.amount = Math.division(val, this.buyorder.entrust_price);
} else { //
this.cacheTotal = val;
}
}
},
sellTotal: {
get() {
return Math.multiple(this.sellorder.entrust_price, this.sellorder.amount);
}
},
//
lang() {
let browser_Lang = navigator.language.includes('zh') ? 'zh' : 'en';
return localStorage.lang || browser_Lang;
},
},
watch: {
custom(newVal) {
console.log(newVal)
},
type() {
//
// percentage
this.reset();
},
//
newTrade(newVal, oldVal) {
// if (!this.isMarket ) {
// trade
if (!oldVal && newVal) { //
// orderprice
this.cachePrice = newVal.price;
this.reset();
}
//
if (oldVal && !newVal) { //
this.cachePrice = null;
this.reset();
}
// }
},
symbol(){
this.getCoinInfo()
}
},
methods: {
//
getMarketList() {
Contract.getMarketList().then(res => {
this.contractList = res[0];
//console.log("%c%s","color:green","market res")
let tmpList = res[0].marketInfoList;
for(i=0;i<tmpList.length;i++){
let tcurCoin = tmpList[i]
if(tcurCoin.symbol.toLowerCase()+"usdt" === this.symbol){
this.activeContract = tcurCoin
}
}
//
this.activeContract = filterList
//
let firstParent = res[0];
if (firstParent) {
let first = firstParent.marketInfoList[0];
if (first) this.activeSymbol = first.symbol;
}
});
},
getCoinInfo(){
// console.log(this.symbol.indexOf('usdt')!=-1)
if(this.symbol.indexOf('usdt')!=-1){
var market=this.symbol.substring(0,this.symbol.length-4);
}else{
var market=this.symbol.substring(0,this.symbol.length-3);
}
console.log("%c%s","#ccff00","currnet market")
console.log(market)
let data = {
coin_name:market,
lang:this.lang
}
//
let tmpList = this.contractList.marketInfoList;
for(i=0;i<tmpList.length;i++){
let tcurCoin = tmpList[i]
if(tcurCoin.symbol.toLowerCase()+"usdt" === this.symbol){
this.activeContract = tcurCoin
}
}
Market.getCoinInfo(data).then(res => {
this.detail = res
}).catch(err => {
});
},
renderBuyAmount(val, index) {
console.info(val)
console.info(this.buyorder)
if (!this.buyorder.entrust_price) {
this.visibles.buy.limitPrice = true;
this.msgList.buy[1] = this.$t('nav.set');
this.clearAll();
return;
}
this.buyPercentIndex = index;
this.buyTotal = Math.multiple(this.fromBalance, val);
},
renderSellAmount(val, index) {
if (!this.sellorder.entrust_price) {
this.visibles.sell.limitPrice = true;
this.msgList.sell[1] = this.$t('nav.set');
this.clearAll();
return;
}
this.sellPercentIndex = index;
this.sellorder.amount = Math.multiple(this.toBalance, val);
},
handleBuyOrder() {
//
if (!this.chkValidate(this.buyorder, this.buyTotal, "buy")) return;
const baseArgs = {
symbol: this.pair.to.concat('/', this.pair.from),
type: this.type,
};
//
// 1
// 2
// 3
// 4
Exchange.storeEntrust(Object.assign(this.buyorder, {
total: this.buyTotal,
}, baseArgs)).then(data => {
//
this.$emit('update');
//
this.reset();
}).catch(err => {
});
},
handleSellOrder() {
//
if (!this.chkValidate(this.sellorder, this.sellTotal, "sell")) return;
// console.info(this.sellTotal)
const baseArgs = {
symbol: this.pair.to.concat('/', this.pair.from),
type: this.type,
};
Exchange.storeEntrust(Object.assign(this.sellorder, {
total: this.sellTotal
}, baseArgs)).then(data => {
//
this.$emit('update');
//
this.reset();
}).catch(err => {
});
},
reset() {
// newTrade 0
//
let price = this.cachePrice || 0;
// console.info(price)
// console.info(this.priceDecimals)
this.buyorder.entrust_price = Math.omitTo(price, this.priceDecimals);
this.buyorder.trigger_price = Math.omitTo(price, this.priceDecimals);
this.sellorder.entrust_price = Math.omitTo(price, this.priceDecimals);
// console.info(this.sellorder.entrust_price)
this.sellorder.trigger_price = Math.omitTo(price, this.priceDecimals);
//
this.buyorder.amount = 0;
this.sellorder.amount = 0;
// totalset
// this.buyTotal = 0;
// this.cacheTotal = 0;
//
this.buyPercentIndex = -1;
this.sellPercentIndex = -1;
},
clearAll() {
// 5s
setTimeout(function () {
Object.keys(this.visibles.buy).forEach(key => this.visibles.buy[key] = false);
Object.keys(this.visibles.sell).forEach(key => this.visibles.sell[key] = false);
}.bind(this), 5000);
},
empty(val) {
let ret;
switch (typeof val) {
case "number":
ret = val == 0;
break;
case "string":
ret = val == "0" || /^\s?$/.test(val);
break;
case "boolean":
ret = val;
break;
default:
ret = Boolean(val);
break;
}
return ret;
},
chkValidate(order, total, orderType) {
//
//
if (!this.isLogin) {
this.$confirm(this.$t('nav.login'), {
confirmButtonText:this.$t('common.confirmBtn'),
cancelButtonText: this.$t('common.cancelBtn'),
type: 'warning'
}).then(() => {
this.$router.push(`/sign-in`);
}).catch();
return;
}
let flag = true;
switch (this.type) {
case 1: // limit
if (this.empty(order.entrust_price)) {
flag = false;
this.visibles[orderType].limitPrice = true;
this.msgList[orderType][1] = this.$t('nav.a1');
} else if (this.empty(order.amount)) {
flag = false;
this.visibles[orderType].limitAmount = true;
this.msgList[orderType][2] = this.$t('nav.a2');
} else {
if (order.amount < this.minQty) {
flag = false;
this.visibles[orderType].limitAmount = true;
this.msgList[orderType][2] = this.$t('nav.a3')+`${this.minQty}`;
}
if (total < this.minTotal) {
flag = false;
this.visibles[orderType].orderTotal = true;
this.msgList[orderType][5] = this.$t('exchange.total')+`${this.minTotal}`;
}
}
break;
case 2: // market
if (order.direction == "buy") { //
if (this.empty(total)) {
flag = false;
this.visibles[orderType].marketTotal = true;
this.msgList[orderType][3] = this.$t('nav.a4');
} else if (this.total < this.minTotal) {
flag = false;
this.visibles.marketTotal = true;
this.msgList[3] = this.$t('nav.a5')+` ${this.minTotal}`;
}
}
if (order.direction == "sell") { //
if (this.empty(order.amount)) {
flag = false;
this.visibles[orderType].marketAmount = true;
this.msgList[orderType][4] = this.$t('nav.a6');
} else if (order.amount < this.minQty) {
flag = false;
this.visibles[orderType].marketAmount = true;
this.msgList[orderType][4] = this.$t('nav.a7')+` ${this.minQty}`;
}
}
break;
case 3: // stop-limit
if (this.empty(order.trigger_price)) {
flag = false;
this.visibles[orderType].trigger = true;
this.msgList[orderType][0] = this.$t('nav.a8')
} else if (this.empty(order.entrust_price)) {
flag = false;
this.visibles[orderType].limitPrice = true;
this.msgList[orderType][1] = this.$t('nav.a9')
} else if (this.empty(order.amount)) {
flag = false;
this.visibles[orderType].limitAmount = true;
this.msgList[orderType][2] = this.$t('nav.b1')
}
break;
case 4: // stop-market
if (this.empty(order.trigger_price)) {
flag = false;
this.visibles[orderType].trigger = true;
this.msgList[orderType][0] = this.$t('nav.b2')
} else {
if (order.direction == "buy") {
if (this.empty(total)) {
flag = false;
this.visibles[orderType].marketTotal = true;
this.msgList[orderType][3] = this.$t('nav.b3')
} else if (total < this.minTotal) {
flag = false;
this.visibles[orderType].marketTotal = true;
this.msgList[orderType][3] = this.$t('nav.b5')+` ${this.minTotal}`
}
}
if (order.direction == "sell") {
if (this.empty(order.amount)) {
flag = false;
this.visibles[orderType].marketAmount = true;
this.msgList[orderType][4] = this.$t('nav.b6')
} else if (order.amount < this.minQty) {
flag = false;
this.visibles[orderType].marketAmount = true;
this.msgList[orderType][4] =this.$t('nav.b7')+ ` ${this.minQty}`
}
}
}
break;
}
//
this.clearAll();
//
return flag;
},
},
created() {
this.getMarketList();
this.getCoinInfo()
this.reset();
},
}
</script>
<style lang="scss" scoped>
.buyPercentActive {
a:link {
font-weight: bold;
background: #26a69a;
color: #fff;
}
}
.sellPercentActive {
a:link {
font-weight: bold;
background: #ef5350;
color: #fff;
}
}
.input-group-text {
width: 68px;
@include flexible(row, center, center);
}
.market-trade {
border: none;
border-color: transparent;
}
.market{
width: 300px;
height: 500px;
overflow: scroll;
display: flex;
flex-wrap: wrap;
padding: 10px;
display: -webkit-box;
color: black;
.ov{
width: 100%;
table-layout:fixed;
word-break:break-all;
overflow:hidden;
}
}
.p-y-xs{
padding: 5px 0;
}
.el-button{
padding: 0!important;
background: transparent!important;
}
</style>

6
src/views/exchange/symbols.vue

@ -210,9 +210,9 @@ export default {
},
created() {
},
mounted() {
// []
Market.getMarketList().then(data => {
@ -246,6 +246,6 @@ export default {
width: 32% !important;
}
.active{
color: #326AEB!important;
color: #f0a70a!important;
}
</style>

2700
src/views/home/index.vue

File diff suppressed because it is too large

34
src/views/notice/detail.vue

@ -12,24 +12,24 @@
<div class="text-muted">{{article.created_at}}</div>
</div>
<div class="edit-content py-4 text-light">
<div v-html="article.body"></div>
</div>
<div class="row mt-3">
<div class="col-12">
<div class="title h3 my-4">{{$t('college.recommendedCourse')}}</div>
<div class="row justify-content-between">
<div class="item col-lg-3 col-md-6 mb-4 col-xs-12" v-for="(item,index) in recommend" :key="index">
<router-link :to="`/college/detail/${item.category_id}/${item.id}`">
<div class="banner">
<!-- <img src="http://iph.href.lu/260x150" alt /> -->
<img :src="item.full_cover" alt />
</div>
<div class="txt">{{item.title}}</div>
</router-link>
</div>
</div>
</div>
<div v-html="article.body" style="color:#000000;"></div>
</div>
<!-- <div class="row mt-3">-->
<!-- <div class="col-12">-->
<!-- <div class="title h3 my-4">{{$t('college.recommendedCourse')}}</div>-->
<!-- <div class="row justify-content-between">-->
<!-- <div class="item col-lg-3 col-md-6 mb-4 col-xs-12" v-for="(item,index) in recommend" :key="index">-->
<!-- <router-link :to="`/college/detail/${item.category_id}/${item.id}`">-->
<!-- <div class="banner">-->
<!-- &lt;!&ndash; <img src="http://iph.href.lu/260x150" alt /> &ndash;&gt;-->
<!-- <img :src="item.full_cover" alt />-->
<!-- </div>-->
<!-- <div class="txt">{{item.title}}</div>-->
<!-- </router-link>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</div>

6
src/views/notice/index.vue

@ -52,10 +52,10 @@ export default {
<style lang="scss" scoped>
.list{
.item{
color: #758696;
color: #000000;
&:hover{
color: white;
color: #0c1daa;
}
}
}
</style>
</style>

903
src/views/option/kline.vue

@ -1,5 +1,5 @@
<template>
<div id="tradingview_1355aw2"></div>
<div id="tradingview_1355aw2"></div>
</template>
<script>
@ -10,487 +10,494 @@ import Contract from "@/api/contract";
import Socket from "@/api/server/Socket.js";
import tvStyle from "@/assets/js/tvStyle.js";
import bus from "@/components/bus.js";
import { mapState } from "vuex";
import {mapState} from "vuex";
let exchangeAjax = {
getKline: Option.getKline,
getSymbol(name) {
return name.split("/").join("").toLowerCase();
},
msg: "Kline_",
getKline: Option.getKline,
getSymbol(name) {
return name.split("/").join("").toLowerCase();
},
msg: "Kline_",
};
let contractAjax = {
getKline: Contract.getKline,
getSymbol(name) {
return name.split("/")[0];
},
msg: "swapKline_",
getKline: Contract.getKline,
getSymbol(name) {
return name.split("/")[0];
},
msg: "swapKline_",
};
export default {
props: {
contract: {
default: false,
type: Boolean,
required: false,
},
activeCoin: {
default: {},
type: Object,
required: false,
},
wsUrl: {
default: "",
type: String,
required: false,
},
},
watch: {
activeCoin(n, o) {
if (!n) return;
let boo = this.contract
? n.pair_name != o.pair_name
: n.pair_time_name != o.pair_time_name;
if (boo) {
//
let timer = this.timer;
this.page[n.pair_name] = 1;
this.TView.setSymbol(n.pair_name, this.timer);
//
if (n.pair_id != o.pair_id) {
this.unsub(o.pair_id, timer);
}
}
},
symbol(n, o) {
if (n != o && o) {
this.unsub(this.ajaxTv.getSymbol(o), this.timer);
}
props: {
contract: {
default: false,
type: Boolean,
required: false,
},
activeCoin: {
default: {},
type: Object,
required: false,
},
wsUrl: {
default: "",
type: String,
required: false,
},
},
},
computed: {
lang() {
let local;
if (localStorage.lang) {
if (localStorage.lang == "tw") {
local = "zh_TW";
} else if (localStorage.lang == "cn") {
local = "zh";
} else if (localStorage.lang == "kor") {
local = "ko";
} else if (localStorage.lang == "jp") {
local = "ja";
} else if (localStorage.lang == "de") {
local = "de_DE";
} else if (localStorage.lang == "fra") {
local = "fr";
} else if (localStorage.lang == "it") {
local = "it";
} else if (localStorage.lang == "pt") {
local = "pt";
} else if (localStorage.lang == "spa") {
local = "es";
} else if (localStorage.lang == "en") {
local = "en";
}else {
local = "en";
watch: {
activeCoin(n, o) {
if (!n) return;
let boo = this.contract
? n.pair_name != o.pair_name
: n.pair_time_name != o.pair_time_name;
if (boo) {
//
let timer = this.timer;
this.page[n.pair_name] = 1;
this.TView.setSymbol(n.pair_name, this.timer);
//
if (n.pair_id != o.pair_id) {
this.unsub(o.pair_id, timer);
}
}
}
return local;
},
symbol() {
return this.activeCoin.pair_name;
},
symbol(n, o) {
if (n != o && o) {
this.unsub(this.ajaxTv.getSymbol(o), this.timer);
}
},
},
...mapState({
theme: "theme",
}),
ajaxTv() {
return this.contract ? contractAjax : exchangeAjax;
computed: {
lang() {
let local;
if (localStorage.lang) {
if (localStorage.lang == "tw") {
local = "zh_TW";
} else if (localStorage.lang == "cn") {
local = "zh";
} else if (localStorage.lang == "kor") {
local = "ko";
} else if (localStorage.lang == "jp") {
local = "ja";
} else if (localStorage.lang == "de") {
local = "de_DE";
} else if (localStorage.lang == "fra") {
local = "fr";
} else if (localStorage.lang == "it") {
local = "it";
} else if (localStorage.lang == "pt") {
local = "pt";
} else if (localStorage.lang == "spa") {
local = "es";
} else if (localStorage.lang == "en") {
local = "en";
} else {
local = "en";
}
}
return local;
},
symbol() {
let yes_symbol = this.$route.query.symbol;
if(yes_symbol){
return yes_symbol+"/USDT";
}
return this.activeCoin.pair_name;
},
...mapState({
theme: "theme",
}),
ajaxTv() {
return this.contract ? contractAjax : exchangeAjax;
},
msg() {
return `${this.ajaxTv.msg}${this.ajaxTv.getSymbol(
this.symbol
)}_${this.resolution(this.interval)}`;
},
},
msg() {
return `${this.ajaxTv.msg}${this.ajaxTv.getSymbol(
this.symbol
)}_${this.resolution(this.interval)}`;
data() {
return {
TView: undefined,
ws: undefined,
onLoadedCallback: undefined,
onRealtimeCallback: undefined,
// timer: "15",
timer: "1",
sub: "",
isCreateSocket: false,
page: {},
tt: undefined
};
},
},
data() {
return {
TView: undefined,
ws: undefined,
onLoadedCallback: undefined,
onRealtimeCallback: undefined,
// timer: "15",
timer: "1D",
sub: "",
isCreateSocket: false,
page: {},
tt:undefined
};
},
methods: {
reconnect() {
if(this.isCreateSocket) {
return;
};
let msgObj = {
cmd: "sub",
msg: this.sub,
};
this.isCreateSocket = true;
//
this.tt && clearTimeout(this.tt);
let th=this
th.tt = setTimeout(function () {
th.isCreateSocket = false;
th.linkSocket(() => {
th.ws.send(msgObj);
});
methods: {
reconnect() {
if (this.isCreateSocket) {
return;
}
;
let msgObj = {
cmd: "sub",
msg: this.sub,
};
this.isCreateSocket = true;
//
this.tt && clearTimeout(this.tt);
let th = this
th.tt = setTimeout(function () {
th.isCreateSocket = false;
th.linkSocket(() => {
th.ws.send(msgObj);
});
}, 4000);
},
// socket
linkSocket(call) {
const ws = new Socket(this.wsUrl);
ws.on("open", () => {
this.ws = ws;
call && call();
});
}, 4000);
},
// socket
linkSocket(call) {
const ws = new Socket(this.wsUrl);
ws.on("open", () => {
this.ws = ws;
call && call();
});
ws.on("message", (res) => {
let { data, msg, code, sub, type, status, req, cmd } = res;
if (sub == this.sub && this.onRealtimeCallback) {
if(sub.indexOf("BTC")!= -1) (data.close).toFixed(1)
this.onRealtimeCallback(this.getMap(data));
bus.$emit('collapse', data);
} else if (type == "ping" || cmd == "ping") {
this.ws.send({
cmd: "pong",
ws.on("message", (res) => {
let {data, msg, code, sub, type, status, req, cmd} = res;
if (sub == this.sub && this.onRealtimeCallback) {
if (sub.indexOf("BTC") != -1) (data.close).toFixed(1)
this.onRealtimeCallback(this.getMap(data));
bus.$emit('collapse', data);
} else if (type == "ping" || cmd == "ping") {
this.ws.send({
cmd: "pong",
});
}
});
}
});
ws.on('close',()=>{
console.log('链接关闭');
this.reconnect();
})
ws.on('error',()=>{
console.log('发生异常了');
this.reconnect();
})
ws.on('close', () => {
console.log('链接关闭');
this.reconnect();
})
ws.on('error', () => {
console.log('发生异常了');
this.reconnect();
})
},
//
unsub(pair_id, timer) {
let msgObj = {
cmd: "unsub",
msg: `${this.ajaxTv.msg}${pair_id}_${this.resolution(timer)}`,
};
this.ws.send(msgObj);
},
getConfig() {
return {};
},
getSymbol() {
return {};
},
getMap(data) {
return {
time: data.id * 1000,
close: data.close,
open: data.open,
high: data.high,
low: data.low,
volume: data.vol,
};
},
resolution(resolution) {
let T = "";
if (isNaN(resolution * 1)) {
T = resolution
.replace("D", "day")
.replace("W", "week")
.replace("M", "mon");
} else {
if (resolution > 60) {
T = Math.floor(resolution / 60) + "hours";
},
//
unsub(pair_id, timer) {
let msgObj = {
cmd: "unsub",
msg: `${this.ajaxTv.msg}${pair_id}_${this.resolution(timer)}`,
};
this.ws.send(msgObj);
},
getConfig() {
return {};
},
getSymbol() {
return {};
},
getMap(data) {
return {
time: data.id * 1000,
close: data.close,
open: data.open,
high: data.high,
low: data.low,
volume: data.vol,
};
},
resolution(resolution) {
let T = "";
if (isNaN(resolution * 1)) {
T = resolution
.replace("D", "day")
.replace("W", "week")
.replace("M", "mon");
} else {
T = resolution + "min";
if (resolution > 60) {
T = Math.floor(resolution / 60) + "hours";
} else {
T = resolution + "min";
}
}
}
return T;
},
//
unzip(b64Data) {
let u8 = window.atob(b64Data);
let jiya = window.pako.inflate(u8)
let str = this.Uint8ArrayToString(jiya);
return JSON.parse(str);
return T;
},
//
unzip(b64Data) {
let u8 = window.atob(b64Data);
let jiya = window.pako.inflate(u8)
let str = this.Uint8ArrayToString(jiya);
return JSON.parse(str);
},
Uint8ArrayToString(fileData) {
var dataString = "";
for (var i = 0; i < fileData.length; i++) {
dataString += String.fromCharCode(fileData[i]);
}
return dataString;
},
getBars(
symbolInfo,
resolution,
rangeStartDate,
rangeEndDate,
onLoadedCallback,
onErrorCallback
var dataString = "";
for (var i = 0; i < fileData.length; i++) {
dataString += String.fromCharCode(fileData[i]);
}
return dataString;
},
getBars(
symbolInfo,
resolution,
rangeStartDate,
rangeEndDate,
onLoadedCallback,
onErrorCallback
) {
// handleClick
this.page[this.symbol] = this.page[this.symbol] || 1;
let page = this.page[this.symbol] > 3 ? 3 : this.page[this.symbol];
let data = {
symbol: this.ajaxTv.getSymbol(symbolInfo.name),
period: this.resolution(resolution),
form: rangeStartDate,
to: rangeEndDate,
size: page * 200,
zip: 1,
};
this.onLoadedCallback = onLoadedCallback;
//
if (!this.activeCoin.pair_name) {
onLoadedCallback([]);
return;
}
//
if (this.timer && this.timer != resolution) {
this.unsub(
this.ajaxTv.getSymbol(this.activeCoin.pair_name),
this.timer
);
} else {
}
this.page[this.symbol] = this.page[this.symbol] || 1;
let page = this.page[this.symbol] > 3 ? 3 : this.page[this.symbol];
let data = {
symbol: this.ajaxTv.getSymbol(symbolInfo.name),
period: this.resolution(resolution),
form: rangeStartDate,
to: rangeEndDate,
size: page * 200,
zip: 1,
};
this.timer = resolution;
this.ajaxTv.getKline(data).then((res) => {
let arr = this.unzip(res.data).map((item) => {
return this.getMap(item);
});
this.page[this.symbol]++;
onLoadedCallback(arr);
setTimeout(() => {
if (this.page[this.symbol] > 3) {
this.onLoadedCallback = onLoadedCallback;
//
if (!this.activeCoin.pair_name) {
onLoadedCallback([]);
return;
}
}, 60);
});
//
let msgObj = {
cmd: "sub",
msg: `${this.ajaxTv.msg}${data.symbol}_${data.period}`,
};
this.sub = msgObj.msg;
let send = (msgObj) => {
if (this.ws) {
this.ws.send(msgObj);
//
if (this.timer && this.timer != resolution) {
this.unsub(
this.ajaxTv.getSymbol(this.activeCoin.pair_name),
this.timer
);
} else {
if (this.isCreateSocket) {
setTimeout(() => {
send(msgObj);
}, 200);
return;
}
this.isCreateSocket = true;
this.linkSocket(() => {
this.isCreateSocket = false;
this.ws.send(msgObj);
this.timer = resolution;
this.ajaxTv.getKline(data).then((res) => {
let arr = this.unzip(res.data).map((item) => {
return this.getMap(item);
});
this.page[this.symbol]++;
onLoadedCallback(arr);
setTimeout(() => {
if (this.page[this.symbol] > 3) {
onLoadedCallback([]);
}
}, 60);
});
}
};
send(msgObj);
},
subscribeBars(
symbolInfo,
resolution,
onRealtimeCallback,
subscriberUID,
onResetCacheNeededCallback
//
let msgObj = {
cmd: "sub",
msg: `${this.ajaxTv.msg}${data.symbol}_${data.period}`,
};
this.sub = msgObj.msg;
let send = (msgObj) => {
if (this.ws) {
this.ws.send(msgObj);
} else {
if (this.isCreateSocket) {
setTimeout(() => {
send(msgObj);
}, 200);
return;
}
this.isCreateSocket = true;
this.linkSocket(() => {
this.isCreateSocket = false;
this.ws.send(msgObj);
});
}
};
send(msgObj);
},
subscribeBars(
symbolInfo,
resolution,
onRealtimeCallback,
subscriberUID,
onResetCacheNeededCallback
) {
this.onRealtimeCallback = onRealtimeCallback;
if (!this.activeCoin.pair_name) {
setTimeout(() => {
onResetCacheNeededCallback();
}, 100);
}
},
initView() {
let _this = this;
let Tdata = new VDatafeed(this);
let widget=(_this.TView = new TradingView.widget({
width: "100%",
height: 590,
interval: _this.timer,
// timezone: "Asia/Shanghai",
timezone: "America/Toronto",
theme: "light", //
style: "1",
library_path: "/static/Kline/charting_library/",
datafeed: Tdata,
locale: _this.lang,
toolbar_bg: _this.theme == "light" ? "#f1f3f6" : "#222e3d",
enable_publishing: false,
withdateranges: true,
hide_side_toolbar: false,
allow_symbol_change: true,
show_popup_button: true,
popup_width: "1000",
popup_height: "650",
container_id: "tradingview_1355aw2",
disabled_features: [
"header_symbol_search",
"widget_logo",
"header_compare",
"volume_force_overlay",
'timeframes_toolbar',
"control_bar",
"main_series_scale_menu",
"header_resolutions",
"legend_context_menu",
"symbol_search_hot_key",
"symbol_info",
"pane_context_menu",
// "header_widget_dom_node",
'timeframes_toolbar',
],
enabled_features:['header_indicators'],
supported_resolutions: ["5", "15", "30", "60", "240", "1D", "1W", "1M"],
overrides: tvStyle[_this.theme],
custom_css_url: `/static/Kline/charting_library/static/css/tradingview_${
_this.theme == "light" ? "white" : "black"
}.css`,
drawings_access: {
type: "black",
tools: [
{ name: "Trend Line", grayed: true },
{ name: "Trend Angle", grayed: true }
]
},
}));
widget.onChartReady(function () {
let buttonArr = [
{
title: "1" + _this.$t("exchange.min"),
resolution: "1",
chartType: 1
},
{
title: "5" + _this.$t("exchange.min"),
resolution: "5",
chartType: 1
},
{
title: "15" + _this.$t("exchange.min"),
resolution: "15",
chartType: 1
},
{
title: "30" + _this.$t("exchange.min"),
resolution: "30",
chartType: 1
},
{
title: "1" + _this.$t("exchange.hour"),
resolution: "60",
chartType: 1
},
{
title: "1" + _this.$t("exchange.day"),
resolution: "1D",
chartType: 1
},
{
title: "1" + _this.$t("exchange.week"),
resolution: "1W",
chartType: 1
this.onRealtimeCallback = onRealtimeCallback;
if (!this.activeCoin.pair_name) {
setTimeout(() => {
onResetCacheNeededCallback();
}, 100);
}
},
initView() {
let _this = this;
let Tdata = new VDatafeed(this);
let widget = (_this.TView = new TradingView.widget({
width: "100%",
height: 590,
interval: _this.timer,
// timezone: "Asia/Shanghai",
timezone: "America/Toronto",
theme: "light", //
style: "1",
library_path: "/static/Kline/charting_library/",
datafeed: Tdata,
locale: _this.lang,
toolbar_bg: _this.theme == "light" ? "#f1f3f6" : "#222e3d",
enable_publishing: false,
withdateranges: true,
hide_side_toolbar: false,
allow_symbol_change: true,
show_popup_button: true,
popup_width: "1000",
popup_height: "650",
container_id: "tradingview_1355aw2",
disabled_features: [
"header_symbol_search",
// "widget_logo",
"header_compare",
"volume_force_overlay",
'timeframes_toolbar',
"control_bar",
"main_series_scale_menu",
"header_resolutions",
"legend_context_menu",
"symbol_search_hot_key",
"symbol_info",
"pane_context_menu",
// "header_widget_dom_node",
'timeframes_toolbar',
],
// enabled_features:['header_indicators'],
supported_resolutions: ["5", "15", "30", "60", "240", "1D", "1W", "1M"],
overrides: tvStyle[_this.theme],
custom_css_url: `/static/Kline/charting_library/static/css/tradingview_${
_this.theme == "light" ? "white" : "black"
}.css`,
drawings_access: {
type: "black",
tools: [
{name: "Trend Line", grayed: true},
{name: "Trend Angle", grayed: true}
]
},
{
title: "1" + _this.$t("exchange.month"),
resolution: "1M",
chartType: 1
}
];
let btn = {};
let nowTime = "";
}));
widget.onChartReady(function () {
let buttonArr = [
{
title: "1" + _this.$t("exchange.min"),
resolution: "1",
chartType: 1
},
{
title: "5" + _this.$t("exchange.min"),
resolution: "5",
chartType: 1
},
{
title: "15" + _this.$t("exchange.min"),
resolution: "15",
chartType: 1
},
{
title: "30" + _this.$t("exchange.min"),
resolution: "30",
chartType: 1
},
{
title: "1" + _this.$t("exchange.hour"),
resolution: "60",
chartType: 1
},
{
title: "1" + _this.$t("exchange.day"),
resolution: "1D",
chartType: 1
},
{
title: "1" + _this.$t("exchange.week"),
resolution: "1W",
chartType: 1
},
{
title: "1" + _this.$t("exchange.month"),
resolution: "1M",
chartType: 1
}
];
let btn = {};
let nowTime = "";
buttonArr.forEach((v, i) => {
let button = widget.createButton();
button.attr("title", v.title).addClass("my-date").text(v.title);
if (v.resolution === _this.timer) {
button.css({
color: "#5786d2",
"border-bottom": "1px solid #5786d2",
buttonArr.forEach((v, i) => {
let button = widget.createButton();
button.attr("title", v.title).addClass("my-date").text(v.title);
if (v.resolution === _this.timer) {
button.css({
color: "#5786d2",
"border-bottom": "1px solid #5786d2",
});
// localStorage.setItem("tim", v.resolution);
}
btn = button.on("click", function (e) {
$(this).parents(".left").children().find(".my-date").removeAttr("style");
handleClick(e, v.resolution);
button.css({
color: "#5786d2",
"border-bottom": "1px solid #5786d2",
});
// _this.$store.commit("upType", v.type);
localStorage.setItem("tim", v.resolution);
widget.chart().setChartType(v.chartType); //K线
});
// localStorage.setItem("tim", v.resolution);
}
btn = button.on("click", function (e) {
$(this).parents(".left").children().find(".my-date").removeAttr("style");
handleClick(e, v.resolution);
button.css({
color: "#5786d2",
"border-bottom": "1px solid #5786d2",
});
// _this.$store.commit("upType", v.type);
localStorage.setItem("tim", v.resolution);
widget.chart().setChartType(v.chartType); //K线
});
});
let handleClick = (e, value) => {
_this.setSymbol = function (symbol, value) {
gh.chart().setSymbol(symbol, value);
let handleClick = (e, value) => {
_this.setSymbol = function (symbol, value) {
gh.chart().setSymbol(symbol, value);
};
widget.chart().setResolution(value, function onReadyCallback() {
}); //
$(e.target)
.addClass("mydate")
.closest("div.space-single")
.siblings("div.space-single")
.find("div.button")
.removeClass("mydate");
};
widget.chart().setResolution(value, function onReadyCallback() {}); //
$(e.target)
.addClass("mydate")
.closest("div.space-single")
.siblings("div.space-single")
.find("div.button")
.removeClass("mydate");
};
widget.chart().createStudy(
"Moving Average",
false,
true,
[5, "close", 0],
null,
{
"Plot.color": "#e843da",
}
);
widget.chart().createStudy(
"Moving Average",
false,
true,
[10, "close", 0],
null,
{
"Plot.color": "#53b987",
}
);
widget.chart().createStudy(
"Moving Average",
false,
true,
[30, "close", 0],
null,
{
"Plot.color": "#ff231f",
}
);
});
widget.chart().createStudy(
"Moving Average",
false,
true,
[5, "close", 0],
null,
{
"Plot.color": "#e843da",
}
);
widget.chart().createStudy(
"Moving Average",
false,
true,
[10, "close", 0],
null,
{
"Plot.color": "#53b987",
}
);
widget.chart().createStudy(
"Moving Average",
false,
true,
[30, "close", 0],
null,
{
"Plot.color": "#ff231f",
}
);
});
},
},
},
created(){
let tim=localStorage.getItem("tim");
if(tim){
this.timer=tim
created() {
let tim = localStorage.getItem("tim");
if (tim) {
this.timer = tim
}
},
mounted() {
this.initView();
},
mounted() {
this.initView();
},
};
</script>

2
src/views/option/option-bottom.vue

@ -25,7 +25,7 @@
<table class="table">
<thead>
<tr class="text-nowrap">
<th>{{$t('option.orderNum')}}</th>
<th>{{$t('option.orderNum')}}pppp</th>
<th>{{$t('option.option')}}</th>
<th>{{$t('option.buyTime')}}</th>
<th>{{$t('option.buyAmount')}}</th>

754
src/views/profile/certification.vue

@ -1,120 +1,121 @@
<template>
<div class="profile-page">
<secondary-nav></secondary-nav>
<div class="container">
<div class="w-100 d-flex justify-content-center mb-3 mt-4">
<div class="h3">{{$t('profile.realName')}}</div>
</div>
<div class="row">
<div class="col-12 mt-4">
<el-steps :active="setp+1" align-center>
<el-step :title="$t('profile.primaryCertification')"></el-step>
<el-step :title="$t('profile.advancedCertification1')"></el-step>
<el-step :title="$t('profile.toExamine')"></el-step>
</el-steps>
</div>
</div>
<div class="row">
<div class="col-9 mx-auto mt-4 panel-box shadow-sm bg-panel" id="auth">
<!-- 第一步 -->
<div class="tab-content" v-if="setp==0">
<div class="form-row">
<div class="form-group col-md-6">
<label>{{$t('profile.fullName')}}{{$t('profile.legal')}}*</label>
<input
type="text"
required
v-model="form.realname"
class="form-control"
:placeholder="$t('profile.pleaseEnterName')"
/>
</div>
<div class="form-group col-md-6">
<label>{{$t('profile.dateOfBirth')}}YYYY-MM-DD*</label>
<el-date-picker
required
v-model="form.birthday"
type="date"
:placeholder="$t('profile.selectDate')"
></el-date-picker>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-3">
<label>{{$t('profile.documentType')}}*</label>
<el-select v-model="form.type" :placeholder="$t('profile.pelaseSelect')">
<el-option
v-for="item in cardType"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="form-group col-md-9">
<label>{{$t('profile.certificateNumber')}}*</label>
<input
type="text"
required
v-model="form.id_card"
class="form-control"
:placeholder="$t('profile.endterIDNumber')"
/>
</div>
</div>
<div class="label my-2 blue">{{$t('profile.addressInfo')}}</div>
<div class="form-group">
<label>{{$t('profile.residentialAddress')}}*</label>
<input
type="text"
required
v-model="form.address"
class="form-control"
:placeholder="$t('profile.residentialAddress1')"
/>
<div class="profile-page">
<secondary-nav></secondary-nav>
<div class="container">
<div class="w-100 d-flex justify-content-center mb-3 mt-4">
<div class="h3">{{ $t('profile.realName') }}</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label>{{$t('profile.ciy')}}*</label>
<input
type="text"
required
v-model="form.city"
class="form-control"
:placeholder="$t('profile.incity')"
/>
</div>
<div class="form-group col-md-6">
<label>{{$t('profile.postalCode')}}*</label>
<input
type="text"
required
v-model="form.postal_code"
class="form-control"
:placeholder="$t('profile.thePostcode')"
/>
</div>
</div>
<!-- <div class="form-group">
<label>{{$t('profile.additionalInformation')}}{{$t('profile.optional')}}</label>
<input type="text" v-model="form.extra" class="form-control" placeholder />
</div> -->
<div class="label my-2 blue">{{$t('profile.contactInformation')}}</div>
<div class="form-row">
<!-- <div class="form-group col-md-12"> -->
<!-- <label>{{$t('profile.phoneNumber')}}*</label> -->
<!-- <div class="input-group mb-3"> -->
<!--<div class="row">-->
<!-- <div class="col-12 mt-4">-->
<!-- <el-steps :active="setp+1" align-center>-->
<!-- <el-step :title="$t('profile.primaryCertification')"></el-step>-->
<!-- <el-step :title="$t('profile.advancedCertification')"></el-step>-->
<!-- <el-step :title="$t('profile.toExamine')"></el-step>-->
<!-- </el-steps>-->
<!-- </div>-->
<!--</div>-->
<div class="row">
<div class="col-9 mx-auto mt-4 panel-box shadow-sm bg-panel" id="auth">
<!-- 第一步 -->
<div class="tab-content" v-if="setp==0">
<div class="form-row">
<div class="form-group col-md-6">
<label>{{ $t('profile.fullName') }}{{ $t('profile.legal') }}*</label>
<input
type="text"
required
v-model="topForm.realname"
class="form-control"
:placeholder="$t('profile.pleaseEnterName')"
/>
</div>
<!--<div class="form-group col-md-6">-->
<!-- <label>{{ $t('profile.dateOfBirth') }}YYYY-MM-DD*</label>-->
<!-- <el-date-picker-->
<!-- required-->
<!-- v-model="form.birthday"-->
<!-- type="date"-->
<!-- :placeholder="$t('profile.selectDate')"-->
<!-- ></el-date-picker>-->
<!--</div>-->
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label>{{ $t('profile.country') }}*</label>
<input
type="text"
required
v-model="topForm.city"
class="form-control"
:placeholder="$t('profile.incity')"
/>
</div>
<!--<div class="form-group col-md-6">-->
<!-- <label>{{ $t('profile.postalCode') }}*</label>-->
<!-- <input-->
<!-- type="text"-->
<!-- required-->
<!-- v-model="form.postal_code"-->
<!-- class="form-control"-->
<!-- :placeholder="$t('profile.thePostcode')"-->
<!-- />-->
<!--</div>-->
</div>
<div class="form-row">
<div class="form-group col-md-3">
<label>{{$t('profile.SelectAreaCode')}}*</label>
<el-select v-model="form.country_id" filterable placeholder="请选择" >
<label>{{ $t('profile.documentType') }}*</label>
<el-select v-model="topForm.type" :placeholder="$t('profile.pelaseSelect')">
<el-option
v-for="item in countryList"
:key="item.id"
:label="'+'+item.country_code +'('+item.name+')'"
:value="item.id">
</el-option>
v-for="item in cardType"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<div class="form-group col-md-9">
<label>{{ $t('profile.certificateNumber') }}*</label>
<input
type="text"
required
v-model="topForm.id_card"
class="form-control"
:placeholder="$t('profile.endterIDNumber')"
/>
</div>
</div>
<!--<div class="label my-2 blue">{{ $t('profile.addressInfo') }}</div>-->
<!--<div class="form-group">-->
<!-- <label>{{ $t('profile.residentialAddress') }}*</label>-->
<!-- <input-->
<!-- type="text"-->
<!-- required-->
<!-- v-model="form.address"-->
<!-- class="form-control"-->
<!-- :placeholder="$t('profile.residentialAddress1')"-->
<!-- />-->
<!--</div>-->
<!-- <div class="form-group">
<label>{{$t('profile.additionalInformation')}}{{$t('profile.optional')}}</label>
<input type="text" v-model="form.extra" class="form-control" placeholder />
</div> -->
<!--<div class="label my-2 blue">{{ $t('profile.contactInformation') }}</div>-->
<!--<div class="form-row">-->
<!-- <div class="form-group col-md-12"> -->
<!-- <label>{{$t('profile.phoneNumber')}}*</label> -->
<!-- <div class="input-group mb-3"> -->
<!--<div class="form-group col-md-3">-->
<!-- <label>{{ $t('profile.SelectAreaCode') }}*</label>-->
<!-- <el-select v-model="form.country_id" filterable placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in countryList"-->
<!-- :key="item.id"-->
<!-- :label="'+'+item.country_code +'('+item.name+')'"-->
<!-- :value="item.id">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!--</div>-->
<!-- <el-dropdown tragger="click" class="input-group-prepend">
<button
class="btn btn-outline-secondary dropdown-toggle"
@ -129,288 +130,307 @@
>{{item.country_code}}{{item.name}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown> -->
<div class="form-group col-md-9">
<label>{{$t('profile.phoneNumber')}}*</label>
<input
type="text"
required
v-model="form.phone"
class="form-control"
:placeholder="$t('profile.enterPhoneNumber')"
/>
</div>
<!-- </div>
</div> -->
</div>
<div class="text-center">
<button
type="button"
class="btn w-25 btn-primary rounded-pill"
@click="primaryAuth"
>{{$t('profile.nextStep')}}</button>
</div>
</div>
<!-- 第二步 -->
<div class="tab-content" v-if="setp==1">
<p>{{$t('profile.clickUpload1')}}</p>
<p>
{{$t('profile.pelaseDownload')}}
<span
class="red"
v-if="detail.type==3"
>{{$t('profile.passport')}}</span>
<span class="red" v-if="detail.type==2">{{$t('profile.drivingLicense')}}</span>
<span class="red" v-if="detail.type==1">{{$t('profile.iD')}}</span>
{{$t('profile.upload')}}
</p>
<!--<div class="form-group col-md-9">-->
<!-- <label>{{ $t('profile.phoneNumber') }}*</label>-->
<!-- <input-->
<!-- type="text"-->
<!-- required-->
<!-- v-model="form.phone"-->
<!-- class="form-control"-->
<!-- :placeholder="$t('profile.enterPhoneNumber')"-->
<!-- />-->
<!--</div>-->
<!-- </div>
</div> -->
<!--</div>-->
<!--<div class="text-center">-->
<!-- <button-->
<!-- type="button"-->
<!-- class="btn w-25 btn-primary rounded-pill"-->
<!-- @click="primaryAuth"-->
<!-- >{{ $t('profile.nextStep') }}-->
<!-- </button>-->
<!--</div>-->
</div>
<!-- 第二步 -->
<div class="tab-content" v-if="setp==0">
<upload-img
class="mb-3"
v-model="topForm.front_img"
required
:placeholder="$t('profile.uploadPhoto')"
>
<template #text>
<div class="el-upload__text">
{{ $t('profile.positive') }}-{{ $t('profile.dragHere') }}
<em>{{ $t('profile.clickUpload') }}</em>
</div>
</template>
</upload-img>
<upload-img
class="mb-3"
v-model="topForm.back_img"
required
:placeholder="$t('profile.reversePhoto')"
>
<template #text>
<div class="el-upload__text">
{{ $t('profile.theOtherSide') }}-{{ $t('profile.dragHere') }}
<em>{{ $t('profile.clickUpload') }}</em>
</div>
</template>
</upload-img>
<p>{{ $t('profile.clickUpload1') }}</p>
<p>
{{ $t('profile.pelaseDownload') }}
<span
class="red"
v-if="detail.type==3"
>{{ $t('profile.passport') }}</span>
<span class="red" v-if="detail.type==2">{{ $t('profile.drivingLicense') }}</span>
<span class="red" v-if="detail.type==1">{{ $t('profile.iD') }}</span>
{{ $t('profile.upload') }}
</p>
<p>{{$t('profile.explain')}}</p>
<ul class="mb-2">
<li class="mb-2">1. {{$t('profile.unexpired')}}</li>
<li class="mb-2">2.{{$t('profile.pleaseConfirm')}}</li>
<li class="mb-2">3. {{$t('profile.fileFormat')}}pdf./ gif./ jpeg./jpg./png.</li>
<li class="mb-2">4. {{$t('profile.maximumFileSize')}}5 MB</li>
</ul>
<upload-img
class="mb-3"
v-model="topForm.front_img"
required
:placeholder="$t('profile.uploadPhoto')"
>
<template #text>
<div class="el-upload__text">
{{$t('profile.positive')}}-{{$t('profile.dragHere')}}
<em>{{$t('profile.clickUpload')}}</em>
</div>
</template>
</upload-img>
<upload-img
class="mb-3"
v-model="topForm.back_img"
required
:placeholder="$t('profile.reversePhoto')"
>
<template #text>
<div class="el-upload__text">
{{$t('profile.theOtherSide')}}-{{$t('profile.dragHere')}}
<em>{{$t('profile.clickUpload')}}</em>
</div>
</template>
</upload-img>
<!-- <upload-img
class="mb-3"
v-model="topForm.front_img"
required
:placeholder="$t('profile.uploadIDCard')"
>
<template #text>
<div class="el-upload__text">
{{$t('profile.hold')}}-{{$t('profile.dragHere')}}
<em>{{$t('profile.clickUpload')}}</em>
<p>{{ $t('profile.explain') }}</p>
<ul class="mb-2">
<li class="mb-2">1. {{ $t('profile.unexpired') }}</li>
<li class="mb-2">2.{{ $t('profile.pleaseConfirm') }}</li>
<li class="mb-2">3. {{ $t('profile.fileFormat') }}pdf./ gif./ jpeg./jpg./png.</li>
<li class="mb-2">4. {{ $t('profile.maximumFileSize') }}5 MB</li>
</ul>
<!-- <upload-img
class="mb-3"
v-model="topForm.front_img"
required
:placeholder="$t('profile.uploadIDCard')"
>
<template #text>
<div class="el-upload__text">
{{$t('profile.hold')}}-{{$t('profile.dragHere')}}
<em>{{$t('profile.clickUpload')}}</em>
</div>
</template>
</upload-img> -->
<div class="text-center mt-3">
<button type="button" class="btn w-25 btn-primary rounded-pill" @click="topAuth">
{{ $t('profile.nextStep') }}
</button>
</div>
</div>
<!-- 第三步 -->
<div class="tab-ceontent p-5 text-center" v-if="setp==2">
<!-- 待审核 -->
<div v-if="detail.status==1">
<p class="mt-3 mb-4">{{ $t('profile.inSubmit') }}</p>
<i class="el-icon-s-order my-4 text-warning" style="font-size:70px"></i>
<div class="text-center">
<button
type="button"
class="btn w-25 btn-primary rounded-pill"
@click="$router.go(-1)"
>{{ $t('profile.gotIt') }}
</button>
</div>
</div>
<div v-else-if="detail.status==2">
<p class="mt-3 mb-4" style="font-size:18px">
{{ $t('profile.congratulations') }}{{ detail.status_text_lang }}</p>
<i class="el-icon-circle-check my-4 increace" style="font-size:60px"></i>
<div class="text-center">
<button
type="button"
class="btn w-25 btn-primary rounded-pill"
@click="$router.go(-1)"
>{{ $t('profile.back') }}
</button>
</div>
</div>
<div v-else-if="detail.status==3">
<p class="mt-3 mb-4">{{ detail.status_text_lang }}{{ $t('profile.resetApply') }}</p>
<i class="el-icon-s-release my-4 decreace" style="font-size:60px"></i>
<div class="text-center">
<button
type="button"
class="btn w-25 btn-outline-danger"
@click="setp=1"
>{{ $t('profile.recertification') }}
</button>
</div>
</div>
</div>
</div>
</template>
</upload-img> -->
<div class="text-center mt-3">
<button type="button" class="btn w-25 btn-primary rounded-pill" @click="topAuth">{{$t('profile.nextStep')}}</button>
</div>
</div>
<!-- 第三步 -->
<div class="tab-ceontent p-5 text-center" v-if="setp==2">
<!-- 待审核 -->
<div v-if="detail.status==1">
<p class="mt-3 mb-4">{{$t('profile.inSubmit')}}</p>
<i class="el-icon-s-order my-4 text-warning" style="font-size:70px"></i>
<div class="text-center">
<button
type="button"
class="btn w-25 btn-primary rounded-pill"
@click="$router.go(-1)"
>{{$t('profile.gotIt')}}</button>
</div>
</div>
<div v-else-if="detail.status==2">
<p class="mt-3 mb-4" style="font-size:18px">{{$t('profile.congratulations')}}{{detail.status_text_lang}}</p>
<i class="el-icon-circle-check my-4 increace" style="font-size:60px"></i>
<div class="text-center">
<button
type="button"
class="btn w-25 btn-primary rounded-pill"
@click="$router.go(-1)"
>{{$t('profile.back')}}</button>
</div>
</div>
<div v-else-if="detail.status==3">
<p class="mt-3 mb-4">{{detail.status_text_lang}}{{$t('profile.resetApply')}}</p>
<i class="el-icon-s-release my-4 decreace" style="font-size:60px"></i>
<div class="text-center">
<button
type="button"
class="btn w-25 btn-outline-danger"
@click="setp=1"
>{{$t('profile.recertification')}}</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Profile from "@/api/profile";
import Member from "@/api/member";
import server from "@/api/server";
export default {
data() {
return {
setp: 0,
detail: {},
imgURL: server.defaults.baseURL,
countryList: [],
data() {
return {
setp: 0,
detail: {},
imgURL: server.defaults.baseURL,
countryList: [],
form: {
country_code: "",
country_id: "",
realname: "",
id_card: "",
type: 1,
birthday: "",
address: "",
city: "",
postal_code: "",
phone: "",
extra: ""
form: {
country_code: "",
country_id: "",
realname: "",
id_card: "",
type: 1,
birthday: "",
address: "",
city: "",
postal_code: "",
phone: "",
extra: ""
},
//
topForm: {
id_card: "",
type: 1,
city: "",
realname: "",
front_img: "",
back_img: "",
hand_img: ""
}
};
},
computed: {
country() {
return (
this.countryList.find(item => item.id == this.form.country_id) || {}
);
},
//
topForm: {
front_img: "",
back_img: "",
hand_img: ""
cardType() {
return [
{
label: this.$t("profile.iD"),
value: 1,
},
{
label: this.$t("profile.driverLicense"),
value: 2,
},
{
label: this.$t("profile.passport"),
value: 3,
},
];
}
};
},
computed: {
country() {
return (
this.countryList.find(item => item.id == this.form.country_id) || {}
);
},
cardType() {
return [
{
label: this.$t("profile.iD"),
value: 1,
},
{
label: this.$t("profile.driverLicense"),
value: 2,
},
{
label: this.$t("profile.passport"),
value: 3,
},
];
}
},
methods: {
//
getAuthInfo() {
Profile.getAuthInfo()
.then(res => {
this.detail = res;
//
if (res.primary_status == 0) {
this.setp = 0;
return;
} else if (res.status == 0) {
this.setp = 1;
} else {
this.setp = 2;
methods: {
//
getAuthInfo() {
Profile.getAuthInfo()
.then(res => {
this.detail = res;
//
if (res.primary_status == 0) {
this.setp = 0;
return;
} else if (res.status == 0) {
this.setp = 1;
} else {
this.setp = 2;
}
})
.catch(res => {
});
},
//
getCountryCode() {
Member.getCountryCode().then(res => {
this.countryList = res;
for (let i = 0; i < this.countryList.length; i++) {
let item = this.countryList[i];
if (item.id == 195) {
this.form.country_id = item.id;
break;
}
}
}).catch(res => {
});
},
//
primaryAuth() {
let data = this.form;
data.country_code = this.country.country_code;
if (utils.validate("#auth")) {
Profile.primaryAuth(data)
.then(res => {
this.$message.success(this.$t("profile.preliminary"));
// this.setp++;
this.$router.push("/wallet/assets/exchange")
})
.catch(err => {
});
}
})
.catch(res => {});
},
//
getCountryCode() {
Member.getCountryCode().then(res => {
this.countryList = res;
for(let i=0; i<this.countryList.length;i++){
let item=this.countryList[i];
if(item.id==195){
this.form.country_id = item.id;
break;
},
//
topAuth() {
let data = this.topForm;
if (utils.validate("#auth")) {
// if (!data.hand_img) {
// // this.$message.error(this.$t("profile.uploadIDCard"));
// this.$message.error(this.$t("profile.uploadPhoto"));
// return;
// }
if (!data.back_img) {
this.$message.error(this.$t("profile.reversePhoto"));
return;
}
if (!data.front_img) {
this.$message.error(this.$t("profile.uploadPhoto"));
return;
}
Profile.topAuth(data)
.then(res => {
this.$message.success(this.$t("profile.advancedCertification"));
this.getAuthInfo();
})
.catch(err => {
});
}
}).catch(res => {});
},
//
primaryAuth() {
let data = this.form;
data.country_code = this.country.country_code;
if (utils.validate("#auth")) {
Profile.primaryAuth(data)
.then(res => {
this.$message.success(this.$t("profile.preliminary"));
// this.setp++;
this.$router.push("/wallet/assets/exchange")
})
.catch(err => {});
}
},
//
topAuth() {
let data = this.topForm;
if (utils.validate("#auth")) {
// if (!data.hand_img) {
// // this.$message.error(this.$t("profile.uploadIDCard"));
// this.$message.error(this.$t("profile.uploadPhoto"));
// return;
// }
if (!data.back_img) {
this.$message.error(this.$t("profile.reversePhoto"));
return;
}
if (!data.front_img) {
this.$message.error(this.$t("profile.uploadPhoto"));
return;
}
Profile.topAuth(data)
.then(res => {
this.$message.success(this.$t("profile.advancedCertification2"));
this.getAuthInfo();
})
.catch(err => {});
}
created() {
this.getCountryCode();
this.getAuthInfo();
}
},
created() {
this.getCountryCode();
this.getAuthInfo();
}
};
</script>
<style scoped lang="scss">
.upload-demo {
/deep/ .el-upload-dragger {
width: 300px;
height: 150px;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
/deep/ .el-upload-dragger {
width: 300px;
height: 150px;
}
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
/deep/ {
.el-step__title.is-process {
color: white;
}
.el-upload-dragger {
background-color: #1e2834;
}
}
/deep/{
.el-step__title.is-process{
color: white;
}
.el-upload-dragger{
background-color: #1e2834;
}
}
</style>

325
src/views/profile/index.vue

@ -1,153 +1,204 @@
<template>
<div class="profile-page">
<secondary-nav></secondary-nav>
<div class="container">
<div class="w-100 d-flex justify-content-between align-items-center mb-3 mt-4">
<div class="h3">{{$t('profile.userInfo')}}</div>
</div>
<div class="row">
<div class="col-md-5 d-flex align-items-stretch mb-4">
<!-- 账户信息 -->
<div class="panel-box bg-panel shadow-sm w-100">
<div class="heading d-flex justify-content-between align-items-center">
<div class="h6">{{$t('profile.userInfo')}}</div>
<div class="status fn-14 text-tips">{{detail.user_auth_level_text }}</div>
<div class="profile-page">
<secondary-nav></secondary-nav>
<div class="container">
<div class="w-100 d-flex justify-content-between align-items-center mb-3 mt-4">
<div class="h3">{{ $t('profile.userInfo') }}</div>
</div>
<div class="tab-content">
<div class="mobile fn-30 font-weight-bolder">
{{detail.account }}
<!-- | userFilter -->
</div>
<div class="label my-2">{{$t('profile.verState')}}</div>
<div class="d-flex align-items-center">
<div class="icon mr-2">
<img src="../../assets/img/icon/top2.png" alt v-if="detail.user_auth_level==2"/>
<img src="../../assets/img/icon/top1.png" alt v-else/>
</div>
<div>
<!-- {{$t('profile.max')}}
<span class="font-weight-bold">1k</span>
<span class="font-weight-bold ">USD</span>
<span class="font-weight-bold">24</span>
{{$t('profile.limitH')}}
{{$t('profile.tips')}} -->
{{detail.user_auth_level==2?$t('profile.tips2'):$t('profile.tips1')}}
</div>
</div>
</div>
</div>
</div>
<div class="col-md-7 d-flex align-items-stretch mb-4">
<!-- 实名认证 -->
<div class="panel-box bg-panel shadow-sm w-100">
<div class="heading d-flex justify-content-between align-items-center">
<div class="h6">{{$t('profile.verLeave')}}</div>
</div>
<div class="tab-content">
<div class="step-group d-flex justify-content-center text-center">
<div class="step">
<div class="icon">
<img src="../../assets/img/icon/top1.png" alt />
</div>
<div class="txt">{{$t('profile.max')}} 20k USDT</div>
</div>
<div class="next-icon mt-4">
<img src="../../assets/img/icon/stepnext.png" alt />
</div>
<div class="step">
<div class="icon">
<img src="../../assets/img/icon/top2.png" alt />
</div>
<div class="txt">{{$t('profile.max')}} 500K USDT</div>
<div class="btn">
<span v-if="detail.user_auth_level==2" class="btn btn-sm btn-primary rounded-pill">{{$t('profile.clickToVerify1')}}</span>
<button type="button" v-else @click="$router.push('/profile/certification')" class="btn btn-sm btn-primary rounded-pill">{{$t('profile.clickToVerify')}}</button>
</div>
</div>
<div class="next-icon mt-4">
<img src="../../assets/img/icon/stepnext.png" alt />
</div>
<div class="step">
<div class="icon">
<img src="../../assets/img/icon/top3.png" alt />
</div>
<div class="txt">{{$t('profile.exceed')}} 500K USDT</div>
<div class="btn">
<router-link
to="/contact-us"
tag="button"
type="button"
class="btn btn-sm btn-primary rounded-pill"
@click="$router.push('/contact-us')"
>{{$t('profile.contactUs')}}</router-link>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<!-- <div class="col-md-4 d-flex">
邀请好友
<div class="panel-box bg-panel shadow-sm w-100">
<div class="heading d-flex justify-content-between">{{$t('profile.inviteFriends')}}</div>
<div class="tab-content">
<div class="min-height-50">{{$t('profile.dividends',{name:'AMATAK',num:'30%'})}}</div>
<button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill" @click="$router.push('/profile/invite')">{{$t('profile.sendInvitation')}}</button>
<div class="row">
<!--<div class="col-md-5 d-flex align-items-stretch mb-4">-->
<!-- &lt;!&ndash; 账户信息 &ndash;&gt;-->
<!-- <div class="panel-box bg-panel shadow-sm w-100">-->
<!-- <div class="heading d-flex justify-content-between align-items-center">-->
<!-- <div class="h6">{{ $t('profile.userInfo') }}</div>-->
<!-- <div class="status fn-14 text-tips">{{ detail.user_auth_level_text }}</div>-->
<!-- </div>-->
<!-- <div class="tab-content">-->
<!-- <div class="mobile fn-30 font-weight-bolder">-->
<!-- {{ detail.account }}-->
<!-- &lt;!&ndash; | userFilter &ndash;&gt;-->
<!-- </div>-->
<!-- <div class="label my-2">{{ $t('profile.verState') }}</div>-->
<!-- <div class="d-flex align-items-center">-->
<!-- <div class="icon mr-2">-->
<!-- <img src="../../assets/img/icon/top2.png" alt v-if="detail.user_auth_level==2"/>-->
<!-- <img src="../../assets/img/icon/top1.png" alt v-else/>-->
<!-- </div>-->
<!-- <div>-->
<!-- &lt;!&ndash; {{$t('profile.max')}}-->
<!-- <span class="font-weight-bold">1k</span>-->
<!-- <span class="font-weight-bold ">USD</span>-->
<!-- <span class="font-weight-bold">24</span>-->
<!-- {{$t('profile.limitH')}}-->
<!-- {{$t('profile.tips')}} &ndash;&gt;-->
<!-- {{ detail.user_auth_level == 2 ? $t('profile.tips2') : $t('profile.tips1') }}-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<!--<div class="col-md-7 d-flex align-items-stretch mb-4">-->
<!-- &lt;!&ndash; 实名认证 &ndash;&gt;-->
<!-- <div class="panel-box bg-panel shadow-sm w-100">-->
<!-- <div class="heading d-flex justify-content-between align-items-center">-->
<!-- <div class="h6">{{ $t('profile.verLeave') }}</div>-->
<!-- </div>-->
<!-- <div class="tab-content">-->
<!-- <div class="step-group d-flex justify-content-center text-center">-->
<!-- <div class="step">-->
<!-- <div class="icon">-->
<!-- <img src="../../assets/img/icon/top1.png" alt/>-->
<!-- </div>-->
<!-- <div class="txt">{{ $t('profile.max') }} 20k USDT</div>-->
<!-- </div>-->
<!-- <div class="next-icon mt-4">-->
<!-- <img src="../../assets/img/icon/stepnext.png" alt/>-->
<!-- </div>-->
<!-- <div class="step">-->
<!-- <div class="icon">-->
<!-- <img src="../../assets/img/icon/top2.png" alt/>-->
<!-- </div>-->
<!-- <div class="txt">{{ $t('profile.max') }} 500K USDT</div>-->
<!-- <div class="btn">-->
<!-- <span v-if="detail.user_auth_level==2"-->
<!-- class="btn btn-sm btn-primary rounded-pill">{{-->
<!-- $t('profile.clickToVerify1')-->
<!-- }}</span>-->
<!-- <button type="button" v-else @click="$router.push('/profile/certification')"-->
<!-- class="btn btn-sm btn-primary rounded-pill">-->
<!-- {{ $t('profile.clickToVerify') }}-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="next-icon mt-4">-->
<!-- <img src="../../assets/img/icon/stepnext.png" alt/>-->
<!-- </div>-->
<!-- <div class="step">-->
<!-- <div class="icon">-->
<!-- <img src="../../assets/img/icon/top3.png" alt/>-->
<!-- </div>-->
<!-- <div class="txt">{{ $t('profile.exceed') }} 500K USDT</div>-->
<!-- <div class="btn">-->
<!-- <router-link-->
<!-- to="/contact-us"-->
<!-- tag="button"-->
<!-- type="button"-->
<!-- class="btn btn-sm btn-primary rounded-pill"-->
<!-- @click="$router.push('/contact-us')"-->
<!-- >{{ $t('profile.contactUs') }}-->
<!-- </router-link>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!--</div>-->
<div class="d-flex align-items-stretch mb-4 w-100">
<!--新版用户中心-->
<div class="panel-box bg-panel shadow-sm w-100">
<div class="tab-content w-100">
<tr class=" w-100" style="height:60px;">
<td style="width:30%;">{{ $t('common.email') }}</td>
<td style="width:60%;">{{ detail.account }}</td>
<td style="width:60%;"></td>
</tr>
<tr class=" w-100" style="height:60px;">
<td style="width:30%;">{{ $t('profile.realName') }}</td>
<td style="width:60%;">
{{detail.user_auth_level_text}}
</td>
<td style="width:60%;"><span v-if="detail.user_auth_level==2"
class="btn btn-sm btn-primary rounded-pill">{{
$t('profile.clickToVerify1')
}}</span>
<button type="button" v-else @click="$router.push('/profile/certification')"
class="btn btn-sm btn-primary rounded-pill">
{{ $t('profile.clickToVerify') }}
</button>
</td>
</tr>
<tr class=" w-100" style="height:60px;">
<td style="width:30%;">{{ $t('setting.loginPassword') }}</td>
<td style="width:60%;">{{ $t('setting.passwordChangePrompt') }}</td>
<td style="width:60%;">
<button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill"
@click="$router.push('/setting')">{{ $t('profile.clickReset') }}
</button>
</td>
</tr>
</div>
</div>
</div>
</div> -->
<div class="col-md-4 d-flex">
<!-- 重置密码 -->
<div class="panel-box bg-panel shadow-sm w-100">
<div class="heading d-flex justify-content-between">{{$t('profile.resetPassword')}}</div>
<div class="tab-content">
<div class="min-height-50">{{$t('profile.forLoginAccount')}}</div>
<button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill" @click="$router.push('/setting')">{{$t('profile.clickReset')}}</button>
</div>
</div>
<!--<div class="row">-->
<!-- &lt;!&ndash; <div class="col-md-4 d-flex">-->
<!-- 邀请好友-->
<!-- <div class="panel-box bg-panel shadow-sm w-100">-->
<!-- <div class="heading d-flex justify-content-between">{{$t('profile.inviteFriends')}}</div>-->
<!-- <div class="tab-content">-->
<!-- <div class="min-height-50">{{$t('profile.dividends',{name:'AMATAK',num:'30%'})}}</div>-->
<!-- <button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill" @click="$router.push('/profile/invite')">{{$t('profile.sendInvitation')}}</button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div> &ndash;&gt;-->
<!-- <div class="col-md-4 d-flex">-->
<!-- &lt;!&ndash; 重置密码 &ndash;&gt;-->
<!-- <div class="panel-box bg-panel shadow-sm w-100">-->
<!-- <div class="heading d-flex justify-content-between">{{ $t('profile.resetPassword') }}</div>-->
<!-- <div class="tab-content">-->
<!-- <div class="min-height-50">{{ $t('profile.forLoginAccount') }}</div>-->
<!-- <button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill"-->
<!-- @click="$router.push('/setting')">{{ $t('profile.clickReset') }}-->
<!-- </button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- &lt;!&ndash; <div class="col-md-4 d-flex">-->
<!-- 访问记录-->
<!-- <div class="panel-box bg-panel shadow-sm w-100">-->
<!-- <div class="heading d-flex justify-content-between">{{$t('profile.registrationDecord')}}</div>-->
<!-- <div class="tab-content">-->
<!-- <div class="min-height-50">{{$t('profile.recording')}}</div>-->
<!-- <button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill" @click="$router.push('/profile/login-history')">{{$t('profile.recordingDEtail')}}</button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div> &ndash;&gt;-->
<!--</div>-->
</div>
<!-- <div class="col-md-4 d-flex">
访问记录
<div class="panel-box bg-panel shadow-sm w-100">
<div class="heading d-flex justify-content-between">{{$t('profile.registrationDecord')}}</div>
<div class="tab-content">
<div class="min-height-50">{{$t('profile.recording')}}</div>
<button type="button" class="bottom-left-btn btn btn-sm btn-primary rounded-pill" @click="$router.push('/profile/login-history')">{{$t('profile.recordingDEtail')}}</button>
</div>
</div>
</div> -->
</div>
</div>
</div>
</template>
<script>
import Profile from "@/api/profile";
import {mapState} from "vuex";
export default {
data() {
return {
detail: {}
};
},
filters: {
//|
userFilter(val) {
if (!val) return;
return val.replace(/(^\w{3})\w*(@|\w{3}$)/g, "$1***$2");
}
},
methods: {
getUserInfo() {
Profile.getUserInfo().then(res => {
this.detail = res;
});
data() {
return {
detail: {}
};
},
filters: {
//|
userFilter(val) {
if (!val) return;
return val.replace(/(^\w{3})\w*(@|\w{3}$)/g, "$1***$2");
}
},
methods: {
getUserInfo() {
Profile.getUserInfo().then(res => {
this.detail = res;
});
}
},
created() {
this.getUserInfo();
}
},
created() {
this.getUserInfo();
}
};
</script>

843
src/views/purchase/index.vue

@ -1,193 +1,197 @@
<template>
<div class="subscride-page">
<!-- 表单 -->
<div class="container panel my-4 p-5 rounded shadow-sm bg-panel">
<div class="row">
<div class="col-6">
<div class="h3 mb-3">{{ detail.coin_name }}</div>
<div class>{{ $t("purchase.sendPrice") }}</div>
<div class="price fn-20 blue">
1 {{ detail.coin_name }} = {{issue_price}}
<!-- {{ detail.issue_price }} -->
USDT
</div>
<ul>
<li class="mt-3">
<div class="label text-secondary">
{{ $t("purchase.subscriptionCurrency") }}
</div>
<div class="txt">{{ detail.subscribe_currency }}</div>
</li>
<li class="mt-3">
<div class="label text-secondary">
{{ $t("purchase.expected") }}
</div>
<div class="txt">
{{ parseTime(detail.expected_time_online) }}
</div>
</li>
<li class="mt-3">
<div class="label text-secondary">
{{ $t("purchase.startTime") }}
</div>
<div class="txt">
{{ parseTime(detail.start_subscription_time) }}
</div>
</li>
<li class="mt-3">
<div class="label text-secondary">
{{ $t("purchase.applyForPurchase") }}
</div>
<div class="txt">
{{ parseTime(detail.end_subscription_time) }}
</div>
</li>
</ul>
</div>
<div
class="col-6 d-flex flex-column justify-content-end align-items-start"
>
<div class="input-group mb-3">
<div class="input-group-prepend">
<el-dropdown>
<div class="subscride-page">
<!-- 表单 -->
<div class="container panel my-4 p-5 rounded shadow-sm bg-panel">
<div class="row">
<div class="col-6">
<div class="h3 mb-3">{{ detail.coin_name }}</div>
<div class>{{ $t("purchase.sendPrice") }}</div>
<div class="price fn-20 blue">
1 {{ detail.coin_name }} = {{ issue_price }}
<!-- {{ detail.issue_price }} -->
USDT
</div>
<!--<ul>-->
<!-- <li class="mt-3">-->
<!-- <div class="label text-secondary">-->
<!-- {{ $t("purchase.subscriptionCurrency") }}-->
<!-- </div>-->
<!-- <div class="txt">{{ detail.subscribe_currency }}</div>-->
<!-- </li>-->
<!-- <li class="mt-3">-->
<!-- <div class="label text-secondary">-->
<!-- {{ $t("purchase.expected") }}-->
<!-- </div>-->
<!-- <div class="txt">-->
<!-- {{ parseTime(detail.expected_time_online) }}-->
<!-- </div>-->
<!-- </li>-->
<!-- <li class="mt-3">-->
<!-- <div class="label text-secondary">-->
<!-- {{ $t("purchase.startTime") }}-->
<!-- </div>-->
<!-- <div class="txt">-->
<!-- {{ parseTime(detail.start_subscription_time) }}-->
<!-- </div>-->
<!-- </li>-->
<!-- <li class="mt-3">-->
<!-- <div class="label text-secondary">-->
<!-- {{ $t("purchase.applyForPurchase") }}-->
<!-- </div>-->
<!-- <div class="txt">-->
<!-- {{ parseTime(detail.end_subscription_time) }}-->
<!-- </div>-->
<!-- </li>-->
<!--</ul>-->
<img :src='detail.icon'>
</div>
<div
class="col-6 d-flex flex-column justify-content-end align-items-start"
>
<div class="input-group mb-3">
<div class="input-group-prepend">
<el-dropdown>
<span class="input-group-text">
{{ activeCoin.coin_name }}
<i class="el-icon-caret-bottom"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
v-for="item in coinList"
@click.native="activeCoin = item"
:key="item.coin_name"
>{{ item.coin_name }}</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</div>
<input
type="number"
class="form-control"
:placeholder="$t('purchase.enterNum')"
min="0"
step="0.0000000001"
:data-message="$t('nav.b9',{num:10})"
required
aria-label="Username"
v-model="num"
aria-describedby="basic-addon1"
/>
<div class="input-group-append">
<button
class="btn btn-outline-primary"
type="button"
@click="num = activeCoin.usable_balance"
>
{{ $t("purchase.all") }}
</button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
v-for="item in coinList"
@click.native="activeCoin = item"
:key="item.coin_name"
>{{ item.coin_name }}
</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</div>
<input
type="number"
class="form-control"
:placeholder="$t('purchase.enterNum')"
min="0"
step="0.0000000001"
:data-message="$t('nav.b9',{num:10})"
required
aria-label="Username"
v-model="num"
aria-describedby="basic-addon1"
/>
<div class="input-group-append">
<button
class="btn btn-outline-primary"
type="button"
@click="num = activeCoin.usable_balance"
>
{{ $t("purchase.all") }}
</button>
</div>
</div>
<!-- v-if="activeCoin.usable_balance" -->
<p>
{{ $t("wallet.availableBalance") }}{{ activeCoin.usable_balance }}
</p>
<p>
1
<!-- {{ activeCoin.coin_name }} -->
USDT
{{ 1 / detail.issue_price | omitTo(4) }}
<!-- {{ activeCoin.proportion_amount | omitTo(5) }} -->
{{ detail.coin_name }}
</p>
<p>
{{ num || 0 }} {{ activeCoin.coin_name }}
{{ (activeCoin.CurrentPrice / detail.issue_price) * num | omitTo(4) }}
<!-- {{ total }} -->
{{ detail.coin_name }}
</p>
<button
type="submit"
class="btn btn-primary rounded-pill"
@click="ifSubscribeNow"
>
{{ $t("purchase.subscribeNow") }}
</button>
</div>
</div>
</div>
<!-- v-if="activeCoin.usable_balance" -->
<p >
{{ $t("wallet.availableBalance") }}{{ activeCoin.usable_balance }}
</p>
<p>
1
<!-- {{ activeCoin.coin_name }} -->
USDT
{{ 1 / detail.issue_price | omitTo(4)}}
<!-- {{ activeCoin.proportion_amount | omitTo(5) }} -->
{{ detail.coin_name }}
</p>
<p>
{{ num || 0 }} {{ activeCoin.coin_name }}
{{(activeCoin.CurrentPrice/ detail.issue_price)*num | omitTo(4)}}
<!-- {{ total }} -->
{{ detail.coin_name }}
</p>
<button
type="submit"
class="btn btn-primary rounded-pill"
@click="ifSubscribeNow"
>
{{ $t("purchase.subscribeNow") }}
</button>
</div>
</div>
</div>
<!-- 进度 -->
<div v-if="activityList[0].amount" class="container panel my-4 px-4 pt-4 pb-5 rounded shadow-sm bg-panel">
<div class="row">
<div class="col-12">
<h5 class="border-bottom pb-3 mb-5">
{{ $t('nav.c2') }}
</h5>
<el-steps :active="activestep+1" align-center>
<el-step
:description="$t('nav.c2')"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[0].amount,name:detail.coin_name,rate:activityList[0].rate*100})"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[1].amount,name:detail.coin_name,rate:activityList[1].rate*100})"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[2].amount,name:detail.coin_name,rate:activityList[2].rate*100})"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[3].amount,name:detail.coin_name,rate:activityList[3].rate*100})"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[4].amount,name:detail.coin_name,rate:activityList[4].rate*100})"
></el-step>
</el-steps>
<!-- 进度 -->
<div v-if="activityList[0].amount" class="container panel my-4 px-4 pt-4 pb-5 rounded shadow-sm bg-panel">
<div class="row">
<div class="col-12">
<h5 class="border-bottom pb-3 mb-5">
{{ $t('nav.c2') }}
</h5>
<el-steps :active="activestep+1" align-center>
<el-step
:description="$t('nav.c2')"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[0].amount,name:detail.coin_name,rate:activityList[0].rate*100})"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[1].amount,name:detail.coin_name,rate:activityList[1].rate*100})"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[2].amount,name:detail.coin_name,rate:activityList[2].rate*100})"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[3].amount,name:detail.coin_name,rate:activityList[3].rate*100})"
></el-step>
<el-step
:description="$t('nav.c1', { amount: activityList[4].amount,name:detail.coin_name,rate:activityList[4].rate*100})"
></el-step>
</el-steps>
</div>
</div>
</div>
</div>
</div>
<div class="container panel my-4 px-4 pt-4 pb-5 rounded shadow-sm bg-panel">
<div class="container panel my-4 px-4 pt-4 pb-5 rounded shadow-sm bg-panel">
<div class="col-md-12 mt15">
<div class="markets-pair-list">
<ul class="nav nav-pills" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link" data-toggle="pill" role="tab" aria-selected="false">{{ $t("common.a3") }}</a>
<a class="nav-link" data-toggle="pill" role="tab" aria-selected="false">{{
$t("common.a3")
}}</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane fade show active" id="tab1" role="tabpanel">
<table class="table">
<thead>
<tr>
<th>{{$t('purchase.subscribe')}}</th>
<th>{{$t('otc.a5')}}</th>
<th>{{$t('wallet.money')}}</th>
<th>{{$t('purchase.subscriptionCurrency')}}</th>
<th>{{$t('contract.b1')}}</th>
<th>{{$t('contract.l1')}}</th>
<th>{{$t('contract.l4')}}
<!-- USDT -->
</th>
<th class="text-right">{{$t('wallet.status')}}</th>
</tr>
<tr>
<th>{{ $t('purchase.subscribe') }}</th>
<th>{{ $t('otc.a5') }}</th>
<th>{{ $t('wallet.money') }}</th>
<th>{{ $t('purchase.subscriptionCurrency') }}</th>
<th>{{ $t('contract.b1') }}</th>
<th>{{ $t('contract.l1') }}</th>
<th>{{ $t('contract.l4') }}
<!-- USDT -->
</th>
<th class="text-right">{{ $t('wallet.status') }}</th>
</tr>
</thead>
<tbody>
<tr v-for="item in subscribeRecords" :key="item.id" v-if="seek(item)">
<td>
<img src="../../assets/img/icon/1.png" alt="eth" />
{{ item.subscription_currency_name }}
</td>
<td>{{ item.subscription_currency_amount }}</td>
<td>{{ item.payment_amount }}</td>
<td>{{ item.payment_currency }}</td>
<td>{{ item.subscription_time|parseTime }}</td>
<td>{{(item.increase_ratio).toFixed(5)}}%</td>
<td>{{(item.total_value).toFixed(5)}}</td>
<!-- <td>{{ ( ((detail.issue_price-(item.payment_amount/item.subscription_currency_amount))/detail.issue_price)*100 ).toFixed(2) }}%</td> -->
<!-- <td>{{ ( (((item.payment_amount/item.subscription_currency_amount))*detail.issue_price) ).toFixed(2) }}</td> -->
<td class="text-right">
<span class="success">{{$t('wallet.success')}}</span>
</td>
</tr>
<tr v-for="item in subscribeRecords" :key="item.id" v-if="seek(item)">
<td>
<img src="../../assets/img/icon/1.png" alt="eth"/>
{{ item.subscription_currency_name }}
</td>
<td>{{ item.subscription_currency_amount }}</td>
<td>{{ item.payment_amount }}</td>
<td>{{ item.payment_currency }}</td>
<td>{{ item.subscription_time|parseTime }}</td>
<td>{{ (item.increase_ratio).toFixed(5) }}%</td>
<td>{{ (item.total_value).toFixed(5) }}</td>
<!-- <td>{{ ( ((detail.issue_price-(item.payment_amount/item.subscription_currency_amount))/detail.issue_price)*100 ).toFixed(2) }}%</td> -->
<!-- <td>{{ ( (((item.payment_amount/item.subscription_currency_amount))*detail.issue_price) ).toFixed(2) }}</td> -->
<td class="text-right">
<span class="success">{{ $t('wallet.success') }}</span>
</td>
</tr>
</tbody>
</table>
</div>
@ -195,155 +199,173 @@
</div>
</div>
</div>
<!-- 进度 -->
<div class="container panel my-4 px-4 pt-4 pb-5 rounded shadow-sm bg-panel">
<div class="row">
<div class="col-12">
<h5 class="border-bottom pb-3 mb-5">
{{ $t("purchase.subscriptionCycle") }}
</h5>
<el-steps :active="detail.status" align-center>
<el-step
:title="$t('purchase.projectWarmUp')"
:icon="detail.status >= 1 ? 'el-icon-success' : undefined"
></el-step>
<el-step
:title="$t('purchase.startSubscription')"
:icon="detail.status >= 2 ? 'el-icon-success' : undefined"
:description="parseTime(detail.start_subscription_time)"
></el-step>
<el-step
:title="$t('purchase.endOfSubscription')"
:icon="detail.status >= 3 ? 'el-icon-success' : undefined"
:description="parseTime(detail.end_subscription_time)"
></el-step>
<el-step
:title="$t('purchase.announceResults')"
:icon="detail.status >= 4 ? 'el-icon-success' : undefined"
:description="parseTime(detail.announce_time)"
></el-step>
</el-steps>
<!-- 进度 -->
<div class="container panel my-4 px-4 pt-4 pb-5 rounded shadow-sm bg-panel">
<div class="row">
<div class="col-12">
<h5 class="border-bottom pb-3 mb-5">
{{ $t("purchase.subscriptionCycle") }}
</h5>
<el-steps :active="detail.status" align-center>
<el-step
:title="$t('purchase.projectWarmUp')"
:icon="detail.status >= 1 ? 'el-icon-success' : undefined"
></el-step>
<el-step
:title="$t('purchase.startSubscription')"
:icon="detail.status >= 2 ? 'el-icon-success' : undefined"
:description="parseTime(detail.start_subscription_time)"
></el-step>
<el-step
:title="$t('purchase.endOfSubscription')"
:icon="detail.status >= 3 ? 'el-icon-success' : undefined"
:description="parseTime(detail.end_subscription_time)"
></el-step>
<el-step
:title="$t('purchase.announceResults')"
:icon="detail.status >= 4 ? 'el-icon-success' : undefined"
:description="parseTime(detail.announce_time)"
></el-step>
</el-steps>
</div>
</div>
</div>
</div>
</div>
<!-- 详情 -->
<div class="container panel my-4 px-4 pt-4 pb-5 rounded shadow-sm bg-panel">
<div class="row">
<div class="col-12">
<h5 class="border-bottom pb-3 mb-4">
{{ $t("purchase.projectCetails") }}
</h5>
<div class="edit-content" v-html="detail.project_details"></div>
<!-- 详情 -->
<div class="container panel my-4 px-4 pt-4 pb-5 rounded shadow-sm bg-panel">
<div class="row">
<div class="col-12">
<h5 class="border-bottom pb-3 mb-4">
{{ $t("purchase.projectCetails") }}
</h5>
<div class="edit-content" v-html="detail.project_details"></div>
</div>
</div>
</div>
</div>
</div>
<div
class="modal fade"
id="editAddress"
tabindex="-1"
role="dialog"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content bg-panel">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">
{{$t("purchase.useOrNot")}}{{activeCoin.coin_name}}{{$t("purchase.subscribe")}}?
</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="comments" class="col-form-label"
>{{$t("contract.k9")}}:</label
>
<input
type="text"
class="form-control"
id="comments"
v-model="code"
/>
</div>
</form>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary rounded-pill"
data-dismiss="modal"
>
{{ $t("common.cancelBtn") }}
</button>
<button
type="button"
class="btn btn-primary rounded-pill"
@click="sbumit"
>
{{ $t("common.confirmBtn") }}
</button>
</div>
<div
class="modal fade"
id="editAddress"
tabindex="-1"
role="dialog"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content bg-panel">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">
{{ $t("purchase.useOrNot") }}{{ activeCoin.coin_name }}{{ $t("purchase.subscribe") }}?
</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="comments" class="col-form-label"
>{{ $t("contract.k9") }}:</label
>
<input
type="text"
class="form-control"
id="comments"
v-model="code"
/>
</div>
</form>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary rounded-pill"
data-dismiss="modal"
>
{{ $t("common.cancelBtn") }}
</button>
<button
type="button"
class="btn btn-primary rounded-pill"
@click="sbumit"
>
{{ $t("common.confirmBtn") }}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Subscride from "@/api/subscride";
import Wallet from "@/api/wallet";
export default {
data() {
return {
num: 1,
coinList: [],
detail: {},
activeCoin: {},
code:"",
transferRecords: [],
coinName:"",
subscribeRecords:[],
activityList:[{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""},{rate: "", amount: ""}],
activestep:0,
issue_price:0.03,
timer:''
};
},
computed: {
total() {
return utils.multiple(
this.num || 1,
this.activeCoin.proportion_amount * 1,
2
);
data() {
return {
num: 1,
coinList: [],
detail: {},
activeCoin: {},
code: "",
transferRecords: [],
coinName: "",
subscribeRecords: [],
activityList: [{rate: "", amount: ""}, {rate: "", amount: ""}, {rate: "", amount: ""}, {
rate: "",
amount: ""
}, {rate: "", amount: ""}],
activestep: 0,
issue_price: 0.035,
timer: ''
};
},
computed: {
total() {
return utils.multiple(
this.num || 1,
this.activeCoin.proportion_amount * 1,
2
);
},
isLogin() {
return Boolean(this.userAuth);
},
isLogin() {
return Boolean(this.userAuth);
},
userAuth() {
const auth = localStorage.getItem("auth");
let ret = "";
if (auth) {
let {memberId, accessToken} = JSON.parse(auth);
ret = `?${accessToken}&${memberId}`;
}
return ret;
},
userAuth() {
const auth = localStorage.getItem("auth");
let ret = "";
if (auth) {
let { memberId, accessToken } = JSON.parse(auth);
ret = `?${accessToken}&${memberId}`;
}
return ret;
},
},
methods: {
//
methods: {
chkAuth() {
// alert(222222);
this.authh = JSON.parse(localStorage.getItem("auth"));
// console.log(this.authh.user_auth_level);
if (this.authh.user_auth_level == 0) {
// alert(11111);
this.$router.push(`/profile/certification`);
location.reload();
}
return utils.validate(".input-group");
},
//
seek(item) {
return !this.isCondition || item.coin_name === this.coinName;
},
@ -352,104 +374,123 @@ export default {
.then(data => {
this.subscribeRecords = data.data;
})
.catch(err => {});
.catch(err => {
});
},
activity() {
Subscride.activity()
.then(data => {
this.activityList=data.activity.params
this.activestep=data.step
this.activityList = data.activity.params
this.activestep = data.step
})
.catch(err => {});
.catch(err => {
});
},
parseTime(num) {
if (!num) return;
return utils.parseTime(num);
},
subscribeTokenList() {
Subscride.subscribeTokenList().then((res) => {
this.coinList = res;
this.activeCoin = this.coinList[0];
});
},
getInfo() {
Subscride.subscribe().then((res) => {
this.detail = res;
console.log(res, '这里')
});
},
chkValidate() {
//
// alert('11111');
if (!this.isLogin) {
// this.$confirm( this.$t("contract.k8"), {
// // confirmButtonText: this.$t("contract.c5"),
// // cancelButtonText: this.$t("contract.c4"),
// // type: "warning",
// })
this.$router.push(`/sign-in`);
// this.then(() => {
// // alert('22222');
// // console.log(123123);
// this.$router.push(`/sign-in`);
//
// // this.$router.push("/profile/certification")
// // this.$router.replace("/sign-in");
// })
// .catch();
}
return utils.validate(".input-group");
},
parseTime(num) {
if (!num) return;
return utils.parseTime(num);
},
subscribeTokenList() {
Subscride.subscribeTokenList().then((res) => {
this.coinList = res;
this.activeCoin = this.coinList[0];
});
},
getInfo() {
Subscride.subscribe().then((res) => {
this.detail = res;
});
},
chkValidate() {
//
if (!this.isLogin) {
this.$confirm( this.$t("contract.k8"), {
confirmButtonText: this.$t("contract.c5"),
cancelButtonText: this.$t("contract.c4"),
type: "warning",
})
.then(() => {
this.$router.push(`/sign-in`);
})
.catch();
}
return utils.validate(".input-group");
},
ifSubscribeNow() {
if (this.chkValidate()) {
this.$confirm(
`${this.$t("purchase.useOrNot")}${this.activeCoin.coin_name}${this.$t(
"purchase.subscribe"
)}?`,
this.$t("purchase.prompt"),
{
confirmButtonText: this.$t("common.confirmBtn"),
cancelButtonText: this.$t("common.cancelBtn"),
ifSubscribeNow() {
if (this.chkValidate()) {
this.$confirm(
`${this.$t("purchase.useOrNot")}${this.activeCoin.coin_name}${this.$t(
"purchase.subscribe"
)}?`,
this.$t("purchase.prompt"),
{
confirmButtonText: this.$t("common.confirmBtn"),
cancelButtonText: this.$t("common.cancelBtn"),
}
)
.then(() => {
this.subscribeNow();
})
.catch(() => {
});
}
)
.then(() => {
this.subscribeNow();
})
.catch(() => {});
}
},
sbumit(){
$("#editAddress").modal("hide");
let data={
purchase_code:this.code
}
Subscride.changePurchaseCode(data)
.then((res) => {
this.subscribeNow();
})
.catch((err) => {
$("#editAddress").modal("show");
});
},
subscribeNow() {
let data = {
amount: this.num,
coin_name: this.activeCoin.coin_name,
};
Subscride.subscribeNow(data).then((res) => {
if (res) {
this.$message.success(this.$t("purchase.subscribeSuccess"));
this.num = "";
this.getTransferRecords()
},
sbumit() {
$("#editAddress").modal("hide");
let data = {
purchase_code: this.code
}
Subscride.changePurchaseCode(data)
.then((res) => {
this.subscribeNow();
})
.catch((err) => {
$("#editAddress").modal("show");
});
},
subscribeNow() {
let data = {
amount: this.num,
coin_name: this.activeCoin.coin_name,
};
Subscride.subscribeNow(data).then((res) => {
if (res) {
this.$message.success(this.$t("purchase.subscribeSuccess"));
this.num = "";
this.getTransferRecords()
}
})
.catch((err) => {
if(err==4002){
$("#editAddress").modal("show");
}
});
.catch((err) => {
if (err == 4002) {
$("#editAddress").modal("show");
}
});
},
},
},
created() {
this.chkValidate();
this.chkAuth();
this.subscribeTokenList();
this.getInfo();
this.getTransferRecords()
this.activity()
this.timer=setInterval(this.getTransferRecords,5000)
this.timer = setInterval(this.getTransferRecords, 5000)
},
beforeMount() {
this.getInfo();
this.chkAuth();
this.chkValidate();
},
beforeDestroy() {
clearInterval(this.timer);
@ -458,23 +499,27 @@ export default {
</script>
<style lang='scss' scoped>
.table tr:hover{
.table tr:hover {
background: #e9e9e9 !important;
}
/deep/ {
.el-step__icon {
background: #222e3d;
}
.el-step__head.is-process {
color: inherit;
border-color: inherit;
}
.el-step__description.is-process,
.el-step__title.is-process {
color: inherit;
}
.el-step__description{
margin-top: 0;
}
.el-step__icon {
background: #222e3d;
}
.el-step__head.is-process {
color: inherit;
border-color: inherit;
}
.el-step__description.is-process,
.el-step__title.is-process {
color: inherit;
}
.el-step__description {
margin-top: 0;
}
}
</style>

3
src/views/setting/login-pwd.vue

@ -1,5 +1,6 @@
<template>
<div class="edit-password">
<secondary-nav></secondary-nav>
<div class="form-group">
<label>{{$t('setting.newPassword')}}</label>
<input
@ -102,4 +103,4 @@ export default {
</script>
<style>
</style>
</style>

76
src/views/signIn/index.vue

@ -1,13 +1,13 @@
<template>
<div>
<div class="vh-100 d-flex justify-content-center">
<div class="form-access my-auto ">
<div class="body">
<div class="logins" style="height:700px;">
<div class="form-access" style="padding-top: 150px">
<form class="login-body bg-panel">
<div class="text-center h3">
<span>{{ $t("login.sign-in") }}</span>
</div>
<template v-if="step === 1 ">
<template v-if="step === 1">
<div class="form-group">
<input type="text" name="account" v-model="user.account" required :data-has="$t('login.effectivePhoneEmail')" class="form-control" :placeholder="$t('login.enterPhoneEmail')" :data-message="$t('login.effectivePhoneEmail')" />
</div>
@ -211,28 +211,6 @@ export default {
return localStorage.getItem('lang');
},
test(){
// var query=this.$route.query;
// console.log(query)
let rqtoken =this.$route.query.autooooooo;
// let uid = this.$route.query.user_id;
let acc = this.$route.query.account
if(typeof rqtoken!='undefined'){
// let xuser='{"user_id":'+uid+',"account":"'+acc+'"}'
// console.log("simple json:"+xuser)
this.user.account=acc;
this.user.password="HJH^*jj8f9fj38j";
this.isLogin=true
// localStorage.setItem("auth",xuser);
//localStorage.setItem("auth",JSON.stringify(uid));
// localStorage.setItem('token', rqtoken);
//this.$router.push("/wallet/assets/exchange");
//location.reload();
// this.$router.push("/wallet/assets/exchange");
// location.reload();
}
},
refreshSlider() {
// nameiframe
// idiframedom contentWindow
@ -439,7 +417,15 @@ export default {
// local
localStorage.setItem("auth", JSON.stringify(response.user));
localStorage.setItem("token", response.token);
this.$router.push("/wallet/assets/exchange");
this.authh = JSON.parse(localStorage.getItem("auth"));
if(this.authh.user_auth_level==0){
// alert(11111);
this.$router.push(`/profile/certification`);
}else {
this.$router.push("/wallet/assets/exchange");
}
location.reload();
return;
}
@ -495,16 +481,9 @@ export default {
Member.loginConfirm(data)
.then(response => {
console.dir(response);
// let rqtoken =this.$route.query;
// if(typeof rqtoken!='undefined'){
// this.isLogin=true
// localStorage.setItem('token', rqtoken);
// }else {
// local
localStorage.setItem("auth", JSON.stringify(response.user));
localStorage.setItem("token", response.token);
// }
// local
localStorage.setItem("auth", JSON.stringify(response.user));
localStorage.setItem("token", response.token);
// 退
this.$router.push("/wallet/assets/exchange");
location.reload();
@ -523,17 +502,25 @@ export default {
//
window.step2Login = this.step2;
console.log(localStorage.lang,navigator.language.includes("zh"))
//
this.test()
}
};
</script>
<style lang="scss" scoped>
.body{
background-image: url('../../assets/img/xi4Gdg.jpeg');
background-size: 100% 100%;
// position: fixed;
height: 100%;
width: 100%;
background-color: #fff;
}
form.login-body {
// margin-top: 400rpx;
.form-group {
margin: 1rem auto;
margin: 1rem auto;
}
.area-phone-box {
@ -643,4 +630,13 @@ form.login-body {
padding: 0;
margin: 0;
}
.logins{
width: 30%;
margin-left: 62%;
//margin-top: 5%;
// display: flex;
// margin-top: 300rpx !important;
// margin:200rpx ;
// float:right;
}
</style>

38
src/views/signUp/index.vue

@ -1,8 +1,8 @@
<template>
<div>
<div class="vh-100 d-flex justify-content-center">
<div class="body">
<div class="d-flex justify-content-center logins" style="height:800px;">
<div class="form-access my-auto">
<form class="register-body">
<form class="register-body bg-panel">
<div class="text-center h3">
<span>{{$t('login.goRegister')}}</span>
</div>
@ -68,7 +68,7 @@
</label>
</div>
<button type="submit" class="btn btn-primary rounded-pill theme-bg-color-a" style="background-image: none;" @click.prevent.stop="step1">{{$t('login.reg')}}</button>
<button type="submit" class="btn btn-primary rounded-pill" @click.prevent.stop="step1">{{$t('login.reg')}}</button>
</template>
<!-- Step3 -->
@ -306,7 +306,7 @@ export default {
case 1:
Member.sendEmailCode({
email: this.user.email,
invite_code: this.user.parentCode,
token
})
.then(data => {
@ -546,6 +546,14 @@ export default {
</script>
<style lang="scss" scoped>
.body{
background-image: url("../../assets/img/xi4Gdg.jpeg");
background-size: 100% 100%;
// position: fixed;
height: 100%;
width: 100%;
background-color: #fff;
}
@import '@/assets/scss/base/_common.scss';
form.register-body {
.form-group {
@ -670,17 +678,13 @@ div.verify-code {
.form-control:disabled, .form-control[readonly]{
background-color: #1e2834;
}
.form-control {
background-color: #f8f8f8 !important;
border: none !important;
}
.nav-tabs {
border-bottom-color: #DEE2E6;
}
.nav-tabs .nav-item{
margin-bottom: 0px !important;
}
.nav-tabs .nav-link.active{
border: none !important;
.logins{
width: 30%;
margin-left: 62%;
top: 5%;
// display: flex;
// margin-top: 300rpx !important;
// margin:200rpx ;
// float:right;
}
</style>

2
src/views/wallet/address.vue

@ -9,7 +9,7 @@
<div class>
<button
type="button"
class="btn btn-primary"
class="btn btn-success"
data-toggle="modal"
data-target="#editAddress"
@click="add"

6
src/views/wallet/contract-assets.vue

@ -34,8 +34,8 @@
</thead>
<tbody>
<tr v-for="item in list" :key="item.id">
<td>{{ item.created_at }}</td>
<td>{{ item.log_type_text }}</td>
<td style="color:#000000">{{ item.created_at }}</td>
<td style="color:#000000">{{ item.log_type_text }}</td>
<td
:class="{
increace: item.amount >= 0,
@ -99,4 +99,4 @@ export default {
</script>
<style>
</style>
</style>

44
src/views/wallet/exchange-assets.vue

@ -109,7 +109,7 @@
<div class="mb-2 mr-sm-2">
<input type="text" v-model="keyword" class="form-control mb-2 mr-sm-2" :placeholder="$t('wallet.searchCurrency')" />
<router-link to="/wallet/address" class="btn btn-primary rounded-pill mb-2">{{$t('wallet.addressManagement')}}</router-link>
<!--<router-link to="/wallet/address" class="btn btn-success rounded-pill mb-2">{{$t('wallet.addressManagement')}}</router-link>-->
</div>
</form>
<div class="tab-content">
@ -142,8 +142,7 @@
<div class="btn-group btn-group-sm" role="group" aria-label="Basic example">
<!-- data-target="#deposite" -->
<button type="button" class="btn btn-outline-primary" data-toggle="modal" @click="enterDeposite(item)" :disabled="!item.is_withdraw">{{$t('wallet.recharge')}}</button>
<!-- <button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#withdraw" @click="enterWithdraw(item)" :disabled="!item.is_withdraw">{{$t('wallet.withdrawal')}}</button> -->
<button type="button" class="btn btn-outline-primary" data-target="#withdraw" @click="enterWithdraw(item)" :disabled="!item.is_withdraw">{{$t('wallet.withdrawal')}}</button>
<button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#withdraw" @click="enterWithdraw(item)" :disabled="!item.is_withdraw">{{$t('wallet.withdrawal')}}</button>
<div class="btn-group btn-group-sm" role="group">
<button id="btnGroupDrop1" type="button" class="btn btn-outline-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{$t('wallet.transaction')}}</button>
@ -340,7 +339,7 @@
</span>
<span>
{{$t('wallet.low')}}:{{withdrawFee.withdrawal_min}} {{withdrawCoin}}
<router-link to="/wallet/address" class="text-primary">{{$t('wallet.addressList')}}</router-link>
<!--<router-link to="/wallet/address" class="text-primary">{{$t('wallet.addressList')}}</router-link>-->
</span>
</label>
<div class="input-group input-group-sm">
@ -361,14 +360,6 @@
</div>
<span class="text-right">{{$t('wallet.handlingFee1')}}: {{withdrawCoin=='USDT'&&withdraw.addressType==3?withdrawFee.trc20:withdrawFee.withdrawal_fee }} {{withdrawCoin}}</span>
</div>
<div class="form-group mt-2">
<label class="d-flex justify-content-between" for="formGroupExampleInput">
<span>{{$t('login.pwd')}}</span>
</label>
<div class="input-group input-group-sm">
<input type="password" v-model="withdraw.password" :placeholder="$t('login.password')" class="form-control" />
</div>
</div>
</form>
</div>
<div class="col-md-6">
@ -420,7 +411,6 @@ export default {
total_assets_usd: 0
},
userInfo:{},//
ProfileDetail: {},
coinAssets: [], //
isHideZero: false, // 0
@ -444,7 +434,6 @@ export default {
coin_id: "",
amount: "",
address: "",
password: "",
addressType: 2, // 1 omni 2 erc20,
code_type: 1,
code: ''
@ -605,12 +594,6 @@ export default {
//
enterWithdraw(item) {
// console.log(this.ProfileDetail.status)
if(this.ProfileDetail.status!=2){
this.$router.push("/profile/certification");
return;
}
$('#withdraw').modal('show');
this.withdrawCoin = item.coin_name;
this.withdraw.coin_id = item.coin_id;
//
@ -665,16 +648,6 @@ export default {
Profile.getUserInfo({}).then(res => {
this.userInfo = res
});
},
getAuthInfo() {
Profile.getAuthInfo({}).then(res => {
this.ProfileDetail = res;
console.log(this.ProfileDetail, 11111)
});
},
//
PageScrollTo(num){
document.documentElement.scrollTop = num;
}
},
@ -683,8 +656,7 @@ created() {
this.getUserAssets();
this.getCoinAssets();
this.createWalletAddress();
this.getUserInfo();
this.getAuthInfo();
this.getUserInfo()
},
mounted() {
@ -718,14 +690,6 @@ created() {
// console.error('Action:', e.action);
// console.error('Trigger:', e.trigger);
});
//
let isNeedScroll = this.$route.fullPath.split('?buy=')[1];
// console.log(this.$route.fullPath,121212121, isNeedScroll);
if(isNeedScroll){
setTimeout(() => {
this.PageScrollTo(775);
}, 1500);
}
}
};
</script>

7
src/views/wallet/funding.vue

@ -40,7 +40,7 @@
</div>
<div class="tab-content">
<!-- 充值 -->
<div v-infinite-scroll="load1" class="tab-pane funding-table fade show" :class="currentTab =='deposit'? 'active':''" id="deposit" role="tabpanel">
<div v-infinite-scroll="load1" class="tab-pane funding-table fade " :class="currentTab =='deposit'? 'active':''" id="deposit" role="tabpanel">
<table class="table stripe">
<thead>
<tr>
@ -189,10 +189,7 @@ export default {
},
getDepositHistories() {
Wallet.depositHistory().then(data => {
this.depositHistories = data.data;
console.log( this.depositHistories, ' this.depositHistories')
}).catch(err => { });
Wallet.depositHistory().then(data => this.depositHistories = data.data).catch(err => { });
},
getRechargeManualLog() {

BIN
static/images/icon/andriod.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

BIN
static/images/icon/api.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

BIN
static/images/icon/google-play.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

BIN
static/images/icon/imac.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/images/icon/ios.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

BIN
static/images/icon/linux.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

BIN
static/images/icon/right.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

BIN
static/images/icon/windows.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
static/images/icon_1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

BIN
static/images/icon_2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

BIN
static/images/icon_3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

BIN
static/images/illustration-3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 KiB

BIN
static/images/lightImageUrl.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

BIN
static/images/lightImageUrl_2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save