32 changed files with 1043 additions and 233 deletions
-
2src/assets/css/base.css
-
30src/assets/css/other.css
-
26src/assets/data/en.js
-
28src/assets/data/zh.js
-
BINsrc/assets/images/bg_default.png
-
29src/router.js
-
2src/store/modules/user.js
-
26src/views/assets/coincoin_assets.vue
-
37src/views/assets/coincoin_records.vue
-
54src/views/assets/currency_assets.vue
-
37src/views/assets/currency_records.vue
-
298src/views/assets/exchange.vue
-
21src/views/coincoin/coincoin_order.vue
-
17src/views/coincoin/coincoin_trade.vue
-
9src/views/coincoin/components/trade_form.vue
-
24src/views/coincoin/components/trade_order_list.vue
-
6src/views/currency/currency_ads.vue
-
24src/views/currency/currency_deal.vue
-
12src/views/currency/currency_merchant.vue
-
18src/views/currency/currency_order.vue
-
2src/views/currency/currency_order_details.vue
-
77src/views/currency/currency_release.vue
-
27src/views/currency/currency_trade.vue
-
57src/views/index/components/announce.vue
-
51src/views/index/index.vue
-
14src/views/login/login.vue
-
100src/views/news/details.vue
-
95src/views/news/list.vue
-
11src/views/news/news.vue
-
16src/views/register/register.vue
-
3src/views/user/account.vue
-
93src/views/user/shop_info.vue
|
After Width: 540 | Height: 340 | Size: 8.1 KiB |
@ -0,0 +1,298 @@ |
|||
<template> |
|||
<div class="global-width"> |
|||
<div class="container"> |
|||
<!--当前位置--> |
|||
<div class="hc-breadcrumb"> |
|||
<span class="hc-color4">{{$t('币币账户')}}</span> |
|||
<i class="hc-breadcrumb-icon"></i> |
|||
<span class="margin0">{{$t('兑换')}}</span> |
|||
</div> |
|||
|
|||
<div class="hc-breadcrumb second-position"> |
|||
<span class="hc-color1"> |
|||
<img src="../../assets/images/icon-money.png" />{{exchangeCoin}} {{$t('兑换')}} |
|||
</span> |
|||
</div> |
|||
|
|||
<div class="recharge-warp"> |
|||
<div class="withdrawmoney-box"> |
|||
<div class="form-box"> |
|||
<div class="form-group"> |
|||
<label class="form-label">{{$t('选择兑换币种')}}</label> |
|||
|
|||
<div class="form-control"> |
|||
<div class="hc-form-warp" @click="showCoin1 = !showCoin1" v-if="exchangeCoin"> |
|||
<img class="hc-select-img" :src="'data:img/jpg;base64,' + exchangeCoinImg" v-if="exchangeCoinImg"> |
|||
<span class="hc-select-span1">{{exchangeCoin}}</span> |
|||
|
|||
<span class="hc-form-down-icon"> |
|||
<i class="fa-caret-down"></i> |
|||
</span> |
|||
</div> |
|||
<div class="hc-form-warp" @click="showCoin1 = !showCoin1" v-else> |
|||
<span class="hc-select-span1">{{$t('选择兑换币种')}}</span> |
|||
|
|||
<span class="hc-form-down-icon"> |
|||
<i class="fa-caret-down"></i> |
|||
</span> |
|||
</div> |
|||
|
|||
<!-- 选择币种弹框 --> |
|||
<div class="choose-currencies" v-if="showCoin1"> |
|||
<div class="hc-select-options" v-for="item of allCoinList" :key="item.id" @click="chooseCoin(item)"> |
|||
<img class="hc-select-img" :src="'data:img/jpg;base64,' + item.image" v-if="item.image"> |
|||
<span class="hc-select-span1">{{item.id}}</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="form-label">{{$t('选择目标币种')}}</label> |
|||
|
|||
<div class="form-control"> |
|||
<div class="hc-form-warp" @click="showCoin2 = !showCoin2"> |
|||
<img class="hc-select-img" :src="'data:img/jpg;base64,' + targetCoinImg" v-if="targetCoinImg"> |
|||
<span class="hc-select-span1">{{targetCoin ? targetCoin : $t('选择目标币种')}}</span> |
|||
|
|||
<span class="hc-form-down-icon"> |
|||
<i class="fa-caret-down"></i> |
|||
</span> |
|||
</div> |
|||
|
|||
<!-- 选择币种弹框 --> |
|||
<div class="choose-currencies" v-if="showCoin2"> |
|||
<div class="hc-select-options" v-for="item of targetCoinList" :key="item.id" @click="chooseTargeCoin(item)"> |
|||
<img class="hc-select-img" :src="'data:img/jpg;base64,' + item.image" v-if="item.image"> |
|||
<span class="hc-select-span1">{{item.id}}</span> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label class="form-label"> |
|||
{{$t('兑换数量')}} |
|||
<span class="hc-color3">( {{$t('可用')}}:{{account}} )</span> |
|||
</label> |
|||
|
|||
<div class="form-control"> |
|||
<el-input class="text-input" :placeholder="$t('请输入兑换数量')" v-model="amount" type="text" clearable autocomplete="off" @keyup.enter.native="submit"> |
|||
</el-input> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<div class="address-form-div2"> |
|||
<label class="form-label">{{$t('兑换比例')}}</label> |
|||
<div class="form-control"> |
|||
<input type="text" class="text-input" :value="proportion" readonly> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="address-form-div3"> |
|||
<label class="form-label">{{$t('支付密码')}}</label> |
|||
<div class="form-control"> |
|||
<el-input class="text-input" :placeholder="$t('请输入支付密码')" v-model="password" type="password" clearable autocomplete="off" @keyup.enter.native="submit"> |
|||
</el-input> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<el-button class="form-submit-btn" type="primary" :loading="true" v-if="loading">{{$t('提交中...')}}</el-button> |
|||
<el-button class="form-submit-btn" type="primary" @click="submit" v-else>{{$t('确认划转')}}</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="address-line"></div> |
|||
<div class="recharge-reminder"> |
|||
<div class="recharge-r-top"> |
|||
<i class="fa-exclamation"></i> |
|||
<span>{{$t('温馨提示')}}</span> |
|||
</div> |
|||
|
|||
<p>{{$t('1. 最小兑换数量为:')}}{{minAmount}}{{exchangeCoin}}{{$t(',最大兑换数量为:')}}{{maxAmount}}{{exchangeCoin}}{{$t(',手续费为:')}}{{fee}}</p> |
|||
<p>{{$t('2. 请务必确认电脑及浏览器安全,防止信息被篡改或泄露。')}}</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState } from 'vuex' |
|||
export default { |
|||
name: 'exchange', |
|||
data() { |
|||
return { |
|||
assetsCaseCode: 'COIN_TO_COIN', //账号类型 1币币 2法币 |
|||
exchangeCoin: '', //兑换币种 |
|||
targetCoin: '', //目标币种 |
|||
showCoin1: false, //选择币种弹窗 |
|||
showCoin2: false, //选择币种弹窗 |
|||
|
|||
account: 0, //余额 |
|||
proportion: 0, //兑换比例 |
|||
maxAmount: 0, //最大兑换数 |
|||
minAmount: 0, //最小兑换数 |
|||
fee: 0, //手续费 |
|||
amount: '', //兑换数量 |
|||
password: '', //支付密码 |
|||
|
|||
loading: false, |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapState('trend', ['allCoinList']), |
|||
|
|||
exchangeCoinImg() { //币种的图片 |
|||
let img; |
|||
this.allCoinList.forEach(item => { |
|||
if (item.id == this.exchangeCoin) { |
|||
img = item.image; |
|||
} |
|||
}) |
|||
return img; |
|||
}, |
|||
targetCoinImg() { //目标币种图片 |
|||
let img; |
|||
this.allCoinList.forEach(item => { |
|||
if (item.id == this.targetCoin) { |
|||
img = item.image; |
|||
} |
|||
}) |
|||
return img; |
|||
}, |
|||
targetCoinList() { |
|||
let list = []; |
|||
this.allCoinList.forEach(item => { |
|||
if(item.id != this.exchangeCoin) { |
|||
list.push(item) |
|||
} |
|||
}); |
|||
return list; |
|||
}, |
|||
|
|||
// summary() { //实际扣除数量 |
|||
// let value = 0; |
|||
// let remainder = this.common.accAdd(1, this.fee); |
|||
|
|||
// if(this.amount > 0) { |
|||
// if(this.common.accMul(this.fee, this.amount) < this.minFee) { //最低手续费 |
|||
// value = this.common.accAdd(this.amount, this.minFee).toFixed(8); |
|||
// } else { |
|||
// value = this.common.accMul(this.amount, remainder).toFixed(8); |
|||
// } |
|||
// } |
|||
// return value; |
|||
// } |
|||
}, |
|||
methods: { |
|||
getBalance() { //获取余额 |
|||
this.getAxios('/api/user/assets/list?type=' + this.assetsCaseCode) |
|||
.then(data => { |
|||
let list = data.data; |
|||
list.forEach(item => { |
|||
if(item.coinId == this.exchangeCoin) { |
|||
this.account = item.normalAmount; |
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
getExchangeInfo() { //获取兑换信息 |
|||
let params = { |
|||
caseCode: this.assetsCaseCode, |
|||
inCoinId: this.exchangeCoin, |
|||
outCoinId: this.targetCoin |
|||
} |
|||
this.postAxios('/api/exchange/coin/info', params) |
|||
.then(data => { |
|||
this.proportion = data.data.proportion; |
|||
this.maxAmount = data.data.maxAmount; |
|||
this.minAmount = data.data.minAmount; |
|||
this.fee = data.data.exchangeFee; |
|||
}) |
|||
}, |
|||
|
|||
chooseCoin(item) { //选择币种 |
|||
this.exchangeCoin = item.id; |
|||
this.showCoin1 = false; |
|||
|
|||
this.getBalance(); |
|||
|
|||
if(this.targetCoin) { |
|||
this.getExchangeInfo(); |
|||
} |
|||
}, |
|||
chooseTargeCoin(item) { //选择目标币种 |
|||
if(!this.exchangeCoin) { |
|||
this.$message.error(this.$t('请先选择兑换币种!')); |
|||
return; |
|||
} |
|||
this.targetCoin = item.id; |
|||
this.showCoin2 = false; |
|||
|
|||
this.getExchangeInfo(); |
|||
}, |
|||
|
|||
submit() { |
|||
if(this.loading) { |
|||
return; |
|||
} |
|||
if(!this.targetCoin) { |
|||
this.$message.error(this.$t('请选择目标币种!')); |
|||
return; |
|||
} |
|||
if(!this.amount) { |
|||
this.$message.error(this.$t('请输入兑换数量!')); |
|||
return; |
|||
} |
|||
if(!this.password) { |
|||
this.$message.error(this.$t('请输入支付密码!')); |
|||
return; |
|||
} |
|||
|
|||
this.loading = true; |
|||
|
|||
let params = { |
|||
caseCode: this.assetsCaseCode, |
|||
inCoinId: this.exchangeCoin, |
|||
outCoinId: this.targetCoin, |
|||
exchangeAmount: this.amount, |
|||
payPassword: this.password |
|||
} |
|||
this.postAxios('/api/exchange/coin/exchangeCoin', params) |
|||
.then(() => { |
|||
this.$message.success(this.$t('兑换提交成功!')); |
|||
|
|||
this.loading = false; |
|||
this.getBalance(); |
|||
this.clearData(); |
|||
}) |
|||
.catch(() => { |
|||
this.loading = false; |
|||
}) |
|||
}, |
|||
clearData() { |
|||
this.amount = ''; |
|||
this.password = ''; |
|||
} |
|||
}, |
|||
created() { |
|||
this.exchangeCoin = this.$route.params.id; |
|||
this.assetsCaseCode = this.$route.params.type == 1 ? 'COIN_TO_COIN' : 'F_COIN'; |
|||
this.getBalance(); |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.address-form-div4 { |
|||
width: 32px; |
|||
display: inline-block; |
|||
margin: 0 9px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,57 @@ |
|||
<template> |
|||
<div class="home-news"> |
|||
<div class="home-news-top"> |
|||
<h2>{{$t('公告')}}</h2> |
|||
<router-link to="/news">{{$t('查看更多')}}</router-link> |
|||
</div> |
|||
|
|||
<ul class="home-news-ul"> |
|||
<li v-for="item of announceList" :key="item.id"> |
|||
<router-link :to="'/news/details/' + item.id"> |
|||
<div class="news-li-top">{{item.createDatetime | dateFormat('YYYY-MM-DD')}} / {{item.source}}</div> |
|||
|
|||
<div class="news-li-text"> |
|||
<img src="@/assets/images/bg_bg4-2.png" /> |
|||
|
|||
<div class="news-li-content"> |
|||
<h3>{{item.title}}</h3> |
|||
<p>{{item.brief}}</p> |
|||
</div> |
|||
</div> |
|||
</router-link> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'indexAnnounce', |
|||
data() { |
|||
return { |
|||
announceList: [], |
|||
} |
|||
}, |
|||
methods: { |
|||
getList() { //获取列表 最新5条数据 |
|||
let params = { |
|||
data: { |
|||
newsType: 'T_S_T_ANNO', |
|||
}, |
|||
page: 1, |
|||
limit: 3, |
|||
} |
|||
this.postAxios('/api/news/news/page', params) |
|||
.then(data => { |
|||
this.announceList = data.data.records; |
|||
}) |
|||
}, |
|||
}, |
|||
created() { |
|||
this.getList() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
@ -0,0 +1,100 @@ |
|||
<template> |
|||
<div class="global-width"> |
|||
<div class="container"> |
|||
<div class="hc-breadcrumb"> |
|||
<span class="hc-color4" @click="$router.push('/news')">{{$t('最新公告')}}</span> |
|||
<i class="hc-breadcrumb-icon"></i> |
|||
<span class="margin0">{{newsDetails.title}}</span> |
|||
</div> |
|||
|
|||
<div class="hc-breadcrumb trade-center-top"> |
|||
<span>{{$t('最新公告')}}</span> |
|||
|
|||
<!-- <div class="helpcenter-soso"> |
|||
<div class="soso-box"> |
|||
<input placeholder="搜索"><i class="icon-search"></i> |
|||
</div> |
|||
</div> --> |
|||
</div> |
|||
|
|||
<div class="helpcenter-main"> |
|||
<div class="helpcenter-l"> |
|||
<div class="helpcenter-problem"> |
|||
<h2 class="more">{{$t('公告')}}</h2> |
|||
|
|||
<ul class="more-li open"> |
|||
<li v-for="item of newsList" :key="item.id"> |
|||
<router-link :to="'/news/details/' + item.id" class="list-title">{{item.title}}</router-link> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="helpcenter-r"> |
|||
<header class="article-header"> |
|||
<h1 class="article-title">{{newsDetails.title}}</h1> |
|||
<p class="time"> |
|||
{{newsDetails.createDatetime | dateFormat('YYYY-MM-DD hh:mm:ss')}} |
|||
<span>{{$t('来源')}}: {{newsDetails.source}}</span> |
|||
</p> |
|||
</header> |
|||
|
|||
<div class="article-info" v-html="newsDetails.content"></div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'newsDetails', |
|||
data() { |
|||
return { |
|||
newsList: [], //最新数据 |
|||
|
|||
id: '', //新闻id |
|||
newsDetails: {}, //新闻详情 |
|||
} |
|||
}, |
|||
watch: { |
|||
$route() { |
|||
this.id = this.$route.params.id; |
|||
|
|||
this.getNewsList(); |
|||
this.getNewsDetails(); |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
getNewsList() { //获取列表 最新5条数据 |
|||
let params = { |
|||
data: { |
|||
newsType: 'T_S_T_ANNO', |
|||
}, |
|||
page: 1, |
|||
limit: 5, |
|||
} |
|||
this.postAxios('/api/news/news/page', params) |
|||
.then(data => { |
|||
this.newsList = data.data.records; |
|||
}) |
|||
}, |
|||
getNewsDetails() { //获取新闻详情 |
|||
this.getAxios('/api/news/' + this.id) |
|||
.then(data => { |
|||
this.newsDetails = data.data; |
|||
}) |
|||
} |
|||
}, |
|||
created() { |
|||
this.id = this.$route.params.id; |
|||
|
|||
this.getNewsList(); |
|||
this.getNewsDetails(); |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
@ -1,8 +1,101 @@ |
|||
<template> |
|||
<div class="wrap"></div> |
|||
<div class="global-width"> |
|||
<div class="container"> |
|||
<div class="hc-breadcrumb"> |
|||
<span>{{$t('公告')}}</span> |
|||
</div> |
|||
|
|||
<div class="hc-breadcrumb trade-center-top"> |
|||
<span>{{$t('最新公告')}}</span> |
|||
|
|||
<!-- <div class="helpcenter-soso"> |
|||
<div class="soso-box soso-boxs"> |
|||
<input class="inp" placeholder="搜索"> |
|||
<i class="icon-search icon-searchs"></i> |
|||
</div> |
|||
</div> --> |
|||
</div> |
|||
|
|||
<div class="news-main"> |
|||
<ul class="news-list-ul"> |
|||
<li v-for="item of newsList" :key="item.id"> |
|||
<div class="list-left" @click="$router.push('/news/details/' + item.id)"> |
|||
<img :src="item.thumbUrl" v-if="item.thumbUrl"> |
|||
<img src="../../assets/images/bg_default.png" v-else> |
|||
</div> |
|||
|
|||
<div class="list-right"> |
|||
<router-link :to="'/news/details/' + item.id" class="list-title">{{item.title}}</router-link> |
|||
<p class="list-cont">{{item.brief}}</p> |
|||
|
|||
<div class="list-time"> |
|||
<span>{{item.createDatetime | dateFormat('YYYY-MM-DD hh:mm:ss')}}</span> |
|||
<span>{{$t('来源')}}: {{item.source}}</span> |
|||
</div> |
|||
</div> |
|||
</li> |
|||
</ul> |
|||
|
|||
<no-content :isText="$t('暂无数据')" :isContent="isContent"></no-content> |
|||
|
|||
<el-pagination class="list-pages" background layout="prev, pager, next" v-show="!isContent" :page-count="pageTotal" :current-page="currentPage" @next-click="pagesChange" @prev-click="pagesChange" @current-change="pagesChange"></el-pagination> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import noContent from '@/components/no_content' |
|||
export default { |
|||
name: 'news', |
|||
components: { |
|||
noContent, |
|||
}, |
|||
data() { |
|||
return { |
|||
newsList: [], |
|||
|
|||
isContent: false, |
|||
noResult: false, |
|||
pageTotal: 0, //总页数 |
|||
currentPage: 1, //默认当前页 |
|||
} |
|||
}, |
|||
methods: { |
|||
getNewsList(pages) { |
|||
let params = { |
|||
data: { |
|||
newsType: 'T_S_T_ANNO', |
|||
}, |
|||
page: pages, |
|||
limit: 10, |
|||
} |
|||
this.currentPage = pages; |
|||
|
|||
this.postAxios('/api/news/news/page', params) |
|||
.then(data => { |
|||
this.pageTotal = data.data.pages; |
|||
|
|||
if (data.data.total == 0) { |
|||
this.isContent = true; |
|||
} else { |
|||
this.isContent = false; |
|||
} |
|||
|
|||
this.newsList = []; |
|||
data.data.records.forEach(item => { |
|||
this.newsList.push(item); |
|||
}) |
|||
}) |
|||
}, |
|||
pagesChange(pages) { |
|||
this.getNewsList(pages); |
|||
}, |
|||
}, |
|||
created() { |
|||
this.getNewsList(1); |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
|
|||
@ -0,0 +1,11 @@ |
|||
<template> |
|||
<div class="wrap"> |
|||
<router-view></router-view> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue