Browse Source

联系客服/所有交易对添加图形验证码(去掉验证码前的版本)

master
shike 6 years ago
parent
commit
b86e001326
  1. 28
      src/assets/css/other.css
  2. 6
      src/components/footer.vue
  3. 3
      src/components/header.vue
  4. 35
      src/router.js
  5. 3
      src/store/modules/trend.js
  6. 8
      src/views/assets/exchange.vue
  7. 8
      src/views/coincoin/components/trade_data_update.vue
  8. 5
      src/views/coincoin/components/trade_depth.vue
  9. 27
      src/views/coincoin/components/trade_form.vue
  10. 79
      src/views/contact/contact_us.vue
  11. 116
      src/views/contact/details.vue
  12. 11
      src/views/contact/index.vue
  13. 51
      src/views/contact/list.vue
  14. 23
      src/views/currency/currency_deal.vue
  15. 24
      src/views/currency/currency_release.vue
  16. 4
      src/views/release/components/release_depth.vue
  17. 27
      src/views/release/components/release_form.vue

28
src/assets/css/other.css

@ -6141,3 +6141,31 @@ otc-index-btn:hover {
margin-left: 100px; margin-left: 100px;
margin-top: 30px; margin-top: 30px;
} }
/*交谈*/
.conversation-box{ background: #fff; padding: 80px 0;}
.conversation-boxs{ padding: 40px 0; min-height: 500px;}
.conli{ width: 600px; margin: auto; margin-bottom: 20px; }
.conli label{ color: #66817f; font-size: 14px; float: left; line-height: 50px;}
.conli input{ line-height: 50px; width: 500px; background: #f6f6f6; padding: 0 10px; float: left; color: #66817f;}
.conli .problem{ line-height: 50px; width: 500px; background: #f6f6f6; padding: 0 10px; float: left; position: relative; font-size: 14px; color: #66817f; cursor: pointer;}
.conli .problem img{ display: inline-block;width: 15px;height: 15px;position: absolute; right: 20px; top: 18px;}
.conli textarea{float: left; background: #f6f6f6; height: 100px; padding: 10px; width: 500px; color: #66817f; font-size: 12px;}
.proul{ width: 500px; overflow: hidden; position: absolute; left: 0; background: #f6f6f6; display: none;}
.proul li{ line-height: 50px; width: 500px; border-top: 1px solid #fff; padding: 0 10px; color: #66817f; font-size: 14px; cursor: pointer;}
.proul li:hover{ color: #999; }
.conli button{ background: #5f97ff; width: 500px; height: 50px; line-height: 50px; display: block; margin-left: 71px; font-size: 14px; color: #fff; }
.tana{ float: right; font-size: 14px; color: #5f97ff; padding-right: 20px;}
.rec-ul{ width: 60%; margin: auto; }
.rec-ul li{ width: 100%; border-bottom: 1px solid #f2f2f2; padding: 20px 0; position: relative;}
.rec-ul li p{ color: #ccc; font-size: 12px; }
.rec-ul li p.rec-p{ font-size: 16px; color: #66817f;margin-bottom: 10px;}
.rec-ul li p span{ float: right; }
.rec-ul li span.no-re{ background: #f2f2f2; color: #fa5e6a; font-size: 12px; border-radius: 30px; padding:2px 12px; position: absolute; right: 0; top: 20px;}
.rec-ul li img{ margin:20px 0; width: 100%; }
.rec-ul li p.reply{ color: #66817f; font-size: 14px; }
.rec-ul li p.reply span{ font-size: 12px; color: #ccc; }
.rec-q h1{ border-radius: 50px; background: #2cbfa2; width: 35px; height: 35px; text-align: center; line-height: 35px; color: #fff; font-size: 20px; margin-bottom: 10px;}
.rec-a h1{ background: #5f97ff; }

6
src/components/footer.vue

@ -16,9 +16,9 @@
<div class="footer-center"> <div class="footer-center">
<ul class="footer-list footer-list-a"> <ul class="footer-list footer-list-a">
<h3>{{$t('关于')}}</h3> <h3>{{$t('关于')}}</h3>
<li>
<!-- <li>
<a href="javascript:;">{{$t('关于我们')}}</a> <a href="javascript:;">{{$t('关于我们')}}</a>
</li>
</li> -->
<li> <li>
<router-link to="/news">{{$t('公告')}}</router-link> <router-link to="/news">{{$t('公告')}}</router-link>
</li> </li>
@ -36,7 +36,7 @@
<h3>{{$t('联系我们')}}</h3> <h3>{{$t('联系我们')}}</h3>
<div class="contact-us"> <div class="contact-us">
<span class="conversation"> <span class="conversation">
<a href="javascript:;">{{$t('在线交谈')}}</a>
<router-link to="/contact">{{$t('在线交谈')}}</router-link>
</span> </span>
</div> </div>

3
src/components/header.vue

@ -24,6 +24,9 @@
<li> <li>
<router-link to="/news">{{$t('公告')}}</router-link> <router-link to="/news">{{$t('公告')}}</router-link>
</li> </li>
<li>
<router-link to="/contact">{{$t('联系我们')}}</router-link>
</li>
</ul> </ul>
<ul class="navbar-nav" v-if="isLogin && !userIsActive"> <ul class="navbar-nav" v-if="isLogin && !userIsActive">

35
src/router.js

@ -139,6 +139,41 @@ export default new Router({
}, },
] ]
}, },
{
path: 'contact',
name: 'contact',
component: () => import('./views/contact/index'),
meta: {
title: '联系我们',
},
redirect: 'contact/contact_us',
children: [
{
path: 'contact_us',
name: 'contactUs',
component: () => import('./views/contact/contact_us'),
meta: {
title: '联系我们',
},
},
{
path: 'list',
name: 'contactList',
component: () => import('./views/contact/list'),
meta: {
title: '联系我们列表',
},
},
{
path: 'details/:id',
name: 'contactDetails',
component: () => import('./views/contact/details'),
meta: {
title: '联系详情',
},
},
]
},
{ {
path: 'news', path: 'news',
name: 'news', name: 'news',

3
src/store/modules/trend.js

@ -25,7 +25,6 @@ export default {
setPair(state, data) { //交易对 -- 行情、币币模块 setPair(state, data) { //交易对 -- 行情、币币模块
//console.log(JSON.stringify(data)); //console.log(JSON.stringify(data));
state.allPairList = data; state.allPairList = data;
console.log(JSON.stringify(data)+'12131313')
}, },
setTrend(state, data) { //行情 setTrend(state, data) { //行情
//console.log(JSON.stringify(data)); //console.log(JSON.stringify(data));
@ -77,7 +76,6 @@ export default {
// 获取实时成交 // 获取实时成交
getTransactions(ctx) { getTransactions(ctx) {
console.log(ctx.state.currentPair);
request.getAxios('/api/entrust/trade/list/'+`${ctx.state.currentPair.dealCoin}-${ctx.state.currentPair.convertType}`).then(res => { request.getAxios('/api/entrust/trade/list/'+`${ctx.state.currentPair.dealCoin}-${ctx.state.currentPair.convertType}`).then(res => {
ctx.commit('setTransactions', res) ctx.commit('setTransactions', res)
}); });
@ -150,7 +148,6 @@ export default {
getCollect(context) { //获取收藏列表 getCollect(context) { //获取收藏列表
request.getAxios('/api/user/config/list') request.getAxios('/api/user/config/list')
.then(res => { .then(res => {
console.log(JSON.stringify(res.data))
res.data.forEach(item => { res.data.forEach(item => {
if (item.configKey == 'U_COLLECTION') { if (item.configKey == 'U_COLLECTION') {
context.commit('setCollect', item.configValue); context.commit('setCollect', item.configValue);

8
src/views/assets/exchange.vue

@ -207,8 +207,8 @@
getExchangeInfo() { // getExchangeInfo() { //
let params = { let params = {
caseCode: this.assetsCaseCode, caseCode: this.assetsCaseCode,
inCoinId: this.exchangeCoin,
outCoinId: this.targetCoin
inCoinId: this.targetCoin,
outCoinId: this.exchangeCoin
} }
this.postAxios('/api/exchange/coin/info', params) this.postAxios('/api/exchange/coin/info', params)
.then(data => { .then(data => {
@ -261,8 +261,8 @@
let params = { let params = {
caseCode: this.assetsCaseCode, caseCode: this.assetsCaseCode,
inCoinId: this.exchangeCoin,
outCoinId: this.targetCoin,
inCoinId: this.targetCoin,
outCoinId: this.exchangeCoin,
exchangeAmount: this.amount, exchangeAmount: this.amount,
payPassword: this.password payPassword: this.password
} }

8
src/views/coincoin/components/trade_data_update.vue

@ -30,12 +30,12 @@
<span class="hc-color1" v-else>{{currentPair.changes * 100 | Decimal(2)}}%</span> <span class="hc-color1" v-else>{{currentPair.changes * 100 | Decimal(2)}}%</span>
</div> </div>
<div class="line-div1"> <div class="line-div1">
<p>24H {{$t('')}}</p>
<span>0</span>
<p>24H {{$t('均价')}}</p>
<span>{{currentPair.avg}}</span>
</div> </div>
<div class="line-div1"> <div class="line-div1">
<p>24H {{$t('')}}</p>
<span>0</span>
<p>24H {{$t('交易量')}}</p>
<span>{{currentPair.dealCount || 0}}</span>
</div> </div>
<div class="line-div1"> <div class="line-div1">
<p>24H {{$t('量')}}</p> <p>24H {{$t('量')}}</p>

5
src/views/coincoin/components/trade_depth.vue

@ -17,7 +17,7 @@
<div class="deal-folder" :class="{'deal-folder-open': depthListType == 3}" v-if="depthListType != 2"> <div class="deal-folder" :class="{'deal-folder-open': depthListType == 3}" v-if="depthListType != 2">
<!-- 买单 --> <!-- 买单 -->
<div class="deal-list"> <div class="deal-list">
<ul v-for="(item, index) of buyDepth" :key="index">
<ul v-for="(item, index) of sellDepth" :key="index">
<li><span class="red-text">{{item.price}}</span></li> <li><span class="red-text">{{item.price}}</span></li>
<li><span>{{item.remain}}</span></li> <li><span>{{item.remain}}</span></li>
<li><span>{{item.amount}}</span></li> <li><span>{{item.amount}}</span></li>
@ -38,7 +38,7 @@
<div class="deal-folder" :class="{'deal-folder-open': depthListType == 2}" v-if="depthListType != 3"> <div class="deal-folder" :class="{'deal-folder-open': depthListType == 2}" v-if="depthListType != 3">
<!-- 卖单 --> <!-- 卖单 -->
<div class="deal-list"> <div class="deal-list">
<ul v-for="(item, index) of sellDepth" :key="index">
<ul v-for="(item, index) of buyDepth" :key="index">
<li><span class="green-text">{{item.price}}</span></li> <li><span class="green-text">{{item.price}}</span></li>
<li><span>{{item.remain}}</span></li> <li><span>{{item.remain}}</span></li>
<li><span>{{item.amount}}</span></li> <li><span>{{item.amount}}</span></li>
@ -114,7 +114,6 @@
list.push(item) list.push(item)
} }
}); });
console.log(JSON.stringify(list)+'卖卖卖')
return list; return list;
}, },
}, },

27
src/views/coincoin/components/trade_form.vue

@ -109,7 +109,14 @@
<el-input :placeholder="$t('请输入支付密码')" v-model="payPassword" type="password" clearable autocomplete="off" @keyup.enter.native="submitTrade"> <el-input :placeholder="$t('请输入支付密码')" v-model="payPassword" type="password" clearable autocomplete="off" @keyup.enter.native="submitTrade">
</el-input> </el-input>
</div> </div>
<div class="title-tips">{{$t('图形验证码')}}</div>
<div class="address-form-input" style="display: flex;justify-content: space-between;">
<el-input :placeholder="$t('请输入图形验证码')" v-model="imgVerifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submit">
</el-input>
<img class="val" :src="imagesUrl" @click="getImageCode">
</div>
<div class="title-tips">{{$t('动态验证')}}</div> <div class="title-tips">{{$t('动态验证')}}</div>
<div class="address-form-input"> <div class="address-form-input">
<el-input class="verify-input" :placeholder="$t('请输入验证码')" v-model="verifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submitTrade"> <el-input class="verify-input" :placeholder="$t('请输入验证码')" v-model="verifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submitTrade">
@ -163,8 +170,15 @@
iTime: 60, // iTime: 60, //
isCodeSend: false, isCodeSend: false,
verifyCode: '', // verifyCode: '', //
randomString: '', //
imgVerifyCode: '', //
imagesUrl: '', //
} }
}, },
created() {
this.getImageCode();
},
computed: { computed: {
...mapState('user', ['userInfoData']), ...mapState('user', ['userInfoData']),
...mapState('trend', ['allPairList', 'allTrendList', 'myCollectList', 'currentPair']), ...mapState('trend', ['allPairList', 'allTrendList', 'myCollectList', 'currentPair']),
@ -208,6 +222,10 @@
} }
}, },
methods: { methods: {
getImageCode() { //
this.randomString = Math.floor(Math.random() * 4000 + 1000) + new Date().getTime();
this.imagesUrl = this.common.baseURL + '/user/api/user/image/' + this.randomString;
},
chooseDealType(val) { // chooseDealType(val) { //
this.dealType = val; this.dealType = val;
if(val == 'E_I_P_T_MARKET') { if(val == 'E_I_P_T_MARKET') {
@ -322,6 +340,10 @@
this.$message.error(this.$t('请输入支付密码!')); this.$message.error(this.$t('请输入支付密码!'));
return; return;
} }
if (!this.imgVerifyCode) {
this.$message.error(this.$t('请输入图片验证码!'));
return;
}
if (!this.payPassword) { if (!this.payPassword) {
this.$message.error(this.$t('请输入验证码!')); this.$message.error(this.$t('请输入验证码!'));
return; return;
@ -338,6 +360,8 @@
triggerPrice: this.dealDirection == 'E_I_D_T_BUY' ? this.buyTriggerPrice : this.sellTriggerPrice, triggerPrice: this.dealDirection == 'E_I_D_T_BUY' ? this.buyTriggerPrice : this.sellTriggerPrice,
payPwd: this.payPassword, payPwd: this.payPassword,
noteVerifyCode: this.verifyCode, noteVerifyCode: this.verifyCode,
randomString: this.randomString,
imgVerifyCode: this.imgVerifyCode,
} }
console.log(JSON.stringify(params)) console.log(JSON.stringify(params))
@ -358,6 +382,7 @@
this.showPassword = false; this.showPassword = false;
// //
this.payPassword = ''; this.payPassword = '';
this.imgVerifyCode = '';
this.verifyCode = ''; this.verifyCode = '';
this.loading1 = false; this.loading1 = false;

79
src/views/contact/contact_us.vue

@ -0,0 +1,79 @@
<template>
<div class="wrap">
<div class="global-width">
<div class="container">
<!--当前位置-->
<div class="hc-breadcrumb" style="display: flex;justify-content: space-between;">
<span class="tansp">在线交谈</span>
<router-link class="tana" to="/contact/list">交谈记录</router-link>
</div>
<div class="conversation-box">
<!-- <div class="conli">
<label style="display: flex;justify-content: space-between;width: 3rem;margin-right: 1rem;">
<span></span><span>:</span>
</label>
<input type="text" placeholder="手动输入邮箱">
<div style="clear:both;"></div>
</div> -->
<!-- <div class="conli">
<label style="margin-right: 0.5rem;">选择问题</label>
<div class="problem">问题类型
<img src="../../assets/images/icon-dowd.png">
<ul class="proul">
<li>问题1</li>
<li>问题1</li>
<li>问题1</li>
</ul>
</div>
<div style="clear:both;"></div>
</div> -->
<div class="conli">
<label style="display: flex;justify-content: space-between;width: 3rem;margin-right: 1rem;"> 您的提问:
</label>
<textarea v-model="content" style="width: 30rem;height: 10rem;" :maxlength="255" :auto-height="true" placeholder="输入内容..."></textarea>
<div style="clear:both;"></div>
<div style="font-size: 0.7rem;padding-top: 0.8rem;text-align: right;">还能输入{{ 255 - content.length }}个字</div>
</div>
<div class="conli" style="margin: 0 auto;">
<button @click="send()">提交</button>
<div style="clear:both;"></div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'contact',
data() {
return {
content: '',
}
},
methods: {
send(){
this.postAxios('/api/feedback/post', {
comment:this.content
})
.then(() => {
this.$message.success(this.$t('提交成功,请耐心等待客服回复'));
this.content=''
})
}
}
}
</script>
<style>
.tana {
font-size: 0.7rem;
color: #5f97ff;
padding-right: 1rem;
}
.conli button {
margin-left: 2.3rem;
}
</style>

116
src/views/contact/details.vue

@ -0,0 +1,116 @@
<template>
<div class="wrap">
<div class="global-width">
<div class="container">
<!--当前位置-->
<div class="hc-breadcrumb"><span class="tansp">交谈内容</span></div>
<div class="conversation-box conversation-boxs">
<ul class="rec-ul">
<li v-if="question">
<div class="rec-q">
<img :src="userInfoData.extendData.avatar" v-if="userInfoData.extendData.avatar">
<img src="../../assets/images/user-head-img.png" v-else>
</div>
<p class="rec-p">{{ question.comment }}</p>
<p><span>{{question.createDateTime | dateFormat('YYYY-MM-DD hh:mm:ss')}}</span></p>
<!-- <img src="../../assets/images/banner-img1.png" /> -->
</li>
<div v-for="(item, index) in list" :key="index">
<li v-if="item.adminName">
<div class="rec-q"><img src="../../assets/images/user-head-img.png"></div>
<p class="rec-p">{{item.content}}</p>
<p><span>{{item.createDateTime | dateFormat('YYYY-MM-DD hh:mm:ss')}}</span></p>
<!-- <img src="../../assets/images/banner-img1.png" /> -->
</li>
<li v-else>
<div class="rec-q"><img :src="userInfoData.extendData.avatar" v-if="userInfoData.extendData.avatar">
<img src="../../assets/images/user-head-img.png" v-else></div>
<p class="rec-p">{{item.content}}</p>
<p><span>{{item.createDateTime | dateFormat('YYYY-MM-DD hh:mm:ss')}}</span></p>
<!-- <img src="../../assets/images/banner-img1.png" /> -->
</li>
</div>
</ul>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'contactDetails',
data() {
return {
// ID
commentId: '',
// ID
question: null,
//
list: [],
//
sendMsg: ''
}
},
watch: {
$route() {
this.commentId = this.$route.params.id;
this.getData()
}
},
created() {
this.commentId = this.$route.params.id;
this.getData()
},
computed: {
...mapState('user', ['isLogin', 'userInfoData', 'merchantStatus', 'merchantUnpass']),
},
methods: {
//
// send() {
// if (this.sendMsg === '') return this.$toast(this.$t(''));
// this.postAxios('/api/feedback/flow/reply', {
// feedbackId: this.commentId,
// content: this.sendMsg
// })
// .then(() => {
// this.sendMsg = '';
// this.$toast(this.$t(''));
// this.getData();
// });
// },
//
getData() {
this.getAxios('/api/feedback/list').then(res => {
res.data.forEach(item => {
if (item.id == this.commentId) this.question = item;
});
});
this.getAxios('/api/feedback/flow/' + this.commentId).then(res => {
this.list = res.data;
this.list.sort((a, b) => a.createDateTime - b.createDateTime);
});
console.log(this.question)
}
}
}
</script>
<style>
.rec-q img {
border-radius: 50px;
background: #2cbfa2;
width: 35px!important;
height: 35px;
text-align: center;
line-height: 35px;
color: #fff;
font-size: 20px;
margin-bottom: 10px!important;
}
</style>

11
src/views/contact/index.vue

@ -0,0 +1,11 @@
<template>
<div class="wrap">
<router-view></router-view>
</div>
</template>
<script>
</script>
<style>
</style>

51
src/views/contact/list.vue

@ -0,0 +1,51 @@
<template>
<div class="wrap">
<div class="global-width">
<div class="container">
<!--当前位置-->
<div class="hc-breadcrumb"><span class="tansp">交谈记录</span></div>
<div class="conversation-box conversation-boxs">
<ul class="rec-ul">
<li v-for="item in list" :key="item.id">
<router-link :to="'/contact/details/' + item.id">
<p class="rec-p">{{item.comment}}</p>
<span v-if="item.finish" style="color: #3e64fd;">已完结</span>
<span v-else-if="item.status=='禁用'" class="no-re">禁用</span>
<span v-else class="no-re">{{item.status}}</span>
<p><span>{{item.createDateTime | dateFormat('YYYY-MM-DD hh:mm:ss')}}</span></p>
</router-link>
</li>
</ul>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'contactList',
data() {
return {
list: []
}
},
methods: {
getData(){
this.getAxios('/api/feedback/list').then(res=>{
this.list=res.data
console.log(this.list)
})
}
},
created() {
this.getData()
}
}
</script>
<style>
.no-re {
color: #3e64fd!important;
}
</style>

23
src/views/currency/currency_deal.vue

@ -175,6 +175,13 @@
</el-input> </el-input>
</div> </div>
<div class="title-tips">{{$t('图形验证码')}}</div>
<div class="address-form-input" style="display: flex;justify-content: space-between;">
<el-input :placeholder="$t('请输入图形验证码')" v-model="imgVerifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submit">
</el-input>
<img class="val" :src="imagesUrl" @click="getImageCode">
</div>
<div class="title-tips">{{$t('动态验证')}}</div> <div class="title-tips">{{$t('动态验证')}}</div>
<div class="address-form-input"> <div class="address-form-input">
<el-input class="verify-input" :placeholder="$t('请输入验证码')" v-model="noteVerifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submit"> <el-input class="verify-input" :placeholder="$t('请输入验证码')" v-model="noteVerifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submit">
@ -227,6 +234,10 @@
isCodeSend: false, isCodeSend: false,
loading: false, loading: false,
loading2: false, loading2: false,
randomString: '', //
imgVerifyCode: '', //
imagesUrl: '', //
} }
}, },
computed: { computed: {
@ -244,6 +255,10 @@
} }
}, },
methods: { methods: {
getImageCode() { //
this.randomString = Math.floor(Math.random() * 4000 + 1000) + new Date().getTime();
this.imagesUrl = this.common.baseURL + '/user/api/user/image/' + this.randomString;
},
getAdsInfo() { //广 getAdsInfo() { //广
}, },
@ -326,6 +341,10 @@
this.$message.error(this.$t('请输入交易密码!')); this.$message.error(this.$t('请输入交易密码!'));
return; return;
} }
if (!this.imgVerifyCode) {
this.$message.error(this.$t('请输入图片验证码!'));
return;
}
if(!this.noteVerifyCode) { if(!this.noteVerifyCode) {
this.$message.error(this.$t('请输入短信验证码!')); this.$message.error(this.$t('请输入短信验证码!'));
return; return;
@ -338,6 +357,8 @@
count: this.dealWay ? this.dealQuantity : this.dealTotalQuantity, // count: this.dealWay ? this.dealQuantity : this.dealTotalQuantity, //
payPwd: this.password, payPwd: this.password,
noteVerifyCode: this.noteVerifyCode, noteVerifyCode: this.noteVerifyCode,
randomString: this.randomString,
imgVerifyCode: this.imgVerifyCode,
} }
let url; let url;
@ -393,9 +414,9 @@
created() { created() {
this.id = this.$route.params.id; this.id = this.$route.params.id;
this.dealInfo = this.common.getItem('data'); this.dealInfo = this.common.getItem('data');
console.log(JSON.stringify(this.dealInfo))
//this.getAdsInfo(); //this.getAdsInfo();
this.getDealerInfo(); this.getDealerInfo();
this.getImageCode();
} }
} }
</script> </script>

24
src/views/currency/currency_release.vue

@ -208,6 +208,13 @@
</el-input> </el-input>
</div> </div>
<div class="title-tips">{{$t('图形验证码')}}</div>
<div class="address-form-input" style="display: flex;justify-content: space-between;">
<el-input :placeholder="$t('请输入图形验证码')" v-model="imgVerifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submit">
</el-input>
<img class="val" :src="imagesUrl" @click="getImageCode">
</div>
<div class="title-tips">{{$t('短信验证码')}}</div> <div class="title-tips">{{$t('短信验证码')}}</div>
<div class="address-form-input"> <div class="address-form-input">
<el-input class="verify-input" :placeholder="$t('请输入短信验证码')" v-model="noteVerifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="releaseAds"> <el-input class="verify-input" :placeholder="$t('请输入短信验证码')" v-model="noteVerifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="releaseAds">
@ -268,6 +275,10 @@
isCodeSend: false, isCodeSend: false,
loading: false, loading: false,
loading2: false, loading2: false,
randomString: '', //
imgVerifyCode: '', //
imagesUrl: '', //
} }
}, },
computed: { computed: {
@ -292,6 +303,10 @@
}, },
}, },
methods: { methods: {
getImageCode() { //
this.randomString = Math.floor(Math.random() * 4000 + 1000) + new Date().getTime();
this.imagesUrl = this.common.baseURL + '/user/api/user/image/' + this.randomString;
},
getUserInfoData() { getUserInfoData() {
this.getAxios('/user/api/user/info') this.getAxios('/user/api/user/info')
.then(data => { .then(data => {
@ -467,6 +482,10 @@
this.$message.error('请输入支付密码!'); this.$message.error('请输入支付密码!');
return; return;
} }
if (!this.imgVerifyCode) {
this.$message.error(this.$t('请输入图片验证码!'));
return;
}
if(!this.noteVerifyCode) { if(!this.noteVerifyCode) {
this.$message.error('请输入短信验证码!'); this.$message.error('请输入短信验证码!');
return; return;
@ -486,7 +505,9 @@
weixinpay: this.weixinpay, weixinpay: this.weixinpay,
unionpay: this.unionpay, unionpay: this.unionpay,
payPwd: this.payPwd, payPwd: this.payPwd,
noteVerifyCode: this.noteVerifyCode
noteVerifyCode: this.noteVerifyCode,
randomString: this.randomString,
imgVerifyCode: this.imgVerifyCode,
} }
this.postAxios('/api/market/order/publish', params) this.postAxios('/api/market/order/publish', params)
@ -509,6 +530,7 @@
this.getCoinList(); this.getCoinList();
this.getUserInfoData(); this.getUserInfoData();
this.getPayment(); this.getPayment();
this.getImageCode();
} }
} }
</script> </script>

4
src/views/release/components/release_depth.vue

@ -17,7 +17,7 @@
<div class="deal-folder" :class="{'deal-folder-open': depthListType == 3}" v-if="depthListType != 2"> <div class="deal-folder" :class="{'deal-folder-open': depthListType == 3}" v-if="depthListType != 2">
<!-- 买单 --> <!-- 买单 -->
<div class="deal-list"> <div class="deal-list">
<ul v-for="(item, index) of buyDepth" :key="index">
<ul v-for="(item, index) of sellDepth" :key="index">
<li><span class="red-text">{{item.price}}</span></li> <li><span class="red-text">{{item.price}}</span></li>
<li><span>{{item.remain}}</span></li> <li><span>{{item.remain}}</span></li>
<li><span>{{item.amount}}</span></li> <li><span>{{item.amount}}</span></li>
@ -38,7 +38,7 @@
<div class="deal-folder" :class="{'deal-folder-open': depthListType == 2}" v-if="depthListType != 3"> <div class="deal-folder" :class="{'deal-folder-open': depthListType == 2}" v-if="depthListType != 3">
<!-- 卖单 --> <!-- 卖单 -->
<div class="deal-list"> <div class="deal-list">
<ul v-for="(item, index) of sellDepth" :key="index">
<ul v-for="(item, index) of buyDepth" :key="index">
<li><span class="green-text">{{item.price}}</span></li> <li><span class="green-text">{{item.price}}</span></li>
<li><span>{{item.remain}}</span></li> <li><span>{{item.remain}}</span></li>
<li><span>{{item.amount}}</span></li> <li><span>{{item.amount}}</span></li>

27
src/views/release/components/release_form.vue

@ -158,7 +158,14 @@
<el-input :placeholder="$t('请输入支付密码')" v-model="payPassword" type="password" clearable autocomplete="off" @keyup.enter.native="submitTrade"> <el-input :placeholder="$t('请输入支付密码')" v-model="payPassword" type="password" clearable autocomplete="off" @keyup.enter.native="submitTrade">
</el-input> </el-input>
</div> </div>
<div class="title-tips" v-if="dealType != 'E_I_P_T_RELEASE'">{{$t('图形验证码')}}</div>
<div class="address-form-input" style="display: flex;justify-content: space-between;" v-if="dealType != 'E_I_P_T_RELEASE'">
<el-input :placeholder="$t('请输入图形验证码')" v-model="imgVerifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submit">
</el-input>
<img class="val" :src="imagesUrl" @click="getImageCode">
</div>
<div class="title-tips">{{$t('动态验证')}}</div> <div class="title-tips">{{$t('动态验证')}}</div>
<div class="address-form-input"> <div class="address-form-input">
<el-input class="verify-input" :placeholder="$t('请输入验证码')" v-model="verifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submitTrade"> <el-input class="verify-input" :placeholder="$t('请输入验证码')" v-model="verifyCode" type="text" clearable autocomplete="off" @keyup.enter.native="submitTrade">
@ -218,6 +225,10 @@
todayAmount: 0, todayAmount: 0,
unblockAmount: 0, unblockAmount: 0,
yesterdayAmount: 0, yesterdayAmount: 0,
randomString: '', //
imgVerifyCode: '', //
imagesUrl: '', //
} }
}, },
computed: { computed: {
@ -262,9 +273,13 @@
} }
}, },
methods: { methods: {
getImageCode() { //
this.randomString = Math.floor(Math.random() * 4000 + 1000) + new Date().getTime();
this.imagesUrl = this.common.baseURL + '/user/api/user/image/' + this.randomString;
},
// //
getDeblockInfo() { getDeblockInfo() {
this.$http.get(`/api/unblock/lock/up/info/${this.ws.dealCoin}-${this.ws.convertType}`).then(res => {
this.getAxios(`/api/unblock/lock/up/info/${this.currentPair.dealCoin}-${this.currentPair.convertType}`).then(res => {
this.enableSellAmount = res.enableSellAmount this.enableSellAmount = res.enableSellAmount
this.todayAmount = res.todayAmount this.todayAmount = res.todayAmount
this.unblockAmount = res.unblockAmount this.unblockAmount = res.unblockAmount
@ -403,6 +418,10 @@
this.$message.error(this.$t('请输入支付密码!')); this.$message.error(this.$t('请输入支付密码!'));
return; return;
} }
if (!this.imgVerifyCode) {
this.$message.error(this.$t('请输入图片验证码!'));
return;
}
if (!this.payPassword) { if (!this.payPassword) {
this.$message.error(this.$t('请输入验证码!')); this.$message.error(this.$t('请输入验证码!'));
return; return;
@ -420,6 +439,8 @@
triggerPrice: this.dealDirection == 'E_I_D_T_BUY' ? this.buyTriggerPrice : this.sellTriggerPrice, triggerPrice: this.dealDirection == 'E_I_D_T_BUY' ? this.buyTriggerPrice : this.sellTriggerPrice,
payPwd: this.payPassword, payPwd: this.payPassword,
noteVerifyCode: this.verifyCode, noteVerifyCode: this.verifyCode,
randomString: this.randomString,
imgVerifyCode: this.imgVerifyCode,
} }
this.postAxios('/api/entrust/info/putup', params) this.postAxios('/api/entrust/info/putup', params)
@ -457,6 +478,7 @@
// //
this.payPassword = ''; this.payPassword = '';
this.verifyCode = ''; this.verifyCode = '';
this.verifyCode = '';
this.loading1 = false; this.loading1 = false;
this.loading2 = false; this.loading2 = false;
@ -503,6 +525,7 @@
}, },
created() { created() {
this.getDeblockInfo() this.getDeblockInfo()
this.getImageCode();
} }
} }
</script> </script>

Loading…
Cancel
Save